[Piglit] [PATCH] arb_gpu_shader5: add textureSize sampler indexing tests

Timothy Arceri t_arceri at yahoo.com.au
Tue Jul 7 00:08:19 PDT 2015


On Mon, 2015-06-22 at 01:15 -0400, Ilia Mirkin wrote:
> Don't really have to do the checkerboard thing, but... meh. Also I
> would have picked /128.0 instead of /100 so that you get nicer-looking
> fractions, but again... meh. With those things either changed or not,

So I noticed this still isn't commited and was going to reply at the time.

Anyway to bump it I just thought I'd add that I like the fractions how they
are as it makes them less abstract.

And have another reviewed-by for waiting.

Reviewed-by: Timothy Arceri <t_arceri at yahoo.com.au>

> 
> Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>
> 
> On Sun, Jun 21, 2015 at 11:16 PM, Dave Airlie <airlied at gmail.com> wrote:
> > From: Dave Airlie <airlied at redhat.com>
> > 
> > softpipe takes a different path for textureSize, so test it as well
> > just in case other drivers do similiar.
> > 
> > Signed-off-by: Dave Airlie <airlied at redhat.com>
> > ---
> >  .../fs-simple-texture-size.shader_test             | 68 
> > ++++++++++++++++++++++
> >  1 file changed, 68 insertions(+)
> >  create mode 100644 
> > tests/spec/arb_gpu_shader5/execution/sampler_array_indexing/fs-simple
> > -texture-size.shader_test
> > 
> > diff --git 
> > a/tests/spec/arb_gpu_shader5/execution/sampler_array_indexing/fs-simple
> > -texture-size.shader_test 
> > b/tests/spec/arb_gpu_shader5/execution/sampler_array_indexing/fs-simple
> > -texture-size.shader_test
> > new file mode 100644
> > index 0000000..dca749f
> > --- /dev/null
> > +++ b/tests/spec/arb_gpu_shader5/execution/sampler_array_indexing/fs
> > -simple-texture-size.shader_test
> > @@ -0,0 +1,68 @@
> > +# This test verifies that dynamically uniform indexing of sampler arrays
> > +# in the fragment shader behaves correctly using textureSize
> > +
> > +[require]
> > +GLSL >= 1.50
> > +GL_ARB_gpu_shader5
> > +
> > +[vertex shader passthrough]
> > +
> > +[fragment shader]
> > +#version 150
> > +#extension GL_ARB_gpu_shader5: require
> > +
> > +uniform sampler2D s[4];
> > +
> > +uniform int n;
> > +
> > +out vec4 color;
> > +
> > +void main()
> > +{
> > +       color = vec4(textureSize(s[n], 0)/100.0, 0.0, 1.0);
> > +}
> > +
> > +[test]
> > +clear color 0.2 0.2 0.2 0.2
> > +clear
> > +
> > +uniform int s[0] 0
> > +uniform int s[1] 1
> > +uniform int s[2] 2
> > +uniform int s[3] 3
> > +
> > +texture checkerboard 0 0 (128, 128) (1.0, 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 (64, 64) (0.0, 1.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)
> > +texparameter 2D min nearest
> > +texparameter 2D mag nearest
> > +
> > +texture checkerboard 3 0 (16, 16) (1.0, 1.0, 1.0, 1.0) (1.0, 1.0, 1.0, 
> > 1.0)
> > +texparameter 2D min nearest
> > +texparameter 2D mag nearest
> > +
> > +uniform int n 0
> > +draw rect -1 -1 1 1
> > +
> > +relative probe rect rgb (0.0, 0.0, 0.5, 0.5) (1.0, 1.0, 0.0)
> > +
> > +uniform int n 1
> > +draw rect 0 -1 1 1
> > +
> > +relative probe rect rgb (0.5, 0.0, 0.5, 0.5) (0.64, 0.64, 0.0)
> > +
> > +uniform int n 2
> > +draw rect -1 0 1 1
> > +
> > +relative probe rect rgb (0.0, 0.5, 0.5, 0.5) (0.32, 0.32, 0.0)
> > +
> > +uniform int n 3
> > +draw rect 0 0 1 1
> > +
> > +relative probe rect rgb (0.5, 0.5, 0.5, 0.5) (0.16, 0.16, 0.0)
> > --
> > 2.4.3
> > 
> > _______________________________________________
> > Piglit mailing list
> > Piglit at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/piglit
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit


More information about the Piglit mailing list