[Piglit] [PATCH 6/7] arb_enhanced_layouts: More duplicated layout-qualifier-names tests
Andres Gomez
agomez at igalia.com
Sat Oct 22 20:42:25 UTC 2016
Added tests for the layout-qualifier-names "max_vertices",
"invocations", "vertices", "local_size_[x|y|z]" and "xfb_stride" which
may have redeclarations but all of them enforce that a global or
variable redeclaration holds the same value than in the previous
declaration(s).
These tests check that multiple appearances of the same
layout-qualifier-name in a single layout qualifier with different values
won't trigger a compile/link error.
>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."
Signed-off-by: Andres Gomez <agomez at igalia.com>
---
...tion-identifiers-in-single-layout-mismatch.geom | 38 +++++++++++++++++++
...le-invocation-identifiers-in-single-layout.geom | 38 +++++++++++++++++++
...size-identifiers-in-single-layout-mismatch.comp | 38 +++++++++++++++++++
...le-local_size-identifiers-in-single-layout.comp | 38 +++++++++++++++++++
...ices-identifiers-in-single-layout-mismatch.geom | 40 ++++++++++++++++++++
...-max_vertices-identifiers-in-single-layout.geom | 40 ++++++++++++++++++++
...ices-identifiers-in-single-layout-mismatch.tesc | 39 +++++++++++++++++++
...iple-vertices-identifiers-in-single-layout.tesc | 39 +++++++++++++++++++
...obal-identifiers-in-single-layout-mismatch.vert | 41 ++++++++++++++++++++
...-block-global-identifiers-in-single-layout.vert | 41 ++++++++++++++++++++
...lock-identifiers-in-single-layout-mismatch.vert | 44 ++++++++++++++++++++++
..._stride-block-identifiers-in-single-layout.vert | 44 ++++++++++++++++++++++
...obal-identifiers-in-single-layout-mismatch.vert | 37 ++++++++++++++++++
...stride-global-identifiers-in-single-layout.vert | 37 ++++++++++++++++++
...obal-identifiers-in-single-layout-mismatch.vert | 41 ++++++++++++++++++++
...dblock-global-identifiers-in-single-layout.vert | 41 ++++++++++++++++++++
...lock-identifiers-in-single-layout-mismatch.vert | 44 ++++++++++++++++++++++
...de-namedblock-identifiers-in-single-layout.vert | 44 ++++++++++++++++++++++
...obal-identifiers-in-single-layout-mismatch.vert | 39 +++++++++++++++++++
...riable-global-identifiers-in-single-layout.vert | 39 +++++++++++++++++++
...able-identifiers-in-single-layout-mismatch.vert | 39 +++++++++++++++++++
...ride-variable-identifiers-in-single-layout.vert | 39 +++++++++++++++++++
22 files changed, 880 insertions(+)
create mode 100644 tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-invocation-identifiers-in-single-layout-mismatch.geom
create mode 100644 tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-invocation-identifiers-in-single-layout.geom
create mode 100644 tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-local_size-identifiers-in-single-layout-mismatch.comp
create mode 100644 tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-local_size-identifiers-in-single-layout.comp
create mode 100644 tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-max_vertices-identifiers-in-single-layout-mismatch.geom
create mode 100644 tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-max_vertices-identifiers-in-single-layout.geom
create mode 100644 tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-vertices-identifiers-in-single-layout-mismatch.tesc
create mode 100644 tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-vertices-identifiers-in-single-layout.tesc
create mode 100644 tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-xfb_stride-block-global-identifiers-in-single-layout-mismatch.vert
create mode 100644 tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-xfb_stride-block-global-identifiers-in-single-layout.vert
create mode 100644 tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-xfb_stride-block-identifiers-in-single-layout-mismatch.vert
create mode 100644 tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-xfb_stride-block-identifiers-in-single-layout.vert
create mode 100644 tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-xfb_stride-global-identifiers-in-single-layout-mismatch.vert
create mode 100644 tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-xfb_stride-global-identifiers-in-single-layout.vert
create mode 100644 tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-xfb_stride-namedblock-global-identifiers-in-single-layout-mismatch.vert
create mode 100644 tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-xfb_stride-namedblock-global-identifiers-in-single-layout.vert
create mode 100644 tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-xfb_stride-namedblock-identifiers-in-single-layout-mismatch.vert
create mode 100644 tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-xfb_stride-namedblock-identifiers-in-single-layout.vert
create mode 100644 tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-xfb_stride-variable-global-identifiers-in-single-layout-mismatch.vert
create mode 100644 tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-xfb_stride-variable-global-identifiers-in-single-layout.vert
create mode 100644 tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-xfb_stride-variable-identifiers-in-single-layout-mismatch.vert
create mode 100644 tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-xfb_stride-variable-identifiers-in-single-layout.vert
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..b9a950a
--- /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,38 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// require_extensions: GL_ARB_enhanced_layouts GL_ARB_compute_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_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..7bd9d91
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-local_size-identifiers-in-single-layout.comp
@@ -0,0 +1,38 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// require_extensions: GL_ARB_enhanced_layouts GL_ARB_compute_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_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..03b7dca
--- /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.40
+// 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 140
+#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..688b2f6
--- /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.40
+// 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 140
+#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..c881d88
--- /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.40
+// 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 140
+#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..7ea023d
--- /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.40
+// 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 140
+#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..04d585e
--- /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.40
+// 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 140
+#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..b66784c
--- /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.40
+// 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 140
+#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);
+}
--
2.9.3
More information about the Piglit
mailing list