[Piglit] [PATCH 05/13] glsl-1.30: Convert minimum-maximums tests to use built-in-constants program
Ian Romanick
idr at freedesktop.org
Mon Aug 26 10:33:07 PDT 2013
From: Ian Romanick <ian.d.romanick at intel.com>
minimum-maximums.txt was generated by:
cd tests/spec/glsl-1.30
echo 1.30 > 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 | 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 | 32 ----------------------
.../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 -------------------
tests/spec/glsl-1.30/minimum-maximums.txt | 14 ++++++++++
15 files changed, 15 insertions(+), 368 deletions(-)
delete mode 100644 tests/spec/glsl-1.30/execution/maximums/gl_MaxClipDistances.shader_test
delete mode 100644 tests/spec/glsl-1.30/execution/maximums/gl_MaxClipPlanes.shader_test
delete mode 100644 tests/spec/glsl-1.30/execution/maximums/gl_MaxCombinedTextureImageUnits.shader_test
delete mode 100644 tests/spec/glsl-1.30/execution/maximums/gl_MaxDrawBuffers.shader_test
delete mode 100644 tests/spec/glsl-1.30/execution/maximums/gl_MaxFragmentUniformComponents.shader_test
delete mode 100644 tests/spec/glsl-1.30/execution/maximums/gl_MaxTextureCoords.shader_test
delete mode 100644 tests/spec/glsl-1.30/execution/maximums/gl_MaxTextureImageUnits.shader_test
delete mode 100644 tests/spec/glsl-1.30/execution/maximums/gl_MaxTextureUnits.shader_test
delete mode 100644 tests/spec/glsl-1.30/execution/maximums/gl_MaxVaryingComponents.shader_test
delete mode 100644 tests/spec/glsl-1.30/execution/maximums/gl_MaxVaryingFloats.shader_test
delete mode 100644 tests/spec/glsl-1.30/execution/maximums/gl_MaxVertexAttribs.shader_test
delete mode 100644 tests/spec/glsl-1.30/execution/maximums/gl_MaxVertexTextureImageUnits.shader_test
delete mode 100644 tests/spec/glsl-1.30/execution/maximums/gl_MaxVertexUniformComponents.shader_test
create mode 100644 tests/spec/glsl-1.30/minimum-maximums.txt
diff --git a/tests/all.tests b/tests/all.tests
index 98f9389..fe51e32 100644
--- a/tests/all.tests
+++ b/tests/all.tests
@@ -891,6 +891,7 @@ add_concurrent_test(spec['glsl-1.30']['execution'], 'vertexid-drawarrays')
add_concurrent_test(spec['glsl-1.30']['execution'], 'vertexid-drawelements')
add_concurrent_test(spec['glsl-1.30']['execution'], 'fs-execution-ordering')
+spec['glsl-1.30']['built-in constants'] = concurrent_test('built-in-constants tests/spec/glsl-1.30/minimum-maximums.txt')
spec['glsl-1.30']['api'] = Group()
add_concurrent_test(spec['glsl-1.30']['api'], 'getactiveattrib 130');
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
deleted file mode 100644
index d4c2fcb..0000000
--- a/tests/spec/glsl-1.30/execution/maximums/gl_MaxClipDistances.shader_test
+++ /dev/null
@@ -1,28 +0,0 @@
-# [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
deleted file mode 100644
index 9d9ad99..0000000
--- a/tests/spec/glsl-1.30/execution/maximums/gl_MaxClipPlanes.shader_test
+++ /dev/null
@@ -1,28 +0,0 @@
-# [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
deleted file mode 100644
index ec95147..0000000
--- a/tests/spec/glsl-1.30/execution/maximums/gl_MaxCombinedTextureImageUnits.shader_test
+++ /dev/null
@@ -1,28 +0,0 @@
-# [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
deleted file mode 100644
index 4350623..0000000
--- a/tests/spec/glsl-1.30/execution/maximums/gl_MaxDrawBuffers.shader_test
+++ /dev/null
@@ -1,28 +0,0 @@
-# [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
deleted file mode 100644
index 1dce3f5..0000000
--- a/tests/spec/glsl-1.30/execution/maximums/gl_MaxFragmentUniformComponents.shader_test
+++ /dev/null
@@ -1,28 +0,0 @@
-# [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
deleted file mode 100644
index d83f315..0000000
--- a/tests/spec/glsl-1.30/execution/maximums/gl_MaxTextureCoords.shader_test
+++ /dev/null
@@ -1,28 +0,0 @@
-# [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
deleted file mode 100644
index 0b4a9ca..0000000
--- a/tests/spec/glsl-1.30/execution/maximums/gl_MaxTextureImageUnits.shader_test
+++ /dev/null
@@ -1,28 +0,0 @@
-# [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
deleted file mode 100644
index e37b541..0000000
--- a/tests/spec/glsl-1.30/execution/maximums/gl_MaxTextureUnits.shader_test
+++ /dev/null
@@ -1,32 +0,0 @@
-# [description]
-# Tests for GLSL 1.30 minimum maximums for the builtin constants.
-#
-# See the GLSL 1.30.08 specification, section 7.4, page 67.
-#
-# Note that the limit should have been 2, but it is incorrectly listed as 16.
-# This was fixed in GLSL 1.50 (see page 75 (page 81 of the PDF)), but the fix
-# was never back ported to 1.30 or 1.40.
-
-[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 >= 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.30/execution/maximums/gl_MaxVaryingComponents.shader_test b/tests/spec/glsl-1.30/execution/maximums/gl_MaxVaryingComponents.shader_test
deleted file mode 100644
index 377e5f7..0000000
--- a/tests/spec/glsl-1.30/execution/maximums/gl_MaxVaryingComponents.shader_test
+++ /dev/null
@@ -1,28 +0,0 @@
-# [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
deleted file mode 100644
index 9a20893..0000000
--- a/tests/spec/glsl-1.30/execution/maximums/gl_MaxVaryingFloats.shader_test
+++ /dev/null
@@ -1,28 +0,0 @@
-# [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
deleted file mode 100644
index 53fa73e..0000000
--- a/tests/spec/glsl-1.30/execution/maximums/gl_MaxVertexAttribs.shader_test
+++ /dev/null
@@ -1,28 +0,0 @@
-# [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
deleted file mode 100644
index cf63f40..0000000
--- a/tests/spec/glsl-1.30/execution/maximums/gl_MaxVertexTextureImageUnits.shader_test
+++ /dev/null
@@ -1,28 +0,0 @@
-# [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
deleted file mode 100644
index 9a57362..0000000
--- a/tests/spec/glsl-1.30/execution/maximums/gl_MaxVertexUniformComponents.shader_test
+++ /dev/null
@@ -1,28 +0,0 @@
-# [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
diff --git a/tests/spec/glsl-1.30/minimum-maximums.txt b/tests/spec/glsl-1.30/minimum-maximums.txt
new file mode 100644
index 0000000..9eb97e7
--- /dev/null
+++ b/tests/spec/glsl-1.30/minimum-maximums.txt
@@ -0,0 +1,14 @@
+1.30
+gl_MaxClipDistances 8
+gl_MaxClipPlanes 8
+gl_MaxCombinedTextureImageUnits 16
+gl_MaxDrawBuffers 8
+gl_MaxFragmentUniformComponents 1024
+gl_MaxTextureCoords 8
+gl_MaxTextureImageUnits 16
+gl_MaxTextureUnits 2
+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