[Piglit] [PATCH] GLSL: Test that input layout qualifiers cannot be used on variable declarations
Nicholas Mack
nichmack at gmail.com
Fri Sep 20 12:31:05 PDT 2013
---
...-layout-qualifiers-with-variable-declarations.geom | 19 +++++++++++++++++++
...-layout-qualifiers-with-variable-declarations.geom | 19 +++++++++++++++++++
2 files changed, 38 insertions(+)
create mode 100644 tests/spec/glsl-1.50/compiler/incorrect-in-layout-qualifiers-with-variable-declarations.geom
create mode 100644 tests/spec/glsl-1.50/compiler/incorrect-out-layout-qualifiers-with-variable-declarations.geom
diff --git a/tests/spec/glsl-1.50/compiler/incorrect-in-layout-qualifiers-with-variable-declarations.geom b/tests/spec/glsl-1.50/compiler/incorrect-in-layout-qualifiers-with-variable-declarations.geom
new file mode 100644
index 0000000..f26b60d
--- /dev/null
+++ b/tests/spec/glsl-1.50/compiler/incorrect-in-layout-qualifiers-with-variable-declarations.geom
@@ -0,0 +1,19 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// check_link: true
+// [end config]
+//
+// Tests that input layout qualifiers cannot be used on a variable declaration.
+//
+// GLSLangSpec 1.50, section 4.3.8.2 (Output Layout Qualifiers):
+// "Geometry shaders allow input layout qualifiers only on the interface
+// qualifier in, not on an input block,block member, or variable."
+
+#version 150
+
+layout(points) in float c[];
+
+void main()
+{
+}
diff --git a/tests/spec/glsl-1.50/compiler/incorrect-out-layout-qualifiers-with-variable-declarations.geom b/tests/spec/glsl-1.50/compiler/incorrect-out-layout-qualifiers-with-variable-declarations.geom
new file mode 100644
index 0000000..161de1c
--- /dev/null
+++ b/tests/spec/glsl-1.50/compiler/incorrect-out-layout-qualifiers-with-variable-declarations.geom
@@ -0,0 +1,19 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// check_link: true
+// [end config]
+//
+// Tests that output layout qualifiers cannot be used on a variable declaration.
+//
+// GLSLangSpec 1.50, section 4.3.8.2 (Output Layout Qualifiers):
+// "Geometry shaders can have output layout qualifiers only on the interface
+// qualifier out, not on an output block or variable declaration."
+
+#version 150
+
+layout(points) out float c;
+
+void main()
+{
+}
--
1.8.3.1
More information about the Piglit
mailing list