diff mbox

[2/8] shader_runner: glsl-es-1.00 add maximums/gl_MaxDrawBuffers.shader_test

Message ID 1361224963-8407-2-git-send-email-tom.gall@linaro.org
State Accepted
Headers show

Commit Message

Tom Gall Feb. 18, 2013, 10:02 p.m. UTC
Adds tests/spec/glsl-es-1.00/maximums/gl_MaxDrawBuffers.shader_test
checks built-in constant gl_MaxDrawBuffers

Signed-off-by: Tom Gall <tom.gall@linaro.org>
---
 .../maximums/gl_MaxDrawBuffers.shader_test         |   29 ++++++++++++++++++++
 1 file changed, 29 insertions(+)
 create mode 100644 tests/spec/glsl-es-1.00/execution/maximums/gl_MaxDrawBuffers.shader_test
diff mbox

Patch

diff --git a/tests/spec/glsl-es-1.00/execution/maximums/gl_MaxDrawBuffers.shader_test b/tests/spec/glsl-es-1.00/execution/maximums/gl_MaxDrawBuffers.shader_test
new file mode 100644
index 0000000..7f647bc
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/execution/maximums/gl_MaxDrawBuffers.shader_test
@@ -0,0 +1,29 @@ 
+# [description]
+# Tests for GLSL ES 1.00 minimum maximums for the builtin constants.
+#
+# See the GLSL ES 1.0.17 specification, section 7.3, page 61.
+
+[require]
+GLSL ES >= 1.00
+GL ES >= 2.0
+
+[vertex shader]
+attribute vec4 vertex;
+
+void main(void)
+{
+	gl_Position = vertex;
+}
+
+[fragment shader]
+void main(void)
+{
+	if (gl_MaxDrawBuffers >= 1)
+		gl_FragColor = vec4(0, 1, 0, 0);
+	else
+		gl_FragColor = vec4(1, 0, 0, 0);
+}
+
+[test]
+draw rect -1 -1 2 2
+probe all rgba 0.0 1.0 0.0 0.0