[Piglit] [PATCH 2/4] glean/glsl1: Delete duplicated indexing tests.
Matt Turner
mattst88 at gmail.com
Mon Jul 7 14:14:32 PDT 2014
---
tests/all.py | 11 ---
tests/glean/tglsl1.cpp | 209 -------------------------------------------------
2 files changed, 220 deletions(-)
diff --git a/tests/all.py b/tests/all.py
index 8951f9e..802d415 100644
--- a/tests/all.py
+++ b/tests/all.py
@@ -165,17 +165,6 @@ glean_glsl_tests = [
'chained assignment',
'cross() function, in-place',
'sequence (comma) operator',
- 'constant array with constant indexing, fragment shader',
- 'temp array with constant indexing, fragment shader',
- 'constant array with constant indexing, vertex shader',
- 'temp array with constant indexing, vertex shader',
- 'temp array with variable indexing, fragment shader',
- 'temp array with variable indexing, vertex shader',
- 'constant array with variable indexing, vertex shader',
- 'constant array of vec4 with variable indexing, vertex shader',
- 'constant array with variable indexing, vertex shader (2)',
- 'temp array with swizzled variable indexing',
- 'vector subscript *=',
'&& operator, short-circuit',
'|| operator, short-circuit',
'uniform variable (fragment shader)',
diff --git a/tests/glean/tglsl1.cpp b/tests/glean/tglsl1.cpp
index f743670..97e5576 100644
--- a/tests/glean/tglsl1.cpp
+++ b/tests/glean/tglsl1.cpp
@@ -372,215 +372,6 @@ static const ShaderProgram Programs[] = {
FLAG_NONE
},
- {
- "constant array with constant indexing, fragment shader",
- NO_VERTEX_SHADER,
- "uniform float uniformArray[4]; \n"
- "void main() { \n"
- " gl_FragColor.x = uniformArray[0]; \n"
- " gl_FragColor.y = uniformArray[1]; \n"
- " gl_FragColor.z = uniformArray[2]; \n"
- " gl_FragColor.w = uniformArray[3]; \n"
- "} \n",
- { UniformArray[0], UniformArray[1],
- UniformArray[2], UniformArray[3] },
- DONT_CARE_Z,
- FLAG_NONE
- },
-
- {
- "temp array with constant indexing, fragment shader",
- NO_VERTEX_SHADER,
- "void main() { \n"
- " float ar[4]; \n"
- " ar[0] = 0.5; \n"
- " ar[1] = 1.0; \n"
- " ar[2] = 0.25; \n"
- " ar[3] = 0.2; \n"
- " gl_FragColor.x = ar[0]; \n"
- " gl_FragColor.y = ar[1]; \n"
- " gl_FragColor.z = ar[2]; \n"
- " gl_FragColor.w = ar[3]; \n"
- "} \n",
- { 0.5, 1.0, 0.25, 0.2 },
- DONT_CARE_Z,
- FLAG_NONE
- },
-
- {
- "constant array with constant indexing, vertex shader",
- "uniform float uniformArray[4]; \n"
- "void main() { \n"
- " gl_FrontColor.x = uniformArray[0]; \n"
- " gl_FrontColor.y = uniformArray[1]; \n"
- " gl_FrontColor.z = uniformArray[2]; \n"
- " gl_FrontColor.w = uniformArray[3]; \n"
- " gl_Position = ftransform(); \n"
- "} \n",
- NO_FRAGMENT_SHADER,
- { UniformArray[0], UniformArray[1],
- UniformArray[2], UniformArray[3] },
- DONT_CARE_Z,
- FLAG_NONE
- },
-
- {
- "temp array with constant indexing, vertex shader",
- "void main() { \n"
- " float ar[4]; \n"
- " ar[0] = 0.5; \n"
- " ar[1] = 1.0; \n"
- " ar[2] = 0.25; \n"
- " ar[3] = 0.2; \n"
- " gl_FrontColor.x = ar[0]; \n"
- " gl_FrontColor.y = ar[1]; \n"
- " gl_FrontColor.z = ar[2]; \n"
- " gl_FrontColor.w = ar[3]; \n"
- " gl_Position = ftransform(); \n"
- "} \n",
- NO_FRAGMENT_SHADER,
- { 0.5, 1.0, 0.25, 0.2 },
- DONT_CARE_Z,
- FLAG_NONE
- },
-
-#if 0
- {
- "temp array with variable indexing, fragment shader",
- NO_VERTEX_SHADER,
- "uniform vec4 uniform1; \n"
- "void main() { \n"
- " float ar[4]; \n"
- " ar[0] = 0.0; \n"
- " ar[1] = 0.1; \n"
- " ar[2] = 0.5; \n"
- " ar[3] = 0.7; \n"
- " int indx = int(uniform1.y * 8.0); // should be 2 \n"
- " gl_FragColor = vec4(ar[indx]); \n"
- "} \n",
- { 0.5, 0.5, 0.5, 0.5 },
- DONT_CARE_Z,
- FLAG_NONE
- },
-
- {
- "temp array with variable indexing, vertex shader",
- "uniform vec4 uniform1; \n"
- "void main() { \n"
- " float ar[4]; \n"
- " ar[0] = 0.0; \n"
- " ar[1] = 0.1; \n"
- " ar[2] = 0.5; \n"
- " ar[3] = 0.7; \n"
- " int indx = int(uniform1.y * 8.0); // should be 2 \n"
- " gl_FrontColor = vec4(ar[indx]); \n"
- " gl_Position = ftransform(); \n"
- "} \n",
- NO_FRAGMENT_SHADER,
- { 0.5, 0.5, 0.5, 0.5 },
- DONT_CARE_Z,
- FLAG_NONE
- },
-#endif
- {
- "constant array with variable indexing, vertex shader",
- "uniform float uniformArray[4]; \n"
- "uniform vec4 uniform1; \n"
- "void main() { \n"
- " int indx = int(uniform1.y * 8.0); // should be 2 \n"
- " gl_FrontColor = vec4(uniformArray[indx]); \n"
- " gl_Position = ftransform(); \n"
- "} \n",
- NO_FRAGMENT_SHADER,
- { 0.5, 0.5, 0.5, 0.5 },
- DONT_CARE_Z,
- FLAG_NONE
- },
-
- {
- "constant array of vec4 with variable indexing, vertex shader",
- "uniform vec4 uniform1; \n"
- "uniform float uniformArray[4]; \n"
- "uniform vec4 uniformArray4[4]; \n"
- "void main() { \n"
- " int i0 = int(gl_TexCoord[0].x); \n"
- " int i1 = int(gl_TexCoord[0].y); \n"
- " int i2 = int(gl_TexCoord[0].z); \n"
- " int i3 = int(gl_TexCoord[0].w); \n"
-
- " int indx0 = int(uniform1.y * 3.0); // should be 2 \n"
- " int indx = int(uniform1.y * 8.0); // should be 2 \n"
- " gl_FrontColor.z = uniformArray4[indx].z; \n"
- " gl_FrontColor.x = uniformArray4[indx].x; \n"
- " gl_FrontColor.w = uniformArray4[indx].w; \n"
- " gl_FrontColor.y = uniformArray4[indx].y; \n"
- " gl_Position = ftransform(); \n"
- "} \n",
- NO_FRAGMENT_SHADER,
- { 0.5, 0.6, 0.7, 0.5 },
- DONT_CARE_Z,
- FLAG_NONE
- },
-
- {
- // This one tests that a different array index per vertex
- // works as expected. The left edge of the polygon should
- // have a gray value = uniformArray[2] while the right
- // edge of the polygon should have a gray value =
- // uniformArray[3].
- "constant array with variable indexing, vertex shader (2)",
- "uniform float uniformArray[4]; \n"
- "void main() { \n"
- " int indx = int(gl_MultiTexCoord0.x + 2.0); // 2 or 3 \n"
- " gl_FrontColor = vec4(uniformArray[indx]); \n"
- " gl_Position = ftransform(); \n"
- "} \n",
- NO_FRAGMENT_SHADER,
- // If we read the center pixel we'd get the average of
- // the Uniform[2] and Uniform[3] values here. But we read
- // an off-center pixel so this result was found emperically.
- { 0.6, 0.6, 0.6, 0.6 },
- DONT_CARE_Z,
- FLAG_NONE
- },
-
- {
- "temp array with swizzled variable indexing",
- NO_VERTEX_SHADER,
- "uniform vec4 uniform1; \n"
- "void main() { \n"
- " float ar[4]; \n"
- " ar[0] = 0.0; \n"
- " ar[1] = 0.8; \n"
- " ar[2] = 0.5; \n"
- " ar[3] = 0.7; \n"
- " ivec2 indx; \n"
- " indx.x = 1; \n"
- " indx.y = int(uniform1.y * 8.0); // should be 2 \n"
- " float p = ar[indx.x] * ar[indx.y]; \n"
- " gl_FragColor = vec4(p); \n"
- "} \n",
- { 0.4, 0.4, 0.4, 0.4 },
- DONT_CARE_Z,
- FLAG_NONE
- },
-
-#if 0 // XXX enable someday
- {
- "vector subscript *=",
- NO_VERTEX_SHADER,
- "void main() { \n"
- " vec4 c = vec4(0.25, 0.5, 0.1, 0.1); \n"
- " c[0] *= 4.0; \n"
- " c[1] *= 2.0; \n"
- " gl_FragColor = c; \n"
- "} \n",
- { 1.0, 1.0, 0.1, 0.1 },
- DONT_CARE_Z,
- FLAG_NONE
- },
-#endif
-
// Logical operators =================================================
{
"&& operator, short-circuit",
--
1.8.5.5
More information about the Piglit
mailing list