diff mbox

[3/3] shader_runner: add glsl-es-1.00 sanity test

Message ID 1357933720-23420-3-git-send-email-tom.gall@linaro.org
State Accepted
Headers show

Commit Message

Tom Gall Jan. 11, 2013, 7:48 p.m. UTC
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>
---
 .../spec/glsl-es-1.00/execution/sanity.shader_test |   42 ++++++++++++++++++++
 1 file changed, 42 insertions(+)
 create mode 100644 tests/spec/glsl-es-1.00/execution/sanity.shader_test
diff mbox

Patch

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 0000000..a1dc07a
--- /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