[Piglit] [PATCH 04/13] glsl-1.20: Convert minimum-maximums tests to use built-in-constants program

Ian Romanick idr at freedesktop.org
Mon Aug 26 10:33:06 PDT 2013


From: Ian Romanick <ian.d.romanick at intel.com>

minimum-maximums.txt was generated by:

    cd tests/spec/glsl-1.20
    echo 1.20 > minimum-maximums.txt
    grep gl_Max execution/maximums/gl_Max* |\
        sort |\
        sed 's/[^(]\+[(]//;s/ >= / /;s/[)]$//' >> minimum-maximums.txt

Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
---
 tests/all.tests                                    |  1 +
 .../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 ----------------------
 tests/spec/glsl-1.20/minimum-maximums.txt          | 13 ++++++++++
 14 files changed, 14 insertions(+), 336 deletions(-)
 delete mode 100644 tests/spec/glsl-1.20/execution/maximums/gl_MaxClipPlanes.shader_test
 delete mode 100644 tests/spec/glsl-1.20/execution/maximums/gl_MaxCombinedTextureImageUnits.shader_test
 delete mode 100644 tests/spec/glsl-1.20/execution/maximums/gl_MaxDrawBuffers.shader_test
 delete mode 100644 tests/spec/glsl-1.20/execution/maximums/gl_MaxFragmentUniformComponents.shader_test
 delete mode 100644 tests/spec/glsl-1.20/execution/maximums/gl_MaxLights.shader_test
 delete mode 100644 tests/spec/glsl-1.20/execution/maximums/gl_MaxTextureCoords.shader_test
 delete mode 100644 tests/spec/glsl-1.20/execution/maximums/gl_MaxTextureImageUnits.shader_test
 delete mode 100644 tests/spec/glsl-1.20/execution/maximums/gl_MaxTextureUnits.shader_test
 delete mode 100644 tests/spec/glsl-1.20/execution/maximums/gl_MaxVaryingFloats.shader_test
 delete mode 100644 tests/spec/glsl-1.20/execution/maximums/gl_MaxVertexAttribs.shader_test
 delete mode 100644 tests/spec/glsl-1.20/execution/maximums/gl_MaxVertexTextureImageUnits.shader_test
 delete mode 100644 tests/spec/glsl-1.20/execution/maximums/gl_MaxVertexUniformComponents.shader_test
 create mode 100644 tests/spec/glsl-1.20/minimum-maximums.txt

diff --git a/tests/all.tests b/tests/all.tests
index b4546b7..98f9389 100644
--- a/tests/all.tests
+++ b/tests/all.tests
@@ -832,6 +832,7 @@ add_recursion_test(rec, 'indirect-separate')
 add_recursion_test(rec, 'indirect-complex')
 add_recursion_test(rec, 'indirect-complex-separate')
 
+spec['glsl-1.20']['built-in constants'] = concurrent_test('built-in-constants tests/spec/glsl-1.20/minimum-maximums.txt')
 spec['glsl-1.20']['api'] = Group()
 add_concurrent_test(spec['glsl-1.20']['api'], 'getactiveattrib 120');
 
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
deleted file mode 100644
index 1667293..0000000
--- a/tests/spec/glsl-1.20/execution/maximums/gl_MaxClipPlanes.shader_test
+++ /dev/null
@@ -1,28 +0,0 @@
-# [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
deleted file mode 100644
index a489be0..0000000
--- a/tests/spec/glsl-1.20/execution/maximums/gl_MaxCombinedTextureImageUnits.shader_test
+++ /dev/null
@@ -1,28 +0,0 @@
-# [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
deleted file mode 100644
index e450a1c..0000000
--- a/tests/spec/glsl-1.20/execution/maximums/gl_MaxDrawBuffers.shader_test
+++ /dev/null
@@ -1,28 +0,0 @@
-# [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
deleted file mode 100644
index 3aefbf5..0000000
--- a/tests/spec/glsl-1.20/execution/maximums/gl_MaxFragmentUniformComponents.shader_test
+++ /dev/null
@@ -1,28 +0,0 @@
-# [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 >= 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.20/execution/maximums/gl_MaxLights.shader_test b/tests/spec/glsl-1.20/execution/maximums/gl_MaxLights.shader_test
deleted file mode 100644
index 3c0fea5..0000000
--- a/tests/spec/glsl-1.20/execution/maximums/gl_MaxLights.shader_test
+++ /dev/null
@@ -1,28 +0,0 @@
-# [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
deleted file mode 100644
index 4951ffd..0000000
--- a/tests/spec/glsl-1.20/execution/maximums/gl_MaxTextureCoords.shader_test
+++ /dev/null
@@ -1,28 +0,0 @@
-# [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
deleted file mode 100644
index e32faae..0000000
--- a/tests/spec/glsl-1.20/execution/maximums/gl_MaxTextureImageUnits.shader_test
+++ /dev/null
@@ -1,28 +0,0 @@
-# [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
deleted file mode 100644
index 52bb5f6..0000000
--- a/tests/spec/glsl-1.20/execution/maximums/gl_MaxTextureUnits.shader_test
+++ /dev/null
@@ -1,28 +0,0 @@
-# [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
deleted file mode 100644
index 2116faa..0000000
--- a/tests/spec/glsl-1.20/execution/maximums/gl_MaxVaryingFloats.shader_test
+++ /dev/null
@@ -1,28 +0,0 @@
-# [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
deleted file mode 100644
index 531fe71..0000000
--- a/tests/spec/glsl-1.20/execution/maximums/gl_MaxVertexAttribs.shader_test
+++ /dev/null
@@ -1,28 +0,0 @@
-# [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
deleted file mode 100644
index 38fa647..0000000
--- a/tests/spec/glsl-1.20/execution/maximums/gl_MaxVertexTextureImageUnits.shader_test
+++ /dev/null
@@ -1,28 +0,0 @@
-# [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
deleted file mode 100644
index ae3b729..0000000
--- a/tests/spec/glsl-1.20/execution/maximums/gl_MaxVertexUniformComponents.shader_test
+++ /dev/null
@@ -1,28 +0,0 @@
-# [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
diff --git a/tests/spec/glsl-1.20/minimum-maximums.txt b/tests/spec/glsl-1.20/minimum-maximums.txt
new file mode 100644
index 0000000..f65ca64
--- /dev/null
+++ b/tests/spec/glsl-1.20/minimum-maximums.txt
@@ -0,0 +1,13 @@
+1.20
+gl_MaxClipPlanes 6
+gl_MaxCombinedTextureImageUnits 2
+gl_MaxDrawBuffers 1
+gl_MaxFragmentUniformComponents 64
+gl_MaxLights 8
+gl_MaxTextureCoords 2
+gl_MaxTextureImageUnits 2
+gl_MaxTextureUnits 2
+gl_MaxVaryingFloats 32
+gl_MaxVertexAttribs 16
+gl_MaxVertexTextureImageUnits 0
+gl_MaxVertexUniformComponents 512
-- 
1.8.1.4



More information about the Piglit mailing list