aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2013-01-14 02:48:34 +0000
committerDave Airlie <airlied@redhat.com>2013-01-15 07:50:14 +0000
commitab8bcea5b530b7f14924c69a75559442b4aebed9 (patch)
treea20c622d334bef0162520de82f4c6a12e2496c55
parentf2704c7257902b0f1b9b83d9af9aad7e448dc142 (diff)
downloadpiglit-ab8bcea5b530b7f14924c69a75559442b4aebed9.tar.gz
glsl-1.50: add simple sanity test
this just ports the basic sanity test from GLSL 3.00 ES to GLSL 1.50 Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Paul Berry <stereotype441@gmail.com>
-rw-r--r--tests/spec/glsl-1.50/execution/sanity.shader_test44
1 files changed, 44 insertions, 0 deletions
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 00000000..cd8331dc
--- /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