diff --git a/src/gallium/frontends/rusticl/core/kernel.rs b/src/gallium/frontends/rusticl/core/kernel.rs index 05296c0cd0e..cbe02152c41 100644 --- a/src/gallium/frontends/rusticl/core/kernel.rs +++ b/src/gallium/frontends/rusticl/core/kernel.rs @@ -516,6 +516,8 @@ fn lower_and_optimize_nir( nir_variable_mode::nir_var_mem_constant, Some(glsl_get_cl_type_size_align), ); + + // has to run before adding internal kernel arguments nir.extract_constant_initializers(); // run before gather info @@ -615,6 +617,8 @@ fn lower_and_optimize_nir( ); } + // need to run after first opt loop and remove_dead_variables to get rid of uneccessary scratch + // memory nir_pass!( nir, nir_lower_vars_to_explicit_types,