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

Author: Dave Airlie <[email protected]>
Date:   Fri Dec  8 14:59:25 2023 +1000

nvk/nak: fix regression with shf changes on sm70

This commit nak: implement SHL and SHR on SM50 caused a regression on
KHR-GL45.gpu_shader_fp64.* using zink.

This fixes the regression, by setting the wrap fields.

Fixes: 00be041ffcb0 ("nak: implement SHL and SHR on SM50")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26586>

---

 src/nouveau/compiler/nak/builder.rs | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/nouveau/compiler/nak/builder.rs 
b/src/nouveau/compiler/nak/builder.rs
index cc1daacabb1..2f75410200e 100644
--- a/src/nouveau/compiler/nak/builder.rs
+++ b/src/nouveau/compiler/nak/builder.rs
@@ -130,7 +130,7 @@ pub trait SSABuilder: Builder {
                 high: 0.into(),
                 shift: shift,
                 right: false,
-                wrap: false,
+                wrap: true,
                 data_type: IntType::I32,
                 dst_high: false,
             });
@@ -139,7 +139,7 @@ pub trait SSABuilder: Builder {
                 dst: dst.into(),
                 src: x,
                 shift: shift,
-                wrap: false,
+                wrap: true,
             });
         }
         dst
@@ -154,7 +154,7 @@ pub trait SSABuilder: Builder {
                 high: x,
                 shift: shift,
                 right: true,
-                wrap: false,
+                wrap: true,
                 data_type: if signed { IntType::I32 } else { IntType::U32 },
                 dst_high: true,
             });
@@ -163,7 +163,7 @@ pub trait SSABuilder: Builder {
                 dst: dst.into(),
                 src: x,
                 shift: shift,
-                wrap: false,
+                wrap: true,
                 signed,
             });
         }

Reply via email to