mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-01 01:38:06 +02:00
nak/sm20: Fix legalization of float source types
Fixes:142fb563c4("nak/sm20: Improve folding of ffma and dfma") Fixes:a3330f1d46("nak/sm20: Add float ops") Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34622>
This commit is contained in:
parent
a2caf95c50
commit
0b8359e159
1 changed files with 9 additions and 9 deletions
|
|
@ -599,9 +599,9 @@ impl SM20Op for OpFFma {
|
|||
b.copy_alu_src(src1, GPR, SrcType::F32);
|
||||
}
|
||||
if src_is_reg(src1, GPR) {
|
||||
b.copy_alu_src_if_imm(src2, GPR, SrcType::ALU);
|
||||
b.copy_alu_src_if_imm(src2, GPR, SrcType::F32);
|
||||
} else {
|
||||
b.copy_alu_src_if_not_reg(src2, GPR, SrcType::I32);
|
||||
b.copy_alu_src_if_not_reg(src2, GPR, SrcType::F32);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -756,7 +756,7 @@ impl SM20Op for OpRro {
|
|||
impl SM20Op for OpMuFu {
|
||||
fn legalize(&mut self, b: &mut LegalizeBuilder) {
|
||||
use RegFile::GPR;
|
||||
b.copy_alu_src_if_not_reg(&mut self.src, GPR, SrcType::I32);
|
||||
b.copy_alu_src_if_not_reg(&mut self.src, GPR, SrcType::F32);
|
||||
}
|
||||
|
||||
fn encode(&self, e: &mut SM20Encoder<'_>) {
|
||||
|
|
@ -792,8 +792,8 @@ impl SM20Op for OpFSet {
|
|||
if swap_srcs_if_not_reg(src0, src1, GPR) {
|
||||
self.cmp_op = self.cmp_op.flip();
|
||||
}
|
||||
b.copy_alu_src_if_not_reg(src0, GPR, SrcType::ALU);
|
||||
b.copy_alu_src_if_f20_overflow(src1, GPR, SrcType::ALU);
|
||||
b.copy_alu_src_if_not_reg(src0, GPR, SrcType::F32);
|
||||
b.copy_alu_src_if_f20_overflow(src1, GPR, SrcType::F32);
|
||||
}
|
||||
|
||||
fn encode(&self, e: &mut SM20Encoder<'_>) {
|
||||
|
|
@ -822,8 +822,8 @@ impl SM20Op for OpFSetP {
|
|||
if swap_srcs_if_not_reg(src0, src1, GPR) {
|
||||
self.cmp_op = self.cmp_op.flip();
|
||||
}
|
||||
b.copy_alu_src_if_not_reg(src0, GPR, SrcType::ALU);
|
||||
b.copy_alu_src_if_f20_overflow(src1, GPR, SrcType::ALU);
|
||||
b.copy_alu_src_if_not_reg(src0, GPR, SrcType::F32);
|
||||
b.copy_alu_src_if_f20_overflow(src1, GPR, SrcType::F32);
|
||||
}
|
||||
|
||||
fn encode(&self, e: &mut SM20Encoder<'_>) {
|
||||
|
|
@ -930,9 +930,9 @@ impl SM20Op for OpDFma {
|
|||
b.copy_alu_src_if_not_reg(src0, GPR, SrcType::F64);
|
||||
b.copy_alu_src_if_f20_overflow(src1, GPR, SrcType::F64);
|
||||
if src_is_reg(src1, GPR) {
|
||||
b.copy_alu_src_if_imm(src2, GPR, SrcType::ALU);
|
||||
b.copy_alu_src_if_imm(src2, GPR, SrcType::F64);
|
||||
} else {
|
||||
b.copy_alu_src_if_not_reg(src2, GPR, SrcType::I32);
|
||||
b.copy_alu_src_if_not_reg(src2, GPR, SrcType::F64);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue