From a3c5c339a8dcda213f8e3f6a56b44080b4c4eda7 Mon Sep 17 00:00:00 2001 From: Jordan Justen Date: Mon, 14 Dec 2015 18:12:57 -0800 Subject: [PATCH] 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 --- src/glsl/nir/spirv_to_nir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: -- 2.30.2