[5/9] arb_enhanced_layouts: More duplicated layout-qualifier-names tests

Submitted by Andres Gomez on Oct. 26, 2016, 4:14 p.m.

Details

Message ID 20161026161416.22078-6-agomez@igalia.com
State Accepted
Commit dd29f890cac9c047be24b6e649853fbd34ffc365
Headers show

Not browsing as part of any series.

Patch hide | download patch | download mbox

diff --git a/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-invocation-identifiers-in-single-layout-mismatch.geom b/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-invocation-identifiers-in-single-layout-mismatch.geom
new file mode 100644
index 0000000..31d0aed
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-invocation-identifiers-in-single-layout-mismatch.geom
@@ -0,0 +1,38 @@ 
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// require_extensions: GL_ARB_enhanced_layouts GL_ARB_gpu_shader5
+// check_link: false
+// [end config]
+//
+// From the ARB_enhanced_layouts spec:
+//
+//    "More than one layout qualifier may appear in a single declaration.
+//     Additionally, the same layout-qualifier-name can occur multiple times
+//     within a layout qualifier or across multiple layout qualifiers in the
+//     same declaration. When the same layout-qualifier-name occurs
+//     multiple times, in a single declaration, the last occurrence overrides
+//     the former occurrence(s).  Further, if such a layout-qualifier-name
+//     will effect subsequent declarations or other observable behavior, it
+//     is only the last occurrence that will have any effect, behaving as if
+//     the earlier occurrence(s) within the declaration are not present.
+//     This is also true for overriding layout-qualifier-names, where one
+//     overrides the other (e.g., row_major vs. column_major); only the last
+//     occurrence has any effect."
+//
+// From the ARB_gpu_shader5 spec:
+//
+//    "If an invocation count is declared, all such declarations must
+//     specify the same count."
+
+#version 150
+#extension GL_ARB_enhanced_layouts: enable
+#extension GL_ARB_gpu_shader5 : enable
+
+layout(points, invocations=4, invocations=3) in;
+layout(invocations=4) in;
+layout(triangle_strip, max_vertices=3) out;
+
+void main()
+{
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-invocation-identifiers-in-single-layout.geom b/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-invocation-identifiers-in-single-layout.geom
new file mode 100644
index 0000000..a9837fb
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-invocation-identifiers-in-single-layout.geom
@@ -0,0 +1,38 @@ 
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// require_extensions: GL_ARB_enhanced_layouts GL_ARB_gpu_shader5
+// check_link: false
+// [end config]
+//
+// From the ARB_enhanced_layouts spec:
+//
+//    "More than one layout qualifier may appear in a single declaration.
+//     Additionally, the same layout-qualifier-name can occur multiple times
+//     within a layout qualifier or across multiple layout qualifiers in the
+//     same declaration. When the same layout-qualifier-name occurs
+//     multiple times, in a single declaration, the last occurrence overrides
+//     the former occurrence(s).  Further, if such a layout-qualifier-name
+//     will effect subsequent declarations or other observable behavior, it
+//     is only the last occurrence that will have any effect, behaving as if
+//     the earlier occurrence(s) within the declaration are not present.
+//     This is also true for overriding layout-qualifier-names, where one
+//     overrides the other (e.g., row_major vs. column_major); only the last
+//     occurrence has any effect."
+//
+// From the ARB_gpu_shader5 spec:
+//
+//    "If an invocation count is declared, all such declarations must
+//     specify the same count."
+
+#version 150
+#extension GL_ARB_enhanced_layouts: enable
+#extension GL_ARB_gpu_shader5 : enable
+
+layout(points, invocations=3, invocations=4) in;
+layout(invocations=4) in;
+layout(triangle_strip, max_vertices=3) out;
+
+void main()
+{
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-local_size-identifiers-in-single-layout-mismatch.comp b/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-local_size-identifiers-in-single-layout-mismatch.comp
new file mode 100644
index 0000000..9d0b6ca
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-local_size-identifiers-in-single-layout-mismatch.comp
@@ -0,0 +1,37 @@ 
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// require_extensions: GL_ARB_enhanced_layouts GL_ARB_compute_shader
+// [end config]
+//
+// From the ARB_enhanced_layouts spec:
+//
+//    "More than one layout qualifier may appear in a single declaration.
+//     Additionally, the same layout-qualifier-name can occur multiple times
+//     within a layout qualifier or across multiple layout qualifiers in the
+//     same declaration. When the same layout-qualifier-name occurs
+//     multiple times, in a single declaration, the last occurrence overrides
+//     the former occurrence(s).  Further, if such a layout-qualifier-name
+//     will effect subsequent declarations or other observable behavior, it
+//     is only the last occurrence that will have any effect, behaving as if
+//     the earlier occurrence(s) within the declaration are not present.
+//     This is also true for overriding layout-qualifier-names, where one
+//     overrides the other (e.g., row_major vs. column_major); only the last
+//     occurrence has any effect."
+//
+// From the ARB_compute_shader spec:
+//
+//    "[If an input layout qualifier] is declared more than once in
+//     the same shader, all those declarations must indicate the same
+//     local work-group size; otherwise a compile-time error results."
+
+#version 150
+#extension GL_ARB_enhanced_layouts: enable
+#extension GL_ARB_compute_shader: enable
+
+layout(local_size_z = 2, local_size_z = 1) in;
+layout(local_size_z = 2) in;
+
+void main()
+{
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-local_size-identifiers-in-single-layout.comp b/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-local_size-identifiers-in-single-layout.comp
new file mode 100644
index 0000000..c5b0dd7
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-local_size-identifiers-in-single-layout.comp
@@ -0,0 +1,37 @@ 
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// require_extensions: GL_ARB_enhanced_layouts GL_ARB_compute_shader
+// [end config]
+//
+// From the ARB_enhanced_layouts spec:
+//
+//    "More than one layout qualifier may appear in a single declaration.
+//     Additionally, the same layout-qualifier-name can occur multiple times
+//     within a layout qualifier or across multiple layout qualifiers in the
+//     same declaration. When the same layout-qualifier-name occurs
+//     multiple times, in a single declaration, the last occurrence overrides
+//     the former occurrence(s).  Further, if such a layout-qualifier-name
+//     will effect subsequent declarations or other observable behavior, it
+//     is only the last occurrence that will have any effect, behaving as if
+//     the earlier occurrence(s) within the declaration are not present.
+//     This is also true for overriding layout-qualifier-names, where one
+//     overrides the other (e.g., row_major vs. column_major); only the last
+//     occurrence has any effect."
+//
+// From the ARB_compute_shader spec:
+//
+//    "[If an input layout qualifier] is declared more than once in
+//     the same shader, all those declarations must indicate the same
+//     local work-group size; otherwise a compile-time error results."
+
+#version 150
+#extension GL_ARB_enhanced_layouts: enable
+#extension GL_ARB_compute_shader: enable
+
+layout(local_size_z = 1, local_size_z = 2) in;
+layout(local_size_z = 2) in;
+
+void main()
+{
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-max_vertices-identifiers-in-single-layout-mismatch.geom b/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-max_vertices-identifiers-in-single-layout-mismatch.geom
new file mode 100644
index 0000000..9f3519c
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-max_vertices-identifiers-in-single-layout-mismatch.geom
@@ -0,0 +1,40 @@ 
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// require_extensions: GL_ARB_enhanced_layouts
+// check_link: true
+// [end config]
+//
+// From the ARB_enhanced_layouts spec:
+//
+//    "More than one layout qualifier may appear in a single declaration.
+//     Additionally, the same layout-qualifier-name can occur multiple times
+//     within a layout qualifier or across multiple layout qualifiers in the
+//     same declaration. When the same layout-qualifier-name occurs
+//     multiple times, in a single declaration, the last occurrence overrides
+//     the former occurrence(s).  Further, if such a layout-qualifier-name
+//     will effect subsequent declarations or other observable behavior, it
+//     is only the last occurrence that will have any effect, behaving as if
+//     the earlier occurrence(s) within the declaration are not present.
+//     This is also true for overriding layout-qualifier-names, where one
+//     overrides the other (e.g., row_major vs. column_major); only the last
+//     occurrence has any effect."
+//
+// From section 4.3.8.2(Output Layout Qualifiers) of the GLSL 1.50 spec says:
+//
+//    "All geometry shader output layout declarations in a program must declare the
+//     same layout and same value for max_vertices."
+
+#version 150
+#extension GL_ARB_enhanced_layouts: enable
+
+layout(lines) in;
+layout(line_strip, max_vertices=3, max_vertices=2) out;
+
+in vec4 pos[];
+
+layout(max_vertices=3) out;
+
+void main()
+{
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-max_vertices-identifiers-in-single-layout.geom b/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-max_vertices-identifiers-in-single-layout.geom
new file mode 100644
index 0000000..54411cf
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-max_vertices-identifiers-in-single-layout.geom
@@ -0,0 +1,40 @@ 
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// require_extensions: GL_ARB_enhanced_layouts
+// check_link: true
+// [end config]
+//
+// From the ARB_enhanced_layouts spec:
+//
+//    "More than one layout qualifier may appear in a single declaration.
+//     Additionally, the same layout-qualifier-name can occur multiple times
+//     within a layout qualifier or across multiple layout qualifiers in the
+//     same declaration. When the same layout-qualifier-name occurs
+//     multiple times, in a single declaration, the last occurrence overrides
+//     the former occurrence(s).  Further, if such a layout-qualifier-name
+//     will effect subsequent declarations or other observable behavior, it
+//     is only the last occurrence that will have any effect, behaving as if
+//     the earlier occurrence(s) within the declaration are not present.
+//     This is also true for overriding layout-qualifier-names, where one
+//     overrides the other (e.g., row_major vs. column_major); only the last
+//     occurrence has any effect."
+//
+// From section 4.3.8.2(Output Layout Qualifiers) of the GLSL 1.50 spec says:
+//
+//    "All geometry shader output layout declarations in a program must declare the
+//     same layout and same value for max_vertices."
+
+#version 150
+#extension GL_ARB_enhanced_layouts: enable
+
+layout(lines) in;
+layout(line_strip, max_vertices=2, max_vertices=3) out;
+
+in vec4 pos[];
+
+layout(max_vertices=3) out;
+
+void main()
+{
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-vertices-identifiers-in-single-layout-mismatch.tesc b/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-vertices-identifiers-in-single-layout-mismatch.tesc
new file mode 100644
index 0000000..883567e
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-vertices-identifiers-in-single-layout-mismatch.tesc
@@ -0,0 +1,39 @@ 
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// require_extensions: GL_ARB_enhanced_layouts GL_ARB_tessellation_shader
+// check_link: true
+// [end config]
+//
+// From the ARB_enhanced_layouts spec:
+//
+//    "More than one layout qualifier may appear in a single declaration.
+//     Additionally, the same layout-qualifier-name can occur multiple times
+//     within a layout qualifier or across multiple layout qualifiers in the
+//     same declaration. When the same layout-qualifier-name occurs
+//     multiple times, in a single declaration, the last occurrence overrides
+//     the former occurrence(s).  Further, if such a layout-qualifier-name
+//     will effect subsequent declarations or other observable behavior, it
+//     is only the last occurrence that will have any effect, behaving as if
+//     the earlier occurrence(s) within the declaration are not present.
+//     This is also true for overriding layout-qualifier-names, where one
+//     overrides the other (e.g., row_major vs. column_major); only the last
+//     occurrence has any effect."
+//
+// From the ARB_tessellation_shader spec:
+//
+//    "All tessellation control shader layout declarations in a program must
+//     specify the same output patch vertex count."
+
+#version 150
+#extension GL_ARB_enhanced_layouts: enable
+#extension GL_ARB_tessellation_shader: require
+
+layout(vertices = 3, vertices = 4) out;
+layout(vertices = 3) out;
+
+void main() {
+    gl_out[gl_InvocationID].gl_Position = vec4(0.0);
+    gl_TessLevelOuter = float[4](1.0, 1.0, 1.0, 1.0);
+    gl_TessLevelInner = float[2](1.0, 1.0);
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-vertices-identifiers-in-single-layout.tesc b/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-vertices-identifiers-in-single-layout.tesc
new file mode 100644
index 0000000..66f4223
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-vertices-identifiers-in-single-layout.tesc
@@ -0,0 +1,39 @@ 
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// require_extensions: GL_ARB_enhanced_layouts GL_ARB_tessellation_shader
+// check_link: true
+// [end config]
+//
+// From the ARB_enhanced_layouts spec:
+//
+//    "More than one layout qualifier may appear in a single declaration.
+//     Additionally, the same layout-qualifier-name can occur multiple times
+//     within a layout qualifier or across multiple layout qualifiers in the
+//     same declaration. When the same layout-qualifier-name occurs
+//     multiple times, in a single declaration, the last occurrence overrides
+//     the former occurrence(s).  Further, if such a layout-qualifier-name
+//     will effect subsequent declarations or other observable behavior, it
+//     is only the last occurrence that will have any effect, behaving as if
+//     the earlier occurrence(s) within the declaration are not present.
+//     This is also true for overriding layout-qualifier-names, where one
+//     overrides the other (e.g., row_major vs. column_major); only the last
+//     occurrence has any effect."
+//
+// From the ARB_tessellation_shader spec:
+//
+//    "All tessellation control shader layout declarations in a program must
+//     specify the same output patch vertex count."
+
+#version 150
+#extension GL_ARB_enhanced_layouts: enable
+#extension GL_ARB_tessellation_shader: require
+
+layout(vertices = 4, vertices = 3) out;
+layout(vertices = 3) out;
+
+void main() {
+    gl_out[gl_InvocationID].gl_Position = vec4(0.0);
+    gl_TessLevelOuter = float[4](1.0, 1.0, 1.0, 1.0);
+    gl_TessLevelInner = float[2](1.0, 1.0);
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-xfb_stride-block-global-identifiers-in-single-layout-mismatch.vert b/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-xfb_stride-block-global-identifiers-in-single-layout-mismatch.vert
new file mode 100644
index 0000000..5863ffc
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-xfb_stride-block-global-identifiers-in-single-layout-mismatch.vert
@@ -0,0 +1,41 @@ 
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// require_extensions: GL_ARB_enhanced_layouts
+// check_link: true
+// [end config]
+//
+// From the ARB_enhanced_layouts spec:
+//
+//    "More than one layout qualifier may appear in a single declaration.
+//     Additionally, the same layout-qualifier-name can occur multiple times
+//     within a layout qualifier or across multiple layout qualifiers in the
+//     same declaration. When the same layout-qualifier-name occurs
+//     multiple times, in a single declaration, the last occurrence overrides
+//     the former occurrence(s).  Further, if such a layout-qualifier-name
+//     will effect subsequent declarations or other observable behavior, it
+//     is only the last occurrence that will have any effect, behaving as if
+//     the earlier occurrence(s) within the declaration are not present.
+//     This is also true for overriding layout-qualifier-names, where one
+//     overrides the other (e.g., row_major vs. column_major); only the last
+//     occurrence has any effect."
+//
+// From the ARB_enhanced_layouts spec:
+//
+//    "While *xfb_stride* can be declared multiple times for the same buffer,
+//     it is a compile-time or link-time error to have different values
+//     specified for the stride for the same buffer."
+
+#version 150
+#extension GL_ARB_enhanced_layouts: require
+
+layout(xfb_stride = 20, xfb_buffer = 0) out;
+
+layout(xfb_stride = 20, xfb_stride = 32) out block {
+  vec4 var;
+};
+
+void main()
+{
+  var = vec4(1.0);
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-xfb_stride-block-global-identifiers-in-single-layout.vert b/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-xfb_stride-block-global-identifiers-in-single-layout.vert
new file mode 100644
index 0000000..a43961b
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-xfb_stride-block-global-identifiers-in-single-layout.vert
@@ -0,0 +1,41 @@ 
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// require_extensions: GL_ARB_enhanced_layouts
+// check_link: true
+// [end config]
+//
+// From the ARB_enhanced_layouts spec:
+//
+//    "More than one layout qualifier may appear in a single declaration.
+//     Additionally, the same layout-qualifier-name can occur multiple times
+//     within a layout qualifier or across multiple layout qualifiers in the
+//     same declaration. When the same layout-qualifier-name occurs
+//     multiple times, in a single declaration, the last occurrence overrides
+//     the former occurrence(s).  Further, if such a layout-qualifier-name
+//     will effect subsequent declarations or other observable behavior, it
+//     is only the last occurrence that will have any effect, behaving as if
+//     the earlier occurrence(s) within the declaration are not present.
+//     This is also true for overriding layout-qualifier-names, where one
+//     overrides the other (e.g., row_major vs. column_major); only the last
+//     occurrence has any effect."
+//
+// From the ARB_enhanced_layouts spec:
+//
+//    "While *xfb_stride* can be declared multiple times for the same buffer,
+//     it is a compile-time or link-time error to have different values
+//     specified for the stride for the same buffer."
+
+#version 150
+#extension GL_ARB_enhanced_layouts: require
+
+layout(xfb_stride = 20, xfb_buffer = 0) out;
+
+layout(xfb_stride = 32, xfb_stride = 20) out block {
+  vec4 var;
+};
+
+void main()
+{
+  var = vec4(1.0);
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-xfb_stride-block-identifiers-in-single-layout-mismatch.vert b/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-xfb_stride-block-identifiers-in-single-layout-mismatch.vert
new file mode 100644
index 0000000..3bf3934
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-xfb_stride-block-identifiers-in-single-layout-mismatch.vert
@@ -0,0 +1,44 @@ 
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// require_extensions: GL_ARB_enhanced_layouts
+// check_link: true
+// [end config]
+//
+// From the ARB_enhanced_layouts spec:
+//
+//    "More than one layout qualifier may appear in a single declaration.
+//     Additionally, the same layout-qualifier-name can occur multiple times
+//     within a layout qualifier or across multiple layout qualifiers in the
+//     same declaration. When the same layout-qualifier-name occurs
+//     multiple times, in a single declaration, the last occurrence overrides
+//     the former occurrence(s).  Further, if such a layout-qualifier-name
+//     will effect subsequent declarations or other observable behavior, it
+//     is only the last occurrence that will have any effect, behaving as if
+//     the earlier occurrence(s) within the declaration are not present.
+//     This is also true for overriding layout-qualifier-names, where one
+//     overrides the other (e.g., row_major vs. column_major); only the last
+//     occurrence has any effect."
+//
+// From the ARB_enhanced_layouts spec:
+//
+//    "While *xfb_stride* can be declared multiple times for the same buffer,
+//     it is a compile-time or link-time error to have different values
+//     specified for the stride for the same buffer."
+
+#version 150
+#extension GL_ARB_enhanced_layouts: require
+
+layout(xfb_stride = 20, xfb_stride = 32) out block1 {
+  vec4 var;
+};
+
+layout(xfb_buffer = 0, xfb_stride = 20) out block2 {
+  vec4 var2;
+};
+
+void main()
+{
+  var = vec4(1.0);
+  var2 = vec4(0.0);
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-xfb_stride-block-identifiers-in-single-layout.vert b/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-xfb_stride-block-identifiers-in-single-layout.vert
new file mode 100644
index 0000000..e3b0355
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-xfb_stride-block-identifiers-in-single-layout.vert
@@ -0,0 +1,44 @@ 
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// require_extensions: GL_ARB_enhanced_layouts
+// check_link: true
+// [end config]
+//
+// From the ARB_enhanced_layouts spec:
+//
+//    "More than one layout qualifier may appear in a single declaration.
+//     Additionally, the same layout-qualifier-name can occur multiple times
+//     within a layout qualifier or across multiple layout qualifiers in the
+//     same declaration. When the same layout-qualifier-name occurs
+//     multiple times, in a single declaration, the last occurrence overrides
+//     the former occurrence(s).  Further, if such a layout-qualifier-name
+//     will effect subsequent declarations or other observable behavior, it
+//     is only the last occurrence that will have any effect, behaving as if
+//     the earlier occurrence(s) within the declaration are not present.
+//     This is also true for overriding layout-qualifier-names, where one
+//     overrides the other (e.g., row_major vs. column_major); only the last
+//     occurrence has any effect."
+//
+// From the ARB_enhanced_layouts spec:
+//
+//    "While *xfb_stride* can be declared multiple times for the same buffer,
+//     it is a compile-time or link-time error to have different values
+//     specified for the stride for the same buffer."
+
+#version 150
+#extension GL_ARB_enhanced_layouts: require
+
+layout(xfb_stride = 32, xfb_stride = 20) out block1 {
+  vec4 var;
+};
+
+layout(xfb_buffer = 0, xfb_stride = 20) out block2 {
+  vec4 var2;
+};
+
+void main()
+{
+  var = vec4(1.0);
+  var2 = vec4(0.0);
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-xfb_stride-global-identifiers-in-single-layout-mismatch.vert b/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-xfb_stride-global-identifiers-in-single-layout-mismatch.vert
new file mode 100644
index 0000000..b896dbc
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-xfb_stride-global-identifiers-in-single-layout-mismatch.vert
@@ -0,0 +1,37 @@ 
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// require_extensions: GL_ARB_enhanced_layouts
+// check_link: true
+// [end config]
+//
+// From the ARB_enhanced_layouts spec:
+//
+//    "More than one layout qualifier may appear in a single declaration.
+//     Additionally, the same layout-qualifier-name can occur multiple times
+//     within a layout qualifier or across multiple layout qualifiers in the
+//     same declaration. When the same layout-qualifier-name occurs
+//     multiple times, in a single declaration, the last occurrence overrides
+//     the former occurrence(s).  Further, if such a layout-qualifier-name
+//     will effect subsequent declarations or other observable behavior, it
+//     is only the last occurrence that will have any effect, behaving as if
+//     the earlier occurrence(s) within the declaration are not present.
+//     This is also true for overriding layout-qualifier-names, where one
+//     overrides the other (e.g., row_major vs. column_major); only the last
+//     occurrence has any effect."
+//
+// From the ARB_enhanced_layouts spec:
+//
+//    "While *xfb_stride* can be declared multiple times for the same buffer,
+//     it is a compile-time or link-time error to have different values
+//     specified for the stride for the same buffer."
+
+#version 150
+#extension GL_ARB_enhanced_layouts: require
+
+layout(xfb_stride = 32, xfb_stride = 20) out;
+layout(xfb_buffer = 0, xfb_stride = 32) out;
+
+void main()
+{
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-xfb_stride-global-identifiers-in-single-layout.vert b/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-xfb_stride-global-identifiers-in-single-layout.vert
new file mode 100644
index 0000000..70a35e2
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-xfb_stride-global-identifiers-in-single-layout.vert
@@ -0,0 +1,37 @@ 
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// require_extensions: GL_ARB_enhanced_layouts
+// check_link: true
+// [end config]
+//
+// From the ARB_enhanced_layouts spec:
+//
+//    "More than one layout qualifier may appear in a single declaration.
+//     Additionally, the same layout-qualifier-name can occur multiple times
+//     within a layout qualifier or across multiple layout qualifiers in the
+//     same declaration. When the same layout-qualifier-name occurs
+//     multiple times, in a single declaration, the last occurrence overrides
+//     the former occurrence(s).  Further, if such a layout-qualifier-name
+//     will effect subsequent declarations or other observable behavior, it
+//     is only the last occurrence that will have any effect, behaving as if
+//     the earlier occurrence(s) within the declaration are not present.
+//     This is also true for overriding layout-qualifier-names, where one
+//     overrides the other (e.g., row_major vs. column_major); only the last
+//     occurrence has any effect."
+//
+// From the ARB_enhanced_layouts spec:
+//
+//    "While *xfb_stride* can be declared multiple times for the same buffer,
+//     it is a compile-time or link-time error to have different values
+//     specified for the stride for the same buffer."
+
+#version 150
+#extension GL_ARB_enhanced_layouts: require
+
+layout(xfb_stride = 32, xfb_stride = 20) out;
+layout(xfb_buffer = 0, xfb_stride = 20) out;
+
+void main()
+{
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-xfb_stride-namedblock-global-identifiers-in-single-layout-mismatch.vert b/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-xfb_stride-namedblock-global-identifiers-in-single-layout-mismatch.vert
new file mode 100644
index 0000000..e3d6277
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-xfb_stride-namedblock-global-identifiers-in-single-layout-mismatch.vert
@@ -0,0 +1,41 @@ 
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// require_extensions: GL_ARB_enhanced_layouts
+// check_link: true
+// [end config]
+//
+// From the ARB_enhanced_layouts spec:
+//
+//    "More than one layout qualifier may appear in a single declaration.
+//     Additionally, the same layout-qualifier-name can occur multiple times
+//     within a layout qualifier or across multiple layout qualifiers in the
+//     same declaration. When the same layout-qualifier-name occurs
+//     multiple times, in a single declaration, the last occurrence overrides
+//     the former occurrence(s).  Further, if such a layout-qualifier-name
+//     will effect subsequent declarations or other observable behavior, it
+//     is only the last occurrence that will have any effect, behaving as if
+//     the earlier occurrence(s) within the declaration are not present.
+//     This is also true for overriding layout-qualifier-names, where one
+//     overrides the other (e.g., row_major vs. column_major); only the last
+//     occurrence has any effect."
+//
+// From the ARB_enhanced_layouts spec:
+//
+//    "While *xfb_stride* can be declared multiple times for the same buffer,
+//     it is a compile-time or link-time error to have different values
+//     specified for the stride for the same buffer."
+
+#version 150
+#extension GL_ARB_enhanced_layouts: require
+
+layout(xfb_stride = 20, xfb_buffer = 0) out;
+
+layout(xfb_stride = 20, xfb_stride = 32) out block {
+  vec4 var;
+} b1;
+
+void main()
+{
+  b1.var = vec4(1.0);
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-xfb_stride-namedblock-global-identifiers-in-single-layout.vert b/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-xfb_stride-namedblock-global-identifiers-in-single-layout.vert
new file mode 100644
index 0000000..e9c528f
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-xfb_stride-namedblock-global-identifiers-in-single-layout.vert
@@ -0,0 +1,41 @@ 
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// require_extensions: GL_ARB_enhanced_layouts
+// check_link: true
+// [end config]
+//
+// From the ARB_enhanced_layouts spec:
+//
+//    "More than one layout qualifier may appear in a single declaration.
+//     Additionally, the same layout-qualifier-name can occur multiple times
+//     within a layout qualifier or across multiple layout qualifiers in the
+//     same declaration. When the same layout-qualifier-name occurs
+//     multiple times, in a single declaration, the last occurrence overrides
+//     the former occurrence(s).  Further, if such a layout-qualifier-name
+//     will effect subsequent declarations or other observable behavior, it
+//     is only the last occurrence that will have any effect, behaving as if
+//     the earlier occurrence(s) within the declaration are not present.
+//     This is also true for overriding layout-qualifier-names, where one
+//     overrides the other (e.g., row_major vs. column_major); only the last
+//     occurrence has any effect."
+//
+// From the ARB_enhanced_layouts spec:
+//
+//    "While *xfb_stride* can be declared multiple times for the same buffer,
+//     it is a compile-time or link-time error to have different values
+//     specified for the stride for the same buffer."
+
+#version 150
+#extension GL_ARB_enhanced_layouts: require
+
+layout(xfb_stride = 20, xfb_buffer = 0) out;
+
+layout(xfb_stride = 32, xfb_stride = 20) out block {
+  vec4 var;
+} b1;
+
+void main()
+{
+  b1.var = vec4(1.0);
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-xfb_stride-namedblock-identifiers-in-single-layout-mismatch.vert b/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-xfb_stride-namedblock-identifiers-in-single-layout-mismatch.vert
new file mode 100644
index 0000000..b42c283
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-xfb_stride-namedblock-identifiers-in-single-layout-mismatch.vert
@@ -0,0 +1,44 @@ 
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// require_extensions: GL_ARB_enhanced_layouts
+// check_link: true
+// [end config]
+//
+// From the ARB_enhanced_layouts spec:
+//
+//    "More than one layout qualifier may appear in a single declaration.
+//     Additionally, the same layout-qualifier-name can occur multiple times
+//     within a layout qualifier or across multiple layout qualifiers in the
+//     same declaration. When the same layout-qualifier-name occurs
+//     multiple times, in a single declaration, the last occurrence overrides
+//     the former occurrence(s).  Further, if such a layout-qualifier-name
+//     will effect subsequent declarations or other observable behavior, it
+//     is only the last occurrence that will have any effect, behaving as if
+//     the earlier occurrence(s) within the declaration are not present.
+//     This is also true for overriding layout-qualifier-names, where one
+//     overrides the other (e.g., row_major vs. column_major); only the last
+//     occurrence has any effect."
+//
+// From the ARB_enhanced_layouts spec:
+//
+//    "While *xfb_stride* can be declared multiple times for the same buffer,
+//     it is a compile-time or link-time error to have different values
+//     specified for the stride for the same buffer."
+
+#version 150
+#extension GL_ARB_enhanced_layouts: require
+
+layout(xfb_stride = 20, xfb_stride = 32) out block1 {
+  vec4 var;
+} b1;
+
+layout(xfb_buffer = 0, xfb_stride = 20) out block2 {
+  vec4 var2;
+} b2;
+
+void main()
+{
+  b1.var = vec4(1.0);
+  b2.var2 = vec4(0.0);
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-xfb_stride-namedblock-identifiers-in-single-layout.vert b/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-xfb_stride-namedblock-identifiers-in-single-layout.vert
new file mode 100644
index 0000000..c32b58c
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-xfb_stride-namedblock-identifiers-in-single-layout.vert
@@ -0,0 +1,44 @@ 
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// require_extensions: GL_ARB_enhanced_layouts
+// check_link: true
+// [end config]
+//
+// From the ARB_enhanced_layouts spec:
+//
+//    "More than one layout qualifier may appear in a single declaration.
+//     Additionally, the same layout-qualifier-name can occur multiple times
+//     within a layout qualifier or across multiple layout qualifiers in the
+//     same declaration. When the same layout-qualifier-name occurs
+//     multiple times, in a single declaration, the last occurrence overrides
+//     the former occurrence(s).  Further, if such a layout-qualifier-name
+//     will effect subsequent declarations or other observable behavior, it
+//     is only the last occurrence that will have any effect, behaving as if
+//     the earlier occurrence(s) within the declaration are not present.
+//     This is also true for overriding layout-qualifier-names, where one
+//     overrides the other (e.g., row_major vs. column_major); only the last
+//     occurrence has any effect."
+//
+// From the ARB_enhanced_layouts spec:
+//
+//    "While *xfb_stride* can be declared multiple times for the same buffer,
+//     it is a compile-time or link-time error to have different values
+//     specified for the stride for the same buffer."
+
+#version 150
+#extension GL_ARB_enhanced_layouts: require
+
+layout(xfb_stride = 32, xfb_stride = 20) out block1 {
+  vec4 var;
+} b1;
+
+layout(xfb_buffer = 0, xfb_stride = 20) out block2 {
+  vec4 var2;
+} b2;
+
+void main()
+{
+  b1.var = vec4(1.0);
+  b2.var2 = vec4(0.0);
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-xfb_stride-variable-global-identifiers-in-single-layout-mismatch.vert b/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-xfb_stride-variable-global-identifiers-in-single-layout-mismatch.vert
new file mode 100644
index 0000000..937280c
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-xfb_stride-variable-global-identifiers-in-single-layout-mismatch.vert
@@ -0,0 +1,39 @@ 
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// require_extensions: GL_ARB_enhanced_layouts
+// check_link: true
+// [end config]
+//
+// From the ARB_enhanced_layouts spec:
+//
+//    "More than one layout qualifier may appear in a single declaration.
+//     Additionally, the same layout-qualifier-name can occur multiple times
+//     within a layout qualifier or across multiple layout qualifiers in the
+//     same declaration. When the same layout-qualifier-name occurs
+//     multiple times, in a single declaration, the last occurrence overrides
+//     the former occurrence(s).  Further, if such a layout-qualifier-name
+//     will effect subsequent declarations or other observable behavior, it
+//     is only the last occurrence that will have any effect, behaving as if
+//     the earlier occurrence(s) within the declaration are not present.
+//     This is also true for overriding layout-qualifier-names, where one
+//     overrides the other (e.g., row_major vs. column_major); only the last
+//     occurrence has any effect."
+//
+// From the ARB_enhanced_layouts spec:
+//
+//    "While *xfb_stride* can be declared multiple times for the same buffer,
+//     it is a compile-time or link-time error to have different values
+//     specified for the stride for the same buffer."
+
+#version 150
+#extension GL_ARB_enhanced_layouts: require
+
+layout(xfb_stride = 20, xfb_buffer = 0) out;
+
+layout(xfb_buffer = 0, xfb_stride = 20, xfb_stride = 32) out vec4 var;
+
+void main()
+{
+  var = vec4(1.0);
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-xfb_stride-variable-global-identifiers-in-single-layout.vert b/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-xfb_stride-variable-global-identifiers-in-single-layout.vert
new file mode 100644
index 0000000..4cfea4d
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-xfb_stride-variable-global-identifiers-in-single-layout.vert
@@ -0,0 +1,39 @@ 
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// require_extensions: GL_ARB_enhanced_layouts
+// check_link: true
+// [end config]
+//
+// From the ARB_enhanced_layouts spec:
+//
+//    "More than one layout qualifier may appear in a single declaration.
+//     Additionally, the same layout-qualifier-name can occur multiple times
+//     within a layout qualifier or across multiple layout qualifiers in the
+//     same declaration. When the same layout-qualifier-name occurs
+//     multiple times, in a single declaration, the last occurrence overrides
+//     the former occurrence(s).  Further, if such a layout-qualifier-name
+//     will effect subsequent declarations or other observable behavior, it
+//     is only the last occurrence that will have any effect, behaving as if
+//     the earlier occurrence(s) within the declaration are not present.
+//     This is also true for overriding layout-qualifier-names, where one
+//     overrides the other (e.g., row_major vs. column_major); only the last
+//     occurrence has any effect."
+//
+// From the ARB_enhanced_layouts spec:
+//
+//    "While *xfb_stride* can be declared multiple times for the same buffer,
+//     it is a compile-time or link-time error to have different values
+//     specified for the stride for the same buffer."
+
+#version 150
+#extension GL_ARB_enhanced_layouts: require
+
+layout(xfb_stride = 20, xfb_buffer = 0) out;
+
+layout(xfb_buffer = 0, xfb_stride = 32, xfb_stride = 20) out vec4 var;
+
+void main()
+{
+  var = vec4(1.0);
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-xfb_stride-variable-identifiers-in-single-layout-mismatch.vert b/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-xfb_stride-variable-identifiers-in-single-layout-mismatch.vert
new file mode 100644
index 0000000..8874b42
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-xfb_stride-variable-identifiers-in-single-layout-mismatch.vert
@@ -0,0 +1,39 @@ 
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// require_extensions: GL_ARB_enhanced_layouts
+// check_link: true
+// [end config]
+//
+// From the ARB_enhanced_layouts spec:
+//
+//    "More than one layout qualifier may appear in a single declaration.
+//     Additionally, the same layout-qualifier-name can occur multiple times
+//     within a layout qualifier or across multiple layout qualifiers in the
+//     same declaration. When the same layout-qualifier-name occurs
+//     multiple times, in a single declaration, the last occurrence overrides
+//     the former occurrence(s).  Further, if such a layout-qualifier-name
+//     will effect subsequent declarations or other observable behavior, it
+//     is only the last occurrence that will have any effect, behaving as if
+//     the earlier occurrence(s) within the declaration are not present.
+//     This is also true for overriding layout-qualifier-names, where one
+//     overrides the other (e.g., row_major vs. column_major); only the last
+//     occurrence has any effect."
+//
+// From the ARB_enhanced_layouts spec:
+//
+//    "While *xfb_stride* can be declared multiple times for the same buffer,
+//     it is a compile-time or link-time error to have different values
+//     specified for the stride for the same buffer."
+
+#version 150
+#extension GL_ARB_enhanced_layouts: require
+
+layout(xfb_stride = 32, xfb_stride = 20) out vec4 var;
+layout(xfb_buffer = 0, xfb_stride = 32) out vec4 var2;
+
+void main()
+{
+  var = vec4(1.0);
+  var2 = vec4(0.0);
+}
diff --git a/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-xfb_stride-variable-identifiers-in-single-layout.vert b/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-xfb_stride-variable-identifiers-in-single-layout.vert
new file mode 100644
index 0000000..0f7df19
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-xfb_stride-variable-identifiers-in-single-layout.vert
@@ -0,0 +1,39 @@ 
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// require_extensions: GL_ARB_enhanced_layouts
+// check_link: true
+// [end config]
+//
+// From the ARB_enhanced_layouts spec:
+//
+//    "More than one layout qualifier may appear in a single declaration.
+//     Additionally, the same layout-qualifier-name can occur multiple times
+//     within a layout qualifier or across multiple layout qualifiers in the
+//     same declaration. When the same layout-qualifier-name occurs
+//     multiple times, in a single declaration, the last occurrence overrides
+//     the former occurrence(s).  Further, if such a layout-qualifier-name
+//     will effect subsequent declarations or other observable behavior, it
+//     is only the last occurrence that will have any effect, behaving as if
+//     the earlier occurrence(s) within the declaration are not present.
+//     This is also true for overriding layout-qualifier-names, where one
+//     overrides the other (e.g., row_major vs. column_major); only the last
+//     occurrence has any effect."
+//
+// From the ARB_enhanced_layouts spec:
+//
+//    "While *xfb_stride* can be declared multiple times for the same buffer,
+//     it is a compile-time or link-time error to have different values
+//     specified for the stride for the same buffer."
+
+#version 150
+#extension GL_ARB_enhanced_layouts: require
+
+layout(xfb_stride = 32, xfb_stride = 20) out vec4 var;
+layout(xfb_buffer = 0, xfb_stride = 20) out vec4 var2;
+
+void main()
+{
+  var = vec4(1.0);
+  var2 = vec4(0.0);
+}