nak/sm50: Fix encoding of immediates in OpFFma

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28000>
This commit is contained in:
Faith Ekstrand 2024-03-05 18:11:21 -06:00 committed by Marge Bot
parent 21de61b1ac
commit 3d13d190e6

View file

@ -1491,9 +1491,6 @@ impl SM50Instr {
}
fn encode_ffma(&mut self, op: &OpFFma) {
// TODO: FFMA in the 32 bits immediate form use the dest as source 2
assert!(op.srcs[1].as_imm_not_i20().is_none());
// FFMA doesn't have any abs flags.
assert!(!op.srcs[0].src_mod.has_fabs());
assert!(!op.srcs[1].src_mod.has_fabs());
@ -1506,7 +1503,7 @@ impl SM50Instr {
}
SrcRef::Imm32(i) => {
self.set_opcode(0x3280);
self.set_src_imm_i20(20..39, 56, *i);
self.set_src_imm_f20(20..39, 56, *i);
}
SrcRef::CBuf(cb) => {
self.set_opcode(0x4980);