[Piglit] [PATCH] arb_compute_variable_group_size: ensure local size works with fixed

Jordan Justen jordan.l.justen at intel.com
Mon Oct 23 00:20:53 UTC 2017


Reviewed-by: Jordan Justen <jordan.l.justen at intel.com>

On 2017-10-22 15:12:58, Ilia Mirkin wrote:
> The new gl_LocalGroupSizeARB variable is meant to work with fixed sizes
> as well. Test it.
> 
> Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
> ---
>  .../execution/fixed-local-size.shader_test         | 32 ++++++++++++++++++++++
>  1 file changed, 32 insertions(+)
>  create mode 100644 tests/spec/arb_compute_variable_group_size/execution/fixed-local-size.shader_test
> 
> diff --git a/tests/spec/arb_compute_variable_group_size/execution/fixed-local-size.shader_test b/tests/spec/arb_compute_variable_group_size/execution/fixed-local-size.shader_test
> new file mode 100644
> index 000000000..6d92aeaad
> --- /dev/null
> +++ b/tests/spec/arb_compute_variable_group_size/execution/fixed-local-size.shader_test
> @@ -0,0 +1,32 @@
> +# Simple test that verifies gl_LocalGroupSizeARB values are
> +# functioning. Atomic counters are used as outputs.
> +
> +[require]
> +GL >= 3.3
> +GLSL >= 3.30
> +GL_ARB_compute_variable_group_size
> +GL_ARB_shader_atomic_counters
> +
> +[compute shader]
> +#version 330
> +#extension GL_ARB_compute_shader: enable
> +#extension GL_ARB_compute_variable_group_size: enable
> +#extension GL_ARB_shader_atomic_counters: require
> +
> +layout(binding = 0) uniform atomic_uint a;
> +
> +layout(local_size_x = 8, local_size_y = 4, local_size_z = 2) in;
> +
> +void main()
> +{
> +       if (gl_LocalGroupSizeARB.x == 8u &&
> +           gl_LocalGroupSizeARB.y == 4u &&
> +           gl_LocalGroupSizeARB.z == 2u)
> +       atomicCounterIncrement(a);
> +}
> +
> +[test]
> +atomic counters 1
> +
> +compute 1 1 1
> +probe atomic counter 0 == 64
> -- 
> 2.13.6
> 
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/piglit


More information about the Piglit mailing list