diff options
Diffstat (limited to 'src/mesa/main/compute.c')
-rw-r--r-- | src/mesa/main/compute.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/mesa/main/compute.c b/src/mesa/main/compute.c index b052bae7e91..bb6253906bc 100644 --- a/src/mesa/main/compute.c +++ b/src/mesa/main/compute.c @@ -66,5 +66,22 @@ _mesa_DispatchComputeGroupSizeARB(GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z, GLuint group_size_x, GLuint group_size_y, GLuint group_size_z) { + GET_CURRENT_CONTEXT(ctx); + const GLuint num_groups[3] = { num_groups_x, num_groups_y, num_groups_z }; + const GLuint group_size[3] = { group_size_x, group_size_y, group_size_z }; + + if (MESA_VERBOSE & VERBOSE_API) + _mesa_debug(ctx, + "glDispatchComputeGroupSizeARB(%d, %d, %d, %d, %d, %d)\n", + num_groups_x, num_groups_y, num_groups_z, + group_size_x, group_size_y, group_size_z); + + if (!_mesa_validate_DispatchComputeGroupSizeARB(ctx, num_groups, + group_size)) + return; + + if (num_groups_x == 0u || num_groups_y == 0u || num_groups_z == 0u) + return; + ctx->Driver.DispatchComputeGroupSize(ctx, num_groups, group_size); } |