[Piglit] [PATCH 3/3] glsl-1.10/execution/maximums: Verify the limits in section 7.4.

Eric Anholt eric at anholt.net
Sun Oct 23 00:48:25 PDT 2011


---
 .../maximums/gl_MaxClipPlanes.shader_test          |   28 ++++++++++++++++++++
 .../gl_MaxCombinedTextureImageUnits.shader_test    |   28 ++++++++++++++++++++
 .../maximums/gl_MaxDrawBuffers.shader_test         |   28 ++++++++++++++++++++
 .../gl_MaxFragmentUniformComponents.shader_test    |   28 ++++++++++++++++++++
 .../execution/maximums/gl_MaxLights.shader_test    |   28 ++++++++++++++++++++
 .../maximums/gl_MaxTextureCoords.shader_test       |   28 ++++++++++++++++++++
 .../maximums/gl_MaxTextureImageUnits.shader_test   |   28 ++++++++++++++++++++
 .../maximums/gl_MaxTextureUnits.shader_test        |   28 ++++++++++++++++++++
 .../maximums/gl_MaxVaryingFloats.shader_test       |   28 ++++++++++++++++++++
 .../maximums/gl_MaxVertexAttribs.shader_test       |   28 ++++++++++++++++++++
 .../gl_MaxVertexTextureImageUnits.shader_test      |   28 ++++++++++++++++++++
 .../gl_MaxVertexUniformComponents.shader_test      |   28 ++++++++++++++++++++
 12 files changed, 336 insertions(+), 0 deletions(-)
 create mode 100644 tests/spec/glsl-1.10/execution/maximums/gl_MaxClipPlanes.shader_test
 create mode 100644 tests/spec/glsl-1.10/execution/maximums/gl_MaxCombinedTextureImageUnits.shader_test
 create mode 100644 tests/spec/glsl-1.10/execution/maximums/gl_MaxDrawBuffers.shader_test
 create mode 100644 tests/spec/glsl-1.10/execution/maximums/gl_MaxFragmentUniformComponents.shader_test
 create mode 100644 tests/spec/glsl-1.10/execution/maximums/gl_MaxLights.shader_test
 create mode 100644 tests/spec/glsl-1.10/execution/maximums/gl_MaxTextureCoords.shader_test
 create mode 100644 tests/spec/glsl-1.10/execution/maximums/gl_MaxTextureImageUnits.shader_test
 create mode 100644 tests/spec/glsl-1.10/execution/maximums/gl_MaxTextureUnits.shader_test
 create mode 100644 tests/spec/glsl-1.10/execution/maximums/gl_MaxVaryingFloats.shader_test
 create mode 100644 tests/spec/glsl-1.10/execution/maximums/gl_MaxVertexAttribs.shader_test
 create mode 100644 tests/spec/glsl-1.10/execution/maximums/gl_MaxVertexTextureImageUnits.shader_test
 create mode 100644 tests/spec/glsl-1.10/execution/maximums/gl_MaxVertexUniformComponents.shader_test

diff --git a/tests/spec/glsl-1.10/execution/maximums/gl_MaxClipPlanes.shader_test b/tests/spec/glsl-1.10/execution/maximums/gl_MaxClipPlanes.shader_test
new file mode 100644
index 0000000..6314151
--- /dev/null
+++ b/tests/spec/glsl-1.10/execution/maximums/gl_MaxClipPlanes.shader_test
@@ -0,0 +1,28 @@
+# [description]
+# Tests for GLSL 1.10 minimum maximums for the builtin constants.
+#
+# See the GLSL 1.10.59 specification, section 7.4, page 44 (page 50 of the PDF).
+
+[require]
+GLSL >= 1.10
+
+[vertex shader]
+#version 110
+void main(void)
+{
+	gl_Position = gl_Vertex;
+}
+
+[fragment shader]
+#version 110
+void main(void)
+{
+	if (gl_MaxClipPlanes >= 6)
+		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-1.10/execution/maximums/gl_MaxCombinedTextureImageUnits.shader_test b/tests/spec/glsl-1.10/execution/maximums/gl_MaxCombinedTextureImageUnits.shader_test
new file mode 100644
index 0000000..f480e5c
--- /dev/null
+++ b/tests/spec/glsl-1.10/execution/maximums/gl_MaxCombinedTextureImageUnits.shader_test
@@ -0,0 +1,28 @@
+# [description]
+# Tests for GLSL 1.10 minimum maximums for the builtin constants.
+#
+# See the GLSL 1.10.59 specification, section 7.4, page 44 (page 50 of the PDF).
+
+[require]
+GLSL >= 1.10
+
+[vertex shader]
+#version 110
+void main(void)
+{
+	gl_Position = gl_Vertex;
+}
+
+[fragment shader]
+#version 110
+void main(void)
+{
+	if (gl_MaxCombinedTextureImageUnits >= 2)
+		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-1.10/execution/maximums/gl_MaxDrawBuffers.shader_test b/tests/spec/glsl-1.10/execution/maximums/gl_MaxDrawBuffers.shader_test
new file mode 100644
index 0000000..61ca295
--- /dev/null
+++ b/tests/spec/glsl-1.10/execution/maximums/gl_MaxDrawBuffers.shader_test
@@ -0,0 +1,28 @@
+# [description]
+# Tests for GLSL 1.10 minimum maximums for the builtin constants.
+#
+# See the GLSL 1.10.59 specification, section 7.4, page 44 (page 50 of the PDF).
+
+[require]
+GLSL >= 1.10
+
+[vertex shader]
+#version 110
+void main(void)
+{
+	gl_Position = gl_Vertex;
+}
+
+[fragment shader]
+#version 110
+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-1.10/execution/maximums/gl_MaxFragmentUniformComponents.shader_test b/tests/spec/glsl-1.10/execution/maximums/gl_MaxFragmentUniformComponents.shader_test
new file mode 100644
index 0000000..d1da24f
--- /dev/null
+++ b/tests/spec/glsl-1.10/execution/maximums/gl_MaxFragmentUniformComponents.shader_test
@@ -0,0 +1,28 @@
+# [description]
+# Tests for GLSL 1.10 minimum maximums for the builtin constants.
+#
+# See the GLSL 1.10.59 specification, section 7.4, page 44 (page 50 of the PDF).
+
+[require]
+GLSL >= 1.10
+
+[vertex shader]
+#version 110
+void main(void)
+{
+	gl_Position = gl_Vertex;
+}
+
+[fragment shader]
+#version 110
+void main(void)
+{
+	if (gl_MaxFragmentUniformComponents >= 512)
+		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-1.10/execution/maximums/gl_MaxLights.shader_test b/tests/spec/glsl-1.10/execution/maximums/gl_MaxLights.shader_test
new file mode 100644
index 0000000..c7cbf9d
--- /dev/null
+++ b/tests/spec/glsl-1.10/execution/maximums/gl_MaxLights.shader_test
@@ -0,0 +1,28 @@
+# [description]
+# Tests for GLSL 1.10 minimum maximums for the builtin constants.
+#
+# See the GLSL 1.10.59 specification, section 7.4, page 44 (page 50 of the PDF).
+
+[require]
+GLSL >= 1.10
+
+[vertex shader]
+#version 110
+void main(void)
+{
+	gl_Position = gl_Vertex;
+}
+
+[fragment shader]
+#version 110
+void main(void)
+{
+	if (gl_MaxLights >= 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-1.10/execution/maximums/gl_MaxTextureCoords.shader_test b/tests/spec/glsl-1.10/execution/maximums/gl_MaxTextureCoords.shader_test
new file mode 100644
index 0000000..794be9f
--- /dev/null
+++ b/tests/spec/glsl-1.10/execution/maximums/gl_MaxTextureCoords.shader_test
@@ -0,0 +1,28 @@
+# [description]
+# Tests for GLSL 1.10 minimum maximums for the builtin constants.
+#
+# See the GLSL 1.10.59 specification, section 7.4, page 44 (page 50 of the PDF).
+
+[require]
+GLSL >= 1.10
+
+[vertex shader]
+#version 110
+void main(void)
+{
+	gl_Position = gl_Vertex;
+}
+
+[fragment shader]
+#version 110
+void main(void)
+{
+	if (gl_MaxTextureCoords >= 2)
+		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-1.10/execution/maximums/gl_MaxTextureImageUnits.shader_test b/tests/spec/glsl-1.10/execution/maximums/gl_MaxTextureImageUnits.shader_test
new file mode 100644
index 0000000..66b5c74
--- /dev/null
+++ b/tests/spec/glsl-1.10/execution/maximums/gl_MaxTextureImageUnits.shader_test
@@ -0,0 +1,28 @@
+# [description]
+# Tests for GLSL 1.10 minimum maximums for the builtin constants.
+#
+# See the GLSL 1.10.59 specification, section 7.4, page 44 (page 50 of the PDF).
+
+[require]
+GLSL >= 1.10
+
+[vertex shader]
+#version 110
+void main(void)
+{
+	gl_Position = gl_Vertex;
+}
+
+[fragment shader]
+#version 110
+void main(void)
+{
+	if (gl_MaxTextureImageUnits >= 2)
+		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-1.10/execution/maximums/gl_MaxTextureUnits.shader_test b/tests/spec/glsl-1.10/execution/maximums/gl_MaxTextureUnits.shader_test
new file mode 100644
index 0000000..24db06e
--- /dev/null
+++ b/tests/spec/glsl-1.10/execution/maximums/gl_MaxTextureUnits.shader_test
@@ -0,0 +1,28 @@
+# [description]
+# Tests for GLSL 1.10 minimum maximums for the builtin constants.
+#
+# See the GLSL 1.10.59 specification, section 7.4, page 44 (page 50 of the PDF).
+
+[require]
+GLSL >= 1.10
+
+[vertex shader]
+#version 110
+void main(void)
+{
+	gl_Position = gl_Vertex;
+}
+
+[fragment shader]
+#version 110
+void main(void)
+{
+	if (gl_MaxTextureUnits >= 2)
+		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-1.10/execution/maximums/gl_MaxVaryingFloats.shader_test b/tests/spec/glsl-1.10/execution/maximums/gl_MaxVaryingFloats.shader_test
new file mode 100644
index 0000000..b55f809
--- /dev/null
+++ b/tests/spec/glsl-1.10/execution/maximums/gl_MaxVaryingFloats.shader_test
@@ -0,0 +1,28 @@
+# [description]
+# Tests for GLSL 1.10 minimum maximums for the builtin constants.
+#
+# See the GLSL 1.10.59 specification, section 7.4, page 44 (page 50 of the PDF).
+
+[require]
+GLSL >= 1.10
+
+[vertex shader]
+#version 110
+void main(void)
+{
+	gl_Position = gl_Vertex;
+}
+
+[fragment shader]
+#version 110
+void main(void)
+{
+	if (gl_MaxVaryingFloats >= 32)
+		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-1.10/execution/maximums/gl_MaxVertexAttribs.shader_test b/tests/spec/glsl-1.10/execution/maximums/gl_MaxVertexAttribs.shader_test
new file mode 100644
index 0000000..e0872f9
--- /dev/null
+++ b/tests/spec/glsl-1.10/execution/maximums/gl_MaxVertexAttribs.shader_test
@@ -0,0 +1,28 @@
+# [description]
+# Tests for GLSL 1.10 minimum maximums for the builtin constants.
+#
+# See the GLSL 1.10.59 specification, section 7.4, page 44 (page 50 of the PDF).
+
+[require]
+GLSL >= 1.10
+
+[vertex shader]
+#version 110
+void main(void)
+{
+	gl_Position = gl_Vertex;
+}
+
+[fragment shader]
+#version 110
+void main(void)
+{
+	if (gl_MaxVertexAttribs >= 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-1.10/execution/maximums/gl_MaxVertexTextureImageUnits.shader_test b/tests/spec/glsl-1.10/execution/maximums/gl_MaxVertexTextureImageUnits.shader_test
new file mode 100644
index 0000000..0dc85e5
--- /dev/null
+++ b/tests/spec/glsl-1.10/execution/maximums/gl_MaxVertexTextureImageUnits.shader_test
@@ -0,0 +1,28 @@
+# [description]
+# Tests for GLSL 1.10 minimum maximums for the builtin constants.
+#
+# See the GLSL 1.10.59 specification, section 7.4, page 44 (page 50 of the PDF).
+
+[require]
+GLSL >= 1.10
+
+[vertex shader]
+#version 110
+void main(void)
+{
+	gl_Position = gl_Vertex;
+}
+
+[fragment shader]
+#version 110
+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-1.10/execution/maximums/gl_MaxVertexUniformComponents.shader_test b/tests/spec/glsl-1.10/execution/maximums/gl_MaxVertexUniformComponents.shader_test
new file mode 100644
index 0000000..5386bad
--- /dev/null
+++ b/tests/spec/glsl-1.10/execution/maximums/gl_MaxVertexUniformComponents.shader_test
@@ -0,0 +1,28 @@
+# [description]
+# Tests for GLSL 1.10 minimum maximums for the builtin constants.
+#
+# See the GLSL 1.10.59 specification, section 7.4, page 44 (page 50 of the PDF).
+
+[require]
+GLSL >= 1.10
+
+[vertex shader]
+#version 110
+void main(void)
+{
+	gl_Position = gl_Vertex;
+}
+
+[fragment shader]
+#version 110
+void main(void)
+{
+	if (gl_MaxVertexUniformComponents >= 512)
+		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.7



More information about the Piglit mailing list