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

Author: Karol Herbst <kher...@redhat.com>
Date:   Mon Jan 15 12:34:46 2024 +0100

rusticl/kernel: no need to reset the scratch size anymore

The scratch size gets assigned by nir_lower_vars_to_explicit_types. Now
that we only run it once on temp memory, there is no need to reset the
value.

Signed-off-by: Karol Herbst <kher...@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27068>

---

 src/gallium/frontends/rusticl/core/kernel.rs       | 1 -
 src/gallium/frontends/rusticl/mesa/compiler/nir.rs | 6 ------
 2 files changed, 7 deletions(-)

diff --git a/src/gallium/frontends/rusticl/core/kernel.rs 
b/src/gallium/frontends/rusticl/core/kernel.rs
index cbe02152c41..73ebcbb1ff1 100644
--- a/src/gallium/frontends/rusticl/core/kernel.rs
+++ b/src/gallium/frontends/rusticl/core/kernel.rs
@@ -509,7 +509,6 @@ fn lower_and_optimize_nir(
         !dev.samplers_as_deref(),
     );
 
-    nir.reset_scratch_size();
     nir_pass!(
         nir,
         nir_lower_vars_to_explicit_types,
diff --git a/src/gallium/frontends/rusticl/mesa/compiler/nir.rs 
b/src/gallium/frontends/rusticl/mesa/compiler/nir.rs
index b61ec9254a9..5845d017d13 100644
--- a/src/gallium/frontends/rusticl/mesa/compiler/nir.rs
+++ b/src/gallium/frontends/rusticl/mesa/compiler/nir.rs
@@ -308,12 +308,6 @@ impl NirShader {
         unsafe { (*self.nir.as_ptr()).info.num_textures }
     }
 
-    pub fn reset_scratch_size(&mut self) {
-        unsafe {
-            (*self.nir.as_ptr()).scratch_size = 0;
-        }
-    }
-
     pub fn scratch_size(&self) -> u32 {
         unsafe { (*self.nir.as_ptr()).scratch_size }
     }

Reply via email to