[Piglit] [PATCH 2/5] Test that gl_ClipDistance is unavailable in GLSL 1.20

Paul Berry stereotype441 at gmail.com
Fri Sep 23 18:54:16 PDT 2011


gl_ClipDistance was added in GLSL version 1.30.  Verify that it is not
available when compiling against GLSL version 1.20.
---
 .../clipping/clip-distance-unavailable.frag        |   17 +++++++++++++++++
 .../clipping/clip-distance-unavailable.vert        |   18 ++++++++++++++++++
 2 files changed, 35 insertions(+), 0 deletions(-)
 create mode 100644 tests/spec/glsl-1.20/compiler/clipping/clip-distance-unavailable.frag
 create mode 100644 tests/spec/glsl-1.20/compiler/clipping/clip-distance-unavailable.vert

diff --git a/tests/spec/glsl-1.20/compiler/clipping/clip-distance-unavailable.frag b/tests/spec/glsl-1.20/compiler/clipping/clip-distance-unavailable.frag
new file mode 100644
index 0000000..51888a6
--- /dev/null
+++ b/tests/spec/glsl-1.20/compiler/clipping/clip-distance-unavailable.frag
@@ -0,0 +1,17 @@
+/* [config]
+ * expect_result: fail
+ * glsl_version: 1.20
+ * check_link: true
+ * [end config]
+ *
+ * This test verifies that the fragment shader special variable
+ * gl_ClipDistance (defined in GLSL 1.30) is not available when the
+ * GLSL version is 1.20.
+ */
+#version 120
+
+varying float gl_ClipDistance[2];
+
+void main()
+{
+}
diff --git a/tests/spec/glsl-1.20/compiler/clipping/clip-distance-unavailable.vert b/tests/spec/glsl-1.20/compiler/clipping/clip-distance-unavailable.vert
new file mode 100644
index 0000000..cd13aa3
--- /dev/null
+++ b/tests/spec/glsl-1.20/compiler/clipping/clip-distance-unavailable.vert
@@ -0,0 +1,18 @@
+/* [config]
+ * expect_result: fail
+ * glsl_version: 1.20
+ * check_link: true
+ * [end config]
+ *
+ * This test verifies that the vertex shader special variable
+ * gl_ClipDistance (defined in GLSL 1.30) is not available when the
+ * GLSL version is 1.20.
+ */
+#version 120
+
+varying float gl_ClipDistance[2];
+
+void main()
+{
+  gl_Position = vec4(0.0);
+}
-- 
1.7.6.2



More information about the Piglit mailing list