nir/spirv_to_nir: Use a minimum of 1 for GS invocations

glslang is giving us 0, which causes the SIMD8 GS compile to hit an
assert.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
This commit is contained in:
Jordan Justen 2015-12-14 18:12:57 -08:00
parent f46544dea1
commit a3c5c339a8

View file

@ -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: