Module: Mesa
Branch: main
Commit: 835c208578b333f4624dc7d81158058e99e5efb0
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=835c208578b333f4624dc7d81158058e99e5efb0

Author: Karol Herbst <[email protected]>
Date:   Mon Jan 15 12:37:17 2024 +0100

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>

---

 src/gallium/frontends/rusticl/core/kernel.rs | 4 ++++
 1 file changed, 4 insertions(+)

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,

Reply via email to