[Piglit] [PATCH 1/2] arb_compute_shader: Support ID tests with work group sizes of 0

Ilia Mirkin imirkin at alum.mit.edu
Tue Feb 16 16:50:01 UTC 2016


On Tue, Feb 16, 2016 at 11:27 AM, Jordan Justen
<jordan.l.justen at intel.com> wrote:
> The ARB_compute_shader spec says:
>
>   "If the work group count in any dimension is zero, no work groups
>    are dispatched."
>
> Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>

Series is

Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>

> ---
>  tests/spec/arb_compute_shader/cs-ids-common.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/tests/spec/arb_compute_shader/cs-ids-common.c b/tests/spec/arb_compute_shader/cs-ids-common.c
> index 9676c82..e5987d3 100644
> --- a/tests/spec/arb_compute_shader/cs-ids-common.c
> +++ b/tests/spec/arb_compute_shader/cs-ids-common.c
> @@ -135,7 +135,8 @@ confirm_size()
>
>         memset(&values, 0, sizeof values);
>
> -       for (z = 0; z < zs; z++) {
> +       const bool no_work = global_x == 0 || global_y == 0 || global_z == 0;
> +       for (z = 0; z < zs && !no_work; z++) {
>                 for (y = 0; y < ys; y++) {
>                         for (x = 0; x < xs; x++) {
>                                 if (((x & y) & z) == 0u)
> @@ -280,8 +281,7 @@ cs_ids_run_test()
>                        local_x, local_y, local_z,
>                        global_x, global_y, global_z);
>
> -       if (local_x == 0 || local_y == 0 || local_z == 0 ||
> -           global_x == 0 || global_y == 0 || global_z == 0)
> +       if (local_x == 0 || local_y == 0 || local_z == 0)
>                 return PIGLIT_FAIL;
>
>         glBindBufferBase(GL_ATOMIC_COUNTER_BUFFER, 0, atomics_bo);
> --
> 2.7.0
>
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/piglit


More information about the Piglit mailing list