From 3d4a4a68a0fe91a5184c59323a1a882eb594c23d Mon Sep 17 00:00:00 2001 From: Faith Ekstrand Date: Sat, 27 Jul 2024 15:52:19 -0500 Subject: [PATCH] nak: Non-constant offsets are allowed on patch loads Fixes: 37a38f6744f3 ("nak/sm50: Add support for OpAL2P") Part-of: --- src/nouveau/compiler/nak/sm50.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/nouveau/compiler/nak/sm50.rs b/src/nouveau/compiler/nak/sm50.rs index c85431b2877..ec10e4b4c98 100644 --- a/src/nouveau/compiler/nak/sm50.rs +++ b/src/nouveau/compiler/nak/sm50.rs @@ -2619,8 +2619,9 @@ impl SM50Op for OpALd { e.set_dst(self.dst); if self.access.phys { + assert!(!self.access.patch); assert!(self.offset.src_ref.as_reg().is_some()); - } else { + } else if !self.access.patch { assert!(self.offset.is_zero()); } e.set_reg_src(8..16, self.offset);