diff options
author | Jason Ekstrand <[email protected]> | 2019-01-22 13:42:08 -0600 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2019-02-01 17:34:02 +0000 |
commit | e68871f6a44fe25f5ed0289aa4b5e6064fe78412 (patch) | |
tree | 049d1f6763986c83b9f19922fbe1b258fe92432e /src/compiler | |
parent | 7d862ef53024b70458929c1665af43573b4d07ff (diff) |
spirv: Handle constants and types before execution modes
We already defer handling the actual execution modes until after we've
created the shader. This just moves it a tiny bit further so we
actually have constants and types and can handle OpExecutionModeId.
Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/spirv/spirv_to_nir.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c index 41972edc1b5..bfc16b2ae7d 100644 --- a/src/compiler/spirv/spirv_to_nir.c +++ b/src/compiler/spirv/spirv_to_nir.c @@ -4441,10 +4441,6 @@ spirv_to_nir(const uint32_t *words, size_t word_count, /* 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); - b->specializations = spec; b->num_specializations = num_spec; @@ -4452,6 +4448,10 @@ spirv_to_nir(const uint32_t *words, size_t word_count, words = vtn_foreach_instruction(b, words, word_end, vtn_handle_variable_or_type_instruction); + /* Parse execution modes */ + vtn_foreach_execution_mode(b, b->entry_point, + vtn_handle_execution_mode, NULL); + if (b->workgroup_size_builtin) { vtn_assert(b->workgroup_size_builtin->type->type == glsl_vector_type(GLSL_TYPE_UINT, 3)); |