summaryrefslogtreecommitdiff
path: root/tests/spec/arb_compute_shader
diff options
context:
space:
mode:
authorJordan Justen <jordan.l.justen@intel.com>2016-02-16 00:58:30 -0800
committerJordan Justen <jordan.l.justen@intel.com>2016-02-16 09:06:52 -0800
commit611d130a08d0610054d0b89e6fc1fe6cf081814b (patch)
tree55b025d179b83620e9a6bceb8c35502aab719595 /tests/spec/arb_compute_shader
parentdd586ecda7acfac5484dba907e7d0f8090abb7ac (diff)
arb_compute_shader: Support ID tests with work group sizes of 0
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@intel.com> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Diffstat (limited to 'tests/spec/arb_compute_shader')
-rw-r--r--tests/spec/arb_compute_shader/cs-ids-common.c6
1 files 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 9676c82ac..e5987d3e2 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);