[Piglit] [PATCH 2/2] glsl-1.50: Test the minimum maximum of gl_MaxVaryingFloats
Nicholas Mack
nichmack at gmail.com
Mon Jul 29 17:08:49 PDT 2013
---
.../maximums/gl_MaxVaryingFloats.shader_test | 38 ++++++++++++++++++++++
1 file changed, 38 insertions(+)
create mode 100644 tests/spec/glsl-1.50/execution/maximums/gl_MaxVaryingFloats.shader_test
diff --git a/tests/spec/glsl-1.50/execution/maximums/gl_MaxVaryingFloats.shader_test b/tests/spec/glsl-1.50/execution/maximums/gl_MaxVaryingFloats.shader_test
new file mode 100644
index 0000000..1942da2
--- /dev/null
+++ b/tests/spec/glsl-1.50/execution/maximums/gl_MaxVaryingFloats.shader_test
@@ -0,0 +1,38 @@
+# [description]
+# Tests for GLSL 1.50 minimum maximums for the builtin constants.
+#
+# See the GLSL 1.50.09 specification, section 7.4, page 74.
+
+[require]
+GLSL >= 1.50
+
+[vertex shader]
+#version 150
+
+in vec4 vertex;
+
+void main(void)
+{
+ gl_Position = vertex;
+}
+
+[fragment shader]
+#version 150
+void main(void)
+{
+ if (gl_MaxVaryingFloats >= 60)
+ gl_FragColor = vec4(0, 1, 0, 0);
+ else
+ gl_FragColor = vec4(1, 0, 0, 0);
+}
+
+[vertex data]
+vertex/float/2
+-1.0 -1.0
+ 1.0 -1.0
+ 1.0 1.0
+-1.0 1.0
+
+[test]
+draw arrays GL_TRIANGLE_FAN 0 4
+probe all rgba 0.0 1.0 0.0 0.0
--
1.8.3.1
More information about the Piglit
mailing list