From page 93 (page 110 of the PDF) of the GL 4.2 (Core Profile) spec:
" 2.11.7 Uniform Variables
...
Uniform Blocks
...
When a named uniform block is declared by multiple shaders in a
program, it must be declared identically in each shader. The
uniforms within the block must be declared with the same names and
types, and in the same order. If a program contains multiple
shaders with different declarations for the same named uniform
block differs between shader, the program will fail to link."
From page 129 (page 150 of the PDF) of the GL 4.3 (Core Profile) spec:
" 7.8 Shader Buffer Variables and Shader Storage Blocks
...
When a named shader storage block is declared by multiple shaders
in a program, it must be declared identically in each shader. The
buffer variables within the block must be declared with the same
names, types, qualification, and declaration order. If a program
contains multiple shaders with different declarations for the same
named shader storage block, the program will fail to link."
From page 60 (page 66 of the PDF) of the GLSL 4.20 spec, v11:
" A link error will result if two compilation units in a program
specify different integer-constant bindings for the same
opaque-uniform name. However, it is not an error to specify a
binding on some but not all declarations for the same name, as
shown in the examples below."
This patch series adds tests to check that a link error is expected
when specifying different binding points for matching Uniform Blocks,
Shader Storage Blocks or Opaque-Uniforms across multiple compilation
units.
Andres Gomez (2):
arb_shading_language_420pack: check different binding points
arb_shader_atomic_counters: check different binding points
.../different-bindings-atomic-counter.shader_test | 51 ++++++++++++++++
.../linker/different-bindings-image2D.shader_test | 57 ++++++++++++++++++
.../different-bindings-sampler2D.shader_test | 53 +++++++++++++++++
...ngs-shader-storage-blocks-instanced.shader_test | 66 +++++++++++++++++++++
...rent-bindings-shader-storage-blocks.shader_test | 66 +++++++++++++++++++++
...t-bindings-uniform-blocks-instanced.shader_test | 69 ++++++++++++++++++++++
.../different-bindings-uniform-blocks.shader_test | 69 ++++++++++++++++++++++
7 files changed, 431 insertions(+)
create mode 100644
tests/spec/arb_shader_atomic_counters/linker/different-bindings-atomic-counter.shader_test
create mode 100644
tests/spec/arb_shading_language_420pack/linker/different-bindings-image2D.shader_test
create mode 100644
tests/spec/arb_shading_language_420pack/linker/different-bindings-sampler2D.shader_test
create mode 100644
tests/spec/arb_shading_language_420pack/linker/different-bindings-shader-storage-blocks-instanced.shader_test
create mode 100644
tests/spec/arb_shading_language_420pack/linker/different-bindings-shader-storage-blocks.shader_test
create mode 100644
tests/spec/arb_shading_language_420pack/linker/different-bindings-uniform-blocks-instanced.shader_test
create mode 100644
tests/spec/arb_shading_language_420pack/linker/different-bindings-uniform-blocks.shader_test
--
2.11.0
_______________________________________________
Piglit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/piglit