From e612e840d2b15054e3597763e22d0537f6bc81e6 Mon Sep 17 00:00:00 2001 From: Faith Ekstrand Date: Mon, 31 Mar 2025 15:11:58 -0500 Subject: [PATCH] nak: Use is_volta() instead of sm == 70 This is a bug fix but Volta is currently disabled by default and it only affects fp64 and fp16. Reviewed-by: Dave Airlie Reviewed-by: Mel Henning Part-of: --- src/nouveau/compiler/nak/sm70.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nouveau/compiler/nak/sm70.rs b/src/nouveau/compiler/nak/sm70.rs index 58c9d2f8900..2d6d7491d84 100644 --- a/src/nouveau/compiler/nak/sm70.rs +++ b/src/nouveau/compiler/nak/sm70.rs @@ -40,7 +40,7 @@ impl ShaderModel70 { | Op::HMul2(_) | Op::HSet2(_) | Op::HSetP2(_) - | Op::HMnMx2(_) => if self.sm == 70 { + | Op::HMnMx2(_) => if self.is_volta() { // Volta is even slower (13, 15) } else { @@ -197,7 +197,7 @@ impl ShaderModel for ShaderModel70 { } fn paw_latency(&self, write: &Op, _dst_idx: usize) -> u32 { - if self.sm == 70 { + if self.is_volta() { match write { Op::DSetP(_) | Op::HSetP2(_) => 15, _ => 13,