[Piglit] [PATCH 3/3] shader_runner: add glsl-es-1.00 sanity test
Tom Gall
tom.gall at linaro.org
Tue Jan 8 12:40:15 PST 2013
Add tests/spec/glsl-es-1.00 directory and new
execution/sanity.shader_test in that directory.
Reviewed-by: Chad Versace <chad.versace at linux.intel.com>
Signed-off-by: Tom Gall <tom.gall at 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 --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
--
1.7.10.4
More information about the Piglit
mailing list