rusticl/kernel: add a few comments in regards to pass ordering

This is helpful as otherwise I'll keep doing the same mistakes trying to
fix anything in here.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27068>
This commit is contained in:
Karol Herbst 2024-01-15 12:37:17 +01:00 committed by Marge Bot
parent f896659894
commit 835c208578

View file

@ -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,