Commit feb2c63b by Jiajia Qin Committed by Commit Bot

ES31: Fixed the SSBO instance array error

In ESSL 3.10 spec, there are below descriptions: 1. Any uniform or shader storage block declared without a binding qualifier is initially assigned to block binding point zero. 2. If the binding qualifier is used with a uniform block or shader storage block instanced as an array, the first element of the array takes the specified block binding and each subsequent element takes the next consecutive binding point. So explicitly specifying the binding to zero is different with not declaring a binding qualifier for a block instance array. For example: 1) layout(shared, binding = 0) buffer blockName { uint data; } instanceName[3]; 2) layout(shared) buffer blockName { uint data; } instanceName[3]; In 1), the binding point of each element instance is 0, 1, 2. In 2), the binding point of each element instance is 0, 0, 0. BUG=angleproject:1951 TEST=dEQP-GLES31.functional.ssbo.layout.* Change-Id: If770d6e1fd8e13d2cdc762bab289772076258e4c Reviewed-on: https://chromium-review.googlesource.com/816340Reviewed-by: 's avatarOlli Etuaho <oetuaho@nvidia.com> Reviewed-by: 's avatarCorentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
parent 629a6449
......@@ -1221,7 +1221,7 @@ void TOutputGLSLBase::declareInterfaceBlockLayout(const TInterfaceBlock *interfa
break;
}
if (interfaceBlock->blockBinding() > 0)
if (interfaceBlock->blockBinding() >= 0)
{
out << ", ";
out << "binding = " << interfaceBlock->blockBinding();
......
......@@ -936,10 +936,6 @@ void InterfaceBlockLinker::defineInterfaceBlock(const GetBlockSize &getBlockSize
blockIndexes.push_back(static_cast<unsigned int>(blockMemberIndex));
}
// ESSL 3.10 section 4.4.4 page 58:
// Any uniform or shader storage block declared without a binding qualifier is initially
// assigned to block binding point zero.
int blockBinding = (interfaceBlock.binding == -1 ? 0 : interfaceBlock.binding);
for (unsigned int arrayElement = 0; arrayElement < interfaceBlock.elementCount();
++arrayElement)
{
......@@ -957,8 +953,13 @@ void InterfaceBlockLinker::defineInterfaceBlock(const GetBlockSize &getBlockSize
continue;
}
// ESSL 3.10 section 4.4.4 page 58:
// Any uniform or shader storage block declared without a binding qualifier is initially
// assigned to block binding point zero.
int blockBinding =
(interfaceBlock.binding == -1 ? 0 : interfaceBlock.binding + arrayElement);
InterfaceBlock block(interfaceBlock.name, interfaceBlock.mappedName,
interfaceBlock.isArray(), arrayElement, blockBinding + arrayElement);
interfaceBlock.isArray(), arrayElement, blockBinding);
block.memberIndexes = blockIndexes;
block.setStaticUse(shaderType, interfaceBlock.staticUse);
......
......@@ -549,50 +549,11 @@
1442 OPENGL : dEQP-GLES31.functional.program_interface_query.uniform_block.resource_list.block_array = FAIL
1442 OPENGL : dEQP-GLES31.functional.program_interface_query.uniform_block.resource_list.block_array_single_element = FAIL
1442 OPENGL : dEQP-GLES31.functional.program_interface_query.uniform_block.referenced_by.* = FAIL
1729 OPENGL : dEQP-GLES31.functional.ssbo.layout.2_level_unsized* = FAIL
1729 OPENGL : dEQP-GLES31.functional.ssbo.layout.single_struct.per_block_buffer.shared_instance_array = FAIL
1729 OPENGL : dEQP-GLES31.functional.ssbo.layout.single_struct.per_block_buffer.packed_instance_array = FAIL
1729 OPENGL : dEQP-GLES31.functional.ssbo.layout.single_struct.per_block_buffer.std140_instance_array = FAIL
1729 OPENGL : dEQP-GLES31.functional.ssbo.layout.single_struct.per_block_buffer.std430_instance_array = FAIL
1729 OPENGL : dEQP-GLES31.functional.ssbo.layout.single_struct.single_buffer.* = FAIL
1729 OPENGL : dEQP-GLES31.functional.ssbo.layout.single_struct_array.single_buffer.* = FAIL
1729 OPENGL : dEQP-GLES31.functional.ssbo.layout.single_nested_struct.single_buffer.* = FAIL
1729 OPENGL : dEQP-GLES31.functional.ssbo.layout.single_struct_array.per_block_buffer.shared_instance_array = FAIL
1729 OPENGL : dEQP-GLES31.functional.ssbo.layout.single_struct_array.per_block_buffer.packed_instance_array = FAIL
1729 OPENGL : dEQP-GLES31.functional.ssbo.layout.single_struct_array.per_block_buffer.std140_instance_array = FAIL
1729 OPENGL : dEQP-GLES31.functional.ssbo.layout.single_struct_array.per_block_buffer.std430_instance_array = FAIL
1729 OPENGL : dEQP-GLES31.functional.ssbo.layout.single_nested_struct.per_block_buffer.shared_instance_array = FAIL
1729 OPENGL : dEQP-GLES31.functional.ssbo.layout.single_nested_struct.per_block_buffer.packed_instance_array = FAIL
1729 OPENGL : dEQP-GLES31.functional.ssbo.layout.single_nested_struct.per_block_buffer.std140_instance_array = FAIL
1729 OPENGL : dEQP-GLES31.functional.ssbo.layout.single_nested_struct.per_block_buffer.std430_instance_array = FAIL
1729 OPENGL : dEQP-GLES31.functional.ssbo.layout.single_nested_struct_array.single_buffer.* = FAIL
1729 OPENGL : dEQP-GLES31.functional.ssbo.layout.single_nested_struct_array.per_block_buffer.shared_instance_array = FAIL
1729 OPENGL : dEQP-GLES31.functional.ssbo.layout.single_nested_struct_array.per_block_buffer.packed_instance_array = FAIL
1729 OPENGL : dEQP-GLES31.functional.ssbo.layout.single_nested_struct_array.per_block_buffer.std140_instance_array = FAIL
1729 OPENGL : dEQP-GLES31.functional.ssbo.layout.single_nested_struct_array.per_block_buffer.std430_instance_array = FAIL
1729 OPENGL : dEQP-GLES31.functional.ssbo.layout.unsized* = FAIL
1729 OPENGL : dEQP-GLES31.functional.ssbo.layout.instance* = FAIL
1729 OPENGL : dEQP-GLES31.functional.ssbo.layout.multi_basic_types.per_block_buffer.shared_instance_array = FAIL
1729 OPENGL : dEQP-GLES31.functional.ssbo.layout.multi_basic_types.per_block_buffer.packed_instance_array = FAIL
1729 OPENGL : dEQP-GLES31.functional.ssbo.layout.multi_basic_types.per_block_buffer.std140_instance_array = FAIL
1729 OPENGL : dEQP-GLES31.functional.ssbo.layout.multi_basic_types.per_block_buffer.std430_instance_array = FAIL
1729 OPENGL : dEQP-GLES31.functional.ssbo.layout.multi_basic_types.single_buffer.shared_instance_array = FAIL
1729 OPENGL : dEQP-GLES31.functional.ssbo.layout.multi_basic_types.single_buffer.packed_instance_array = FAIL
1729 OPENGL : dEQP-GLES31.functional.ssbo.layout.multi_basic_types.single_buffer.std140_instance_array = FAIL
1729 OPENGL : dEQP-GLES31.functional.ssbo.layout.multi_basic_types.single_buffer.std430_instance_array = FAIL
1729 OPENGL : dEQP-GLES31.functional.ssbo.layout.multi_nested_struct.per_block_buffer.shared_instance_array = FAIL
1729 OPENGL : dEQP-GLES31.functional.ssbo.layout.multi_nested_struct.per_block_buffer.packed_instance_array = FAIL
1729 OPENGL : dEQP-GLES31.functional.ssbo.layout.multi_nested_struct.per_block_buffer.std140_instance_array = FAIL
1729 OPENGL : dEQP-GLES31.functional.ssbo.layout.multi_nested_struct.per_block_buffer.std430_instance_array = FAIL
1729 OPENGL : dEQP-GLES31.functional.ssbo.layout.multi_nested_struct.single_buffer.shared_instance_array = FAIL
1729 OPENGL : dEQP-GLES31.functional.ssbo.layout.multi_nested_struct.single_buffer.packed_instance_array = FAIL
1729 OPENGL : dEQP-GLES31.functional.ssbo.layout.multi_nested_struct.single_buffer.std140_instance_array = FAIL
1729 OPENGL : dEQP-GLES31.functional.ssbo.layout.multi_nested_struct.single_buffer.std430_instance_array = FAIL
1729 OPENGL : dEQP-GLES31.functional.ssbo.layout.random.basic_instance_arrays* = FAIL
1729 OPENGL : dEQP-GLES31.functional.ssbo.layout.random.nested_structs* = FAIL
1729 OPENGL : dEQP-GLES31.functional.ssbo.layout.random.all* = FAIL
2272 WIN NVIDIA OPENGL : dEQP-GLES31.functional.ssbo.layout.2_level_unsized* = FAIL
2272 WIN NVIDIA OPENGL : dEQP-GLES31.functional.ssbo.layout.3_level_unsized* = FAIL
2272 WIN NVIDIA OPENGL : dEQP-GLES31.functional.ssbo.layout.random.arrays_of_arrays* = FAIL
2272 WIN NVIDIA OPENGL : dEQP-GLES31.functional.ssbo.layout.random.nested_structs* = FAIL
2272 WIN NVIDIA OPENGL : dEQP-GLES31.functional.ssbo.layout.random.all* = FAIL
// OpenGL and D3D11 Failing Tests
1663 OPENGL D3D11 : dEQP-GLES31.functional.draw_indirect.compute_interop.* = FAIL
......@@ -1242,21 +1203,6 @@
1442 OPENGL D3D11 : dEQP-GLES31.functional.compute.basic.image_barrier_single = FAIL
1442 OPENGL D3D11 : dEQP-GLES31.functional.compute.basic.image_barrier_multiple = FAIL
1442 OPENGL D3D11 : dEQP-GLES31.functional.compute.indirect_dispatch.* = FAIL
1442 OPENGL D3D11 : dEQP-GLES31.functional.ubo.random.basic_type_arrays.4 = FAIL
1442 OPENGL D3D11 : dEQP-GLES31.functional.ubo.random.basic_type_arrays.10 = FAIL
1442 OPENGL D3D11 : dEQP-GLES31.functional.ubo.random.all_per_block_buffers.1 = FAIL
1442 OPENGL D3D11 : dEQP-GLES31.functional.ubo.random.all_per_block_buffers.7 = FAIL
1442 OPENGL D3D11 : dEQP-GLES31.functional.ubo.random.all_per_block_buffers.10 = FAIL
1442 OPENGL D3D11 : dEQP-GLES31.functional.ubo.random.all_per_block_buffers.13 = FAIL
1442 OPENGL D3D11 : dEQP-GLES31.functional.ubo.random.all_per_block_buffers.18 = FAIL
1442 OPENGL D3D11 : dEQP-GLES31.functional.ubo.random.all_per_block_buffers.20 = FAIL
1442 OPENGL D3D11 : dEQP-GLES31.functional.ubo.random.all_per_block_buffers.29 = FAIL
1442 OPENGL D3D11 : dEQP-GLES31.functional.ubo.random.all_per_block_buffers.41 = FAIL
1442 OPENGL D3D11 : dEQP-GLES31.functional.ubo.random.all_shared_buffer.1 = FAIL
1442 OPENGL D3D11 : dEQP-GLES31.functional.ubo.random.all_shared_buffer.8 = FAIL
1442 OPENGL D3D11 : dEQP-GLES31.functional.ubo.random.all_shared_buffer.22 = FAIL
1442 OPENGL D3D11 : dEQP-GLES31.functional.ubo.random.all_shared_buffer.37 = FAIL
1442 OPENGL D3D11 : dEQP-GLES31.functional.ubo.random.all_shared_buffer.38 = FAIL
1442 OPENGL D3D11 : dEQP-GLES31.functional.stencil_texturing.format.depth32f_stencil8_2d = FAIL
1442 OPENGL D3D11 : dEQP-GLES31.functional.stencil_texturing.format.depth32f_stencil8_2d_array = FAIL
1442 OPENGL D3D11 : dEQP-GLES31.functional.stencil_texturing.format.depth32f_stencil8_cube = FAIL
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment