From: Jordan Justen Date: Tue, 16 Feb 2016 16:21:22 +0000 (-0800) Subject: mesa: Don't call driver when there is no compute work X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f28d80fabfca97b24b3e716e8fb1836abdc32643;p=mesa.git mesa: Don't call driver when there is no compute work 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 Reviewed-by: Ilia Mirkin --- diff --git a/src/mesa/main/compute.c b/src/mesa/main/compute.c index 53e7a500f61..b71430f2b12 100644 --- a/src/mesa/main/compute.c +++ b/src/mesa/main/compute.c @@ -41,6 +41,9 @@ _mesa_DispatchCompute(GLuint num_groups_x, if (!_mesa_validate_DispatchCompute(ctx, num_groups)) return; + if (num_groups_x == 0u || num_groups_y == 0u || num_groups_z == 0u) + return; + ctx->Driver.DispatchCompute(ctx, num_groups); }