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

Eric Anholt eric at anholt.net
Sun Oct 23 00:48:24 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.20/execution/maximums/gl_MaxClipPlanes.shader_test
 create mode 100644 tests/spec/glsl-1.20/execution/maximums/gl_MaxCombinedTextureImageUnits.shader_test
 create mode 100644 tests/spec/glsl-1.20/execution/maximums/gl_MaxDrawBuffers.shader_test
 create mode 100644 tests/spec/glsl-1.20/execution/maximums/gl_MaxFragmentUniformComponents.shader_test
 create mode 100644 tests/spec/glsl-1.20/execution/maximums/gl_MaxLights.shader_test
 create mode 100644 tests/spec/glsl-1.20/execution/maximums/gl_MaxTextureCoords.shader_test
 create mode 100644 tests/spec/glsl-1.20/execution/maximums/gl_MaxTextureImageUnits.shader_test
 create mode 100644 tests/spec/glsl-1.20/execution/maximums/gl_MaxTextureUnits.shader_test
 create mode 100644 tests/spec/glsl-1.20/execution/maximums/gl_MaxVaryingFloats.shader_test
 create mode 100644 tests/spec/glsl-1.20/execution/maximums/gl_MaxVertexAttribs.shader_test
 create mode 100644 tests/spec/glsl-1.20/execution/maximums/gl_MaxVertexTextureImageUnits.shader_test
 create mode 100644 tests/spec/glsl-1.20/execution/maximums/gl_MaxVertexUniformComponents.shader_test

diff --git a/tests/spec/glsl-1.20/execution/maximums/gl_MaxClipPlanes.shader_test b/tests/spec/glsl-1.20/execution/maximums/gl_MaxClipPlanes.shader_test
new file mode 100644
index 0000000..1667293
--- /dev/null
+++ b/tests/spec/glsl-1.20/execution/maximums/gl_MaxClipPlanes.shader_test
@@ -0,0 +1,28 @@
+# [description]
+# Tests for GLSL 1.20 minimum maximums for the builtin constants.
+#
+# See the GLSL 1.20.8 specification, section 7.4, page 49 (page 55 of the PDF).
+
+[require]
+GLSL >= 1.20
+
+[vertex shader]
+#version 120
+void main(void)
+{
+	gl_Position = gl_Vertex;
+}
+
+[fragment shader]
+#version 120
+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.20/execution/maximums/gl_MaxCombinedTextureImageUnits.shader_test b/tests/spec/glsl-1.20/execution/maximums/gl_MaxCombinedTextureImageUnits.shader_test
new file mode 100644
index 0000000..a489be0
--- /dev/null
+++ b/tests/spec/glsl-1.20/execution/maximums/gl_MaxCombinedTextureImageUnits.shader_test
@@ -0,0 +1,28 @@
+# [description]
+# Tests for GLSL 1.20 minimum maximums for the builtin constants.
+#
+# See the GLSL 1.20.8 specification, section 7.4, page 49 (page 55 of the PDF).
+
+[require]
+GLSL >= 1.20
+
+[vertex shader]
+#version 120
+void main(void)
+{
+	gl_Position = gl_Vertex;
+}
+
+[fragment shader]
+#version 120
+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.20/execution/maximums/gl_MaxDrawBuffers.shader_test b/tests/spec/glsl-1.20/execution/maximums/gl_MaxDrawBuffers.shader_test
new file mode 100644
index 0000000..e450a1c
--- /dev/null
+++ b/tests/spec/glsl-1.20/execution/maximums/gl_MaxDrawBuffers.shader_test
@@ -0,0 +1,28 @@
+# [description]
+# Tests for GLSL 1.20 minimum maximums for the builtin constants.
+#
+# See the GLSL 1.20.8 specification, section 7.4, page 49 (page 55 of the PDF).
+
+[require]
+GLSL >= 1.20
+
+[vertex shader]
+#version 120
+void main(void)
+{
+	gl_Position = gl_Vertex;
+}
+
+[fragment shader]
+#version 120
+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.20/execution/maximums/gl_MaxFragmentUniformComponents.shader_test b/tests/spec/glsl-1.20/execution/maximums/gl_MaxFragmentUniformComponents.shader_test
new file mode 100644
index 0000000..4df27f1
--- /dev/null
+++ b/tests/spec/glsl-1.20/execution/maximums/gl_MaxFragmentUniformComponents.shader_test
@@ -0,0 +1,28 @@
+# [description]
+# Tests for GLSL 1.20 minimum maximums for the builtin constants.
+#
+# See the GLSL 1.20.8 specification, section 7.4, page 49 (page 55 of the PDF).
+
+[require]
+GLSL >= 1.20
+
+[vertex shader]
+#version 120
+void main(void)
+{
+	gl_Position = gl_Vertex;
+}
+
+[fragment shader]
+#version 120
+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.20/execution/maximums/gl_MaxLights.shader_test b/tests/spec/glsl-1.20/execution/maximums/gl_MaxLights.shader_test
new file mode 100644
index 0000000..3c0fea5
--- /dev/null
+++ b/tests/spec/glsl-1.20/execution/maximums/gl_MaxLights.shader_test
@@ -0,0 +1,28 @@
+# [description]
+# Tests for GLSL 1.20 minimum maximums for the builtin constants.
+#
+# See the GLSL 1.20.8 specification, section 7.4, page 49 (page 55 of the PDF).
+
+[require]
+GLSL >= 1.20
+
+[vertex shader]
+#version 120
+void main(void)
+{
+	gl_Position = gl_Vertex;
+}
+
+[fragment shader]
+#version 120
+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.20/execution/maximums/gl_MaxTextureCoords.shader_test b/tests/spec/glsl-1.20/execution/maximums/gl_MaxTextureCoords.shader_test
new file mode 100644
index 0000000..4951ffd
--- /dev/null
+++ b/tests/spec/glsl-1.20/execution/maximums/gl_MaxTextureCoords.shader_test
@@ -0,0 +1,28 @@
+# [description]
+# Tests for GLSL 1.20 minimum maximums for the builtin constants.
+#
+# See the GLSL 1.20.8 specification, section 7.4, page 49 (page 55 of the PDF).
+
+[require]
+GLSL >= 1.20
+
+[vertex shader]
+#version 120
+void main(void)
+{
+	gl_Position = gl_Vertex;
+}
+
+[fragment shader]
+#version 120
+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.20/execution/maximums/gl_MaxTextureImageUnits.shader_test b/tests/spec/glsl-1.20/execution/maximums/gl_MaxTextureImageUnits.shader_test
new file mode 100644
index 0000000..e32faae
--- /dev/null
+++ b/tests/spec/glsl-1.20/execution/maximums/gl_MaxTextureImageUnits.shader_test
@@ -0,0 +1,28 @@
+# [description]
+# Tests for GLSL 1.20 minimum maximums for the builtin constants.
+#
+# See the GLSL 1.20.8 specification, section 7.4, page 49 (page 55 of the PDF).
+
+[require]
+GLSL >= 1.20
+
+[vertex shader]
+#version 120
+void main(void)
+{
+	gl_Position = gl_Vertex;
+}
+
+[fragment shader]
+#version 120
+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.20/execution/maximums/gl_MaxTextureUnits.shader_test b/tests/spec/glsl-1.20/execution/maximums/gl_MaxTextureUnits.shader_test
new file mode 100644
index 0000000..52bb5f6
--- /dev/null
+++ b/tests/spec/glsl-1.20/execution/maximums/gl_MaxTextureUnits.shader_test
@@ -0,0 +1,28 @@
+# [description]
+# Tests for GLSL 1.20 minimum maximums for the builtin constants.
+#
+# See the GLSL 1.20.8 specification, section 7.4, page 49 (page 55 of the PDF).
+
+[require]
+GLSL >= 1.20
+
+[vertex shader]
+#version 120
+void main(void)
+{
+	gl_Position = gl_Vertex;
+}
+
+[fragment shader]
+#version 120
+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.20/execution/maximums/gl_MaxVaryingFloats.shader_test b/tests/spec/glsl-1.20/execution/maximums/gl_MaxVaryingFloats.shader_test
new file mode 100644
index 0000000..2116faa
--- /dev/null
+++ b/tests/spec/glsl-1.20/execution/maximums/gl_MaxVaryingFloats.shader_test
@@ -0,0 +1,28 @@
+# [description]
+# Tests for GLSL 1.20 minimum maximums for the builtin constants.
+#
+# See the GLSL 1.20.8 specification, section 7.4, page 49 (page 55 of the PDF).
+
+[require]
+GLSL >= 1.20
+
+[vertex shader]
+#version 120
+void main(void)
+{
+	gl_Position = gl_Vertex;
+}
+
+[fragment shader]
+#version 120
+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.20/execution/maximums/gl_MaxVertexAttribs.shader_test b/tests/spec/glsl-1.20/execution/maximums/gl_MaxVertexAttribs.shader_test
new file mode 100644
index 0000000..531fe71
--- /dev/null
+++ b/tests/spec/glsl-1.20/execution/maximums/gl_MaxVertexAttribs.shader_test
@@ -0,0 +1,28 @@
+# [description]
+# Tests for GLSL 1.20 minimum maximums for the builtin constants.
+#
+# See the GLSL 1.20.8 specification, section 7.4, page 49 (page 55 of the PDF).
+
+[require]
+GLSL >= 1.20
+
+[vertex shader]
+#version 120
+void main(void)
+{
+	gl_Position = gl_Vertex;
+}
+
+[fragment shader]
+#version 120
+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.20/execution/maximums/gl_MaxVertexTextureImageUnits.shader_test b/tests/spec/glsl-1.20/execution/maximums/gl_MaxVertexTextureImageUnits.shader_test
new file mode 100644
index 0000000..38fa647
--- /dev/null
+++ b/tests/spec/glsl-1.20/execution/maximums/gl_MaxVertexTextureImageUnits.shader_test
@@ -0,0 +1,28 @@
+# [description]
+# Tests for GLSL 1.20 minimum maximums for the builtin constants.
+#
+# See the GLSL 1.20.8 specification, section 7.4, page 49 (page 55 of the PDF).
+
+[require]
+GLSL >= 1.20
+
+[vertex shader]
+#version 120
+void main(void)
+{
+	gl_Position = gl_Vertex;
+}
+
+[fragment shader]
+#version 120
+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.20/execution/maximums/gl_MaxVertexUniformComponents.shader_test b/tests/spec/glsl-1.20/execution/maximums/gl_MaxVertexUniformComponents.shader_test
new file mode 100644
index 0000000..ae3b729
--- /dev/null
+++ b/tests/spec/glsl-1.20/execution/maximums/gl_MaxVertexUniformComponents.shader_test
@@ -0,0 +1,28 @@
+# [description]
+# Tests for GLSL 1.20 minimum maximums for the builtin constants.
+#
+# See the GLSL 1.20.8 specification, section 7.4, page 49 (page 55 of the PDF).
+
+[require]
+GLSL >= 1.20
+
+[vertex shader]
+#version 120
+void main(void)
+{
+	gl_Position = gl_Vertex;
+}
+
+[fragment shader]
+#version 120
+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