Added tests to check that all the layout-qualifier-ids in more than
one layout-qualifier in a single non-variable output declaration are
taken into account.

The tests check that this works for value and non-value
layout-qualifier-ids.

From the ARB_shading_language_420pack spec:

    "More than one layout qualifier may appear in a single declaration."

Signed-off-by: Andres Gomez <ago...@igalia.com>
---
 ...e-layout-qualifier-in-single-declaration-1.geom | 25 ++++++++++++++++++++++
 ...e-layout-qualifier-in-single-declaration-2.geom | 25 ++++++++++++++++++++++
 ...e-layout-qualifier-in-single-declaration-3.geom | 25 ++++++++++++++++++++++
 ...e-layout-qualifier-in-single-declaration-4.geom | 25 ++++++++++++++++++++++
 4 files changed, 100 insertions(+)
 create mode 100644 
tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-output-non-value-layout-qualifier-in-single-declaration-1.geom
 create mode 100644 
tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-output-non-value-layout-qualifier-in-single-declaration-2.geom
 create mode 100644 
tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-output-value-layout-qualifier-in-single-declaration-3.geom
 create mode 100644 
tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-output-value-layout-qualifier-in-single-declaration-4.geom

diff --git 
a/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-output-non-value-layout-qualifier-in-single-declaration-1.geom
 
b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-output-non-value-layout-qualifier-in-single-declaration-1.geom
new file mode 100644
index 0000000..50cc657
--- /dev/null
+++ 
b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-output-non-value-layout-qualifier-in-single-declaration-1.geom
@@ -0,0 +1,25 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// require_extensions: GL_ARB_shading_language_420pack
+// [end config]
+//
+// From the ARB_shading_language_420pack spec:
+//
+//    "More than one layout qualifier may appear in a single declaration."
+//
+// 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_shading_language_420pack: enable
+
+layout(lines) in;
+layout(triangle_strip) layout(max_vertices=3) out;
+layout(points) out;
+
+void main()
+{
+}
diff --git 
a/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-output-non-value-layout-qualifier-in-single-declaration-2.geom
 
b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-output-non-value-layout-qualifier-in-single-declaration-2.geom
new file mode 100644
index 0000000..11ec500
--- /dev/null
+++ 
b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-output-non-value-layout-qualifier-in-single-declaration-2.geom
@@ -0,0 +1,25 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// require_extensions: GL_ARB_shading_language_420pack
+// [end config]
+//
+// From the ARB_shading_language_420pack spec:
+//
+//    "More than one layout qualifier may appear in a single declaration."
+//
+// 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_shading_language_420pack: enable
+
+layout(lines) in;
+layout(max_vertices=3) layout(triangle_strip) out;
+layout(points) out;
+
+void main()
+{
+}
diff --git 
a/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-output-value-layout-qualifier-in-single-declaration-3.geom
 
b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-output-value-layout-qualifier-in-single-declaration-3.geom
new file mode 100644
index 0000000..d2cc48b
--- /dev/null
+++ 
b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-output-value-layout-qualifier-in-single-declaration-3.geom
@@ -0,0 +1,25 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// require_extensions: GL_ARB_shading_language_420pack
+// [end config]
+//
+// From the ARB_shading_language_420pack spec:
+//
+//    "More than one layout qualifier may appear in a single declaration."
+//
+// 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_shading_language_420pack: enable
+
+layout(lines) in;
+layout(triangle_strip) layout(max_vertices=3) out;
+layout(max_vertices=2) out;
+
+void main()
+{
+}
diff --git 
a/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-output-value-layout-qualifier-in-single-declaration-4.geom
 
b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-output-value-layout-qualifier-in-single-declaration-4.geom
new file mode 100644
index 0000000..21b3259
--- /dev/null
+++ 
b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-output-value-layout-qualifier-in-single-declaration-4.geom
@@ -0,0 +1,25 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// require_extensions: GL_ARB_shading_language_420pack
+// [end config]
+//
+// From the ARB_shading_language_420pack spec:
+//
+//    "More than one layout qualifier may appear in a single declaration."
+//
+// 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_shading_language_420pack: enable
+
+layout(lines) in;
+layout(max_vertices=3) layout(triangle_strip) out;
+layout(max_vertices=2) out;
+
+void main()
+{
+}
-- 
2.9.3

_______________________________________________
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to