nak: add uniform support for s2r

This adds s2ur support to the backend compiler.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36105>
This commit is contained in:
Dave Airlie 2025-07-15 06:31:48 +10:00 committed by Marge Bot
parent 2273b6c46a
commit 4726c08f53
3 changed files with 21 additions and 3 deletions

View file

@ -3722,9 +3722,13 @@ impl SM70Op for OpS2R {
}
fn encode(&self, e: &mut SM70Encoder<'_>) {
assert!(!self.is_uniform());
e.set_opcode(if self.is_uniform() { 0x9c3 } else { 0x919 });
e.set_dst(&self.dst);
if self.is_uniform() {
e.set_opcode(0x9c3);
e.set_udst(&self.dst);
} else {
e.set_opcode(0x919);
e.set_dst(&self.dst);
}
e.set_field(72..80, self.idx);
}
}

View file

@ -932,6 +932,13 @@ impl URegLatencySM75 {
panic!("Illegal R2UR in ureg");
}
}
Op::S2R(_) => {
if !reader {
R2UR
} else {
panic!("Illegal S2UR in ureg");
}
}
Op::Vote(_) => VoteU,
Op::FRnd(_) => vdecoupled,

View file

@ -1067,6 +1067,13 @@ impl URegLatencySM80 {
panic!("Illegal R2UR in ureg");
}
}
Op::S2R(_) => {
if !reader {
ToUr
} else {
panic!("Illegal S2UR in ureg");
}
}
Op::Vote(_) => VoteU,
Op::FRnd(_) => vdecoupled,