From cf2257069cbde19fd177a02c079206914aac5d14 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Tue, 29 Mar 2016 20:29:07 -0700 Subject: [PATCH] nir/spirv: Set a default number of invocations for geometry shaders The SPIR-V spec says geometry shaders are supposed to have one invocation by default. The execution mode is only required if there are multiple invocations. --- src/compiler/nir/spirv/spirv_to_nir.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/compiler/nir/spirv/spirv_to_nir.c b/src/compiler/nir/spirv/spirv_to_nir.c index 663f41fa876..948454494fa 100644 --- a/src/compiler/nir/spirv/spirv_to_nir.c +++ b/src/compiler/nir/spirv/spirv_to_nir.c @@ -2676,6 +2676,9 @@ spirv_to_nir(const uint32_t *words, size_t word_count, b->shader = nir_shader_create(NULL, stage, options); + /* Set shader info defaults */ + b->shader->info.gs.invocations = 1; + /* Parse execution modes */ vtn_foreach_execution_mode(b, b->entry_point, vtn_handle_execution_mode, NULL); -- 2.30.2