summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndres Gomez <agomez@igalia.com>2017-02-24 12:32:17 +0200
committerAndres Gomez <agomez@igalia.com>2017-04-06 10:35:09 +0300
commit182af946c0cd9b0e89f2acd38c3fc59cd8c0805e (patch)
tree55d09c4a7925a1a47fe0c422b8d3d72f6b2b7c2a
parent3466eaa13ff84d6a7c0d537fc4ae006a5e4a1dff (diff)
glsl-1.50: instance name is not used to match UBO/SSBOs shader interfaces
This adds tests to check that no link error occurs when two differently named but equally instanced interface blocks differ in some way. From page 35 (page 41 of the PDF) of the GLSL 1.50, v11, spec: "The block name (block-name) is used to match interfaces: an output block of one pipeline stage will be matched to an input block with the same name in the subsequent pipeline stage. For uniform blocks, the application uses the block name to identify the block. ... Outside the shading language (i.e., in the API), members are similarly identified except the block name is always used in place of the instance name (API accesses are to interfaces, not to shaders)." v2: Simplified comments, as suggested by Timothy. Signed-off-by: Andres Gomez <agomez@igalia.com> Cc: Timothy Arceri <tarceri@itsqueeze.com> Acked-by: Timothy Arceri <tarceri@itsqueeze.com> Reviewed-by: Antia Puentes <apuentes@igalia.com>
-rw-r--r--tests/spec/arb_enhanced_layouts/linker/align-layout/instance-matching-shader-storage-blocks-align-qualifier-mismatch.shader_test53
-rw-r--r--tests/spec/arb_enhanced_layouts/linker/align-layout/instance-matching-shader-storage-blocks-member-align-qualifier-mismatch.shader_test53
-rw-r--r--tests/spec/arb_enhanced_layouts/linker/align-layout/instance-matching-uniform-blocks-align-qualifier-mismatch.shader_test50
-rw-r--r--tests/spec/arb_enhanced_layouts/linker/align-layout/instance-matching-uniform-blocks-member-align-qualifier-mismatch.shader_test50
-rw-r--r--tests/spec/arb_enhanced_layouts/linker/explicit-offsets/instance-matching-shader-storage-blocks-member-offset-qualifier-mismatch.shader_test54
-rw-r--r--tests/spec/arb_enhanced_layouts/linker/explicit-offsets/instance-matching-uniform-blocks-member-offset-qualifier-mismatch.shader_test51
-rw-r--r--tests/spec/arb_shader_storage_buffer_object/linker/instance-matching-shader-storage-blocks-array-size-mismatch.shader_test53
-rw-r--r--tests/spec/arb_shader_storage_buffer_object/linker/instance-matching-shader-storage-blocks-binding-qualifier-mismatch.shader_test54
-rw-r--r--tests/spec/arb_shader_storage_buffer_object/linker/instance-matching-shader-storage-blocks-member-array-size-mismatch.shader_test51
-rw-r--r--tests/spec/arb_shader_storage_buffer_object/linker/instance-matching-shader-storage-blocks-member-count-mismatch.shader_test52
-rw-r--r--tests/spec/arb_shader_storage_buffer_object/linker/instance-matching-shader-storage-blocks-member-name-mismatch.shader_test51
-rw-r--r--tests/spec/arb_shader_storage_buffer_object/linker/instance-matching-shader-storage-blocks-member-order-mismatch.shader_test53
-rw-r--r--tests/spec/arb_shader_storage_buffer_object/linker/instance-matching-shader-storage-blocks-member-qualifier-mismatch.shader_test51
-rw-r--r--tests/spec/arb_shader_storage_buffer_object/linker/instance-matching-shader-storage-blocks-member-type-mismatch.shader_test51
-rw-r--r--tests/spec/arb_shader_storage_buffer_object/linker/instance-matching-shader-storage-blocks-memory-qualifier-mismatch.shader_test51
-rw-r--r--tests/spec/arb_shader_storage_buffer_object/linker/instance-matching-shader-storage-blocks-packaging-qualifier-mismatch.shader_test51
-rw-r--r--tests/spec/arb_shading_language_420pack/linker/instance-matching-uniform-blocks-binding-qualifier-mismatch.shader_test51
-rw-r--r--tests/spec/glsl-1.50/linker/instance-matching-uniform-blocks-array-size-mismatch.shader_test52
-rw-r--r--tests/spec/glsl-1.50/linker/instance-matching-uniform-blocks-member-array-size-mismatch.shader_test47
-rw-r--r--tests/spec/glsl-1.50/linker/instance-matching-uniform-blocks-member-count-mismatch.shader_test48
-rw-r--r--tests/spec/glsl-1.50/linker/instance-matching-uniform-blocks-member-name-mismatch.shader_test47
-rw-r--r--tests/spec/glsl-1.50/linker/instance-matching-uniform-blocks-member-order-mismatch.shader_test49
-rw-r--r--tests/spec/glsl-1.50/linker/instance-matching-uniform-blocks-member-qualifier-mismatch.shader_test47
-rw-r--r--tests/spec/glsl-1.50/linker/instance-matching-uniform-blocks-member-type-mismatch.shader_test47
-rw-r--r--tests/spec/glsl-1.50/linker/instance-matching-uniform-blocks-memory-qualifier-mismatch.shader_test47
-rw-r--r--tests/spec/glsl-1.50/linker/instance-matching-uniform-blocks-packaging-qualifier-mismatch.shader_test47
26 files changed, 1311 insertions, 0 deletions
diff --git a/tests/spec/arb_enhanced_layouts/linker/align-layout/instance-matching-shader-storage-blocks-align-qualifier-mismatch.shader_test b/tests/spec/arb_enhanced_layouts/linker/align-layout/instance-matching-shader-storage-blocks-align-qualifier-mismatch.shader_test
new file mode 100644
index 000000000..dd8ce2365
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/linker/align-layout/instance-matching-shader-storage-blocks-align-qualifier-mismatch.shader_test
@@ -0,0 +1,53 @@
+# Tests that no link error occurs when two different interface blocks
+# have the same instance name but different block names.
+#
+# GLSLangSpec.1.50.11, 4.3.7 Interface Blocks:
+# "The block name (block-name) is used to match interfaces: an output
+# block of one pipeline stage will be matched to an input block with
+# the same name in the subsequent pipeline stage. For uniform blocks,
+# the application uses the block name to identify the block.
+#
+# ...
+#
+# Outside the shading language (i.e., in the API), members are
+# similarly identified except the block name is always used in place
+# of the instance name (API accesses are to interfaces, not to
+# shaders)."
+
+[require]
+GLSL >= 1.50
+GL_ARB_enhanced_layouts
+GL_ARB_shader_storage_buffer_object
+
+[vertex shader]
+#version 150
+#extension GL_ARB_enhanced_layouts : require
+#extension GL_ARB_shader_storage_buffer_object: require
+
+layout(std140, align = 32) buffer blockA {
+ vec4 a;
+} inst;
+
+void main()
+{
+ gl_Position = inst.a;
+}
+
+[fragment shader]
+#version 150
+#extension GL_ARB_enhanced_layouts : require
+#extension GL_ARB_shader_storage_buffer_object: require
+
+layout(std140, align = 64) buffer blockB {
+ vec4 a;
+} inst;
+
+out vec4 color;
+
+void main()
+{
+ color = inst.a;
+}
+
+[test]
+link success
diff --git a/tests/spec/arb_enhanced_layouts/linker/align-layout/instance-matching-shader-storage-blocks-member-align-qualifier-mismatch.shader_test b/tests/spec/arb_enhanced_layouts/linker/align-layout/instance-matching-shader-storage-blocks-member-align-qualifier-mismatch.shader_test
new file mode 100644
index 000000000..9a82347d8
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/linker/align-layout/instance-matching-shader-storage-blocks-member-align-qualifier-mismatch.shader_test
@@ -0,0 +1,53 @@
+# Tests that no link error occurs when two different interface blocks
+# have the same instance name but different block names.
+#
+# GLSLangSpec.1.50.11, 4.3.7 Interface Blocks:
+# "The block name (block-name) is used to match interfaces: an output
+# block of one pipeline stage will be matched to an input block with
+# the same name in the subsequent pipeline stage. For uniform blocks,
+# the application uses the block name to identify the block.
+#
+# ...
+#
+# Outside the shading language (i.e., in the API), members are
+# similarly identified except the block name is always used in place
+# of the instance name (API accesses are to interfaces, not to
+# shaders)."
+
+[require]
+GLSL >= 1.50
+GL_ARB_enhanced_layouts
+GL_ARB_shader_storage_buffer_object
+
+[vertex shader]
+#version 150
+#extension GL_ARB_enhanced_layouts : require
+#extension GL_ARB_shader_storage_buffer_object: require
+
+layout(std140) buffer blockA {
+ layout(align = 32) vec4 a;
+} inst;
+
+void main()
+{
+ gl_Position = inst.a;
+}
+
+[fragment shader]
+#version 150
+#extension GL_ARB_enhanced_layouts : require
+#extension GL_ARB_shader_storage_buffer_object: require
+
+layout(std140) buffer blockB {
+ layout(align = 64) vec4 a;
+} inst;
+
+out vec4 color;
+
+void main()
+{
+ color = inst.a;
+}
+
+[test]
+link success
diff --git a/tests/spec/arb_enhanced_layouts/linker/align-layout/instance-matching-uniform-blocks-align-qualifier-mismatch.shader_test b/tests/spec/arb_enhanced_layouts/linker/align-layout/instance-matching-uniform-blocks-align-qualifier-mismatch.shader_test
new file mode 100644
index 000000000..74cfcaa1f
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/linker/align-layout/instance-matching-uniform-blocks-align-qualifier-mismatch.shader_test
@@ -0,0 +1,50 @@
+# Tests that no link error occurs when two different interface blocks
+# have the same instance name but different block names.
+#
+# GLSLangSpec.1.50.11, 4.3.7 Interface Blocks:
+# "The block name (block-name) is used to match interfaces: an output
+# block of one pipeline stage will be matched to an input block with
+# the same name in the subsequent pipeline stage. For uniform blocks,
+# the application uses the block name to identify the block.
+#
+# ...
+#
+# Outside the shading language (i.e., in the API), members are
+# similarly identified except the block name is always used in place
+# of the instance name (API accesses are to interfaces, not to
+# shaders)."
+
+[require]
+GLSL >= 1.50
+GL_ARB_enhanced_layouts
+
+[vertex shader]
+#version 150
+#extension GL_ARB_enhanced_layouts : require
+
+layout(std140, align = 32) uniform blockA {
+ vec4 a;
+} inst;
+
+void main()
+{
+ gl_Position = inst.a;
+}
+
+[fragment shader]
+#version 150
+#extension GL_ARB_enhanced_layouts : require
+
+layout(std140, align = 64) uniform blockB {
+ vec4 a;
+} inst;
+
+out vec4 color;
+
+void main()
+{
+ color = inst.a;
+}
+
+[test]
+link success
diff --git a/tests/spec/arb_enhanced_layouts/linker/align-layout/instance-matching-uniform-blocks-member-align-qualifier-mismatch.shader_test b/tests/spec/arb_enhanced_layouts/linker/align-layout/instance-matching-uniform-blocks-member-align-qualifier-mismatch.shader_test
new file mode 100644
index 000000000..f451e3562
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/linker/align-layout/instance-matching-uniform-blocks-member-align-qualifier-mismatch.shader_test
@@ -0,0 +1,50 @@
+# Tests that no link error occurs when two different interface blocks
+# have the same instance name but different block names.
+#
+# GLSLangSpec.1.50.11, 4.3.7 Interface Blocks:
+# "The block name (block-name) is used to match interfaces: an output
+# block of one pipeline stage will be matched to an input block with
+# the same name in the subsequent pipeline stage. For uniform blocks,
+# the application uses the block name to identify the block.
+#
+# ...
+#
+# Outside the shading language (i.e., in the API), members are
+# similarly identified except the block name is always used in place
+# of the instance name (API accesses are to interfaces, not to
+# shaders)."
+
+[require]
+GLSL >= 1.50
+GL_ARB_enhanced_layouts
+
+[vertex shader]
+#version 150
+#extension GL_ARB_enhanced_layouts : require
+
+layout(std140) uniform blockA {
+ layout(align = 32) vec4 a;
+} inst;
+
+void main()
+{
+ gl_Position = inst.a;
+}
+
+[fragment shader]
+#version 150
+#extension GL_ARB_enhanced_layouts : require
+
+layout(std140) uniform blockB {
+ layout(align = 64) vec4 a;
+} inst;
+
+out vec4 color;
+
+void main()
+{
+ color = inst.a;
+}
+
+[test]
+link success
diff --git a/tests/spec/arb_enhanced_layouts/linker/explicit-offsets/instance-matching-shader-storage-blocks-member-offset-qualifier-mismatch.shader_test b/tests/spec/arb_enhanced_layouts/linker/explicit-offsets/instance-matching-shader-storage-blocks-member-offset-qualifier-mismatch.shader_test
new file mode 100644
index 000000000..7f5726380
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/linker/explicit-offsets/instance-matching-shader-storage-blocks-member-offset-qualifier-mismatch.shader_test
@@ -0,0 +1,54 @@
+# Tests that no link error occurs for interfaces blocks with matching
+# instances names but mismatching member's offset qualifier and block
+# names.
+#
+# GLSLangSpec.1.50.11, 4.3.7 Interface Blocks:
+# "The block name (block-name) is used to match interfaces: an output
+# block of one pipeline stage will be matched to an input block with
+# the same name in the subsequent pipeline stage. For uniform blocks,
+# the application uses the block name to identify the block.
+#
+# ...
+#
+# Outside the shading language (i.e., in the API), members are
+# similarly identified except the block name is always used in place
+# of the instance name (API accesses are to interfaces, not to
+# shaders)."
+
+[require]
+GLSL >= 1.50
+GL_ARB_enhanced_layouts
+GL_ARB_shader_storage_buffer_object
+
+[vertex shader]
+#version 150
+#extension GL_ARB_enhanced_layouts : require
+#extension GL_ARB_shader_storage_buffer_object: require
+
+layout(std140) buffer blockA {
+ layout(offset = 32) vec4 a;
+} inst;
+
+void main()
+{
+ gl_Position = inst.a;
+}
+
+[fragment shader]
+#version 150
+#extension GL_ARB_enhanced_layouts : require
+#extension GL_ARB_shader_storage_buffer_object: require
+
+layout(std140) buffer blockB {
+ layout(offset = 64) vec4 a;
+} inst;
+
+out vec4 color;
+
+void main()
+{
+ color = inst.a;
+}
+
+[test]
+link success
diff --git a/tests/spec/arb_enhanced_layouts/linker/explicit-offsets/instance-matching-uniform-blocks-member-offset-qualifier-mismatch.shader_test b/tests/spec/arb_enhanced_layouts/linker/explicit-offsets/instance-matching-uniform-blocks-member-offset-qualifier-mismatch.shader_test
new file mode 100644
index 000000000..fbf370d14
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/linker/explicit-offsets/instance-matching-uniform-blocks-member-offset-qualifier-mismatch.shader_test
@@ -0,0 +1,51 @@
+# Tests that no link error occurs for interfaces blocks with matching
+# instances names but mismatching member's offset qualifier and block
+# names.
+#
+# GLSLangSpec.1.50.11, 4.3.7 Interface Blocks:
+# "The block name (block-name) is used to match interfaces: an output
+# block of one pipeline stage will be matched to an input block with
+# the same name in the subsequent pipeline stage. For uniform blocks,
+# the application uses the block name to identify the block.
+#
+# ...
+#
+# Outside the shading language (i.e., in the API), members are
+# similarly identified except the block name is always used in place
+# of the instance name (API accesses are to interfaces, not to
+# shaders)."
+
+[require]
+GLSL >= 1.50
+GL_ARB_enhanced_layouts
+
+[vertex shader]
+#version 150
+#extension GL_ARB_enhanced_layouts : require
+
+layout(std140) uniform blockA {
+ layout(offset = 32) vec4 a;
+} inst;
+
+void main()
+{
+ gl_Position = inst.a;
+}
+
+[fragment shader]
+#version 150
+#extension GL_ARB_enhanced_layouts : require
+
+layout(std140) uniform blockB {
+ layout(offset = 64) vec4 a;
+} inst;
+
+out vec4 color;
+
+void main()
+{
+ color = inst.a;
+}
+
+[test]
+link success
diff --git a/tests/spec/arb_shader_storage_buffer_object/linker/instance-matching-shader-storage-blocks-array-size-mismatch.shader_test b/tests/spec/arb_shader_storage_buffer_object/linker/instance-matching-shader-storage-blocks-array-size-mismatch.shader_test
new file mode 100644
index 000000000..2a0da9e59
--- /dev/null
+++ b/tests/spec/arb_shader_storage_buffer_object/linker/instance-matching-shader-storage-blocks-array-size-mismatch.shader_test
@@ -0,0 +1,53 @@
+/* Tests that no link error occurs for interfaces blocks with matching
+ * instances names but mismatching array dimensions and block names.
+ *
+ * GLSLangSpec.1.50.11, 4.3.7 Interface Blocks:
+ * "The block name (block-name) is used to match interfaces: an output
+ * block of one pipeline stage will be matched to an input block with
+ * the same name in the subsequent pipeline stage. For uniform blocks,
+ * the application uses the block name to identify the block.
+ *
+ * ...
+ *
+ * Outside the shading language (i.e., in the API), members are
+ * similarly identified except the block name is always used in place
+ * of the instance name (API accesses are to interfaces, not to
+ * shaders)."
+ */
+
+[require]
+GLSL >= 1.50
+GL_ARB_shader_storage_buffer_object
+
+[vertex shader]
+#version 150
+#extension GL_ARB_shader_storage_buffer_object: require
+
+buffer blockA {
+ vec4 a;
+ vec4 b;
+} inst[3];
+
+void main()
+{
+ gl_Position = inst[0].a;
+}
+
+[fragment shader]
+#version 150
+#extension GL_ARB_shader_storage_buffer_object: require
+
+buffer blockB {
+ vec4 a;
+ vec4 b;
+} inst[2];
+
+out vec4 color;
+
+void main()
+{
+ color = inst[0].a;
+}
+
+[test]
+link success
diff --git a/tests/spec/arb_shader_storage_buffer_object/linker/instance-matching-shader-storage-blocks-binding-qualifier-mismatch.shader_test b/tests/spec/arb_shader_storage_buffer_object/linker/instance-matching-shader-storage-blocks-binding-qualifier-mismatch.shader_test
new file mode 100644
index 000000000..48bba07f7
--- /dev/null
+++ b/tests/spec/arb_shader_storage_buffer_object/linker/instance-matching-shader-storage-blocks-binding-qualifier-mismatch.shader_test
@@ -0,0 +1,54 @@
+/* Tests that no link error occurs for interfaces blocks with matching
+ * instances names but mismatching bindings and block names.
+ *
+ * GLSLangSpec.1.50.11, 4.3.7 Interface Blocks:
+ * "The block name (block-name) is used to match interfaces: an output
+ * block of one pipeline stage will be matched to an input block with
+ * the same name in the subsequent pipeline stage. For uniform blocks,
+ * the application uses the block name to identify the block.
+ *
+ * ...
+ *
+ * Outside the shading language (i.e., in the API), members are
+ * similarly identified except the block name is always used in place
+ * of the instance name (API accesses are to interfaces, not to
+ * shaders)."
+ */
+
+[require]
+GLSL >= 1.50
+GL_ARB_shading_language_420pack
+GL_ARB_shader_storage_buffer_object
+
+[vertex shader]
+#version 150
+#extension GL_ARB_shading_language_420pack: require
+#extension GL_ARB_shader_storage_buffer_object: require
+
+layout(binding = 0) buffer blockA {
+ vec4 a;
+} inst;
+
+void main()
+{
+ gl_Position = inst.a;
+}
+
+[fragment shader]
+#version 150
+#extension GL_ARB_shading_language_420pack: require
+#extension GL_ARB_shader_storage_buffer_object: require
+
+layout(binding = 1) buffer blockB {
+ vec4 a;
+} inst;
+
+out vec4 color;
+
+void main()
+{
+ color = inst.a;
+}
+
+[test]
+link success
diff --git a/tests/spec/arb_shader_storage_buffer_object/linker/instance-matching-shader-storage-blocks-member-array-size-mismatch.shader_test b/tests/spec/arb_shader_storage_buffer_object/linker/instance-matching-shader-storage-blocks-member-array-size-mismatch.shader_test
new file mode 100644
index 000000000..eba30b6ca
--- /dev/null
+++ b/tests/spec/arb_shader_storage_buffer_object/linker/instance-matching-shader-storage-blocks-member-array-size-mismatch.shader_test
@@ -0,0 +1,51 @@
+/* Tests that no link error occurs for interfaces blocks with matching
+ * instances names but mismatching array sized member and block names.
+ *
+ * GLSLangSpec.1.50.11, 4.3.7 Interface Blocks:
+ * "The block name (block-name) is used to match interfaces: an output
+ * block of one pipeline stage will be matched to an input block with
+ * the same name in the subsequent pipeline stage. For uniform blocks,
+ * the application uses the block name to identify the block.
+ *
+ * ...
+ *
+ * Outside the shading language (i.e., in the API), members are
+ * similarly identified except the block name is always used in place
+ * of the instance name (API accesses are to interfaces, not to
+ * shaders)."
+ */
+
+[require]
+GLSL >= 1.50
+GL_ARB_shader_storage_buffer_object
+
+[vertex shader]
+#version 150
+#extension GL_ARB_shader_storage_buffer_object: require
+
+buffer blockA {
+ vec4 a[2];
+} inst;
+
+void main()
+{
+ gl_Position = inst.a[0];
+}
+
+[fragment shader]
+#version 150
+#extension GL_ARB_shader_storage_buffer_object: require
+
+buffer blockB {
+ vec4 a[3];
+} inst;
+
+out vec4 color;
+
+void main()
+{
+ color = inst.a[0];
+}
+
+[test]
+link success
diff --git a/tests/spec/arb_shader_storage_buffer_object/linker/instance-matching-shader-storage-blocks-member-count-mismatch.shader_test b/tests/spec/arb_shader_storage_buffer_object/linker/instance-matching-shader-storage-blocks-member-count-mismatch.shader_test
new file mode 100644
index 000000000..29ba5ec97
--- /dev/null
+++ b/tests/spec/arb_shader_storage_buffer_object/linker/instance-matching-shader-storage-blocks-member-count-mismatch.shader_test
@@ -0,0 +1,52 @@
+/* Tests that no link error occurs for interfaces blocks with matching
+ * instances names but mismatching members count and block names.
+ *
+ * GLSLangSpec.1.50.11, 4.3.7 Interface Blocks:
+ * "The block name (block-name) is used to match interfaces: an output
+ * block of one pipeline stage will be matched to an input block with
+ * the same name in the subsequent pipeline stage. For uniform blocks,
+ * the application uses the block name to identify the block.
+ *
+ * ...
+ *
+ * Outside the shading language (i.e., in the API), members are
+ * similarly identified except the block name is always used in place
+ * of the instance name (API accesses are to interfaces, not to
+ * shaders)."
+ */
+
+[require]
+GLSL >= 1.50
+GL_ARB_shader_storage_buffer_object
+
+[vertex shader]
+#version 150
+#extension GL_ARB_shader_storage_buffer_object: require
+
+buffer blockA {
+ vec4 a;
+} inst;
+
+void main()
+{
+ gl_Position = inst.a;
+}
+
+[fragment shader]
+#version 150
+#extension GL_ARB_shader_storage_buffer_object: require
+
+buffer blockB {
+ vec4 a;
+ vec4 b;
+} inst;
+
+out vec4 color;
+
+void main()
+{
+ color = inst.a;
+}
+
+[test]
+link success
diff --git a/tests/spec/arb_shader_storage_buffer_object/linker/instance-matching-shader-storage-blocks-member-name-mismatch.shader_test b/tests/spec/arb_shader_storage_buffer_object/linker/instance-matching-shader-storage-blocks-member-name-mismatch.shader_test
new file mode 100644
index 000000000..972cda6ff
--- /dev/null
+++ b/tests/spec/arb_shader_storage_buffer_object/linker/instance-matching-shader-storage-blocks-member-name-mismatch.shader_test
@@ -0,0 +1,51 @@
+/* Tests that no link error occurs for interfaces blocks with matching
+ * instances names but mismatching member names and block names.
+ *
+ * GLSLangSpec.1.50.11, 4.3.7 Interface Blocks:
+ * "The block name (block-name) is used to match interfaces: an output
+ * block of one pipeline stage will be matched to an input block with
+ * the same name in the subsequent pipeline stage. For uniform blocks,
+ * the application uses the block name to identify the block.
+ *
+ * ...
+ *
+ * Outside the shading language (i.e., in the API), members are
+ * similarly identified except the block name is always used in place
+ * of the instance name (API accesses are to interfaces, not to
+ * shaders)."
+ */
+
+[require]
+GLSL >= 1.50
+GL_ARB_shader_storage_buffer_object
+
+[vertex shader]
+#version 150
+#extension GL_ARB_shader_storage_buffer_object: require
+
+buffer blockA {
+ vec4 a;
+} inst;
+
+void main()
+{
+ gl_Position = inst.a;
+}
+
+[fragment shader]
+#version 150
+#extension GL_ARB_shader_storage_buffer_object: require
+
+buffer blockB {
+ vec4 b;
+} inst;
+
+out vec4 color;
+
+void main()
+{
+ color = inst.b;
+}
+
+[test]
+link success
diff --git a/tests/spec/arb_shader_storage_buffer_object/linker/instance-matching-shader-storage-blocks-member-order-mismatch.shader_test b/tests/spec/arb_shader_storage_buffer_object/linker/instance-matching-shader-storage-blocks-member-order-mismatch.shader_test
new file mode 100644
index 000000000..3de14d8a4
--- /dev/null
+++ b/tests/spec/arb_shader_storage_buffer_object/linker/instance-matching-shader-storage-blocks-member-order-mismatch.shader_test
@@ -0,0 +1,53 @@
+/* Tests that no link error occurs for interfaces blocks with matching
+ * instances names but mismatching members order and block names.
+ *
+ * GLSLangSpec.1.50.11, 4.3.7 Interface Blocks:
+ * "The block name (block-name) is used to match interfaces: an output
+ * block of one pipeline stage will be matched to an input block with
+ * the same name in the subsequent pipeline stage. For uniform blocks,
+ * the application uses the block name to identify the block.
+ *
+ * ...
+ *
+ * Outside the shading language (i.e., in the API), members are
+ * similarly identified except the block name is always used in place
+ * of the instance name (API accesses are to interfaces, not to
+ * shaders)."
+ */
+
+[require]
+GLSL >= 1.50
+GL_ARB_shader_storage_buffer_object
+
+[vertex shader]
+#version 150
+#extension GL_ARB_shader_storage_buffer_object: require
+
+buffer blockA {
+ vec4 a;
+ vec4 b;
+} inst;
+
+void main()
+{
+ gl_Position = inst.a;
+}
+
+[fragment shader]
+#version 150
+#extension GL_ARB_shader_storage_buffer_object: require
+
+buffer blockB {
+ vec4 b;
+ vec4 a;
+} inst;
+
+out vec4 color;
+
+void main()
+{
+ color = inst.a;
+}
+
+[test]
+link success
diff --git a/tests/spec/arb_shader_storage_buffer_object/linker/instance-matching-shader-storage-blocks-member-qualifier-mismatch.shader_test b/tests/spec/arb_shader_storage_buffer_object/linker/instance-matching-shader-storage-blocks-member-qualifier-mismatch.shader_test
new file mode 100644
index 000000000..b1c0377b4
--- /dev/null
+++ b/tests/spec/arb_shader_storage_buffer_object/linker/instance-matching-shader-storage-blocks-member-qualifier-mismatch.shader_test
@@ -0,0 +1,51 @@
+/* Tests that no link error occurs for interfaces blocks with matching
+ * instances names but mismatching members qualifiers and block names.
+ *
+ * GLSLangSpec.1.50.11, 4.3.7 Interface Blocks:
+ * "The block name (block-name) is used to match interfaces: an output
+ * block of one pipeline stage will be matched to an input block with
+ * the same name in the subsequent pipeline stage. For uniform blocks,
+ * the application uses the block name to identify the block.
+ *
+ * ...
+ *
+ * Outside the shading language (i.e., in the API), members are
+ * similarly identified except the block name is always used in place
+ * of the instance name (API accesses are to interfaces, not to
+ * shaders)."
+ */
+
+[require]
+GLSL >= 1.50
+GL_ARB_shader_storage_buffer_object
+
+[vertex shader]
+#version 150
+#extension GL_ARB_shader_storage_buffer_object: require
+
+buffer blockA {
+ layout(column_major) mat4 m;
+} inst;
+
+void main()
+{
+ gl_Position = inst.m[0];
+}
+
+[fragment shader]
+#version 150
+#extension GL_ARB_shader_storage_buffer_object: require
+
+buffer blockB {
+ layout(row_major) mat4 m;
+} inst;
+
+out vec4 color;
+
+void main()
+{
+ color = inst.m[0];
+}
+
+[test]
+link success
diff --git a/tests/spec/arb_shader_storage_buffer_object/linker/instance-matching-shader-storage-blocks-member-type-mismatch.shader_test b/tests/spec/arb_shader_storage_buffer_object/linker/instance-matching-shader-storage-blocks-member-type-mismatch.shader_test
new file mode 100644
index 000000000..80bea249b
--- /dev/null
+++ b/tests/spec/arb_shader_storage_buffer_object/linker/instance-matching-shader-storage-blocks-member-type-mismatch.shader_test
@@ -0,0 +1,51 @@
+/* Tests that no link error occurs for interfaces blocks with matching
+ * instances names but mismatching member types and block names.
+ *
+ * GLSLangSpec.1.50.11, 4.3.7 Interface Blocks:
+ * "The block name (block-name) is used to match interfaces: an output
+ * block of one pipeline stage will be matched to an input block with
+ * the same name in the subsequent pipeline stage. For uniform blocks,
+ * the application uses the block name to identify the block.
+ *
+ * ...
+ *
+ * Outside the shading language (i.e., in the API), members are
+ * similarly identified except the block name is always used in place
+ * of the instance name (API accesses are to interfaces, not to
+ * shaders)."
+ */
+
+[require]
+GLSL >= 1.50
+GL_ARB_shader_storage_buffer_object
+
+[vertex shader]
+#version 150
+#extension GL_ARB_shader_storage_buffer_object: require
+
+buffer blockA {
+ vec4 a;
+} inst;
+
+void main()
+{
+ gl_Position = inst.a;
+}
+
+[fragment shader]
+#version 150
+#extension GL_ARB_shader_storage_buffer_object: require
+
+buffer blockB {
+ vec3 a;
+} inst;
+
+out vec4 color;
+
+void main()
+{
+ color = vec4(inst.a, 0.0);
+}
+
+[test]
+link success
diff --git a/tests/spec/arb_shader_storage_buffer_object/linker/instance-matching-shader-storage-blocks-memory-qualifier-mismatch.shader_test b/tests/spec/arb_shader_storage_buffer_object/linker/instance-matching-shader-storage-blocks-memory-qualifier-mismatch.shader_test
new file mode 100644
index 000000000..1ff0f38ef
--- /dev/null
+++ b/tests/spec/arb_shader_storage_buffer_object/linker/instance-matching-shader-storage-blocks-memory-qualifier-mismatch.shader_test
@@ -0,0 +1,51 @@
+/* Tests that no link error occurs for interfaces blocks with matching
+ * instances names but mismatching memory qualifiers and block names.
+ *
+ * GLSLangSpec.1.50.11, 4.3.7 Interface Blocks:
+ * "The block name (block-name) is used to match interfaces: an output
+ * block of one pipeline stage will be matched to an input block with
+ * the same name in the subsequent pipeline stage. For uniform blocks,
+ * the application uses the block name to identify the block.
+ *
+ * ...
+ *
+ * Outside the shading language (i.e., in the API), members are
+ * similarly identified except the block name is always used in place
+ * of the instance name (API accesses are to interfaces, not to
+ * shaders)."
+ */
+
+[require]
+GLSL >= 1.50
+GL_ARB_shader_storage_buffer_object
+
+[vertex shader]
+#version 150
+#extension GL_ARB_shader_storage_buffer_object: require
+
+layout(column_major) buffer blockA {
+ mat4 m;
+} inst;
+
+void main()
+{
+ gl_Position = inst.m[0];
+}
+
+[fragment shader]
+#version 150
+#extension GL_ARB_shader_storage_buffer_object: require
+
+layout(row_major) buffer blockB {
+ mat4 m;
+} inst;
+
+out vec4 color;
+
+void main()
+{
+ color = inst.m[0];
+}
+
+[test]
+link success
diff --git a/tests/spec/arb_shader_storage_buffer_object/linker/instance-matching-shader-storage-blocks-packaging-qualifier-mismatch.shader_test b/tests/spec/arb_shader_storage_buffer_object/linker/instance-matching-shader-storage-blocks-packaging-qualifier-mismatch.shader_test
new file mode 100644
index 000000000..b9c3e52ba
--- /dev/null
+++ b/tests/spec/arb_shader_storage_buffer_object/linker/instance-matching-shader-storage-blocks-packaging-qualifier-mismatch.shader_test
@@ -0,0 +1,51 @@
+/* Tests that no link error occurs for interfaces blocks with matching
+ * instances names but mismatching packaging qualifiers and block names.
+ *
+ * GLSLangSpec.1.50.11, 4.3.7 Interface Blocks:
+ * "The block name (block-name) is used to match interfaces: an output
+ * block of one pipeline stage will be matched to an input block with
+ * the same name in the subsequent pipeline stage. For uniform blocks,
+ * the application uses the block name to identify the block.
+ *
+ * ...
+ *
+ * Outside the shading language (i.e., in the API), members are
+ * similarly identified except the block name is always used in place
+ * of the instance name (API accesses are to interfaces, not to
+ * shaders)."
+ */
+
+[require]
+GLSL >= 1.50
+GL_ARB_shader_storage_buffer_object
+
+[vertex shader]
+#version 150
+#extension GL_ARB_shader_storage_buffer_object: require
+
+layout(std140) buffer blockA {
+ vec4 a;
+} inst;
+
+void main()
+{
+ gl_Position = inst.a;
+}
+
+[fragment shader]
+#version 150
+#extension GL_ARB_shader_storage_buffer_object: require
+
+layout(shared) buffer blockB {
+ vec4 a;
+} inst;
+
+out vec4 color;
+
+void main()
+{
+ color = inst.a;
+}
+
+[test]
+link success
diff --git a/tests/spec/arb_shading_language_420pack/linker/instance-matching-uniform-blocks-binding-qualifier-mismatch.shader_test b/tests/spec/arb_shading_language_420pack/linker/instance-matching-uniform-blocks-binding-qualifier-mismatch.shader_test
new file mode 100644
index 000000000..ebfadfa58
--- /dev/null
+++ b/tests/spec/arb_shading_language_420pack/linker/instance-matching-uniform-blocks-binding-qualifier-mismatch.shader_test
@@ -0,0 +1,51 @@
+/* Tests that no link error occurs for interfaces blocks with matching
+ * instances names but mismatching binding qualifiers and block names.
+ *
+ * GLSLangSpec.1.50.11, 4.3.7 Interface Blocks:
+ * "The block name (block-name) is used to match interfaces: an output
+ * block of one pipeline stage will be matched to an input block with
+ * the same name in the subsequent pipeline stage. For uniform blocks,
+ * the application uses the block name to identify the block.
+ *
+ * ...
+ *
+ * Outside the shading language (i.e., in the API), members are
+ * similarly identified except the block name is always used in place
+ * of the instance name (API accesses are to interfaces, not to
+ * shaders)."
+ */
+
+[require]
+GLSL >= 1.50
+GL_ARB_shading_language_420pack
+
+[vertex shader]
+#version 150
+#extension GL_ARB_shading_language_420pack: require
+
+layout(binding = 0) uniform blockA {
+ vec4 a;
+} inst;
+
+void main()
+{
+ gl_Position = inst.a;
+}
+
+[fragment shader]
+#version 150
+#extension GL_ARB_shading_language_420pack: require
+
+layout(binding = 1) uniform blockB {
+ vec4 a;
+} inst;
+
+out vec4 color;
+
+void main()
+{
+ color = inst.a;
+}
+
+[test]
+link success
diff --git a/tests/spec/glsl-1.50/linker/instance-matching-uniform-blocks-array-size-mismatch.shader_test b/tests/spec/glsl-1.50/linker/instance-matching-uniform-blocks-array-size-mismatch.shader_test
new file mode 100644
index 000000000..f123c94ff
--- /dev/null
+++ b/tests/spec/glsl-1.50/linker/instance-matching-uniform-blocks-array-size-mismatch.shader_test
@@ -0,0 +1,52 @@
+# Tests that no link error occurs for interfaces blocks with matching
+# instances names but mismatching array size and block names.
+#
+# instanced interface blocks differ on the array dimension of the
+# interface.
+#
+# GLSLangSpec.1.50.11, 4.3.7 Interface Blocks:
+# "The block name (block-name) is used to match interfaces: an output
+# block of one pipeline stage will be matched to an input block with
+# the same name in the subsequent pipeline stage. For uniform blocks,
+# the application uses the block name to identify the block.
+#
+# ...
+#
+# Outside the shading language (i.e., in the API), members are
+# similarly identified except the block name is always used in place
+# of the instance name (API accesses are to interfaces, not to
+# shaders)."
+
+[require]
+GLSL >= 1.50
+
+[vertex shader]
+#version 150
+
+uniform blockA {
+ vec4 a;
+ vec4 b;
+} inst[3];
+
+void main()
+{
+ gl_Position = inst[0].a;
+}
+
+[fragment shader]
+#version 150
+
+uniform blockB {
+ vec4 a;
+ vec4 b;
+} inst[2];
+
+out vec4 color;
+
+void main()
+{
+ color = inst[0].a;
+}
+
+[test]
+link success
diff --git a/tests/spec/glsl-1.50/linker/instance-matching-uniform-blocks-member-array-size-mismatch.shader_test b/tests/spec/glsl-1.50/linker/instance-matching-uniform-blocks-member-array-size-mismatch.shader_test
new file mode 100644
index 000000000..34b4078c1
--- /dev/null
+++ b/tests/spec/glsl-1.50/linker/instance-matching-uniform-blocks-member-array-size-mismatch.shader_test
@@ -0,0 +1,47 @@
+# Tests that no link error occurs for interfaces blocks with matching
+# instances names but mismatching array sized member and block names.
+#
+# GLSLangSpec.1.50.11, 4.3.7 Interface Blocks:
+# "The block name (block-name) is used to match interfaces: an output
+# block of one pipeline stage will be matched to an input block with
+# the same name in the subsequent pipeline stage. For uniform blocks,
+# the application uses the block name to identify the block.
+#
+# ...
+#
+# Outside the shading language (i.e., in the API), members are
+# similarly identified except the block name is always used in place
+# of the instance name (API accesses are to interfaces, not to
+# shaders)."
+
+[require]
+GLSL >= 1.50
+
+[vertex shader]
+#version 150
+
+uniform blockA {
+ vec4 a[2];
+} inst;
+
+void main()
+{
+ gl_Position = inst.a[0];
+}
+
+[fragment shader]
+#version 150
+
+uniform blockB {
+ vec4 a[3];
+} inst;
+
+out vec4 color;
+
+void main()
+{
+ color = inst.a[0];
+}
+
+[test]
+link success
diff --git a/tests/spec/glsl-1.50/linker/instance-matching-uniform-blocks-member-count-mismatch.shader_test b/tests/spec/glsl-1.50/linker/instance-matching-uniform-blocks-member-count-mismatch.shader_test
new file mode 100644
index 000000000..333f5258f
--- /dev/null
+++ b/tests/spec/glsl-1.50/linker/instance-matching-uniform-blocks-member-count-mismatch.shader_test
@@ -0,0 +1,48 @@
+# Tests that no link error occurs for interfaces blocks with matching
+# instances names but mismatching members count and block names.
+#
+# GLSLangSpec.1.50.11, 4.3.7 Interface Blocks:
+# "The block name (block-name) is used to match interfaces: an output
+# block of one pipeline stage will be matched to an input block with
+# the same name in the subsequent pipeline stage. For uniform blocks,
+# the application uses the block name to identify the block.
+#
+# ...
+#
+# Outside the shading language (i.e., in the API), members are
+# similarly identified except the block name is always used in place
+# of the instance name (API accesses are to interfaces, not to
+# shaders)."
+
+[require]
+GLSL >= 1.50
+
+[vertex shader]
+#version 150
+
+uniform blockA {
+ vec4 a;
+} inst;
+
+void main()
+{
+ gl_Position = inst.a;
+}
+
+[fragment shader]
+#version 150
+
+uniform blockB {
+ vec4 a;
+ vec4 b;
+} inst;
+
+out vec4 color;
+
+void main()
+{
+ color = inst.a;
+}
+
+[test]
+link success
diff --git a/tests/spec/glsl-1.50/linker/instance-matching-uniform-blocks-member-name-mismatch.shader_test b/tests/spec/glsl-1.50/linker/instance-matching-uniform-blocks-member-name-mismatch.shader_test
new file mode 100644
index 000000000..710adac2d
--- /dev/null
+++ b/tests/spec/glsl-1.50/linker/instance-matching-uniform-blocks-member-name-mismatch.shader_test
@@ -0,0 +1,47 @@
+# Tests that no link error occurs for interfaces blocks with matching
+# instances names but mismatching member's name and block names.
+#
+# GLSLangSpec.1.50.11, 4.3.7 Interface Blocks:
+# "The block name (block-name) is used to match interfaces: an output
+# block of one pipeline stage will be matched to an input block with
+# the same name in the subsequent pipeline stage. For uniform blocks,
+# the application uses the block name to identify the block.
+#
+# ...
+#
+# Outside the shading language (i.e., in the API), members are
+# similarly identified except the block name is always used in place
+# of the instance name (API accesses are to interfaces, not to
+# shaders)."
+
+[require]
+GLSL >= 1.50
+
+[vertex shader]
+#version 150
+
+uniform blockA {
+ vec4 a;
+} inst;
+
+void main()
+{
+ gl_Position = inst.a;
+}
+
+[fragment shader]
+#version 150
+
+uniform blockB {
+ vec4 b;
+} inst;
+
+out vec4 color;
+
+void main()
+{
+ color = inst.b;
+}
+
+[test]
+link success
diff --git a/tests/spec/glsl-1.50/linker/instance-matching-uniform-blocks-member-order-mismatch.shader_test b/tests/spec/glsl-1.50/linker/instance-matching-uniform-blocks-member-order-mismatch.shader_test
new file mode 100644
index 000000000..6ebe45299
--- /dev/null
+++ b/tests/spec/glsl-1.50/linker/instance-matching-uniform-blocks-member-order-mismatch.shader_test
@@ -0,0 +1,49 @@
+# Tests that no link error occurs for interfaces blocks with matching
+# instances names but mismatching members' order and block names.
+#
+# GLSLangSpec.1.50.11, 4.3.7 Interface Blocks:
+# "The block name (block-name) is used to match interfaces: an output
+# block of one pipeline stage will be matched to an input block with
+# the same name in the subsequent pipeline stage. For uniform blocks,
+# the application uses the block name to identify the block.
+#
+# ...
+#
+# Outside the shading language (i.e., in the API), members are
+# similarly identified except the block name is always used in place
+# of the instance name (API accesses are to interfaces, not to
+# shaders)."
+
+[require]
+GLSL >= 1.50
+
+[vertex shader]
+#version 150
+
+uniform blockA {
+ vec4 a;
+ vec4 b;
+} inst;
+
+void main()
+{
+ gl_Position = inst.a;
+}
+
+[fragment shader]
+#version 150
+
+uniform blockB {
+ vec4 b;
+ vec4 a;
+} inst;
+
+out vec4 color;
+
+void main()
+{
+ color = inst.a;
+}
+
+[test]
+link success
diff --git a/tests/spec/glsl-1.50/linker/instance-matching-uniform-blocks-member-qualifier-mismatch.shader_test b/tests/spec/glsl-1.50/linker/instance-matching-uniform-blocks-member-qualifier-mismatch.shader_test
new file mode 100644
index 000000000..e10828b14
--- /dev/null
+++ b/tests/spec/glsl-1.50/linker/instance-matching-uniform-blocks-member-qualifier-mismatch.shader_test
@@ -0,0 +1,47 @@
+# Tests that no link error occurs for interfaces blocks with matching
+# instances names but mismatching member's qualifier and block names.
+#
+# GLSLangSpec.1.50.11, 4.3.7 Interface Blocks:
+# "The block name (block-name) is used to match interfaces: an output
+# block of one pipeline stage will be matched to an input block with
+# the same name in the subsequent pipeline stage. For uniform blocks,
+# the application uses the block name to identify the block.
+#
+# ...
+#
+# Outside the shading language (i.e., in the API), members are
+# similarly identified except the block name is always used in place
+# of the instance name (API accesses are to interfaces, not to
+# shaders)."
+
+[require]
+GLSL >= 1.50
+
+[vertex shader]
+#version 150
+
+uniform blockA {
+ layout(column_major) mat4 m;
+} inst;
+
+void main()
+{
+ gl_Position = inst.m[0];
+}
+
+[fragment shader]
+#version 150
+
+uniform blockB {
+ layout(row_major) mat4 m;
+} inst;
+
+out vec4 color;
+
+void main()
+{
+ color = inst.m[0];
+}
+
+[test]
+link success
diff --git a/tests/spec/glsl-1.50/linker/instance-matching-uniform-blocks-member-type-mismatch.shader_test b/tests/spec/glsl-1.50/linker/instance-matching-uniform-blocks-member-type-mismatch.shader_test
new file mode 100644
index 000000000..f169c23f8
--- /dev/null
+++ b/tests/spec/glsl-1.50/linker/instance-matching-uniform-blocks-member-type-mismatch.shader_test
@@ -0,0 +1,47 @@
+# Tests that no link error occurs for interfaces blocks with matching
+# instances names but mismatching member's type and block names.
+#
+# GLSLangSpec.1.50.11, 4.3.7 Interface Blocks:
+# "The block name (block-name) is used to match interfaces: an output
+# block of one pipeline stage will be matched to an input block with
+# the same name in the subsequent pipeline stage. For uniform blocks,
+# the application uses the block name to identify the block.
+#
+# ...
+#
+# Outside the shading language (i.e., in the API), members are
+# similarly identified except the block name is always used in place
+# of the instance name (API accesses are to interfaces, not to
+# shaders)."
+
+[require]
+GLSL >= 1.50
+
+[vertex shader]
+#version 150
+
+uniform blockA {
+ vec4 a;
+} inst;
+
+void main()
+{
+ gl_Position = inst.a;
+}
+
+[fragment shader]
+#version 150
+
+uniform blockB {
+ vec3 a;
+} inst;
+
+out vec4 color;
+
+void main()
+{
+ color = vec4(inst.a, 0.0);
+}
+
+[test]
+link success
diff --git a/tests/spec/glsl-1.50/linker/instance-matching-uniform-blocks-memory-qualifier-mismatch.shader_test b/tests/spec/glsl-1.50/linker/instance-matching-uniform-blocks-memory-qualifier-mismatch.shader_test
new file mode 100644
index 000000000..d11b76772
--- /dev/null
+++ b/tests/spec/glsl-1.50/linker/instance-matching-uniform-blocks-memory-qualifier-mismatch.shader_test
@@ -0,0 +1,47 @@
+# Tests that no link error occurs for interfaces blocks with matching
+# instances names but mismatching memory qualifier and block names.
+#
+# GLSLangSpec.1.50.11, 4.3.7 Interface Blocks:
+# "The block name (block-name) is used to match interfaces: an output
+# block of one pipeline stage will be matched to an input block with
+# the same name in the subsequent pipeline stage. For uniform blocks,
+# the application uses the block name to identify the block.
+#
+# ...
+#
+# Outside the shading language (i.e., in the API), members are
+# similarly identified except the block name is always used in place
+# of the instance name (API accesses are to interfaces, not to
+# shaders)."
+
+[require]
+GLSL >= 1.50
+
+[vertex shader]
+#version 150
+
+layout(column_major) uniform blockA {
+ mat4 m;
+} inst;
+
+void main()
+{
+ gl_Position = inst.m[0];
+}
+
+[fragment shader]
+#version 150
+
+layout(row_major) uniform blockB {
+ mat4 m;
+} inst;
+
+out vec4 color;
+
+void main()
+{
+ color = inst.m[0];
+}
+
+[test]
+link success
diff --git a/tests/spec/glsl-1.50/linker/instance-matching-uniform-blocks-packaging-qualifier-mismatch.shader_test b/tests/spec/glsl-1.50/linker/instance-matching-uniform-blocks-packaging-qualifier-mismatch.shader_test
new file mode 100644
index 000000000..2ff63a383
--- /dev/null
+++ b/tests/spec/glsl-1.50/linker/instance-matching-uniform-blocks-packaging-qualifier-mismatch.shader_test
@@ -0,0 +1,47 @@
+# Tests that no link error occurs for interfaces blocks with matching
+# instances names but mismatching packaging qualifier and block names.
+#
+# GLSLangSpec.1.50.11, 4.3.7 Interface Blocks:
+# "The block name (block-name) is used to match interfaces: an output
+# block of one pipeline stage will be matched to an input block with
+# the same name in the subsequent pipeline stage. For uniform blocks,
+# the application uses the block name to identify the block.
+#
+# ...
+#
+# Outside the shading language (i.e., in the API), members are
+# similarly identified except the block name is always used in place
+# of the instance name (API accesses are to interfaces, not to
+# shaders)."
+
+[require]
+GLSL >= 1.50
+
+[vertex shader]
+#version 150
+
+layout(std140) uniform blockA {
+ vec4 a;
+} inst;
+
+void main()
+{
+ gl_Position = inst.a;
+}
+
+[fragment shader]
+#version 150
+
+layout(shared) uniform blockB {
+ vec4 a;
+} inst;
+
+out vec4 color;
+
+void main()
+{
+ color = inst.a;
+}
+
+[test]
+link success