mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-26 00:30:31 +01:00
mesa/spirv: Lower variable initializers for global variables
We lower variable initializers for local variables higher up in the function but we never called nir_lower_variable_initializers for anything else. Cc: mesa-stable@lists.freedesktop.org Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7296>
This commit is contained in:
parent
c2cb2dd3bc
commit
6b85a887ff
1 changed files with 7 additions and 0 deletions
|
|
@ -295,6 +295,13 @@ _mesa_spirv_to_nir(struct gl_context *ctx,
|
|||
}
|
||||
assert(exec_list_length(&nir->functions) == 1);
|
||||
|
||||
/* Now that we've deleted all but the main function, we can go ahead and
|
||||
* lower the rest of the constant initializers. We do this here so that
|
||||
* nir_remove_dead_variables and split_per_member_structs below see the
|
||||
* corresponding stores.
|
||||
*/
|
||||
NIR_PASS_V(nir, nir_lower_variable_initializers, ~0);
|
||||
|
||||
/* Split member structs. We do this before lower_io_to_temporaries so that
|
||||
* it doesn't lower system values to temporaries by accident.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue