aboutsummaryrefslogtreecommitdiff
path: root/tests/spec
diff options
context:
space:
mode:
authorTom Gall <tom.gall@linaro.org>2013-01-08 14:40:15 -0600
committerChad Versace <chad.versace@linux.intel.com>2013-01-09 12:31:01 -0800
commit9318792d58e6a135639ab0e46f34ac8af2176ac9 (patch)
tree90014c56cc55433d216ac4e5ea7391647b54fdc4 /tests/spec
parent06d3d19ec7e15cb1353e33de2e2910fdf0bd01b7 (diff)
downloadpiglit-9318792d58e6a135639ab0e46f34ac8af2176ac9.tar.gz
shader_runner: add glsl-es-1.00 sanity test
Add tests/spec/glsl-es-1.00 directory and new execution/sanity.shader_test in that directory. Reviewed-by: Chad Versace <chad.versace@linux.intel.com> Signed-off-by: Tom Gall <tom.gall@linaro.org>
Diffstat (limited to 'tests/spec')
-rw-r--r--tests/spec/glsl-es-1.00/execution/sanity.shader_test42
1 files changed, 42 insertions, 0 deletions
diff --git a/tests/spec/glsl-es-1.00/execution/sanity.shader_test b/tests/spec/glsl-es-1.00/execution/sanity.shader_test
new file mode 100644
index 00000000..a1dc07a0
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/execution/sanity.shader_test
@@ -0,0 +1,42 @@
+# Fill the window with red, then green, then blue.
+
+[require]
+GL >= 2.0 es
+
+[vertex shader]
+#version 100
+
+attribute vec4 vertex;
+
+void main() {
+ gl_Position = vertex;
+}
+
+[fragment shader]
+#version 100
+
+uniform vec4 u_color;
+
+void main() {
+ gl_FragColor = 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