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

Author: Alyssa Rosenzweig <[email protected]>
Date:   Tue Jun 20 17:57:16 2023 -0400

pan/mdg: Lower isub in common code

No shader-db changes.

Signed-off-by: Alyssa Rosenzweig <[email protected]>
Reviewed-by: Italo Nicola <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23769>

---

 src/panfrost/midgard/midgard_compile.h        | 1 +
 src/panfrost/midgard/midgard_nir_algebraic.py | 6 ------
 2 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/src/panfrost/midgard/midgard_compile.h 
b/src/panfrost/midgard/midgard_compile.h
index 9eb2be02d71..ba84e7b8a83 100644
--- a/src/panfrost/midgard/midgard_compile.h
+++ b/src/panfrost/midgard/midgard_compile.h
@@ -51,6 +51,7 @@ static const nir_shader_compiler_options midgard_nir_options 
= {
    .lower_ffract = true,
    .lower_fmod = true,
    .lower_fdiv = true,
+   .lower_ineg = true,
    .lower_isign = true,
    .lower_fpow = true,
    .lower_find_lsb = true,
diff --git a/src/panfrost/midgard/midgard_nir_algebraic.py 
b/src/panfrost/midgard/midgard_nir_algebraic.py
index 1b70c533c81..12a03f8b175 100644
--- a/src/panfrost/midgard/midgard_nir_algebraic.py
+++ b/src/panfrost/midgard/midgard_nir_algebraic.py
@@ -41,12 +41,6 @@ algebraic = [
 ]
 
 algebraic_late = [
-    # ineg must be lowered late, but only for integers; floats will try to
-    # have modifiers attached... hence why this has to be here rather than
-    # a more standard lower_negate approach
-
-    (('ineg', a), ('isub', 0, a)),
-
     # Likewise we want fsub lowered but not isub
     (('fsub', a, b), ('fadd', a, ('fneg', b))),
 

Reply via email to