[Piglit] [PATCH 1/3] glsl-1.30/execution/maximums: Verify the limits in section 7.4.
Eric Anholt
eric at anholt.net
Sun Oct 23 00:48:23 PDT 2011
---
.../maximums/gl_MaxClipDistances.shader_test | 28 ++++++++++++++++++++
.../maximums/gl_MaxClipPlanes.shader_test | 28 ++++++++++++++++++++
.../gl_MaxCombinedTextureImageUnits.shader_test | 28 ++++++++++++++++++++
.../maximums/gl_MaxDrawBuffers.shader_test | 28 ++++++++++++++++++++
.../gl_MaxFragmentUniformComponents.shader_test | 28 ++++++++++++++++++++
.../maximums/gl_MaxTextureCoords.shader_test | 28 ++++++++++++++++++++
.../maximums/gl_MaxTextureImageUnits.shader_test | 28 ++++++++++++++++++++
.../maximums/gl_MaxTextureUnits.shader_test | 28 ++++++++++++++++++++
.../maximums/gl_MaxVaryingComponents.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 ++++++++++++++++++++
13 files changed, 364 insertions(+), 0 deletions(-)
create mode 100644 tests/spec/glsl-1.30/execution/maximums/gl_MaxClipDistances.shader_test
create mode 100644 tests/spec/glsl-1.30/execution/maximums/gl_MaxClipPlanes.shader_test
create mode 100644 tests/spec/glsl-1.30/execution/maximums/gl_MaxCombinedTextureImageUnits.shader_test
create mode 100644 tests/spec/glsl-1.30/execution/maximums/gl_MaxDrawBuffers.shader_test
create mode 100644 tests/spec/glsl-1.30/execution/maximums/gl_MaxFragmentUniformComponents.shader_test
create mode 100644 tests/spec/glsl-1.30/execution/maximums/gl_MaxTextureCoords.shader_test
create mode 100644 tests/spec/glsl-1.30/execution/maximums/gl_MaxTextureImageUnits.shader_test
create mode 100644 tests/spec/glsl-1.30/execution/maximums/gl_MaxTextureUnits.shader_test
create mode 100644 tests/spec/glsl-1.30/execution/maximums/gl_MaxVaryingComponents.shader_test
create mode 100644 tests/spec/glsl-1.30/execution/maximums/gl_MaxVaryingFloats.shader_test
create mode 100644 tests/spec/glsl-1.30/execution/maximums/gl_MaxVertexAttribs.shader_test
create mode 100644 tests/spec/glsl-1.30/execution/maximums/gl_MaxVertexTextureImageUnits.shader_test
create mode 100644 tests/spec/glsl-1.30/execution/maximums/gl_MaxVertexUniformComponents.shader_test
diff --git a/tests/spec/glsl-1.30/execution/maximums/gl_MaxClipDistances.shader_test b/tests/spec/glsl-1.30/execution/maximums/gl_MaxClipDistances.shader_test
new file mode 100644
index 0000000..d4c2fcb
--- /dev/null
+++ b/tests/spec/glsl-1.30/execution/maximums/gl_MaxClipDistances.shader_test
@@ -0,0 +1,28 @@
+# [description]
+# Tests for GLSL 1.30 minimum maximums for the builtin constants.
+#
+# See the GLSL 1.30.08 specification, section 7.4, page 67.
+
+[require]
+GLSL >= 1.30
+
+[vertex shader]
+#version 130
+void main(void)
+{
+ gl_Position = gl_Vertex;
+}
+
+[fragment shader]
+#version 130
+void main(void)
+{
+ if (gl_MaxClipDistances >= 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.30/execution/maximums/gl_MaxClipPlanes.shader_test b/tests/spec/glsl-1.30/execution/maximums/gl_MaxClipPlanes.shader_test
new file mode 100644
index 0000000..9d9ad99
--- /dev/null
+++ b/tests/spec/glsl-1.30/execution/maximums/gl_MaxClipPlanes.shader_test
@@ -0,0 +1,28 @@
+# [description]
+# Tests for GLSL 1.30 minimum maximums for the builtin constants.
+#
+# See the GLSL 1.30.08 specification, section 7.4, page 67.
+
+[require]
+GLSL >= 1.30
+
+[vertex shader]
+#version 130
+void main(void)
+{
+ gl_Position = gl_Vertex;
+}
+
+[fragment shader]
+#version 130
+void main(void)
+{
+ if (gl_MaxClipPlanes >= 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.30/execution/maximums/gl_MaxCombinedTextureImageUnits.shader_test b/tests/spec/glsl-1.30/execution/maximums/gl_MaxCombinedTextureImageUnits.shader_test
new file mode 100644
index 0000000..ec95147
--- /dev/null
+++ b/tests/spec/glsl-1.30/execution/maximums/gl_MaxCombinedTextureImageUnits.shader_test
@@ -0,0 +1,28 @@
+# [description]
+# Tests for GLSL 1.30 minimum maximums for the builtin constants.
+#
+# See the GLSL 1.30.08 specification, section 7.4, page 67.
+
+[require]
+GLSL >= 1.30
+
+[vertex shader]
+#version 130
+void main(void)
+{
+ gl_Position = gl_Vertex;
+}
+
+[fragment shader]
+#version 130
+void main(void)
+{
+ if (gl_MaxCombinedTextureImageUnits >= 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.30/execution/maximums/gl_MaxDrawBuffers.shader_test b/tests/spec/glsl-1.30/execution/maximums/gl_MaxDrawBuffers.shader_test
new file mode 100644
index 0000000..4350623
--- /dev/null
+++ b/tests/spec/glsl-1.30/execution/maximums/gl_MaxDrawBuffers.shader_test
@@ -0,0 +1,28 @@
+# [description]
+# Tests for GLSL 1.30 minimum maximums for the builtin constants.
+#
+# See the GLSL 1.30.08 specification, section 7.4, page 67.
+
+[require]
+GLSL >= 1.30
+
+[vertex shader]
+#version 130
+void main(void)
+{
+ gl_Position = gl_Vertex;
+}
+
+[fragment shader]
+#version 130
+void main(void)
+{
+ if (gl_MaxDrawBuffers >= 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.30/execution/maximums/gl_MaxFragmentUniformComponents.shader_test b/tests/spec/glsl-1.30/execution/maximums/gl_MaxFragmentUniformComponents.shader_test
new file mode 100644
index 0000000..1dce3f5
--- /dev/null
+++ b/tests/spec/glsl-1.30/execution/maximums/gl_MaxFragmentUniformComponents.shader_test
@@ -0,0 +1,28 @@
+# [description]
+# Tests for GLSL 1.30 minimum maximums for the builtin constants.
+#
+# See the GLSL 1.30.08 specification, section 7.4, page 67.
+
+[require]
+GLSL >= 1.30
+
+[vertex shader]
+#version 130
+void main(void)
+{
+ gl_Position = gl_Vertex;
+}
+
+[fragment shader]
+#version 130
+void main(void)
+{
+ if (gl_MaxFragmentUniformComponents >= 1024)
+ 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.30/execution/maximums/gl_MaxTextureCoords.shader_test b/tests/spec/glsl-1.30/execution/maximums/gl_MaxTextureCoords.shader_test
new file mode 100644
index 0000000..d83f315
--- /dev/null
+++ b/tests/spec/glsl-1.30/execution/maximums/gl_MaxTextureCoords.shader_test
@@ -0,0 +1,28 @@
+# [description]
+# Tests for GLSL 1.30 minimum maximums for the builtin constants.
+#
+# See the GLSL 1.30.08 specification, section 7.4, page 67.
+
+[require]
+GLSL >= 1.30
+
+[vertex shader]
+#version 130
+void main(void)
+{
+ gl_Position = gl_Vertex;
+}
+
+[fragment shader]
+#version 130
+void main(void)
+{
+ if (gl_MaxTextureCoords >= 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.30/execution/maximums/gl_MaxTextureImageUnits.shader_test b/tests/spec/glsl-1.30/execution/maximums/gl_MaxTextureImageUnits.shader_test
new file mode 100644
index 0000000..0b4a9ca
--- /dev/null
+++ b/tests/spec/glsl-1.30/execution/maximums/gl_MaxTextureImageUnits.shader_test
@@ -0,0 +1,28 @@
+# [description]
+# Tests for GLSL 1.30 minimum maximums for the builtin constants.
+#
+# See the GLSL 1.30.08 specification, section 7.4, page 67.
+
+[require]
+GLSL >= 1.30
+
+[vertex shader]
+#version 130
+void main(void)
+{
+ gl_Position = gl_Vertex;
+}
+
+[fragment shader]
+#version 130
+void main(void)
+{
+ if (gl_MaxTextureImageUnits >= 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.30/execution/maximums/gl_MaxTextureUnits.shader_test b/tests/spec/glsl-1.30/execution/maximums/gl_MaxTextureUnits.shader_test
new file mode 100644
index 0000000..7cec666
--- /dev/null
+++ b/tests/spec/glsl-1.30/execution/maximums/gl_MaxTextureUnits.shader_test
@@ -0,0 +1,28 @@
+# [description]
+# Tests for GLSL 1.30 minimum maximums for the builtin constants.
+#
+# See the GLSL 1.30.08 specification, section 7.4, page 67.
+
+[require]
+GLSL >= 1.30
+
+[vertex shader]
+#version 130
+void main(void)
+{
+ gl_Position = gl_Vertex;
+}
+
+[fragment shader]
+#version 130
+void main(void)
+{
+ if (gl_MaxTextureUnits >= 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.30/execution/maximums/gl_MaxVaryingComponents.shader_test b/tests/spec/glsl-1.30/execution/maximums/gl_MaxVaryingComponents.shader_test
new file mode 100644
index 0000000..377e5f7
--- /dev/null
+++ b/tests/spec/glsl-1.30/execution/maximums/gl_MaxVaryingComponents.shader_test
@@ -0,0 +1,28 @@
+# [description]
+# Tests for GLSL 1.30 minimum maximums for the builtin constants.
+#
+# See the GLSL 1.30.08 specification, section 7.4, page 67.
+
+[require]
+GLSL >= 1.30
+
+[vertex shader]
+#version 130
+void main(void)
+{
+ gl_Position = gl_Vertex;
+}
+
+[fragment shader]
+#version 130
+void main(void)
+{
+ if (gl_MaxVaryingComponents >= 64)
+ 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.30/execution/maximums/gl_MaxVaryingFloats.shader_test b/tests/spec/glsl-1.30/execution/maximums/gl_MaxVaryingFloats.shader_test
new file mode 100644
index 0000000..9a20893
--- /dev/null
+++ b/tests/spec/glsl-1.30/execution/maximums/gl_MaxVaryingFloats.shader_test
@@ -0,0 +1,28 @@
+# [description]
+# Tests for GLSL 1.30 minimum maximums for the builtin constants.
+#
+# See the GLSL 1.30.08 specification, section 7.4, page 67.
+
+[require]
+GLSL >= 1.30
+
+[vertex shader]
+#version 130
+void main(void)
+{
+ gl_Position = gl_Vertex;
+}
+
+[fragment shader]
+#version 130
+void main(void)
+{
+ if (gl_MaxVaryingFloats >= 64)
+ 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.30/execution/maximums/gl_MaxVertexAttribs.shader_test b/tests/spec/glsl-1.30/execution/maximums/gl_MaxVertexAttribs.shader_test
new file mode 100644
index 0000000..53fa73e
--- /dev/null
+++ b/tests/spec/glsl-1.30/execution/maximums/gl_MaxVertexAttribs.shader_test
@@ -0,0 +1,28 @@
+# [description]
+# Tests for GLSL 1.30 minimum maximums for the builtin constants.
+#
+# See the GLSL 1.30.08 specification, section 7.4, page 67.
+
+[require]
+GLSL >= 1.30
+
+[vertex shader]
+#version 130
+void main(void)
+{
+ gl_Position = gl_Vertex;
+}
+
+[fragment shader]
+#version 130
+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.30/execution/maximums/gl_MaxVertexTextureImageUnits.shader_test b/tests/spec/glsl-1.30/execution/maximums/gl_MaxVertexTextureImageUnits.shader_test
new file mode 100644
index 0000000..cf63f40
--- /dev/null
+++ b/tests/spec/glsl-1.30/execution/maximums/gl_MaxVertexTextureImageUnits.shader_test
@@ -0,0 +1,28 @@
+# [description]
+# Tests for GLSL 1.30 minimum maximums for the builtin constants.
+#
+# See the GLSL 1.30.08 specification, section 7.4, page 67.
+
+[require]
+GLSL >= 1.30
+
+[vertex shader]
+#version 130
+void main(void)
+{
+ gl_Position = gl_Vertex;
+}
+
+[fragment shader]
+#version 130
+void main(void)
+{
+ if (gl_MaxVertexTextureImageUnits >= 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.30/execution/maximums/gl_MaxVertexUniformComponents.shader_test b/tests/spec/glsl-1.30/execution/maximums/gl_MaxVertexUniformComponents.shader_test
new file mode 100644
index 0000000..9a57362
--- /dev/null
+++ b/tests/spec/glsl-1.30/execution/maximums/gl_MaxVertexUniformComponents.shader_test
@@ -0,0 +1,28 @@
+# [description]
+# Tests for GLSL 1.30 minimum maximums for the builtin constants.
+#
+# See the GLSL 1.30.08 specification, section 7.4, page 67.
+
+[require]
+GLSL >= 1.30
+
+[vertex shader]
+#version 130
+void main(void)
+{
+ gl_Position = gl_Vertex;
+}
+
+[fragment shader]
+#version 130
+void main(void)
+{
+ if (gl_MaxVertexUniformComponents >= 1024)
+ 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