mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-21 22:20:14 +01:00
nak/sm20: Improve folding of ffma and dfma
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34619>
This commit is contained in:
parent
9855467ed0
commit
142fb563c4
1 changed files with 10 additions and 2 deletions
|
|
@ -598,7 +598,11 @@ impl SM20Op for OpFFma {
|
||||||
{
|
{
|
||||||
b.copy_alu_src(src1, GPR, SrcType::F32);
|
b.copy_alu_src(src1, GPR, SrcType::F32);
|
||||||
}
|
}
|
||||||
b.copy_alu_src_if_not_reg(src2, GPR, SrcType::F32);
|
if src_is_reg(src1, GPR) {
|
||||||
|
b.copy_alu_src_if_imm(src2, GPR, SrcType::ALU);
|
||||||
|
} else {
|
||||||
|
b.copy_alu_src_if_not_reg(src2, GPR, SrcType::I32);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn encode(&self, e: &mut SM20Encoder<'_>) {
|
fn encode(&self, e: &mut SM20Encoder<'_>) {
|
||||||
|
|
@ -925,7 +929,11 @@ impl SM20Op for OpDFma {
|
||||||
swap_srcs_if_not_reg(src0, src1, GPR);
|
swap_srcs_if_not_reg(src0, src1, GPR);
|
||||||
b.copy_alu_src_if_not_reg(src0, GPR, SrcType::F64);
|
b.copy_alu_src_if_not_reg(src0, GPR, SrcType::F64);
|
||||||
b.copy_alu_src_if_f20_overflow(src1, GPR, SrcType::F64);
|
b.copy_alu_src_if_f20_overflow(src1, GPR, SrcType::F64);
|
||||||
b.copy_alu_src_if_not_reg(src2, GPR, SrcType::F64);
|
if src_is_reg(src1, GPR) {
|
||||||
|
b.copy_alu_src_if_imm(src2, GPR, SrcType::ALU);
|
||||||
|
} else {
|
||||||
|
b.copy_alu_src_if_not_reg(src2, GPR, SrcType::I32);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn encode(&self, e: &mut SM20Encoder<'_>) {
|
fn encode(&self, e: &mut SM20Encoder<'_>) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue