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 <jordan.l.justen@intel.com> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user