[Piglit] [PATCH 2/4] GLSL 1.50: Test that vertex cant have input/output layouts and frag shader cant have output layouts

Nicholas Mack nichmack at gmail.com
Tue Aug 6 10:01:30 PDT 2013


Three tests: Vertex input, vertex output, fragment output
---
 tests/spec/glsl-1.50/compiler/layout-fs-no-output.frag | 17 +++++++++++++++++
 tests/spec/glsl-1.50/compiler/layout-vs-no-input.vert  | 17 +++++++++++++++++
 tests/spec/glsl-1.50/compiler/layout-vs-no-output.vert | 17 +++++++++++++++++
 3 files changed, 51 insertions(+)
 create mode 100644 tests/spec/glsl-1.50/compiler/layout-fs-no-output.frag
 create mode 100644 tests/spec/glsl-1.50/compiler/layout-vs-no-input.vert
 create mode 100644 tests/spec/glsl-1.50/compiler/layout-vs-no-output.vert

diff --git a/tests/spec/glsl-1.50/compiler/layout-fs-no-output.frag b/tests/spec/glsl-1.50/compiler/layout-fs-no-output.frag
new file mode 100644
index 0000000..39e0862
--- /dev/null
+++ b/tests/spec/glsl-1.50/compiler/layout-fs-no-output.frag
@@ -0,0 +1,17 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// check_link: true
+// [end config]
+//
+// Section 4.3.8.2(Output Layout Qualifiers) of the GLSL 1.50 spec says:
+// "Vertex and fragment shaders cannot have output layout qualifiers."
+
+#version 150
+
+layout(origin_upper_left) out vec4 b;
+
+void main()
+{
+	gl_FragColor = vec4(0., 1., 0., 1.);
+}
diff --git a/tests/spec/glsl-1.50/compiler/layout-vs-no-input.vert b/tests/spec/glsl-1.50/compiler/layout-vs-no-input.vert
new file mode 100644
index 0000000..bb7958d
--- /dev/null
+++ b/tests/spec/glsl-1.50/compiler/layout-vs-no-input.vert
@@ -0,0 +1,17 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// check_link: true
+// [end config]
+//
+// Section 4.3.8.1(Input Layout Qualifiers) of the GLSL 1.50 spec says:
+// "Vertex shaders do not have any input layout qualifiers."
+
+#version 150
+
+layout(pixel_center_integer) in vec4 b;
+
+void main()
+{
+	gl_Position = b;
+}
diff --git a/tests/spec/glsl-1.50/compiler/layout-vs-no-output.vert b/tests/spec/glsl-1.50/compiler/layout-vs-no-output.vert
new file mode 100644
index 0000000..a98a3b3
--- /dev/null
+++ b/tests/spec/glsl-1.50/compiler/layout-vs-no-output.vert
@@ -0,0 +1,17 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// check_link: true
+// [end config]
+//
+// Section 4.3.8.2(Output Layout Qualifiers) of the GLSL 1.50 spec says:
+// "Vertex and fragment shaders cannot have output layout qualifiers."
+
+#version 150
+
+layout(origin_upper_left) out vec4 b;
+
+void main()
+{
+	b = vec4(2.);
+}
-- 
1.8.3.1



More information about the Piglit mailing list