diff --git a/src/mesa/main/compute.c b/src/mesa/main/compute.c index 299ba097f65..9ad499040b7 100644 --- a/src/mesa/main/compute.c +++ b/src/mesa/main/compute.c @@ -167,7 +167,7 @@ validate_DispatchComputeGroupSizeARB(struct gl_context *ctx, * for compute shaders with variable group size * (MAX_COMPUTE_VARIABLE_GROUP_INVOCATIONS_ARB)." */ - uint64_t total_invocations = info->block[0] * info->block[1]; + uint64_t total_invocations = info->block[0] * (uint64_t) info->block[1]; if (total_invocations <= UINT32_MAX) { /* Only bother multiplying the third value if total still fits in * 32-bit, since MaxComputeVariableGroupInvocations is also 32-bit.