From 869452aaf08083ff37b3806961cecbfed0226133 Mon Sep 17 00:00:00 2001 From: Mel Henning Date: Tue, 1 Apr 2025 20:11:44 -0400 Subject: [PATCH] nak: Remove range parameter from set_atom_type Part-of: --- src/nouveau/compiler/nak/sm70_encode.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/nouveau/compiler/nak/sm70_encode.rs b/src/nouveau/compiler/nak/sm70_encode.rs index dc544ac888c..ce18748326a 100644 --- a/src/nouveau/compiler/nak/sm70_encode.rs +++ b/src/nouveau/compiler/nak/sm70_encode.rs @@ -2796,7 +2796,7 @@ impl SM70Op for OpSuAtom { e.set_eviction_priority(&self.mem_eviction_priority); e.set_bit(72, false); // .BA - e.set_atom_type(73..76, self.atom_type); + e.set_atom_type(self.atom_type); } } @@ -2965,10 +2965,9 @@ impl SM70Encoder<'_> { ); } - fn set_atom_type(&mut self, range: Range, atom_type: AtomType) { - assert!(range.len() == 3); + fn set_atom_type(&mut self, atom_type: AtomType) { self.set_field( - range, + 73..76, match atom_type { AtomType::U32 => 0_u8, AtomType::I32 => 1_u8, @@ -3051,7 +3050,7 @@ impl SM70Op for OpAtom { e.set_dst(self.dst); e.set_reg_src(24..32, self.addr); e.set_field(40..64, self.addr_offset); - e.set_atom_type(73..76, self.atom_type); + e.set_atom_type(self.atom_type); } }