[Piglit] [PATCH 2/2] unittests: fix tests that check for tesselation
This is a test fix for the practical fix in e8fbd270b35b1bb927acc34383cbf9db95863a26. Signed-off-by: Dylan Baker --- unittests/generators/test_glsl.py | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/unittests/generators/test_glsl.py b/unittests/generators/test_glsl.py index 66e3f66e1..5eec79484 100644 --- a/unittests/generators/test_glsl.py +++ b/unittests/generators/test_glsl.py @@ -300,18 +300,18 @@ class TestMinVersion_for_stage_with_ext(object): TCS (OpenGL)""" self._test('tesc', glsl.Version('410'), (glsl.Version('410'), None)) self._test('tesc', glsl.Version('140'), - (glsl.Version('140'), 'GL_ARB_tesselation_shader')) + (glsl.Version('140'), 'GL_ARB_tessellation_shader')) self._test('tesc', glsl.Version('110'), - (glsl.Version('140'), 'GL_ARB_tesselation_shader')) + (glsl.Version('140'), 'GL_ARB_tessellation_shader')) def test_opengl_tese(self): """generated_tests.modules.glsl.MinVersion.for_stage_with_ext: TES (OpenGL)""" self._test('tese', glsl.Version('410'), (glsl.Version('410'), None)) self._test('tese', glsl.Version('140'), - (glsl.Version('140'), 'GL_ARB_tesselation_shader')) + (glsl.Version('140'), 'GL_ARB_tessellation_shader')) self._test('tese', glsl.Version('110'), - (glsl.Version('140'), 'GL_ARB_tesselation_shader')) + (glsl.Version('140'), 'GL_ARB_tessellation_shader')) def test_opengl_comp(self): """generated_tests.modules.glsl.MinVersion.for_stage_with_ext: @@ -352,9 +352,9 @@ class TestMinVersion_for_stage_with_ext(object): self._test('tesc', glsl.Version('320 es'), (glsl.Version('320 es'), None)) self._test('tesc', glsl.Version('310 es'), - (glsl.Version('310 es'), 'GL_OES_tesselation_shader')) + (glsl.Version('310 es'), 'GL_OES_tessellation_shader')) self._test('tesc', glsl.Version('100'), - (glsl.Version('310 es'), 'GL_OES_tesselation_shader')) + (glsl.Version('310 es'), 'GL_OES_tessellation_shader')) def test_opengles_tese(self): """generated_tests.modules.glsl.MinVersion.for_stage_with_ext: @@ -362,9 +362,9 @@ class TestMinVersion_for_stage_with_ext(object): self._test('tese', glsl.Version('320 es'), (glsl.Version('320 es'), None)) self._test('tese', glsl.Version('310 es'), - (glsl.Version('310 es'), 'GL_OES_tesselation_shader')) + (glsl.Version('310 es'), 'GL_OES_tessellation_shader')) self._test('tese', glsl.Version('100'), - (glsl.Version('310 es'), 'GL_OES_tesselation_shader')) + (glsl.Version('310 es'), 'GL_OES_tessellation_shader')) def test_opengles_comp(self): """generated_tests.modules.glsl.MinVersion.for_stage_with_ext: -- 2.11.1 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH 1/2] unittests: Fix rename of gen_conversion -> gen_conversion_fp64
Signed-off-by: Dylan Baker --- unittests/generators/test_generators.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unittests/generators/test_generators.py b/unittests/generators/test_generators.py index a3ea3e29e..5a129292e 100644 --- a/unittests/generators/test_generators.py +++ b/unittests/generators/test_generators.py @@ -48,7 +48,7 @@ import pytest 'gen_cl_store_tests', 'gen_const_builtin_equal_tests', 'gen_constant_array_size_tests_fp64', -'gen_conversion_fp64', +'gen_conversion', 'gen_extensions_defined', 'gen_flat_interpolation_qualifier', 'gen_inout_fp64', -- 2.11.1 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH] builtin_functions: Add more 64-bit integers
Seriously, 1000 is not the only 64-bit integer. We should test a few more of them. These new integers trigger a bug in the GLSL IR int64 lowering code. Cc: Ian Romanick --- generated_tests/builtin_function.py | 24 ++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/generated_tests/builtin_function.py b/generated_tests/builtin_function.py index 663d9d8..a5eafb2 100644 --- a/generated_tests/builtin_function.py +++ b/generated_tests/builtin_function.py @@ -1309,8 +1309,28 @@ def _make_vector_or_matrix_test_vectors(test_suite_dict): [ 0.14, 0.18, -0.56], [ 0.40, -0.77, 1.76]]), # mat3x4 ] -int64s = [np.int64(x) for x in [0, -1000, 1000]] -uint64s = [np.uint64(x) for x in [0, 10, 1000]] + +int64s = [np.int64(x) for x in [ + 0, + 3, + -1192, + 1048576, + 4251475, + 29852643761, + -4398046511104, + -3948976685146, + -135763469567146206]] +uint64s = [np.uint64(x) for x in [ + 0, + 3, + 1192, + 1048576, + 4251475, + 29852643761, + 4398046511104, + 3948976685146, + 135763469567146206, + 11654173250180970009]] int64vecs = [ np.array([-10, -12], dtype=np.int64), -- 2.5.0.400.gff86faf ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH v2 2/2] generated_tests: Fix require_extensions for constant_array_size
Tested-by: Jason Ekstrand On Thu, Feb 23, 2017 at 4:29 PM, Dylan Baker wrote: > The extension requires a GL_ prefix, which the template didn't have. > > v2: - Actually fix things > > Signed-off-by: Dylan Baker > --- > generated_tests/gen_constant_array_size_tests.py | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/generated_tests/gen_constant_array_size_tests.py > b/generated_tests/gen_constant_array_size_tests.py > index 9c1a9a882..7c87d98da 100644 > --- a/generated_tests/gen_constant_array_size_tests.py > +++ b/generated_tests/gen_constant_array_size_tests.py > @@ -191,8 +191,8 @@ class ParserTest(object): > float(self.glsl_version()) / 100) > req_extensions = list(self.additional_extensions()) > if req_extensions: > -parser_test += ' * require_extensions: {0}\n'.format( > -' '.join(req_extensions)) > +parser_test += ' * require_extensions: {}\n'.format( > +' '.join('GL_{}'.format(r) for r in req_extensions)) > parser_test += ' * [end config]\n' > parser_test += ' *\n' > parser_test += ' * Check that the following test vectors are > constant'\ > -- > 2.11.1 > > ___ > Piglit mailing list > Piglit@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/piglit > ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH v2 2/2] generated_tests: Fix require_extensions for constant_array_size
The extension requires a GL_ prefix, which the template didn't have. v2: - Actually fix things Signed-off-by: Dylan Baker --- generated_tests/gen_constant_array_size_tests.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generated_tests/gen_constant_array_size_tests.py b/generated_tests/gen_constant_array_size_tests.py index 9c1a9a882..7c87d98da 100644 --- a/generated_tests/gen_constant_array_size_tests.py +++ b/generated_tests/gen_constant_array_size_tests.py @@ -191,8 +191,8 @@ class ParserTest(object): float(self.glsl_version()) / 100) req_extensions = list(self.additional_extensions()) if req_extensions: -parser_test += ' * require_extensions: {0}\n'.format( -' '.join(req_extensions)) +parser_test += ' * require_extensions: {}\n'.format( +' '.join('GL_{}'.format(r) for r in req_extensions)) parser_test += ' * [end config]\n' parser_test += ' *\n' parser_test += ' * Check that the following test vectors are constant'\ -- 2.11.1 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH v2 1/2] generated_tests: fix tessellation -> tesselation typo
This typo causes some tests to be skipped that shouldn't. Signed-off-by: Dylan Baker --- generated_tests/modules/glsl.py | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/generated_tests/modules/glsl.py b/generated_tests/modules/glsl.py index f42bec437..18b34a992 100644 --- a/generated_tests/modules/glsl.py +++ b/generated_tests/modules/glsl.py @@ -234,8 +234,8 @@ class _MinVersion(object): __gl_stage_min_ext = { # geometry_shader4 is not included here intentionally. It is # significantly different than the geometry shaders in OpenGL 3.2 -'tesc': (Version('140'), 'GL_ARB_tesselation_shader'), -'tese': (Version('140'), 'GL_ARB_tesselation_shader'), +'tesc': (Version('140'), 'GL_ARB_tessellation_shader'), +'tese': (Version('140'), 'GL_ARB_tessellation_shader'), 'comp': (Version('140'), 'GL_ARB_compute_shader'), } __gles_stage_min = { @@ -250,8 +250,8 @@ class _MinVersion(object): # values from __gles_stage_min if they're not here __gles_stage_min_ext = { 'geom': (Version('310 es'), 'GL_OES_geometry_shader'), -'tesc': (Version('310 es'), 'GL_OES_tesselation_shader'), -'tese': (Version('310 es'), 'GL_OES_tesselation_shader'), +'tesc': (Version('310 es'), 'GL_OES_tessellation_shader'), +'tese': (Version('310 es'), 'GL_OES_tessellation_shader'), } def for_stage(self, stage, version): @@ -260,7 +260,7 @@ class _MinVersion(object): When provided a stage and a version, it will return the greater of the provided version and the minimum version of that stage without an extension. For example, in OpenGL teselation is available in GLSL -4.00+, or in 1.40+ with ARB_tesselation_shader. Given Version('150') +4.00+, or in 1.40+ with ARB_tessellation_shader. Given Version('150') and 'tesc' this method returns Version('400'). Arguments: @@ -291,8 +291,8 @@ class _MinVersion(object): provided version and the minimum version of that stage with an extension, and if necissary the extension as a string. For example, in OpenGL teselation is available in GLSL 4.00+, or in 1.40+ with -ARB_tesselation_shader. Given Version('150') and 'tesc' this method -returns (Version('150'), 'GL_ARB_tesselation_shader'); but given +ARB_tessellation_shader. Given Version('150') and 'tesc' this method +returns (Version('150'), 'GL_ARB_tessellation_shader'); but given Version('400') and 'tesc' it returns (Version('400'), None) If there is no extension (like with fragment and vertex) then None will -- 2.11.1 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH 1/2] generated_tests: fix tessellation -> tesselation typo
This typo causes some tests to be skipped that shouldn't. Signed-off-by: Dylan Baker --- generated_tests/modules/glsl.py | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/generated_tests/modules/glsl.py b/generated_tests/modules/glsl.py index f42bec437..18b34a992 100644 --- a/generated_tests/modules/glsl.py +++ b/generated_tests/modules/glsl.py @@ -234,8 +234,8 @@ class _MinVersion(object): __gl_stage_min_ext = { # geometry_shader4 is not included here intentionally. It is # significantly different than the geometry shaders in OpenGL 3.2 -'tesc': (Version('140'), 'GL_ARB_tesselation_shader'), -'tese': (Version('140'), 'GL_ARB_tesselation_shader'), +'tesc': (Version('140'), 'GL_ARB_tessellation_shader'), +'tese': (Version('140'), 'GL_ARB_tessellation_shader'), 'comp': (Version('140'), 'GL_ARB_compute_shader'), } __gles_stage_min = { @@ -250,8 +250,8 @@ class _MinVersion(object): # values from __gles_stage_min if they're not here __gles_stage_min_ext = { 'geom': (Version('310 es'), 'GL_OES_geometry_shader'), -'tesc': (Version('310 es'), 'GL_OES_tesselation_shader'), -'tese': (Version('310 es'), 'GL_OES_tesselation_shader'), +'tesc': (Version('310 es'), 'GL_OES_tessellation_shader'), +'tese': (Version('310 es'), 'GL_OES_tessellation_shader'), } def for_stage(self, stage, version): @@ -260,7 +260,7 @@ class _MinVersion(object): When provided a stage and a version, it will return the greater of the provided version and the minimum version of that stage without an extension. For example, in OpenGL teselation is available in GLSL -4.00+, or in 1.40+ with ARB_tesselation_shader. Given Version('150') +4.00+, or in 1.40+ with ARB_tessellation_shader. Given Version('150') and 'tesc' this method returns Version('400'). Arguments: @@ -291,8 +291,8 @@ class _MinVersion(object): provided version and the minimum version of that stage with an extension, and if necissary the extension as a string. For example, in OpenGL teselation is available in GLSL 4.00+, or in 1.40+ with -ARB_tesselation_shader. Given Version('150') and 'tesc' this method -returns (Version('150'), 'GL_ARB_tesselation_shader'); but given +ARB_tessellation_shader. Given Version('150') and 'tesc' this method +returns (Version('150'), 'GL_ARB_tessellation_shader'); but given Version('400') and 'tesc' it returns (Version('400'), None) If there is no extension (like with fragment and vertex) then None will -- 2.11.1 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH 2/2] generated_tests: Fix require_extensions for constant_array_size
The extension requires a GL_ prefix, which the template didn't have. Signed-off-by: Dylan Baker cc: Jason Ekstrand --- generated_tests/gen_constant_array_size_tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generated_tests/gen_constant_array_size_tests.py b/generated_tests/gen_constant_array_size_tests.py index 9c1a9a882..f64fe1807 100644 --- a/generated_tests/gen_constant_array_size_tests.py +++ b/generated_tests/gen_constant_array_size_tests.py @@ -191,7 +191,7 @@ class ParserTest(object): float(self.glsl_version()) / 100) req_extensions = list(self.additional_extensions()) if req_extensions: -parser_test += ' * require_extensions: {0}\n'.format( +parser_test += ' * require_extensions: {}\n'.format( ' '.join(req_extensions)) parser_test += ' * [end config]\n' parser_test += ' *\n' -- 2.11.1 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH 1/2] arb_gpu_shader_fp64: fix vs-double-uniform-array-direct-indirect
On Tue, Feb 14, 2017 at 2:20 AM, Samuel Iglesias Gonsálvez wrote: > It was setting a wrong value in arg0. > > Signed-off-by: Samuel Iglesias Gonsálvez > --- > .../uniform_buffers/vs-double-uniform-array-direct-indirect.shader_test | 2 > +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git > a/tests/spec/arb_gpu_shader_fp64/uniform_buffers/vs-double-uniform-array-direct-indirect.shader_test > > b/tests/spec/arb_gpu_shader_fp64/uniform_buffers/vs-double-uniform-array-direct-indirect.shader_test > index 57873fae2..bc4702b4a 100644 > --- > a/tests/spec/arb_gpu_shader_fp64/uniform_buffers/vs-double-uniform-array-direct-indirect.shader_test > +++ > b/tests/spec/arb_gpu_shader_fp64/uniform_buffers/vs-double-uniform-array-direct-indirect.shader_test > @@ -37,7 +37,7 @@ void main() > clear color 0.0 0.0 0.0 0.0 > > clear > -uniform double arg0 0.25 > +uniform double arg0 0.0 > uniform double tolerance 0.0 > uniform dvec4 expected 0.4 0.4 0.4 0.4 > uniform double arg[0] 0.1 > -- > 2.11.0 > > ___ > Piglit mailing list > Piglit@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/piglit Reviewed-by: Anuj Phogat ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH v2 0/2] check different binding points with UBOs, SSBOs and Opaque-Uniforms
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 Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH 2/2] arb_shader_atomic_counters: check different binding points
This adds a test to check that a link error is expected when specifying different binding points among compilation units for atomic counters with the same name. From the ARB_shader_atomic_counters spec: " It is legal for some shaders to provide a layout qualifier for a uniform variable of the same name, while another shader does not provide a layout qualifier for a uniform variable of the same name, but if provided, all provided layout qualifiers must be equal for a uniform variable of the same name, and if not provided, all implicitly provided layout qualifiers must be equal for a uniform variable of the same name." v2: Added GL minimum version restriction. Signed-off-by: Andres Gomez Cc: Francisco Jerez Cc: Ian Romanick --- .../different-bindings-atomic-counter.shader_test | 51 ++ 1 file changed, 51 insertions(+) create mode 100644 tests/spec/arb_shader_atomic_counters/linker/different-bindings-atomic-counter.shader_test diff --git a/tests/spec/arb_shader_atomic_counters/linker/different-bindings-atomic-counter.shader_test b/tests/spec/arb_shader_atomic_counters/linker/different-bindings-atomic-counter.shader_test new file mode 100644 index 0..b331650cc --- /dev/null +++ b/tests/spec/arb_shader_atomic_counters/linker/different-bindings-atomic-counter.shader_test @@ -0,0 +1,51 @@ +/* The ARB_shader_atomic_counters says: + * + * "It is legal for some shaders to provide a layout qualifier for + * a uniform variable of the same name, while another shader does + * not provide a layout qualifier for a uniform variable of the + * same name, but if provided, all provided layout qualifiers + * must be equal for a uniform variable of the same name, and if + * not provided, all implicitly provided layout qualifiers must + * be equal for a uniform variable of the same name." + * + * Verify that a link error happens when using different binding + * points for an atomic counter with the same name in different + * compilation units. + */ + +[require] +GL >= 3.00 +GLSL >= 1.40 +GL_ARB_shader_atomic_counters + +[vertex shader] +#version 140 +#extension GL_ARB_shader_atomic_counters: require + +layout (binding = 0) uniform atomic_uint x; + +in vec4 piglit_vertex; +out vec4 vs_fs; + +void main() +{ + vs_fs = vec4(atomicCounter(x)); + gl_Position = piglit_vertex; +} + +[fragment shader] +#version 140 +#extension GL_ARB_shader_atomic_counters: require + +layout (binding = 1) uniform atomic_uint x; + +in vec4 vs_fs; +out vec4 fs_out; + +void main() +{ + fs_out = vs_fs * atomicCounter(x); +} + +[test] +link error -- 2.11.0 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH 1/2] arb_shading_language_420pack: check different binding points
This 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. 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." Although these restrictions are not included in the ARB_shading_language_420pack spec, it is reasonable to believe that it applies to it too. v2: - Added GL minimum version restrictions. - Corrected GLSL minimum version restrictions. - Corrected the outcome and documentation for the linking failures on UBOs and SSBOs. - Added tests for UBOs and SSBOs without instance names. Signed-off-by: Andres Gomez Cc: Matt Turner Cc: Ian Romanick --- .../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 ++ 6 files changed, 380 insertions(+) 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 diff --git a/tests/spec/arb_shading_language_420pack/linker/different-bindings-image2D.shader_test b/tests/spec/arb_shading_language_420pack/linker/different-bindings-image2D.shader_test new file mode 100644 index 0..27ccda57b --- /dev/null +++ b/tests/spec/arb_shading_language_420pack/linker/different-bindings-image2D.shader_test @@ -0,0 +1,57 @@ +/* The GLSL 4.20 spec, v11, says: + * + * "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." + * + * Although this restriction is not included in the + * ARB_shading_language_420pack spec, it is reasonable to believe that + * it applies to it too. + * + * Verify that a link error happens when using different binding + * points for an opaque type (image2D) with the same name in + * different compilation units. + */ + +[require] +GL >= 3.00 +GLSL >= 1.30 +GL_ARB_shading_language_420pack +GL_ARB_shader_image_load_store + +[vertex shader] +#version 130 +#extension GL_ARB_shading_language_420pack: require +#extension GL_ARB_shader_image_load_store: require + +layout (rgba8, binding = 0) uniform image2D img; + +in vec4 piglit_vertex; +out vec4 vs_fs; + +void main() +{ + vs_fs = imageLoad(img, ivec2(gl_Vertex.xy)); + gl_Position = piglit_vertex; +} + +[fragment shader] +#version 130 +#extension GL_ARB_shading_language_420pack: require +#extension GL_ARB_shader_image_load_store: require + +layout (rgba8, binding =