[Piglit] [PATCH 08/13] glsl-1.40: Modify test to use draw rect
Ian Romanick
idr at freedesktop.org
Tue Aug 27 18:45:51 PDT 2013
From: Ian Romanick <ian.d.romanick at intel.com>
Now that "draw rect" works in core profiles, use it!
Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
Reviewed-by: Paul Berry <stereotype441 at gmail.com> [v1]
Cc: Matt Turner <mattst88 at gmail.com>
---
.../execution/gl_DepthRangeParameters.shader_test | 9 +--------
.../glsl-1.40/execution/glsl-fs-shadow2DRect.shader_test | 15 ++++-----------
.../execution/glsl-fs-shadow2DRectProj.shader_test | 15 ++++-----------
.../glsl-1.40/uniform_buffer/fs-array-copy.shader_test | 9 +--------
tests/spec/glsl-1.40/uniform_buffer/fs-basic.shader_test | 9 +--------
tests/spec/glsl-1.40/uniform_buffer/fs-bools.shader_test | 9 +--------
.../glsl-1.40/uniform_buffer/fs-bvec-array.shader_test | 9 +--------
tests/spec/glsl-1.40/uniform_buffer/fs-exp2.shader_test | 9 +--------
.../uniform_buffer/fs-float-array-const-index.shader_test | 9 +--------
.../fs-float-array-variable-index.shader_test | 9 +--------
tests/spec/glsl-1.40/uniform_buffer/fs-floats.shader_test | 9 +--------
.../uniform_buffer/fs-mat4-row-major.shader_test | 9 +--------
tests/spec/glsl-1.40/uniform_buffer/fs-mat4.shader_test | 9 +--------
.../uniform_buffer/fs-saturated-vec-array.shader_test | 9 +--------
.../uniform_buffer/fs-struct-copy-complicated.shader_test | 9 +--------
.../glsl-1.40/uniform_buffer/fs-struct-copy.shader_test | 9 +--------
.../glsl-1.40/uniform_buffer/fs-struct-pad.shader_test | 9 +--------
tests/spec/glsl-1.40/uniform_buffer/fs-struct.shader_test | 9 +--------
.../glsl-1.40/uniform_buffer/fs-two-members.shader_test | 9 +--------
.../glsl-1.40/uniform_buffer/vs-array-copy.shader_test | 13 +++----------
tests/spec/glsl-1.40/uniform_buffer/vs-basic.shader_test | 13 +++----------
tests/spec/glsl-1.40/uniform_buffer/vs-bools.shader_test | 13 +++----------
.../uniform_buffer/vs-float-array-const-index.shader_test | 13 +++----------
.../vs-float-array-variable-index.shader_test | 13 +++----------
tests/spec/glsl-1.40/uniform_buffer/vs-floats.shader_test | 13 +++----------
.../uniform_buffer/vs-mat4-row-major.shader_test | 13 +++----------
tests/spec/glsl-1.40/uniform_buffer/vs-mat4.shader_test | 13 +++----------
.../uniform_buffer/vs-struct-copy-complicated.shader_test | 13 +++----------
.../glsl-1.40/uniform_buffer/vs-struct-copy.shader_test | 13 +++----------
.../glsl-1.40/uniform_buffer/vs-struct-pad.shader_test | 13 +++----------
tests/spec/glsl-1.40/uniform_buffer/vs-struct.shader_test | 13 +++----------
.../glsl-1.40/uniform_buffer/vs-two-members.shader_test | 13 +++----------
32 files changed, 64 insertions(+), 288 deletions(-)
diff --git a/tests/spec/glsl-1.40/execution/gl_DepthRangeParameters.shader_test b/tests/spec/glsl-1.40/execution/gl_DepthRangeParameters.shader_test
index 94a899b..61b49b4 100644
--- a/tests/spec/glsl-1.40/execution/gl_DepthRangeParameters.shader_test
+++ b/tests/spec/glsl-1.40/execution/gl_DepthRangeParameters.shader_test
@@ -15,13 +15,6 @@ void main()
gl_FragColor = vec4(a, b, c, 1.0);
}
-[vertex data]
-piglit_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
+draw rect -1 -1 2 2
probe all rgba 0.25 0.75 0.75 1.0
diff --git a/tests/spec/glsl-1.40/execution/glsl-fs-shadow2DRect.shader_test b/tests/spec/glsl-1.40/execution/glsl-fs-shadow2DRect.shader_test
index 8016824..04b65f2 100644
--- a/tests/spec/glsl-1.40/execution/glsl-fs-shadow2DRect.shader_test
+++ b/tests/spec/glsl-1.40/execution/glsl-fs-shadow2DRect.shader_test
@@ -4,12 +4,12 @@ GLSL >= 1.40
[vertex shader]
#version 140
-in vec4 vertex;
+in vec4 piglit_vertex;
out vec2 texcoords;
void main()
{
- gl_Position = vertex;
- texcoords = texcoords = (vertex.xy + 1.0) / 2.0;
+ gl_Position = piglit_vertex;
+ texcoords = texcoords = (piglit_vertex.xy + 1.0) / 2.0;
}
[fragment shader]
@@ -22,17 +22,10 @@ void main()
gl_FragColor = vec4(shadow2DRect(tex, texcoords.xyy * vec3(31.0, 31.0, 1.0)).xxx, 1.0);
}
-[vertex data]
-vertex/float/2
--1.0 -1.0
- 1.0 -1.0
- 1.0 1.0
--1.0 1.0
-
[test]
uniform int tex 0
texture shadowRect 0 (32, 32)
-draw arrays GL_TRIANGLE_FAN 0 4
+draw rect -1 -1 2 2
relative probe rgba (0.0, 0.1) (1.0, 1.0, 1.0, 1.0)
relative probe rgba (0.0, 1.0) (1.0, 1.0, 1.0, 1.0)
relative probe rgba (0.9, 1.0) (1.0, 1.0, 1.0, 1.0)
diff --git a/tests/spec/glsl-1.40/execution/glsl-fs-shadow2DRectProj.shader_test b/tests/spec/glsl-1.40/execution/glsl-fs-shadow2DRectProj.shader_test
index db0e5f1..4caa913 100644
--- a/tests/spec/glsl-1.40/execution/glsl-fs-shadow2DRectProj.shader_test
+++ b/tests/spec/glsl-1.40/execution/glsl-fs-shadow2DRectProj.shader_test
@@ -4,13 +4,13 @@ GLSL >= 1.40
[vertex shader]
#version 140
-in vec4 vertex;
+in vec4 piglit_vertex;
out vec2 texcoords;
void main()
{
- gl_Position = vertex;
- texcoords = texcoords = (vertex.xy + 1.0) / 2.0;
+ gl_Position = piglit_vertex;
+ texcoords = texcoords = (piglit_vertex.xy + 1.0) / 2.0;
}
[fragment shader]
@@ -23,17 +23,10 @@ void main()
gl_FragColor = vec4(shadow2DRectProj(tex, vec4(texcoords.xyy * vec3(31.0, 31.0, 1.0), 2.0)).xxx, 1.0);
}
-[vertex data]
-vertex/float/2
--1.0 -1.0
- 1.0 -1.0
- 1.0 1.0
--1.0 1.0
-
[test]
uniform int tex 0
texture shadowRect 0 (32, 32)
-draw arrays GL_TRIANGLE_FAN 0 4
+draw rect -1 -1 2 2
relative probe rgba (0.0, 0.1) (1.0, 1.0, 1.0, 1.0)
relative probe rgba (0.0, 1.0) (1.0, 1.0, 1.0, 1.0)
relative probe rgba (0.9, 1.0) (1.0, 1.0, 1.0, 1.0)
diff --git a/tests/spec/glsl-1.40/uniform_buffer/fs-array-copy.shader_test b/tests/spec/glsl-1.40/uniform_buffer/fs-array-copy.shader_test
index e0171d5..ec4d4e1 100644
--- a/tests/spec/glsl-1.40/uniform_buffer/fs-array-copy.shader_test
+++ b/tests/spec/glsl-1.40/uniform_buffer/fs-array-copy.shader_test
@@ -18,18 +18,11 @@ void main()
gl_FragColor = temp[i];
}
-[vertex data]
-piglit_vertex/float/2
--1.0 -1.0
- 1.0 -1.0
- 1.0 1.0
--1.0 1.0
-
[test]
uniform int i 1
uniform vec4 colors[0] 0.0 0.0 0.0 0.0
uniform vec4 colors[1] 0.0 1.0 0.0 0.0
uniform vec4 colors[2] 0.0 1.0 1.0 0.0
uniform vec4 colors[3] 1.0 0.0 1.0 0.0
-draw arrays GL_TRIANGLE_FAN 0 4
+draw rect -1 -1 2 2
probe all rgba 0.0 1.0 0.0 0.0
diff --git a/tests/spec/glsl-1.40/uniform_buffer/fs-basic.shader_test b/tests/spec/glsl-1.40/uniform_buffer/fs-basic.shader_test
index bcf76ae..76bbce7 100644
--- a/tests/spec/glsl-1.40/uniform_buffer/fs-basic.shader_test
+++ b/tests/spec/glsl-1.40/uniform_buffer/fs-basic.shader_test
@@ -15,14 +15,7 @@ void main()
gl_FragColor = color;
}
-[vertex data]
-piglit_vertex/float/2
--1.0 -1.0
- 1.0 -1.0
- 1.0 1.0
--1.0 1.0
-
[test]
uniform vec4 color 0.0 1.0 0.0 0.0
-draw arrays GL_TRIANGLE_FAN 0 4
+draw rect -1 -1 2 2
probe all rgba 0.0 1.0 0.0 0.0
diff --git a/tests/spec/glsl-1.40/uniform_buffer/fs-bools.shader_test b/tests/spec/glsl-1.40/uniform_buffer/fs-bools.shader_test
index 4743818..45d355c 100644
--- a/tests/spec/glsl-1.40/uniform_buffer/fs-bools.shader_test
+++ b/tests/spec/glsl-1.40/uniform_buffer/fs-bools.shader_test
@@ -18,17 +18,10 @@ void main()
gl_FragColor = vec4(r, g, b, a);
}
-[vertex data]
-piglit_vertex/float/2
--1.0 -1.0
- 1.0 -1.0
- 1.0 1.0
--1.0 1.0
-
[test]
uniform int r 0
uniform int g 1
uniform int b 2
uniform int a 0
-draw arrays GL_TRIANGLE_FAN 0 4
+draw rect -1 -1 2 2
probe all rgba 0.0 1.0 1.0 0.0
diff --git a/tests/spec/glsl-1.40/uniform_buffer/fs-bvec-array.shader_test b/tests/spec/glsl-1.40/uniform_buffer/fs-bvec-array.shader_test
index e210351..4c32aa5 100644
--- a/tests/spec/glsl-1.40/uniform_buffer/fs-bvec-array.shader_test
+++ b/tests/spec/glsl-1.40/uniform_buffer/fs-bvec-array.shader_test
@@ -16,16 +16,9 @@ void main()
gl_FragColor = vec4(b[i]);
}
-[vertex data]
-piglit_vertex/float/2
--1.0 -1.0
- 1.0 -1.0
- 1.0 1.0
--1.0 1.0
-
[test]
uniform int i 1
uniform ivec4 b[0] 0 0 0 0
uniform ivec4 b[1] 0 1 2 3
-draw arrays GL_TRIANGLE_FAN 0 4
+draw rect -1 -1 2 2
probe all rgba 0.0 1.0 1.0 1.0
diff --git a/tests/spec/glsl-1.40/uniform_buffer/fs-exp2.shader_test b/tests/spec/glsl-1.40/uniform_buffer/fs-exp2.shader_test
index df44705..3662995 100644
--- a/tests/spec/glsl-1.40/uniform_buffer/fs-exp2.shader_test
+++ b/tests/spec/glsl-1.40/uniform_buffer/fs-exp2.shader_test
@@ -15,14 +15,7 @@ void main()
gl_FragColor = exp2(v);
}
-[vertex data]
-piglit_vertex/float/2
--1.0 -1.0
- 1.0 -1.0
- 1.0 1.0
--1.0 1.0
-
[test]
uniform vec4 v -2.0 -1.0 0.0 1.0
-draw arrays GL_TRIANGLE_FAN 0 4
+draw rect -1 -1 2 2
probe all rgba 0.25 0.5 1.0 1.0
diff --git a/tests/spec/glsl-1.40/uniform_buffer/fs-float-array-const-index.shader_test b/tests/spec/glsl-1.40/uniform_buffer/fs-float-array-const-index.shader_test
index 141d95c..f6b9e76 100644
--- a/tests/spec/glsl-1.40/uniform_buffer/fs-float-array-const-index.shader_test
+++ b/tests/spec/glsl-1.40/uniform_buffer/fs-float-array-const-index.shader_test
@@ -15,17 +15,10 @@ void main()
gl_FragColor = vec4(f[0], f[1], f[2], f[3]);
}
-[vertex data]
-piglit_vertex/float/2
--1.0 -1.0
- 1.0 -1.0
- 1.0 1.0
--1.0 1.0
-
[test]
uniform float f[0] 0.0
uniform float f[1] 1.0
uniform float f[2] 0.0
uniform float f[3] 0.0
-draw arrays GL_TRIANGLE_FAN 0 4
+draw rect -1 -1 2 2
probe all rgba 0.0 1.0 0.0 0.0
diff --git a/tests/spec/glsl-1.40/uniform_buffer/fs-float-array-variable-index.shader_test b/tests/spec/glsl-1.40/uniform_buffer/fs-float-array-variable-index.shader_test
index 1ff2179..ebe91a0 100644
--- a/tests/spec/glsl-1.40/uniform_buffer/fs-float-array-variable-index.shader_test
+++ b/tests/spec/glsl-1.40/uniform_buffer/fs-float-array-variable-index.shader_test
@@ -17,13 +17,6 @@ void main()
gl_FragColor = vec4(f[ri], f[gi], f[bi], f[ai]);
}
-[vertex data]
-piglit_vertex/float/2
--1.0 -1.0
- 1.0 -1.0
- 1.0 1.0
--1.0 1.0
-
[test]
uniform int ri 0
uniform int gi 1
@@ -34,5 +27,5 @@ uniform float f[0] 0.0
uniform float f[1] 1.0
uniform float f[2] 0.0
uniform float f[3] 0.0
-draw arrays GL_TRIANGLE_FAN 0 4
+draw rect -1 -1 2 2
probe all rgba 0.0 1.0 0.0 0.0
diff --git a/tests/spec/glsl-1.40/uniform_buffer/fs-floats.shader_test b/tests/spec/glsl-1.40/uniform_buffer/fs-floats.shader_test
index 8bad701..aacd5f2 100644
--- a/tests/spec/glsl-1.40/uniform_buffer/fs-floats.shader_test
+++ b/tests/spec/glsl-1.40/uniform_buffer/fs-floats.shader_test
@@ -18,17 +18,10 @@ void main()
gl_FragColor = vec4(r, g, b, a);
}
-[vertex data]
-piglit_vertex/float/2
--1.0 -1.0
- 1.0 -1.0
- 1.0 1.0
--1.0 1.0
-
[test]
uniform float r 0.0
uniform float g 1.0
uniform float b 0.0
uniform float a 0.0
-draw arrays GL_TRIANGLE_FAN 0 4
+draw rect -1 -1 2 2
probe all rgba 0.0 1.0 0.0 0.0
diff --git a/tests/spec/glsl-1.40/uniform_buffer/fs-mat4-row-major.shader_test b/tests/spec/glsl-1.40/uniform_buffer/fs-mat4-row-major.shader_test
index b942fd1..7bca36b 100644
--- a/tests/spec/glsl-1.40/uniform_buffer/fs-mat4-row-major.shader_test
+++ b/tests/spec/glsl-1.40/uniform_buffer/fs-mat4-row-major.shader_test
@@ -15,14 +15,7 @@ void main()
gl_FragColor = m[0] + m[1] + m[2] + m[3];
}
-[vertex data]
-piglit_vertex/float/2
--1.0 -1.0
- 1.0 -1.0
- 1.0 1.0
--1.0 1.0
-
[test]
uniform mat4 m 0.25 0.0 0.0 0.0 0.0 0.0 0.75 0.0 0.0 0.5 0.0 0.0 0.0 0.0 0.0 1.0
-draw arrays GL_TRIANGLE_FAN 0 4
+draw rect -1 -1 2 2
probe all rgba 0.25 0.5 0.75 1.0
diff --git a/tests/spec/glsl-1.40/uniform_buffer/fs-mat4.shader_test b/tests/spec/glsl-1.40/uniform_buffer/fs-mat4.shader_test
index c4a43fb..738d244 100644
--- a/tests/spec/glsl-1.40/uniform_buffer/fs-mat4.shader_test
+++ b/tests/spec/glsl-1.40/uniform_buffer/fs-mat4.shader_test
@@ -15,14 +15,7 @@ void main()
gl_FragColor = m[0] + m[1] + m[2] + m[3];
}
-[vertex data]
-piglit_vertex/float/2
--1.0 -1.0
- 1.0 -1.0
- 1.0 1.0
--1.0 1.0
-
[test]
uniform mat4 m 0.25 0.0 0.0 0.0 0.0 0.0 0.75 0.0 0.0 0.5 0.0 0.0 0.0 0.0 0.0 1.0
-draw arrays GL_TRIANGLE_FAN 0 4
+draw rect -1 -1 2 2
probe all rgba 0.25 0.5 0.75 1.0
diff --git a/tests/spec/glsl-1.40/uniform_buffer/fs-saturated-vec-array.shader_test b/tests/spec/glsl-1.40/uniform_buffer/fs-saturated-vec-array.shader_test
index 41836b1..afec010 100644
--- a/tests/spec/glsl-1.40/uniform_buffer/fs-saturated-vec-array.shader_test
+++ b/tests/spec/glsl-1.40/uniform_buffer/fs-saturated-vec-array.shader_test
@@ -19,16 +19,9 @@ void main()
gl_FragColor = 0.25 + 0.5 * clamp(color[i], 0.0, 1.0);
}
-[vertex data]
-piglit_vertex/float/2
--1.0 -1.0
- 1.0 -1.0
- 1.0 1.0
--1.0 1.0
-
[test]
uniform int i 1
uniform vec4 color[0] 0.5 0.5 0.5 0.5
uniform vec4 color[1] -1 0 1 2
-draw arrays GL_TRIANGLE_FAN 0 4
+draw rect -1 -1 2 2
probe all rgba 0.25 0.25 0.75 0.75
diff --git a/tests/spec/glsl-1.40/uniform_buffer/fs-struct-copy-complicated.shader_test b/tests/spec/glsl-1.40/uniform_buffer/fs-struct-copy-complicated.shader_test
index 47162a9..0b7ae39 100644
--- a/tests/spec/glsl-1.40/uniform_buffer/fs-struct-copy-complicated.shader_test
+++ b/tests/spec/glsl-1.40/uniform_buffer/fs-struct-copy-complicated.shader_test
@@ -85,13 +85,6 @@ void main()
gl_FragColor = v;
}
-[vertex data]
-piglit_vertex/float/2
--1.0 -1.0
- 1.0 -1.0
- 1.0 1.0
--1.0 1.0
-
[test]
uniform vec2 s[0].arr[0].v2 0.99 0.99
uniform mat2 s[0].arr[0].m22[0] 0.03 0.04 0.05 0.06
@@ -111,5 +104,5 @@ uniform mat2 s[1].arr[1].m22[1] 0.67 0.68 0.69 0.70
uniform vec3 s[1].v3 0.71 0.72 0.73
uniform int s[1].b 2
-draw arrays GL_TRIANGLE_FAN 0 4
+draw rect -1 -1 2 2
probe all rgba 0.0 1.0 0.0 0.0
diff --git a/tests/spec/glsl-1.40/uniform_buffer/fs-struct-copy.shader_test b/tests/spec/glsl-1.40/uniform_buffer/fs-struct-copy.shader_test
index 9bfa3eb..8acab2a 100644
--- a/tests/spec/glsl-1.40/uniform_buffer/fs-struct-copy.shader_test
+++ b/tests/spec/glsl-1.40/uniform_buffer/fs-struct-copy.shader_test
@@ -19,17 +19,10 @@ void main()
gl_FragColor = temp.a + temp.b + temp.c + temp.d;
}
-[vertex data]
-piglit_vertex/float/2
--1.0 -1.0
- 1.0 -1.0
- 1.0 1.0
--1.0 1.0
-
[test]
uniform vec4 colors.a 0.0 0.0 0.0 0.0
uniform vec4 colors.b 0.0 1.0 0.0 0.0
uniform vec4 colors.c 1.0 0.0 0.0 0.0
uniform vec4 colors.d 0.0 0.0 0.0 0.0
-draw arrays GL_TRIANGLE_FAN 0 4
+draw rect -1 -1 2 2
probe all rgba 0.0 1.0 0.0 0.0
diff --git a/tests/spec/glsl-1.40/uniform_buffer/fs-struct-pad.shader_test b/tests/spec/glsl-1.40/uniform_buffer/fs-struct-pad.shader_test
index 4cf5fe4..aa1cfa0 100644
--- a/tests/spec/glsl-1.40/uniform_buffer/fs-struct-pad.shader_test
+++ b/tests/spec/glsl-1.40/uniform_buffer/fs-struct-pad.shader_test
@@ -30,17 +30,10 @@ void main()
gl_FragColor = vec4(s.s1.r, s.s2.g, s.s2.b, s.s2.a);
}
-[vertex data]
-piglit_vertex/float/2
--1.0 -1.0
- 1.0 -1.0
- 1.0 1.0
--1.0 1.0
-
[test]
uniform float s.s1.r 0.0
uniform float s.s2.g 1.0
uniform float s.s2.b 0.0
uniform float s.s2.a 0.0
-draw arrays GL_TRIANGLE_FAN 0 4
+draw rect -1 -1 2 2
probe all rgba 0.0 1.0 0.0 0.0
diff --git a/tests/spec/glsl-1.40/uniform_buffer/fs-struct.shader_test b/tests/spec/glsl-1.40/uniform_buffer/fs-struct.shader_test
index c485276..66b5971 100644
--- a/tests/spec/glsl-1.40/uniform_buffer/fs-struct.shader_test
+++ b/tests/spec/glsl-1.40/uniform_buffer/fs-struct.shader_test
@@ -20,17 +20,10 @@ void main()
gl_FragColor = vec4(s.r, s.g, s.b, s.a);
}
-[vertex data]
-piglit_vertex/float/2
--1.0 -1.0
- 1.0 -1.0
- 1.0 1.0
--1.0 1.0
-
[test]
uniform float s.r 0.0
uniform float s.g 1.0
uniform float s.b 0.0
uniform float s.a 0.0
-draw arrays GL_TRIANGLE_FAN 0 4
+draw rect -1 -1 2 2
probe all rgba 0.0 1.0 0.0 0.0
diff --git a/tests/spec/glsl-1.40/uniform_buffer/fs-two-members.shader_test b/tests/spec/glsl-1.40/uniform_buffer/fs-two-members.shader_test
index 98bfcf7..a4cf92c 100644
--- a/tests/spec/glsl-1.40/uniform_buffer/fs-two-members.shader_test
+++ b/tests/spec/glsl-1.40/uniform_buffer/fs-two-members.shader_test
@@ -16,15 +16,8 @@ void main()
gl_FragColor = color1 + color2;
}
-[vertex data]
-piglit_vertex/float/2
--1.0 -1.0
- 1.0 -1.0
- 1.0 1.0
--1.0 1.0
-
[test]
uniform vec4 color1 0.5 0.0 0.0 0.0
uniform vec4 color2 0.0 0.75 0.0 0.0
-draw arrays GL_TRIANGLE_FAN 0 4
+draw rect -1 -1 2 2
probe all rgba 0.5 0.75 0.0 0.0
diff --git a/tests/spec/glsl-1.40/uniform_buffer/vs-array-copy.shader_test b/tests/spec/glsl-1.40/uniform_buffer/vs-array-copy.shader_test
index f7f235d..eb46453 100644
--- a/tests/spec/glsl-1.40/uniform_buffer/vs-array-copy.shader_test
+++ b/tests/spec/glsl-1.40/uniform_buffer/vs-array-copy.shader_test
@@ -9,12 +9,12 @@ uniform ubo1 {
vec4 colors[4];
};
-in vec4 vertex;
+in vec4 piglit_vertex;
out vec4 v;
void main()
{
- gl_Position = vertex;
+ gl_Position = piglit_vertex;
vec4 temp[4] = colors;
temp[0] = vec4(1.0, 0.0, 0.0, 0.0);
v = temp[i];
@@ -30,18 +30,11 @@ void main()
gl_FragColor = v;
}
-[vertex data]
-vertex/float/2
--1.0 -1.0
- 1.0 -1.0
- 1.0 1.0
--1.0 1.0
-
[test]
uniform int i 1
uniform vec4 colors[0] 0.0 0.0 0.0 0.0
uniform vec4 colors[1] 0.0 1.0 0.0 0.0
uniform vec4 colors[2] 0.0 1.0 1.0 0.0
uniform vec4 colors[3] 1.0 0.0 1.0 0.0
-draw arrays GL_TRIANGLE_FAN 0 4
+draw rect -1 -1 2 2
probe all rgba 0.0 1.0 0.0 0.0
diff --git a/tests/spec/glsl-1.40/uniform_buffer/vs-basic.shader_test b/tests/spec/glsl-1.40/uniform_buffer/vs-basic.shader_test
index cf5272b..213158b 100644
--- a/tests/spec/glsl-1.40/uniform_buffer/vs-basic.shader_test
+++ b/tests/spec/glsl-1.40/uniform_buffer/vs-basic.shader_test
@@ -8,12 +8,12 @@ uniform ubo1 {
vec4 color;
};
-in vec4 vertex;
+in vec4 piglit_vertex;
out vec4 v;
void main()
{
- gl_Position = vertex;
+ gl_Position = piglit_vertex;
v = color;
}
@@ -27,14 +27,7 @@ void main()
gl_FragColor = v;
}
-[vertex data]
-vertex/float/2
--1.0 -1.0
- 1.0 -1.0
- 1.0 1.0
--1.0 1.0
-
[test]
uniform vec4 color 0.0 1.0 0.0 0.0
-draw arrays GL_TRIANGLE_FAN 0 4
+draw rect -1 -1 2 2
probe all rgba 0.0 1.0 0.0 0.0
diff --git a/tests/spec/glsl-1.40/uniform_buffer/vs-bools.shader_test b/tests/spec/glsl-1.40/uniform_buffer/vs-bools.shader_test
index 9fe4b5e..84d47b1 100644
--- a/tests/spec/glsl-1.40/uniform_buffer/vs-bools.shader_test
+++ b/tests/spec/glsl-1.40/uniform_buffer/vs-bools.shader_test
@@ -11,12 +11,12 @@ uniform ubo1 {
bool a;
};
-in vec4 vertex;
+in vec4 piglit_vertex;
out vec4 v;
void main()
{
- gl_Position = vertex;
+ gl_Position = piglit_vertex;
v = vec4(r, g, b, a);
}
@@ -30,17 +30,10 @@ void main()
gl_FragColor = v;
}
-[vertex data]
-vertex/float/2
--1.0 -1.0
- 1.0 -1.0
- 1.0 1.0
--1.0 1.0
-
[test]
uniform int r 0
uniform int g 1
uniform int b 2
uniform int a 0
-draw arrays GL_TRIANGLE_FAN 0 4
+draw rect -1 -1 2 2
probe all rgba 0.0 1.0 1.0 0.0
diff --git a/tests/spec/glsl-1.40/uniform_buffer/vs-float-array-const-index.shader_test b/tests/spec/glsl-1.40/uniform_buffer/vs-float-array-const-index.shader_test
index 16aaa29..f440822 100644
--- a/tests/spec/glsl-1.40/uniform_buffer/vs-float-array-const-index.shader_test
+++ b/tests/spec/glsl-1.40/uniform_buffer/vs-float-array-const-index.shader_test
@@ -8,12 +8,12 @@ uniform ubo1 {
float f[4];
};
-in vec4 vertex;
+in vec4 piglit_vertex;
out vec4 v;
void main()
{
- gl_Position = vertex;
+ gl_Position = piglit_vertex;
v = vec4(f[0], f[1], f[2], f[3]);
}
@@ -27,17 +27,10 @@ void main()
gl_FragColor = v;
}
-[vertex data]
-vertex/float/2
--1.0 -1.0
- 1.0 -1.0
- 1.0 1.0
--1.0 1.0
-
[test]
uniform float f[0] 0.0
uniform float f[1] 1.0
uniform float f[2] 0.0
uniform float f[3] 0.0
-draw arrays GL_TRIANGLE_FAN 0 4
+draw rect -1 -1 2 2
probe all rgba 0.0 1.0 0.0 0.0
diff --git a/tests/spec/glsl-1.40/uniform_buffer/vs-float-array-variable-index.shader_test b/tests/spec/glsl-1.40/uniform_buffer/vs-float-array-variable-index.shader_test
index 723fbd5..27f72fc 100644
--- a/tests/spec/glsl-1.40/uniform_buffer/vs-float-array-variable-index.shader_test
+++ b/tests/spec/glsl-1.40/uniform_buffer/vs-float-array-variable-index.shader_test
@@ -10,12 +10,12 @@ uniform ubo1 {
float f[4];
};
-in vec4 vertex;
+in vec4 piglit_vertex;
out vec4 v;
void main()
{
- gl_Position = vertex;
+ gl_Position = piglit_vertex;
v = vec4(f[ri], f[gi], f[bi], f[ai]);
}
@@ -29,13 +29,6 @@ void main()
gl_FragColor = v;
}
-[vertex data]
-vertex/float/2
--1.0 -1.0
- 1.0 -1.0
- 1.0 1.0
--1.0 1.0
-
[test]
uniform int ri 0
uniform int gi 1
@@ -46,5 +39,5 @@ uniform float f[0] 0.0
uniform float f[1] 1.0
uniform float f[2] 0.0
uniform float f[3] 0.0
-draw arrays GL_TRIANGLE_FAN 0 4
+draw rect -1 -1 2 2
probe all rgba 0.0 1.0 0.0 0.0
diff --git a/tests/spec/glsl-1.40/uniform_buffer/vs-floats.shader_test b/tests/spec/glsl-1.40/uniform_buffer/vs-floats.shader_test
index 81c384c..799f28e 100644
--- a/tests/spec/glsl-1.40/uniform_buffer/vs-floats.shader_test
+++ b/tests/spec/glsl-1.40/uniform_buffer/vs-floats.shader_test
@@ -11,12 +11,12 @@ uniform ubo1 {
float a;
};
-in vec4 vertex;
+in vec4 piglit_vertex;
out vec4 v;
void main()
{
- gl_Position = vertex;
+ gl_Position = piglit_vertex;
v = vec4(r, g, b, a);
}
@@ -30,17 +30,10 @@ void main()
gl_FragColor = v;
}
-[vertex data]
-vertex/float/2
--1.0 -1.0
- 1.0 -1.0
- 1.0 1.0
--1.0 1.0
-
[test]
uniform float r 0.0
uniform float g 1.0
uniform float b 0.0
uniform float a 0.0
-draw arrays GL_TRIANGLE_FAN 0 4
+draw rect -1 -1 2 2
probe all rgba 0.0 1.0 0.0 0.0
diff --git a/tests/spec/glsl-1.40/uniform_buffer/vs-mat4-row-major.shader_test b/tests/spec/glsl-1.40/uniform_buffer/vs-mat4-row-major.shader_test
index 47e9823..a2ec1ad 100644
--- a/tests/spec/glsl-1.40/uniform_buffer/vs-mat4-row-major.shader_test
+++ b/tests/spec/glsl-1.40/uniform_buffer/vs-mat4-row-major.shader_test
@@ -8,12 +8,12 @@ uniform ubo1 {
layout(row_major) mat4 m;
};
-in vec4 vertex;
+in vec4 piglit_vertex;
out vec4 v;
void main()
{
- gl_Position = vertex;
+ gl_Position = piglit_vertex;
v = m[0] + m[1] + m[2] + m[3];
}
@@ -27,14 +27,7 @@ void main()
gl_FragColor = v;
}
-[vertex data]
-vertex/float/2
--1.0 -1.0
- 1.0 -1.0
- 1.0 1.0
--1.0 1.0
-
[test]
uniform mat4 m 0.25 0.0 0.0 0.0 0.0 0.0 0.75 0.0 0.0 0.5 0.0 0.0 0.0 0.0 0.0 1.0
-draw arrays GL_TRIANGLE_FAN 0 4
+draw rect -1 -1 2 2
probe all rgba 0.25 0.5 0.75 1.0
diff --git a/tests/spec/glsl-1.40/uniform_buffer/vs-mat4.shader_test b/tests/spec/glsl-1.40/uniform_buffer/vs-mat4.shader_test
index 7cc802f..57bc93a 100644
--- a/tests/spec/glsl-1.40/uniform_buffer/vs-mat4.shader_test
+++ b/tests/spec/glsl-1.40/uniform_buffer/vs-mat4.shader_test
@@ -8,12 +8,12 @@ uniform ubo1 {
mat4 m;
};
-in vec4 vertex;
+in vec4 piglit_vertex;
out vec4 v;
void main()
{
- gl_Position = vertex;
+ gl_Position = piglit_vertex;
v = m[0] + m[1] + m[2] + m[3];
}
@@ -27,14 +27,7 @@ void main()
gl_FragColor = v;
}
-[vertex data]
-vertex/float/2
--1.0 -1.0
- 1.0 -1.0
- 1.0 1.0
--1.0 1.0
-
[test]
uniform mat4 m 0.25 0.0 0.0 0.0 0.0 0.0 0.75 0.0 0.0 0.5 0.0 0.0 0.0 0.0 0.0 1.0
-draw arrays GL_TRIANGLE_FAN 0 4
+draw rect -1 -1 2 2
probe all rgba 0.25 0.5 0.75 1.0
diff --git a/tests/spec/glsl-1.40/uniform_buffer/vs-struct-copy-complicated.shader_test b/tests/spec/glsl-1.40/uniform_buffer/vs-struct-copy-complicated.shader_test
index 1e034e7..ec7db43 100644
--- a/tests/spec/glsl-1.40/uniform_buffer/vs-struct-copy-complicated.shader_test
+++ b/tests/spec/glsl-1.40/uniform_buffer/vs-struct-copy-complicated.shader_test
@@ -17,12 +17,12 @@ uniform ubo1 {
} s[2];
};
-in vec4 vertex;
+in vec4 piglit_vertex;
out vec4 v;
void main()
{
- gl_Position = vertex;
+ gl_Position = piglit_vertex;
S temp[2] = s;
@@ -96,13 +96,6 @@ void main()
gl_FragColor = v;
}
-[vertex data]
-vertex/float/2
--1.0 -1.0
- 1.0 -1.0
- 1.0 1.0
--1.0 1.0
-
[test]
uniform vec2 s[0].arr[0].v2 0.99 0.99
uniform mat2 s[0].arr[0].m22[0] 0.03 0.04 0.05 0.06
@@ -122,5 +115,5 @@ uniform mat2 s[1].arr[1].m22[1] 0.67 0.68 0.69 0.70
uniform vec3 s[1].v3 0.71 0.72 0.73
uniform int s[1].b 2
-draw arrays GL_TRIANGLE_FAN 0 4
+draw rect -1 -1 2 2
probe all rgba 0.0 1.0 0.0 0.0
diff --git a/tests/spec/glsl-1.40/uniform_buffer/vs-struct-copy.shader_test b/tests/spec/glsl-1.40/uniform_buffer/vs-struct-copy.shader_test
index 8a261ab..daf742e 100644
--- a/tests/spec/glsl-1.40/uniform_buffer/vs-struct-copy.shader_test
+++ b/tests/spec/glsl-1.40/uniform_buffer/vs-struct-copy.shader_test
@@ -10,12 +10,12 @@ uniform ubo1 {
} colors;
};
-in vec4 vertex;
+in vec4 piglit_vertex;
out vec4 v;
void main()
{
- gl_Position = vertex;
+ gl_Position = piglit_vertex;
S temp = colors;
temp.c = vec4(0.0); /* try, but fail, to prevent copy prop */
@@ -32,17 +32,10 @@ void main()
gl_FragColor = v;
}
-[vertex data]
-vertex/float/2
--1.0 -1.0
- 1.0 -1.0
- 1.0 1.0
--1.0 1.0
-
[test]
uniform vec4 colors.a 0.0 0.0 0.0 0.0
uniform vec4 colors.b 0.0 1.0 0.0 0.0
uniform vec4 colors.c 1.0 0.0 0.0 0.0
uniform vec4 colors.d 0.0 0.0 0.0 0.0
-draw arrays GL_TRIANGLE_FAN 0 4
+draw rect -1 -1 2 2
probe all rgba 0.0 1.0 0.0 0.0
diff --git a/tests/spec/glsl-1.40/uniform_buffer/vs-struct-pad.shader_test b/tests/spec/glsl-1.40/uniform_buffer/vs-struct-pad.shader_test
index b283b69..d5f87a9 100644
--- a/tests/spec/glsl-1.40/uniform_buffer/vs-struct-pad.shader_test
+++ b/tests/spec/glsl-1.40/uniform_buffer/vs-struct-pad.shader_test
@@ -23,12 +23,12 @@ uniform ubo1 {
S s;
};
-in vec4 vertex;
+in vec4 piglit_vertex;
out vec4 v;
void main()
{
- gl_Position = vertex;
+ gl_Position = piglit_vertex;
v = vec4(s.s1.r, s.s2.g, s.s2.b, s.s2.a);
}
@@ -42,17 +42,10 @@ void main()
gl_FragColor = v;
}
-[vertex data]
-vertex/float/2
--1.0 -1.0
- 1.0 -1.0
- 1.0 1.0
--1.0 1.0
-
[test]
uniform float s.s1.r 0.0
uniform float s.s2.g 1.0
uniform float s.s2.b 0.0
uniform float s.s2.a 0.0
-draw arrays GL_TRIANGLE_FAN 0 4
+draw rect -1 -1 2 2
probe all rgba 0.0 1.0 0.0 0.0
diff --git a/tests/spec/glsl-1.40/uniform_buffer/vs-struct.shader_test b/tests/spec/glsl-1.40/uniform_buffer/vs-struct.shader_test
index 4ed4181..6b7ff53 100644
--- a/tests/spec/glsl-1.40/uniform_buffer/vs-struct.shader_test
+++ b/tests/spec/glsl-1.40/uniform_buffer/vs-struct.shader_test
@@ -13,12 +13,12 @@ uniform ubo1 {
} s;
};
-in vec4 vertex;
+in vec4 piglit_vertex;
out vec4 v;
void main()
{
- gl_Position = vertex;
+ gl_Position = piglit_vertex;
v = vec4(s.r, s.g, s.b, s.a);
}
@@ -32,17 +32,10 @@ void main()
gl_FragColor = v;
}
-[vertex data]
-vertex/float/2
--1.0 -1.0
- 1.0 -1.0
- 1.0 1.0
--1.0 1.0
-
[test]
uniform float s.r 0.0
uniform float s.g 1.0
uniform float s.b 0.0
uniform float s.a 0.0
-draw arrays GL_TRIANGLE_FAN 0 4
+draw rect -1 -1 2 2
probe all rgba 0.0 1.0 0.0 0.0
diff --git a/tests/spec/glsl-1.40/uniform_buffer/vs-two-members.shader_test b/tests/spec/glsl-1.40/uniform_buffer/vs-two-members.shader_test
index 627b309..df4b7e4 100644
--- a/tests/spec/glsl-1.40/uniform_buffer/vs-two-members.shader_test
+++ b/tests/spec/glsl-1.40/uniform_buffer/vs-two-members.shader_test
@@ -9,12 +9,12 @@ uniform ubo1 {
vec4 color2;
};
-in vec4 vertex;
+in vec4 piglit_vertex;
out vec4 v;
void main()
{
- gl_Position = vertex;
+ gl_Position = piglit_vertex;
v = color1 + color2;
}
@@ -28,15 +28,8 @@ void main()
gl_FragColor = v;
}
-[vertex data]
-vertex/float/2
--1.0 -1.0
- 1.0 -1.0
- 1.0 1.0
--1.0 1.0
-
[test]
uniform vec4 color1 0.5 0.0 0.0 0.0
uniform vec4 color2 0.0 0.75 0.0 0.0
-draw arrays GL_TRIANGLE_FAN 0 4
+draw rect -1 -1 2 2
probe all rgba 0.5 0.75 0.0 0.0
--
1.8.1.4
More information about the Piglit
mailing list