[Piglit] [PATCH 1/1] Add tests/spec/glsl-es-1.00/execution/maximums shader tests

Tom Gall tom.gall at linaro.org
Thu Feb 21 08:19:13 PST 2013


Adds gl_MaxCombinedTextureImageUnits.shader_test
     gl_MaxDrawBuffers.shader_test
     gl_MaxFragmentUniformVectors.shader_test
     gl_MaxTextureImageUnits.shader_test
     gl_MaxVaryingVectors.shader_test
     gl_MaxVertexAttribs.shader_test
     gl_MaxVertexTextureImageUnits.shader_test
     gl_MaxVertexUniformVectors.shader_test

These check the built-in constants of the same name from
section 7.4 of the glsl es 1.0.17 spec.

v2: squash patch, address one by one spec reference.

Signed-off-by: Tom Gall <tom.gall at linaro.org>
---
 .../gl_MaxCombinedTextureImageUnits.shader_test    |   30 ++++++++++++++++++++
 .../maximums/gl_MaxDrawBuffers.shader_test         |   29 +++++++++++++++++++
 .../gl_MaxFragmentUniformVectors.shader_test       |   29 +++++++++++++++++++
 .../maximums/gl_MaxTextureImageUnits.shader_test   |   29 +++++++++++++++++++
 .../maximums/gl_MaxVaryingVectors.shader_test      |   29 +++++++++++++++++++
 .../maximums/gl_MaxVertexAttribs.shader_test       |   29 +++++++++++++++++++
 .../gl_MaxVertexTextureImageUnits.shader_test      |   29 +++++++++++++++++++
 .../gl_MaxVertexUniformVectors.shader_test         |   29 +++++++++++++++++++
 8 files changed, 233 insertions(+)
 create mode 100644 tests/spec/glsl-es-1.00/execution/maximums/gl_MaxCombinedTextureImageUnits.shader_test
 create mode 100644 tests/spec/glsl-es-1.00/execution/maximums/gl_MaxDrawBuffers.shader_test
 create mode 100644 tests/spec/glsl-es-1.00/execution/maximums/gl_MaxFragmentUniformVectors.shader_test
 create mode 100644 tests/spec/glsl-es-1.00/execution/maximums/gl_MaxTextureImageUnits.shader_test
 create mode 100644 tests/spec/glsl-es-1.00/execution/maximums/gl_MaxVaryingVectors.shader_test
 create mode 100644 tests/spec/glsl-es-1.00/execution/maximums/gl_MaxVertexAttribs.shader_test
 create mode 100644 tests/spec/glsl-es-1.00/execution/maximums/gl_MaxVertexTextureImageUnits.shader_test
 create mode 100644 tests/spec/glsl-es-1.00/execution/maximums/gl_MaxVertexUniformVectors.shader_test

diff --git a/tests/spec/glsl-es-1.00/execution/maximums/gl_MaxCombinedTextureImageUnits.shader_test b/tests/spec/glsl-es-1.00/execution/maximums/gl_MaxCombinedTextureImageUnits.shader_test
new file mode 100644
index 0000000..887cb8f
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/execution/maximums/gl_MaxCombinedTextureImageUnits.shader_test
@@ -0,0 +1,30 @@
+# [description]
+# Tests for GLSL ES 1.00 minimum maximums for the builtin constants.
+#
+# See the GLSL ES 1.0.17 specification, section 7.4, 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_MaxCombinedTextureImageUnits >= 8)
+		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
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..b9a9b5b
--- /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.4, 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
diff --git a/tests/spec/glsl-es-1.00/execution/maximums/gl_MaxFragmentUniformVectors.shader_test b/tests/spec/glsl-es-1.00/execution/maximums/gl_MaxFragmentUniformVectors.shader_test
new file mode 100644
index 0000000..df3ecbc
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/execution/maximums/gl_MaxFragmentUniformVectors.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.4, 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_MaxFragmentUniformVectors >= 16)
+		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
diff --git a/tests/spec/glsl-es-1.00/execution/maximums/gl_MaxTextureImageUnits.shader_test b/tests/spec/glsl-es-1.00/execution/maximums/gl_MaxTextureImageUnits.shader_test
new file mode 100644
index 0000000..e1b0ed7
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/execution/maximums/gl_MaxTextureImageUnits.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.4, 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_MaxTextureImageUnits >= 8)
+		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
diff --git a/tests/spec/glsl-es-1.00/execution/maximums/gl_MaxVaryingVectors.shader_test b/tests/spec/glsl-es-1.00/execution/maximums/gl_MaxVaryingVectors.shader_test
new file mode 100644
index 0000000..871b07c
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/execution/maximums/gl_MaxVaryingVectors.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.4, 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_MaxVaryingVectors >= 8)
+		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
diff --git a/tests/spec/glsl-es-1.00/execution/maximums/gl_MaxVertexAttribs.shader_test b/tests/spec/glsl-es-1.00/execution/maximums/gl_MaxVertexAttribs.shader_test
new file mode 100644
index 0000000..82ea187
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/execution/maximums/gl_MaxVertexAttribs.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.4, 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_MaxVertexAttribs >= 8)
+		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
diff --git a/tests/spec/glsl-es-1.00/execution/maximums/gl_MaxVertexTextureImageUnits.shader_test b/tests/spec/glsl-es-1.00/execution/maximums/gl_MaxVertexTextureImageUnits.shader_test
new file mode 100644
index 0000000..1a27665
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/execution/maximums/gl_MaxVertexTextureImageUnits.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.4, 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_MaxVertexTextureImageUnits >= 0)
+		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
diff --git a/tests/spec/glsl-es-1.00/execution/maximums/gl_MaxVertexUniformVectors.shader_test b/tests/spec/glsl-es-1.00/execution/maximums/gl_MaxVertexUniformVectors.shader_test
new file mode 100644
index 0000000..9f85b79
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/execution/maximums/gl_MaxVertexUniformVectors.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.4, 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_MaxVertexUniformVectors >= 128)
+		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
-- 
1.7.10.4



More information about the Piglit mailing list