mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-20 22:30:12 +01:00
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 <caio.oliveira@intel.com>
This commit is contained in:
parent
7d862ef530
commit
e68871f6a4
1 changed files with 4 additions and 4 deletions
|
|
@ -4441,10 +4441,6 @@ spirv_to_nir(const uint32_t *words, size_t word_count,
|
||||||
/* Set shader info defaults */
|
/* Set shader info defaults */
|
||||||
b->shader->info.gs.invocations = 1;
|
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->specializations = spec;
|
||||||
b->num_specializations = num_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,
|
words = vtn_foreach_instruction(b, words, word_end,
|
||||||
vtn_handle_variable_or_type_instruction);
|
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) {
|
if (b->workgroup_size_builtin) {
|
||||||
vtn_assert(b->workgroup_size_builtin->type->type ==
|
vtn_assert(b->workgroup_size_builtin->type->type ==
|
||||||
glsl_vector_type(GLSL_TYPE_UINT, 3));
|
glsl_vector_type(GLSL_TYPE_UINT, 3));
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue