summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Ekstrand <jason.ekstrand@intel.com>2016-03-29 20:29:07 -0700
committerJason Ekstrand <jason.ekstrand@intel.com>2016-03-29 20:30:27 -0700
commitcf2257069cbde19fd177a02c079206914aac5d14 (patch)
tree8edd2e033474faa9c2c27d19d1bd18f369f1f2a0 /src
parentf56f538ce4753a6fdd969b610f35433fd657e4ee (diff)
downloadexternal_mesa3d-cf2257069cbde19fd177a02c079206914aac5d14.zip
external_mesa3d-cf2257069cbde19fd177a02c079206914aac5d14.tar.gz
external_mesa3d-cf2257069cbde19fd177a02c079206914aac5d14.tar.bz2
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.
Diffstat (limited to 'src')
-rw-r--r--src/compiler/nir/spirv/spirv_to_nir.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/compiler/nir/spirv/spirv_to_nir.c b/src/compiler/nir/spirv/spirv_to_nir.c
index 663f41f..9484544 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);