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

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


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

minimum-maximums.txt was generated by:

    cd tests/spec/glsl-1.40
    echo 1.40 > 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_MaxClipDistances.shader_test       | 38 ----------------------
 .../gl_MaxCombinedTextureImageUnits.shader_test    | 38 ----------------------
 .../maximums/gl_MaxDrawBuffers.shader_test         | 38 ----------------------
 .../gl_MaxFragmentUniformComponents.shader_test    | 38 ----------------------
 .../maximums/gl_MaxTextureImageUnits.shader_test   | 38 ----------------------
 .../maximums/gl_MaxVaryingComponents.shader_test   | 38 ----------------------
 .../maximums/gl_MaxVaryingFloats.shader_test       | 38 ----------------------
 .../maximums/gl_MaxVertexAttribs.shader_test       | 38 ----------------------
 .../gl_MaxVertexTextureImageUnits.shader_test      | 38 ----------------------
 .../gl_MaxVertexUniformComponents.shader_test      | 38 ----------------------
 tests/spec/glsl-1.40/minimum-maximums.txt          | 11 +++++++
 12 files changed, 12 insertions(+), 380 deletions(-)
 delete mode 100644 tests/spec/glsl-1.40/execution/maximums/gl_MaxClipDistances.shader_test
 delete mode 100644 tests/spec/glsl-1.40/execution/maximums/gl_MaxCombinedTextureImageUnits.shader_test
 delete mode 100644 tests/spec/glsl-1.40/execution/maximums/gl_MaxDrawBuffers.shader_test
 delete mode 100644 tests/spec/glsl-1.40/execution/maximums/gl_MaxFragmentUniformComponents.shader_test
 delete mode 100644 tests/spec/glsl-1.40/execution/maximums/gl_MaxTextureImageUnits.shader_test
 delete mode 100644 tests/spec/glsl-1.40/execution/maximums/gl_MaxVaryingComponents.shader_test
 delete mode 100644 tests/spec/glsl-1.40/execution/maximums/gl_MaxVaryingFloats.shader_test
 delete mode 100644 tests/spec/glsl-1.40/execution/maximums/gl_MaxVertexAttribs.shader_test
 delete mode 100644 tests/spec/glsl-1.40/execution/maximums/gl_MaxVertexTextureImageUnits.shader_test
 delete mode 100644 tests/spec/glsl-1.40/execution/maximums/gl_MaxVertexUniformComponents.shader_test
 create mode 100644 tests/spec/glsl-1.40/minimum-maximums.txt

diff --git a/tests/all.tests b/tests/all.tests
index fe51e32..91cf015 100644
--- a/tests/all.tests
+++ b/tests/all.tests
@@ -904,6 +904,7 @@ add_shader_test_dir(spec['glsl-1.40'],
 	            os.path.join(testsDir, 'spec', 'glsl-1.40'),
 		    recursive=True)
 spec['glsl-1.40']['execution']['tf-no-position'] = concurrent_test('glsl-1.40-tf-no-position')
+spec['glsl-1.40']['built-in constants'] = concurrent_test('built-in-constants tests/spec/glsl-1.40/minimum-maximums.txt')
 
 textureSize_samplers_140 = textureSize_samplers_130 + ['sampler2DRect', 'isampler2DRect', 'sampler2DRectShadow', 'samplerBuffer', 'isamplerBuffer', 'usamplerBuffer']
 for stage in ['vs', 'gs', 'fs']:
diff --git a/tests/spec/glsl-1.40/execution/maximums/gl_MaxClipDistances.shader_test b/tests/spec/glsl-1.40/execution/maximums/gl_MaxClipDistances.shader_test
deleted file mode 100644
index 077f954..0000000
--- a/tests/spec/glsl-1.40/execution/maximums/gl_MaxClipDistances.shader_test
+++ /dev/null
@@ -1,38 +0,0 @@
-# [description]
-# Tests for GLSL 1.40 minimum maximums for the builtin constants.
-#
-# See the GLSL 1.40.08 specification, section 7.4, page 64.
-
-[require]
-GLSL >= 1.40
-
-[vertex shader]
-#version 140
-
-in vec4 vertex;
-
-void main(void)
-{
-	gl_Position = vertex;
-}
-
-[fragment shader]
-#version 140
-void main(void)
-{
-	if (gl_MaxClipDistances >= 8)
-		gl_FragColor = vec4(0, 1, 0, 0);
-	else
-		gl_FragColor = vec4(1, 0, 0, 0);
-}
-
-[vertex data]
-vertex/float/2
--1.0 -1.0
- 1.0 -1.0
- 1.0  1.0
--1.0  1.0
-
-[test]
-draw arrays GL_TRIANGLE_FAN 0 4
-probe all rgba 0.0 1.0 0.0 0.0
diff --git a/tests/spec/glsl-1.40/execution/maximums/gl_MaxCombinedTextureImageUnits.shader_test b/tests/spec/glsl-1.40/execution/maximums/gl_MaxCombinedTextureImageUnits.shader_test
deleted file mode 100644
index 4808673..0000000
--- a/tests/spec/glsl-1.40/execution/maximums/gl_MaxCombinedTextureImageUnits.shader_test
+++ /dev/null
@@ -1,38 +0,0 @@
-# [description]
-# Tests for GLSL 1.40 minimum maximums for the builtin constants.
-#
-# See the GLSL 1.40.08 specification, section 7.4, page 64.
-
-[require]
-GLSL >= 1.40
-
-[vertex shader]
-#version 140
-
-in vec4 vertex;
-
-void main(void)
-{
-	gl_Position = vertex;
-}
-
-[fragment shader]
-#version 140
-void main(void)
-{
-	if (gl_MaxCombinedTextureImageUnits >= 16)
-		gl_FragColor = vec4(0, 1, 0, 0);
-	else
-		gl_FragColor = vec4(1, 0, 0, 0);
-}
-
-[vertex data]
-vertex/float/2
--1.0 -1.0
- 1.0 -1.0
- 1.0  1.0
--1.0  1.0
-
-[test]
-draw arrays GL_TRIANGLE_FAN 0 4
-probe all rgba 0.0 1.0 0.0 0.0
diff --git a/tests/spec/glsl-1.40/execution/maximums/gl_MaxDrawBuffers.shader_test b/tests/spec/glsl-1.40/execution/maximums/gl_MaxDrawBuffers.shader_test
deleted file mode 100644
index a9ef906..0000000
--- a/tests/spec/glsl-1.40/execution/maximums/gl_MaxDrawBuffers.shader_test
+++ /dev/null
@@ -1,38 +0,0 @@
-# [description]
-# Tests for GLSL 1.40 minimum maximums for the builtin constants.
-#
-# See the GLSL 1.40.08 specification, section 7.4, page 64.
-
-[require]
-GLSL >= 1.40
-
-[vertex shader]
-#version 140
-
-in vec4 vertex;
-
-void main(void)
-{
-	gl_Position = vertex;
-}
-
-[fragment shader]
-#version 140
-void main(void)
-{
-	if (gl_MaxDrawBuffers >= 8)
-		gl_FragColor = vec4(0, 1, 0, 0);
-	else
-		gl_FragColor = vec4(1, 0, 0, 0);
-}
-
-[vertex data]
-vertex/float/2
--1.0 -1.0
- 1.0 -1.0
- 1.0  1.0
--1.0  1.0
-
-[test]
-draw arrays GL_TRIANGLE_FAN 0 4
-probe all rgba 0.0 1.0 0.0 0.0
diff --git a/tests/spec/glsl-1.40/execution/maximums/gl_MaxFragmentUniformComponents.shader_test b/tests/spec/glsl-1.40/execution/maximums/gl_MaxFragmentUniformComponents.shader_test
deleted file mode 100644
index 8369d12..0000000
--- a/tests/spec/glsl-1.40/execution/maximums/gl_MaxFragmentUniformComponents.shader_test
+++ /dev/null
@@ -1,38 +0,0 @@
-# [description]
-# Tests for GLSL 1.40 minimum maximums for the builtin constants.
-#
-# See the GLSL 1.40.08 specification, section 7.4, page 64.
-
-[require]
-GLSL >= 1.40
-
-[vertex shader]
-#version 140
-
-in vec4 vertex;
-
-void main(void)
-{
-	gl_Position = vertex;
-}
-
-[fragment shader]
-#version 140
-void main(void)
-{
-	if (gl_MaxFragmentUniformComponents >= 1024)
-		gl_FragColor = vec4(0, 1, 0, 0);
-	else
-		gl_FragColor = vec4(1, 0, 0, 0);
-}
-
-[vertex data]
-vertex/float/2
--1.0 -1.0
- 1.0 -1.0
- 1.0  1.0
--1.0  1.0
-
-[test]
-draw arrays GL_TRIANGLE_FAN 0 4
-probe all rgba 0.0 1.0 0.0 0.0
diff --git a/tests/spec/glsl-1.40/execution/maximums/gl_MaxTextureImageUnits.shader_test b/tests/spec/glsl-1.40/execution/maximums/gl_MaxTextureImageUnits.shader_test
deleted file mode 100644
index 6c48f7c..0000000
--- a/tests/spec/glsl-1.40/execution/maximums/gl_MaxTextureImageUnits.shader_test
+++ /dev/null
@@ -1,38 +0,0 @@
-# [description]
-# Tests for GLSL 1.40 minimum maximums for the builtin constants.
-#
-# See the GLSL 1.40.08 specification, section 7.4, page 64.
-
-[require]
-GLSL >= 1.40
-
-[vertex shader]
-#version 140
-
-in vec4 vertex;
-
-void main(void)
-{
-	gl_Position = vertex;
-}
-
-[fragment shader]
-#version 140
-void main(void)
-{
-	if (gl_MaxTextureImageUnits >= 16)
-		gl_FragColor = vec4(0, 1, 0, 0);
-	else
-		gl_FragColor = vec4(1, 0, 0, 0);
-}
-
-[vertex data]
-vertex/float/2
--1.0 -1.0
- 1.0 -1.0
- 1.0  1.0
--1.0  1.0
-
-[test]
-draw arrays GL_TRIANGLE_FAN 0 4
-probe all rgba 0.0 1.0 0.0 0.0
diff --git a/tests/spec/glsl-1.40/execution/maximums/gl_MaxVaryingComponents.shader_test b/tests/spec/glsl-1.40/execution/maximums/gl_MaxVaryingComponents.shader_test
deleted file mode 100644
index f24a4c0..0000000
--- a/tests/spec/glsl-1.40/execution/maximums/gl_MaxVaryingComponents.shader_test
+++ /dev/null
@@ -1,38 +0,0 @@
-# [description]
-# Tests for GLSL 1.40 minimum maximums for the builtin constants.
-#
-# See the GLSL 1.40.08 specification, section 7.4, page 64.
-
-[require]
-GLSL >= 1.40
-
-[vertex shader]
-#version 140
-
-in vec4 vertex;
-
-void main(void)
-{
-	gl_Position = vertex;
-}
-
-[fragment shader]
-#version 140
-void main(void)
-{
-	if (gl_MaxVaryingComponents >= 64)
-		gl_FragColor = vec4(0, 1, 0, 0);
-	else
-		gl_FragColor = vec4(1, 0, 0, 0);
-}
-
-[vertex data]
-vertex/float/2
--1.0 -1.0
- 1.0 -1.0
- 1.0  1.0
--1.0  1.0
-
-[test]
-draw arrays GL_TRIANGLE_FAN 0 4
-probe all rgba 0.0 1.0 0.0 0.0
diff --git a/tests/spec/glsl-1.40/execution/maximums/gl_MaxVaryingFloats.shader_test b/tests/spec/glsl-1.40/execution/maximums/gl_MaxVaryingFloats.shader_test
deleted file mode 100644
index 7375209..0000000
--- a/tests/spec/glsl-1.40/execution/maximums/gl_MaxVaryingFloats.shader_test
+++ /dev/null
@@ -1,38 +0,0 @@
-# [description]
-# Tests for GLSL 1.40 minimum maximums for the builtin constants.
-#
-# See the GLSL 1.40.08 specification, section 7.4, page 64.
-
-[require]
-GLSL >= 1.40
-
-[vertex shader]
-#version 140
-
-in vec4 vertex;
-
-void main(void)
-{
-	gl_Position = vertex;
-}
-
-[fragment shader]
-#version 140
-void main(void)
-{
-	if (gl_MaxVaryingFloats >= 64)
-		gl_FragColor = vec4(0, 1, 0, 0);
-	else
-		gl_FragColor = vec4(1, 0, 0, 0);
-}
-
-[vertex data]
-vertex/float/2
--1.0 -1.0
- 1.0 -1.0
- 1.0  1.0
--1.0  1.0
-
-[test]
-draw arrays GL_TRIANGLE_FAN 0 4
-probe all rgba 0.0 1.0 0.0 0.0
diff --git a/tests/spec/glsl-1.40/execution/maximums/gl_MaxVertexAttribs.shader_test b/tests/spec/glsl-1.40/execution/maximums/gl_MaxVertexAttribs.shader_test
deleted file mode 100644
index ad354f7..0000000
--- a/tests/spec/glsl-1.40/execution/maximums/gl_MaxVertexAttribs.shader_test
+++ /dev/null
@@ -1,38 +0,0 @@
-# [description]
-# Tests for GLSL 1.40 minimum maximums for the builtin constants.
-#
-# See the GLSL 1.40.08 specification, section 7.4, page 64.
-
-[require]
-GLSL >= 1.40
-
-[vertex shader]
-#version 140
-
-in vec4 vertex;
-
-void main(void)
-{
-	gl_Position = vertex;
-}
-
-[fragment shader]
-#version 140
-void main(void)
-{
-	if (gl_MaxVertexAttribs >= 16)
-		gl_FragColor = vec4(0, 1, 0, 0);
-	else
-		gl_FragColor = vec4(1, 0, 0, 0);
-}
-
-[vertex data]
-vertex/float/2
--1.0 -1.0
- 1.0 -1.0
- 1.0  1.0
--1.0  1.0
-
-[test]
-draw arrays GL_TRIANGLE_FAN 0 4
-probe all rgba 0.0 1.0 0.0 0.0
diff --git a/tests/spec/glsl-1.40/execution/maximums/gl_MaxVertexTextureImageUnits.shader_test b/tests/spec/glsl-1.40/execution/maximums/gl_MaxVertexTextureImageUnits.shader_test
deleted file mode 100644
index 2fb73bc..0000000
--- a/tests/spec/glsl-1.40/execution/maximums/gl_MaxVertexTextureImageUnits.shader_test
+++ /dev/null
@@ -1,38 +0,0 @@
-# [description]
-# Tests for GLSL 1.40 minimum maximums for the builtin constants.
-#
-# See the GLSL 1.40.08 specification, section 7.4, page 64.
-
-[require]
-GLSL >= 1.40
-
-[vertex shader]
-#version 140
-
-in vec4 vertex;
-
-void main(void)
-{
-	gl_Position = vertex;
-}
-
-[fragment shader]
-#version 140
-void main(void)
-{
-	if (gl_MaxVertexTextureImageUnits >= 16)
-		gl_FragColor = vec4(0, 1, 0, 0);
-	else
-		gl_FragColor = vec4(1, 0, 0, 0);
-}
-
-[vertex data]
-vertex/float/2
--1.0 -1.0
- 1.0 -1.0
- 1.0  1.0
--1.0  1.0
-
-[test]
-draw arrays GL_TRIANGLE_FAN 0 4
-probe all rgba 0.0 1.0 0.0 0.0
diff --git a/tests/spec/glsl-1.40/execution/maximums/gl_MaxVertexUniformComponents.shader_test b/tests/spec/glsl-1.40/execution/maximums/gl_MaxVertexUniformComponents.shader_test
deleted file mode 100644
index 22c8c8b..0000000
--- a/tests/spec/glsl-1.40/execution/maximums/gl_MaxVertexUniformComponents.shader_test
+++ /dev/null
@@ -1,38 +0,0 @@
-# [description]
-# Tests for GLSL 1.40 minimum maximums for the builtin constants.
-#
-# See the GLSL 1.40.08 specification, section 7.4, page 64.
-
-[require]
-GLSL >= 1.40
-
-[vertex shader]
-#version 140
-
-in vec4 vertex;
-
-void main(void)
-{
-	gl_Position = vertex;
-}
-
-[fragment shader]
-#version 140
-void main(void)
-{
-	if (gl_MaxVertexUniformComponents >= 1024)
-		gl_FragColor = vec4(0, 1, 0, 0);
-	else
-		gl_FragColor = vec4(1, 0, 0, 0);
-}
-
-[vertex data]
-vertex/float/2
--1.0 -1.0
- 1.0 -1.0
- 1.0  1.0
--1.0  1.0
-
-[test]
-draw arrays GL_TRIANGLE_FAN 0 4
-probe all rgba 0.0 1.0 0.0 0.0
diff --git a/tests/spec/glsl-1.40/minimum-maximums.txt b/tests/spec/glsl-1.40/minimum-maximums.txt
new file mode 100644
index 0000000..a2e8370
--- /dev/null
+++ b/tests/spec/glsl-1.40/minimum-maximums.txt
@@ -0,0 +1,11 @@
+1.40
+gl_MaxClipDistances 8
+gl_MaxCombinedTextureImageUnits 16
+gl_MaxDrawBuffers 8
+gl_MaxFragmentUniformComponents 1024
+gl_MaxTextureImageUnits 16
+gl_MaxVaryingComponents 64
+gl_MaxVaryingFloats 64
+gl_MaxVertexAttribs 16
+gl_MaxVertexTextureImageUnits 16
+gl_MaxVertexUniformComponents 1024
-- 
1.8.1.4



More information about the Piglit mailing list