diff options
author | Jordan Justen <jordan.l.justen@intel.com> | 2016-02-16 08:21:22 -0800 |
---|---|---|
committer | Jordan Justen <jordan.l.justen@intel.com> | 2016-02-16 09:25:20 -0800 |
commit | f28d80fabfca97b24b3e716e8fb1836abdc32643 (patch) | |
tree | 1d0b6cd9979a6e60dcf7ffb9519a421201135406 /src/mesa/main/compute.c | |
parent | 8514c75a26ec2a83784ea9063ed5e6587184832c (diff) | |
download | external_mesa3d-f28d80fabfca97b24b3e716e8fb1836abdc32643.zip external_mesa3d-f28d80fabfca97b24b3e716e8fb1836abdc32643.tar.gz external_mesa3d-f28d80fabfca97b24b3e716e8fb1836abdc32643.tar.bz2 |
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>
Diffstat (limited to 'src/mesa/main/compute.c')
-rw-r--r-- | src/mesa/main/compute.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/main/compute.c b/src/mesa/main/compute.c index 53e7a50..b71430f 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); } |