diff options
author | Neil Roberts <neil@linux.intel.com> | 2015-05-28 17:54:06 +0100 |
---|---|---|
committer | Neil Roberts <neil@linux.intel.com> | 2015-06-15 14:59:43 +0100 |
commit | 4f9caf084eda7353af7bbe2d415b73a0e8d897eb (patch) | |
tree | d37722d0dbec031309830c6e047014126c3b2177 | |
parent | 246791c51ec7f4e9c2ea3333793b372bcbb749c9 (diff) |
sampler_array_indexing: Check that the texture coordinates work
Previously the various sampler_array_indexing shaders were using a
checkerboard texture with identical colours for each part of the grid.
That meant that it didn't actually matter what texture coordinates
were used to sample. This patch changes it so that they all have a
dark red colour for one of the colours and then it ensures that the
texture coordinates should sample from a space with the other colour.
The main reason to do this is that in Mesa with the i965 driver the
texture coordinates aren't actually getting passed correctly with the
vec4 backend (ie, for vs and gs). That means these tests now fail and
correctly identify the problem.
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
10 files changed, 50 insertions, 50 deletions
diff --git a/tests/spec/arb_gpu_shader5/execution/sampler_array_indexing/fs-nonzero-base.shader_test b/tests/spec/arb_gpu_shader5/execution/sampler_array_indexing/fs-nonzero-base.shader_test index 58b934e6e..e44d17d38 100644 --- a/tests/spec/arb_gpu_shader5/execution/sampler_array_indexing/fs-nonzero-base.shader_test +++ b/tests/spec/arb_gpu_shader5/execution/sampler_array_indexing/fs-nonzero-base.shader_test @@ -19,7 +19,7 @@ out vec4 color; void main() { - color = texture(s[n], vec2(0.5, 0.5)); + color = texture(s[n], vec2(0.75, 0.25)); } [test] @@ -31,19 +31,19 @@ uniform int s[1] 2 uniform int s[2] 3 uniform int s[3] 4 -texture checkerboard 1 0 (32, 32) (1.0, 0.0, 0.0, 0.0) (1.0, 0.0, 0.0, 0.0) +texture checkerboard 1 0 (32, 32) (0.5, 0.0, 0.0, 0.0) (1.0, 0.0, 0.0, 0.0) texparameter 2D min nearest texparameter 2D mag nearest -texture checkerboard 2 0 (32, 32) (0.0, 1.0, 0.0, 0.0) (0.0, 1.0, 0.0, 0.0) +texture checkerboard 2 0 (32, 32) (0.5, 0.0, 0.0, 0.0) (0.0, 1.0, 0.0, 0.0) texparameter 2D min nearest texparameter 2D mag nearest -texture checkerboard 3 0 (32, 32) (0.0, 0.0, 1.0, 0.0) (0.0, 0.0, 1.0, 0.0) +texture checkerboard 3 0 (32, 32) (0.5, 0.0, 0.0, 0.0) (0.0, 0.0, 1.0, 0.0) texparameter 2D min nearest texparameter 2D mag nearest -texture checkerboard 4 0 (32, 32) (1.0, 1.0, 1.0, 1.0) (1.0, 1.0, 1.0, 1.0) +texture checkerboard 4 0 (32, 32) (0.5, 0.0, 0.0, 0.0) (1.0, 1.0, 1.0, 1.0) texparameter 2D min nearest texparameter 2D mag nearest diff --git a/tests/spec/arb_gpu_shader5/execution/sampler_array_indexing/fs-simple.shader_test b/tests/spec/arb_gpu_shader5/execution/sampler_array_indexing/fs-simple.shader_test index 6defb65e2..27cd88f02 100644 --- a/tests/spec/arb_gpu_shader5/execution/sampler_array_indexing/fs-simple.shader_test +++ b/tests/spec/arb_gpu_shader5/execution/sampler_array_indexing/fs-simple.shader_test @@ -19,7 +19,7 @@ out vec4 color; void main() { - color = texture(s[n], vec2(0.5, 0.5)); + color = texture(s[n], vec2(0.75, 0.25)); } [test] @@ -31,19 +31,19 @@ uniform int s[1] 1 uniform int s[2] 2 uniform int s[3] 3 -texture checkerboard 0 0 (32, 32) (1.0, 0.0, 0.0, 0.0) (1.0, 0.0, 0.0, 0.0) +texture checkerboard 0 0 (32, 32) (0.5, 0.0, 0.0, 0.0) (1.0, 0.0, 0.0, 0.0) texparameter 2D min nearest texparameter 2D mag nearest -texture checkerboard 1 0 (32, 32) (0.0, 1.0, 0.0, 0.0) (0.0, 1.0, 0.0, 0.0) +texture checkerboard 1 0 (32, 32) (0.5, 0.0, 0.0, 0.0) (0.0, 1.0, 0.0, 0.0) texparameter 2D min nearest texparameter 2D mag nearest -texture checkerboard 2 0 (32, 32) (0.0, 0.0, 1.0, 0.0) (0.0, 0.0, 1.0, 0.0) +texture checkerboard 2 0 (32, 32) (0.5, 0.0, 0.0, 0.0) (0.0, 0.0, 1.0, 0.0) texparameter 2D min nearest texparameter 2D mag nearest -texture checkerboard 3 0 (32, 32) (1.0, 1.0, 1.0, 1.0) (1.0, 1.0, 1.0, 1.0) +texture checkerboard 3 0 (32, 32) (0.5, 0.0, 0.0, 0.0) (1.0, 1.0, 1.0, 1.0) texparameter 2D min nearest texparameter 2D mag nearest diff --git a/tests/spec/arb_gpu_shader5/execution/sampler_array_indexing/fs-weird-uniforms.shader_test b/tests/spec/arb_gpu_shader5/execution/sampler_array_indexing/fs-weird-uniforms.shader_test index d7fe84c4e..22167c72a 100644 --- a/tests/spec/arb_gpu_shader5/execution/sampler_array_indexing/fs-weird-uniforms.shader_test +++ b/tests/spec/arb_gpu_shader5/execution/sampler_array_indexing/fs-weird-uniforms.shader_test @@ -20,7 +20,7 @@ out vec4 color; void main() { - color = texture(s[n], vec2(0.5, 0.5)); + color = texture(s[n], vec2(0.75, 0.25)); } [test] @@ -32,19 +32,19 @@ uniform int s[1] 2 uniform int s[2] 1 uniform int s[3] 0 -texture checkerboard 3 0 (32, 32) (1.0, 0.0, 0.0, 0.0) (1.0, 0.0, 0.0, 0.0) +texture checkerboard 3 0 (32, 32) (0.5, 0.0, 0.0, 0.0) (1.0, 0.0, 0.0, 0.0) texparameter 2D min nearest texparameter 2D mag nearest -texture checkerboard 2 0 (32, 32) (0.0, 1.0, 0.0, 0.0) (0.0, 1.0, 0.0, 0.0) +texture checkerboard 2 0 (32, 32) (0.5, 0.0, 0.0, 0.0) (0.0, 1.0, 0.0, 0.0) texparameter 2D min nearest texparameter 2D mag nearest -texture checkerboard 1 0 (32, 32) (0.0, 0.0, 1.0, 0.0) (0.0, 0.0, 1.0, 0.0) +texture checkerboard 1 0 (32, 32) (0.5, 0.0, 0.0, 0.0) (0.0, 0.0, 1.0, 0.0) texparameter 2D min nearest texparameter 2D mag nearest -texture checkerboard 0 0 (32, 32) (1.0, 1.0, 1.0, 1.0) (1.0, 1.0, 1.0, 1.0) +texture checkerboard 0 0 (32, 32) (0.5, 0.0, 0.0, 0.0) (1.0, 1.0, 1.0, 1.0) texparameter 2D min nearest texparameter 2D mag nearest diff --git a/tests/spec/arb_gpu_shader5/execution/sampler_array_indexing/fs-with-other.shader_test b/tests/spec/arb_gpu_shader5/execution/sampler_array_indexing/fs-with-other.shader_test index f570dcd2a..fc9edf4b8 100644 --- a/tests/spec/arb_gpu_shader5/execution/sampler_array_indexing/fs-with-other.shader_test +++ b/tests/spec/arb_gpu_shader5/execution/sampler_array_indexing/fs-with-other.shader_test @@ -20,7 +20,7 @@ out vec4 color; void main() { - color = texture(s[n], vec2(0.5, 0.5)); + color = texture(s[n], vec2(0.75, 0.25)); } [test] @@ -32,19 +32,19 @@ uniform int s[1] 1 uniform int s[2] 2 uniform int s[3] 3 -texture checkerboard 0 0 (32, 32) (1.0, 0.0, 0.0, 0.0) (1.0, 0.0, 0.0, 0.0) +texture checkerboard 0 0 (32, 32) (0.5, 0.0, 0.0, 0.0) (1.0, 0.0, 0.0, 0.0) texparameter 2D min nearest texparameter 2D mag nearest -texture checkerboard 1 0 (32, 32) (0.0, 1.0, 0.0, 0.0) (0.0, 1.0, 0.0, 0.0) +texture checkerboard 1 0 (32, 32) (0.5, 0.0, 0.0, 0.0) (0.0, 1.0, 0.0, 0.0) texparameter 2D min nearest texparameter 2D mag nearest -texture checkerboard 2 0 (32, 32) (0.0, 0.0, 1.0, 0.0) (0.0, 0.0, 1.0, 0.0) +texture checkerboard 2 0 (32, 32) (0.5, 0.0, 0.0, 0.0) (0.0, 0.0, 1.0, 0.0) texparameter 2D min nearest texparameter 2D mag nearest -texture checkerboard 3 0 (32, 32) (1.0, 1.0, 1.0, 1.0) (1.0, 1.0, 1.0, 1.0) +texture checkerboard 3 0 (32, 32) (0.5, 0.0, 0.0, 0.0) (1.0, 1.0, 1.0, 1.0) texparameter 2D min nearest texparameter 2D mag nearest diff --git a/tests/spec/arb_gpu_shader5/execution/sampler_array_indexing/gs-nonzero-base.shader_test b/tests/spec/arb_gpu_shader5/execution/sampler_array_indexing/gs-nonzero-base.shader_test index 11b2e7523..a61148fbf 100644 --- a/tests/spec/arb_gpu_shader5/execution/sampler_array_indexing/gs-nonzero-base.shader_test +++ b/tests/spec/arb_gpu_shader5/execution/sampler_array_indexing/gs-nonzero-base.shader_test @@ -23,7 +23,7 @@ void main() { for (int i = 0; i < 3; i++) { gl_Position = gl_in[i].gl_Position; - color = texture(s[n], vec2(0.5, 0.5)); + color = texture(s[n], vec2(0.75, 0.25)); EmitVertex(); } EndPrimitive(); @@ -50,19 +50,19 @@ uniform int s[1] 2 uniform int s[2] 3 uniform int s[3] 4 -texture checkerboard 1 0 (32, 32) (1.0, 0.0, 0.0, 0.0) (1.0, 0.0, 0.0, 0.0) +texture checkerboard 1 0 (32, 32) (0.5, 0.0, 0.0, 0.0) (1.0, 0.0, 0.0, 0.0) texparameter 2D min nearest texparameter 2D mag nearest -texture checkerboard 2 0 (32, 32) (0.0, 1.0, 0.0, 0.0) (0.0, 1.0, 0.0, 0.0) +texture checkerboard 2 0 (32, 32) (0.5, 0.0, 0.0, 0.0) (0.0, 1.0, 0.0, 0.0) texparameter 2D min nearest texparameter 2D mag nearest -texture checkerboard 3 0 (32, 32) (0.0, 0.0, 1.0, 0.0) (0.0, 0.0, 1.0, 0.0) +texture checkerboard 3 0 (32, 32) (0.5, 0.0, 0.0, 0.0) (0.0, 0.0, 1.0, 0.0) texparameter 2D min nearest texparameter 2D mag nearest -texture checkerboard 4 0 (32, 32) (1.0, 1.0, 1.0, 1.0) (1.0, 1.0, 1.0, 1.0) +texture checkerboard 4 0 (32, 32) (0.5, 0.0, 0.0, 0.0) (1.0, 1.0, 1.0, 1.0) texparameter 2D min nearest texparameter 2D mag nearest diff --git a/tests/spec/arb_gpu_shader5/execution/sampler_array_indexing/gs-simple.shader_test b/tests/spec/arb_gpu_shader5/execution/sampler_array_indexing/gs-simple.shader_test index cd4054f43..aeb819efb 100644 --- a/tests/spec/arb_gpu_shader5/execution/sampler_array_indexing/gs-simple.shader_test +++ b/tests/spec/arb_gpu_shader5/execution/sampler_array_indexing/gs-simple.shader_test @@ -23,7 +23,7 @@ void main() { for (int i = 0; i < 3; i++) { gl_Position = gl_in[i].gl_Position; - color = texture(s[n], vec2(0.5, 0.5)); + color = texture(s[n], vec2(0.75, 0.25)); EmitVertex(); } EndPrimitive(); @@ -50,19 +50,19 @@ uniform int s[1] 1 uniform int s[2] 2 uniform int s[3] 3 -texture checkerboard 0 0 (32, 32) (1.0, 0.0, 0.0, 0.0) (1.0, 0.0, 0.0, 0.0) +texture checkerboard 0 0 (32, 32) (0.5, 0.0, 0.0, 0.0) (1.0, 0.0, 0.0, 0.0) texparameter 2D min nearest texparameter 2D mag nearest -texture checkerboard 1 0 (32, 32) (0.0, 1.0, 0.0, 0.0) (0.0, 1.0, 0.0, 0.0) +texture checkerboard 1 0 (32, 32) (0.5, 0.0, 0.0, 0.0) (0.0, 1.0, 0.0, 0.0) texparameter 2D min nearest texparameter 2D mag nearest -texture checkerboard 2 0 (32, 32) (0.0, 0.0, 1.0, 0.0) (0.0, 0.0, 1.0, 0.0) +texture checkerboard 2 0 (32, 32) (0.5, 0.0, 0.0, 0.0) (0.0, 0.0, 1.0, 0.0) texparameter 2D min nearest texparameter 2D mag nearest -texture checkerboard 3 0 (32, 32) (1.0, 1.0, 1.0, 1.0) (1.0, 1.0, 1.0, 1.0) +texture checkerboard 3 0 (32, 32) (0.5, 0.0, 0.0, 0.0) (1.0, 1.0, 1.0, 1.0) texparameter 2D min nearest texparameter 2D mag nearest diff --git a/tests/spec/arb_gpu_shader5/execution/sampler_array_indexing/gs-weird-uniforms.shader_test b/tests/spec/arb_gpu_shader5/execution/sampler_array_indexing/gs-weird-uniforms.shader_test index 4512c99af..ec1c10d24 100644 --- a/tests/spec/arb_gpu_shader5/execution/sampler_array_indexing/gs-weird-uniforms.shader_test +++ b/tests/spec/arb_gpu_shader5/execution/sampler_array_indexing/gs-weird-uniforms.shader_test @@ -23,7 +23,7 @@ void main() { for (int i = 0; i < 3; i++) { gl_Position = gl_in[i].gl_Position; - color = texture(s[n], vec2(0.5, 0.5)); + color = texture(s[n], vec2(0.75, 0.25)); EmitVertex(); } EndPrimitive(); @@ -50,19 +50,19 @@ uniform int s[1] 2 uniform int s[2] 1 uniform int s[3] 0 -texture checkerboard 3 0 (32, 32) (1.0, 0.0, 0.0, 0.0) (1.0, 0.0, 0.0, 0.0) +texture checkerboard 3 0 (32, 32) (0.5, 0.0, 0.0, 0.0) (1.0, 0.0, 0.0, 0.0) texparameter 2D min nearest texparameter 2D mag nearest -texture checkerboard 2 0 (32, 32) (0.0, 1.0, 0.0, 0.0) (0.0, 1.0, 0.0, 0.0) +texture checkerboard 2 0 (32, 32) (0.5, 0.0, 0.0, 0.0) (0.0, 1.0, 0.0, 0.0) texparameter 2D min nearest texparameter 2D mag nearest -texture checkerboard 1 0 (32, 32) (0.0, 0.0, 1.0, 0.0) (0.0, 0.0, 1.0, 0.0) +texture checkerboard 1 0 (32, 32) (0.5, 0.0, 0.0, 0.0) (0.0, 0.0, 1.0, 0.0) texparameter 2D min nearest texparameter 2D mag nearest -texture checkerboard 0 0 (32, 32) (1.0, 1.0, 1.0, 1.0) (1.0, 1.0, 1.0, 1.0) +texture checkerboard 0 0 (32, 32) (0.5, 0.0, 0.0, 0.0) (1.0, 1.0, 1.0, 1.0) texparameter 2D min nearest texparameter 2D mag nearest diff --git a/tests/spec/arb_gpu_shader5/execution/sampler_array_indexing/vs-nonzero-base.shader_test b/tests/spec/arb_gpu_shader5/execution/sampler_array_indexing/vs-nonzero-base.shader_test index e251f0b3b..727d52bb7 100644 --- a/tests/spec/arb_gpu_shader5/execution/sampler_array_indexing/vs-nonzero-base.shader_test +++ b/tests/spec/arb_gpu_shader5/execution/sampler_array_indexing/vs-nonzero-base.shader_test @@ -19,7 +19,7 @@ out vec4 color; void main() { gl_Position = piglit_vertex; - color = texture(s[n], vec2(0.5, 0.5)); + color = texture(s[n], vec2(0.75, 0.25)); } [fragment shader] @@ -43,19 +43,19 @@ uniform int s[1] 2 uniform int s[2] 3 uniform int s[3] 4 -texture checkerboard 1 0 (32, 32) (1.0, 0.0, 0.0, 0.0) (1.0, 0.0, 0.0, 0.0) +texture checkerboard 1 0 (32, 32) (0.5, 0.0, 0.0, 0.0) (1.0, 0.0, 0.0, 0.0) texparameter 2D min nearest texparameter 2D mag nearest -texture checkerboard 2 0 (32, 32) (0.0, 1.0, 0.0, 0.0) (0.0, 1.0, 0.0, 0.0) +texture checkerboard 2 0 (32, 32) (0.5, 0.0, 0.0, 0.0) (0.0, 1.0, 0.0, 0.0) texparameter 2D min nearest texparameter 2D mag nearest -texture checkerboard 3 0 (32, 32) (0.0, 0.0, 1.0, 0.0) (0.0, 0.0, 1.0, 0.0) +texture checkerboard 3 0 (32, 32) (0.5, 0.0, 0.0, 0.0) (0.0, 0.0, 1.0, 0.0) texparameter 2D min nearest texparameter 2D mag nearest -texture checkerboard 4 0 (32, 32) (1.0, 1.0, 1.0, 1.0) (1.0, 1.0, 1.0, 1.0) +texture checkerboard 4 0 (32, 32) (0.5, 0.0, 0.0, 0.0) (1.0, 1.0, 1.0, 1.0) texparameter 2D min nearest texparameter 2D mag nearest diff --git a/tests/spec/arb_gpu_shader5/execution/sampler_array_indexing/vs-simple.shader_test b/tests/spec/arb_gpu_shader5/execution/sampler_array_indexing/vs-simple.shader_test index 20389f6fa..70b55079c 100644 --- a/tests/spec/arb_gpu_shader5/execution/sampler_array_indexing/vs-simple.shader_test +++ b/tests/spec/arb_gpu_shader5/execution/sampler_array_indexing/vs-simple.shader_test @@ -19,7 +19,7 @@ out vec4 color; void main() { gl_Position = piglit_vertex; - color = texture(s[n], vec2(0.5, 0.5)); + color = texture(s[n], vec2(0.75, 0.25)); } [fragment shader] @@ -43,19 +43,19 @@ uniform int s[1] 1 uniform int s[2] 2 uniform int s[3] 3 -texture checkerboard 0 0 (32, 32) (1.0, 0.0, 0.0, 0.0) (1.0, 0.0, 0.0, 0.0) +texture checkerboard 0 0 (32, 32) (0.5, 0.0, 0.0, 0.0) (1.0, 0.0, 0.0, 0.0) texparameter 2D min nearest texparameter 2D mag nearest -texture checkerboard 1 0 (32, 32) (0.0, 1.0, 0.0, 0.0) (0.0, 1.0, 0.0, 0.0) +texture checkerboard 1 0 (32, 32) (0.5, 0.0, 0.0, 0.0) (0.0, 1.0, 0.0, 0.0) texparameter 2D min nearest texparameter 2D mag nearest -texture checkerboard 2 0 (32, 32) (0.0, 0.0, 1.0, 0.0) (0.0, 0.0, 1.0, 0.0) +texture checkerboard 2 0 (32, 32) (0.5, 0.0, 0.0, 0.0) (0.0, 0.0, 1.0, 0.0) texparameter 2D min nearest texparameter 2D mag nearest -texture checkerboard 3 0 (32, 32) (1.0, 1.0, 1.0, 1.0) (1.0, 1.0, 1.0, 1.0) +texture checkerboard 3 0 (32, 32) (0.5, 0.0, 0.0, 0.0) (1.0, 1.0, 1.0, 1.0) texparameter 2D min nearest texparameter 2D mag nearest diff --git a/tests/spec/arb_gpu_shader5/execution/sampler_array_indexing/vs-weird-uniforms.shader_test b/tests/spec/arb_gpu_shader5/execution/sampler_array_indexing/vs-weird-uniforms.shader_test index d047f9f09..b233aa300 100644 --- a/tests/spec/arb_gpu_shader5/execution/sampler_array_indexing/vs-weird-uniforms.shader_test +++ b/tests/spec/arb_gpu_shader5/execution/sampler_array_indexing/vs-weird-uniforms.shader_test @@ -19,7 +19,7 @@ out vec4 color; void main() { gl_Position = piglit_vertex; - color = texture(s[n], vec2(0.5, 0.5)); + color = texture(s[n], vec2(0.75, 0.25)); } [fragment shader] @@ -43,19 +43,19 @@ uniform int s[1] 2 uniform int s[2] 1 uniform int s[3] 0 -texture checkerboard 3 0 (32, 32) (1.0, 0.0, 0.0, 0.0) (1.0, 0.0, 0.0, 0.0) +texture checkerboard 3 0 (32, 32) (0.5, 0.0, 0.0, 0.0) (1.0, 0.0, 0.0, 0.0) texparameter 2D min nearest texparameter 2D mag nearest -texture checkerboard 2 0 (32, 32) (0.0, 1.0, 0.0, 0.0) (0.0, 1.0, 0.0, 0.0) +texture checkerboard 2 0 (32, 32) (0.5, 0.0, 0.0, 0.0) (0.0, 1.0, 0.0, 0.0) texparameter 2D min nearest texparameter 2D mag nearest -texture checkerboard 1 0 (32, 32) (0.0, 0.0, 1.0, 0.0) (0.0, 0.0, 1.0, 0.0) +texture checkerboard 1 0 (32, 32) (0.5, 0.0, 0.0, 0.0) (0.0, 0.0, 1.0, 0.0) texparameter 2D min nearest texparameter 2D mag nearest -texture checkerboard 0 0 (32, 32) (1.0, 1.0, 1.0, 1.0) (1.0, 1.0, 1.0, 1.0) +texture checkerboard 0 0 (32, 32) (0.5, 0.0, 0.0, 0.0) (1.0, 1.0, 1.0, 1.0) texparameter 2D min nearest texparameter 2D mag nearest |