summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/glsl/nir/spirv_to_nir.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/glsl/nir/spirv_to_nir.c b/src/glsl/nir/spirv_to_nir.c
index e101e1edcb0..a8f3016e050 100644
--- a/src/glsl/nir/spirv_to_nir.c
+++ b/src/glsl/nir/spirv_to_nir.c
@@ -3075,7 +3075,7 @@ vtn_handle_preamble_instruction(struct vtn_builder *b, SpvOp opcode,
case SpvExecutionModeInvocations:
assert(b->shader->stage == MESA_SHADER_GEOMETRY);
- b->shader->info.gs.invocations = w[3];
+ b->shader->info.gs.invocations = MAX2(1, w[3]);
break;
case SpvExecutionModeDepthReplacing: