rusticl/kernel: call nir_lower_variable_initializers earlier

Fixes spirv_new spirv14_nonwriteable_decoration

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33327>
This commit is contained in:
Karol Herbst 2025-01-31 01:43:56 +01:00 committed by Marge Bot
parent 48f93e7313
commit 2f4931353f
2 changed files with 6 additions and 5 deletions

View file

@ -639,6 +639,12 @@ fn compile_nir_to_args(
nir_pass!(nir, nir_scale_fdiv);
nir.set_workgroup_size_variable_if_zero();
nir.structurize();
nir_pass!(
nir,
nir_lower_variable_initializers,
nir_variable_mode::nir_var_function_temp
);
while {
let mut progress = false;
nir_pass!(nir, nir_split_var_copies);

View file

@ -259,11 +259,6 @@ impl NirShader {
}
pub fn inline(&mut self, libclc: &NirShader) {
nir_pass!(
self,
nir_lower_variable_initializers,
nir_variable_mode::nir_var_function_temp,
);
nir_pass!(self, nir_lower_returns);
nir_pass!(self, nir_link_shader_functions, libclc.nir.as_ptr());
nir_pass!(self, nir_inline_functions);