[Piglit] [PATCH] sampler_array_indexing: also check that texture coordinates work

Neil Roberts neil at linux.intel.com
Thu Jun 18 06:42:13 PDT 2015


Looks good to me. Thanks for doing that.

Reviewed-by: Neil Roberts <neil at linux.intel.com>

Regards,
- Neil

Timothy Arceri <t_arceri at yahoo.com.au> writes:

> Previously the 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.
>
> Test results:
> Nvidia GeForce 840M - NVIDIA 346.47: pass
>
> Cc: Neil Roberts <neil at linux.intel.com>
> ---
>  .../fs-struct-nonconst-sampler-const.shader_test               | 10 +++++-----
>  .../fs-struct-nonconst-sampler-nonconst.shader_test            | 10 +++++-----
>  .../fs-struct-nonconst-sampler.shader_test                     | 10 +++++-----
>  3 files changed, 15 insertions(+), 15 deletions(-)
>
> diff --git a/tests/spec/arb_gpu_shader5/execution/sampler_array_indexing/fs-struct-nonconst-sampler-const.shader_test b/tests/spec/arb_gpu_shader5/execution/sampler_array_indexing/fs-struct-nonconst-sampler-const.shader_test
> index 16f73a4..69dbb0c 100644
> --- a/tests/spec/arb_gpu_shader5/execution/sampler_array_indexing/fs-struct-nonconst-sampler-const.shader_test
> +++ b/tests/spec/arb_gpu_shader5/execution/sampler_array_indexing/fs-struct-nonconst-sampler-const.shader_test
> @@ -23,7 +23,7 @@ out vec4 color;
>  
>  void main()
>  {
> -	color = texture(s[n].tex[1], vec2(0.5, 0.5));
> +	color = texture(s[n].tex[1], vec2(0.75, 0.25));
>  }
>  
>  [test]
> @@ -35,19 +35,19 @@ uniform int s[1].tex[1] 1
>  uniform int s[2].tex[1] 2
>  uniform int s[3].tex[1] 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-struct-nonconst-sampler-nonconst.shader_test b/tests/spec/arb_gpu_shader5/execution/sampler_array_indexing/fs-struct-nonconst-sampler-nonconst.shader_test
> index 88310ab..7368656 100644
> --- a/tests/spec/arb_gpu_shader5/execution/sampler_array_indexing/fs-struct-nonconst-sampler-nonconst.shader_test
> +++ b/tests/spec/arb_gpu_shader5/execution/sampler_array_indexing/fs-struct-nonconst-sampler-nonconst.shader_test
> @@ -24,7 +24,7 @@ out vec4 color;
>  
>  void main()
>  {
> -	color = texture(s[n].tex[m], vec2(0.5, 0.5));
> +	color = texture(s[n].tex[m], vec2(0.75, 0.25));
>  }
>  
>  [test]
> @@ -36,19 +36,19 @@ uniform int s[0].tex[1] 1
>  uniform int s[1].tex[0] 2
>  uniform int s[1].tex[1] 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-struct-nonconst-sampler.shader_test b/tests/spec/arb_gpu_shader5/execution/sampler_array_indexing/fs-struct-nonconst-sampler.shader_test
> index 9c6df15..3e3737d 100644
> --- a/tests/spec/arb_gpu_shader5/execution/sampler_array_indexing/fs-struct-nonconst-sampler.shader_test
> +++ b/tests/spec/arb_gpu_shader5/execution/sampler_array_indexing/fs-struct-nonconst-sampler.shader_test
> @@ -23,7 +23,7 @@ out vec4 color;
>  
>  void main()
>  {
> -	color = texture(s[n].tex, vec2(0.5, 0.5));
> +	color = texture(s[n].tex, vec2(0.75, 0.25));
>  }
>  
>  [test]
> @@ -35,19 +35,19 @@ uniform int s[1].tex 1
>  uniform int s[2].tex 2
>  uniform int s[3].tex 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
>  
> -- 
> 2.1.0


More information about the Piglit mailing list