[Piglit] [PATCH 03/13] glsl-1.10: Convert minimum-maximums tests to use built-in-constants program
Ian Romanick
idr at freedesktop.org
Mon Aug 26 10:33:05 PDT 2013
From: Ian Romanick <ian.d.romanick at intel.com>
minimum-maximums.txt was generated by:
cd tests/spec/glsl-1.10
echo 1.10 > 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.10/minimum-maximums.txt | 13 ++++++++++
14 files changed, 14 insertions(+), 336 deletions(-)
delete mode 100644 tests/spec/glsl-1.10/execution/maximums/gl_MaxClipPlanes.shader_test
delete mode 100644 tests/spec/glsl-1.10/execution/maximums/gl_MaxCombinedTextureImageUnits.shader_test
delete mode 100644 tests/spec/glsl-1.10/execution/maximums/gl_MaxDrawBuffers.shader_test
delete mode 100644 tests/spec/glsl-1.10/execution/maximums/gl_MaxFragmentUniformComponents.shader_test
delete mode 100644 tests/spec/glsl-1.10/execution/maximums/gl_MaxLights.shader_test
delete mode 100644 tests/spec/glsl-1.10/execution/maximums/gl_MaxTextureCoords.shader_test
delete mode 100644 tests/spec/glsl-1.10/execution/maximums/gl_MaxTextureImageUnits.shader_test
delete mode 100644 tests/spec/glsl-1.10/execution/maximums/gl_MaxTextureUnits.shader_test
delete mode 100644 tests/spec/glsl-1.10/execution/maximums/gl_MaxVaryingFloats.shader_test
delete mode 100644 tests/spec/glsl-1.10/execution/maximums/gl_MaxVertexAttribs.shader_test
delete mode 100644 tests/spec/glsl-1.10/execution/maximums/gl_MaxVertexTextureImageUnits.shader_test
delete mode 100644 tests/spec/glsl-1.10/execution/maximums/gl_MaxVertexUniformComponents.shader_test
create mode 100644 tests/spec/glsl-1.10/minimum-maximums.txt
diff --git a/tests/all.tests b/tests/all.tests
index 0c67beb..b4546b7 100644
--- a/tests/all.tests
+++ b/tests/all.tests
@@ -794,6 +794,7 @@ for type in ['int', 'uint', 'float', 'vec2', 'vec3', 'vec4', 'ivec2', 'ivec3',
cmdline = 'simple {0} {1}'.format(type, arrayspec)
spec['glsl-1.10']['execution']['varying-packing'][cmdline] = \
concurrent_test('varying-packing-' + cmdline)
+spec['glsl-1.10']['built-in constants'] = concurrent_test('built-in-constants tests/spec/glsl-1.10/minimum-maximums.txt')
spec['glsl-1.10']['api'] = Group()
add_concurrent_test(spec['glsl-1.10']['api'], 'getactiveattrib 110');
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
deleted file mode 100644
index 6314151..0000000
--- a/tests/spec/glsl-1.10/execution/maximums/gl_MaxClipPlanes.shader_test
+++ /dev/null
@@ -1,28 +0,0 @@
-# [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
deleted file mode 100644
index f480e5c..0000000
--- a/tests/spec/glsl-1.10/execution/maximums/gl_MaxCombinedTextureImageUnits.shader_test
+++ /dev/null
@@ -1,28 +0,0 @@
-# [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
deleted file mode 100644
index 61ca295..0000000
--- a/tests/spec/glsl-1.10/execution/maximums/gl_MaxDrawBuffers.shader_test
+++ /dev/null
@@ -1,28 +0,0 @@
-# [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
deleted file mode 100644
index 537fcbb..0000000
--- a/tests/spec/glsl-1.10/execution/maximums/gl_MaxFragmentUniformComponents.shader_test
+++ /dev/null
@@ -1,28 +0,0 @@
-# [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 >= 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.10/execution/maximums/gl_MaxLights.shader_test b/tests/spec/glsl-1.10/execution/maximums/gl_MaxLights.shader_test
deleted file mode 100644
index c7cbf9d..0000000
--- a/tests/spec/glsl-1.10/execution/maximums/gl_MaxLights.shader_test
+++ /dev/null
@@ -1,28 +0,0 @@
-# [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
deleted file mode 100644
index 794be9f..0000000
--- a/tests/spec/glsl-1.10/execution/maximums/gl_MaxTextureCoords.shader_test
+++ /dev/null
@@ -1,28 +0,0 @@
-# [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
deleted file mode 100644
index 66b5c74..0000000
--- a/tests/spec/glsl-1.10/execution/maximums/gl_MaxTextureImageUnits.shader_test
+++ /dev/null
@@ -1,28 +0,0 @@
-# [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
deleted file mode 100644
index 24db06e..0000000
--- a/tests/spec/glsl-1.10/execution/maximums/gl_MaxTextureUnits.shader_test
+++ /dev/null
@@ -1,28 +0,0 @@
-# [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
deleted file mode 100644
index b55f809..0000000
--- a/tests/spec/glsl-1.10/execution/maximums/gl_MaxVaryingFloats.shader_test
+++ /dev/null
@@ -1,28 +0,0 @@
-# [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
deleted file mode 100644
index e0872f9..0000000
--- a/tests/spec/glsl-1.10/execution/maximums/gl_MaxVertexAttribs.shader_test
+++ /dev/null
@@ -1,28 +0,0 @@
-# [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
deleted file mode 100644
index 0dc85e5..0000000
--- a/tests/spec/glsl-1.10/execution/maximums/gl_MaxVertexTextureImageUnits.shader_test
+++ /dev/null
@@ -1,28 +0,0 @@
-# [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
deleted file mode 100644
index 5386bad..0000000
--- a/tests/spec/glsl-1.10/execution/maximums/gl_MaxVertexUniformComponents.shader_test
+++ /dev/null
@@ -1,28 +0,0 @@
-# [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
diff --git a/tests/spec/glsl-1.10/minimum-maximums.txt b/tests/spec/glsl-1.10/minimum-maximums.txt
new file mode 100644
index 0000000..f0db76d
--- /dev/null
+++ b/tests/spec/glsl-1.10/minimum-maximums.txt
@@ -0,0 +1,13 @@
+1.10
+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