[Piglit] [PATCH 2/4] glsl-1.50: add simple sanity test

Dave Airlie airlied at gmail.com
Sun Jan 13 19:15:23 PST 2013


From: Dave Airlie <airlied at redhat.com>

this just ports the basic sanity test from GLSL 3.00 ES to GLSL 1.50

Signed-off-by: Dave Airlie <airlied at redhat.com>
---
 tests/spec/glsl-1.50/execution/sanity.shader_test | 44 +++++++++++++++++++++++
 1 file changed, 44 insertions(+)
 create mode 100644 tests/spec/glsl-1.50/execution/sanity.shader_test

diff --git a/tests/spec/glsl-1.50/execution/sanity.shader_test b/tests/spec/glsl-1.50/execution/sanity.shader_test
new file mode 100644
index 0000000..cd8331d
--- /dev/null
+++ b/tests/spec/glsl-1.50/execution/sanity.shader_test
@@ -0,0 +1,44 @@
+# Fill the window with red, then green, then blue.
+
+[require]
+GL >= 3.1
+GLSL >= 1.50
+
+[vertex shader]
+#version 150
+
+in vec4 vertex;
+
+void main() {
+    gl_Position = vertex;
+}
+
+[fragment shader]
+#version 150
+
+uniform vec4 u_color;
+out vec4 color;
+
+void main() {
+    color = u_color;
+}
+
+[vertex data]
+vertex/float/2
+-1.0 -1.0
+ 1.0 -1.0
+ 1.0  1.0
+-1.0  1.0
+
+[test]
+uniform vec4 u_color 1.0 0.0 0.0 1.0
+draw arrays GL_TRIANGLE_FAN 0 4
+probe all rgba 1.0 0.0 0.0 1.0
+
+uniform vec4 u_color 0.0 1.0 0.0 1.0
+draw arrays GL_TRIANGLE_FAN 0 4
+probe all rgba 0.0 1.0 0.0 1.0
+
+uniform vec4 u_color 0.0 0.0 1.0 1.0
+draw arrays GL_TRIANGLE_FAN 0 4
+probe all rgba 0.0 0.0 1.0 1.0
-- 
1.8.1



More information about the Piglit mailing list