mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 06:48:06 +02:00
r600/sfn: Fix test creation and handling of 3-src without dest
Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37321>
This commit is contained in:
parent
1f58a36abb
commit
80887e2590
2 changed files with 8 additions and 6 deletions
|
|
@ -1357,8 +1357,10 @@ AluInstr::from_string(istream& is, ValueFactory& value_factory, AluGroup *group,
|
|||
if (op_descr.alu_opcode != op0_nop && op_descr.alu_opcode != op0_group_barrier) {
|
||||
if (dest)
|
||||
retval = new AluInstr(op_descr.alu_opcode, dest, sources, flags, slots);
|
||||
else
|
||||
else if (op_descr.nsrc < 3)
|
||||
retval = new AluInstr(op_descr.alu_opcode, chan, sources, flags);
|
||||
else
|
||||
retval = new AluInstr(op_descr.alu_opcode, value_factory.dummy_dest(chan), sources, flags, 1);
|
||||
} else {
|
||||
retval = new AluInstr(op_descr.alu_opcode, 0);
|
||||
for (auto f : flags)
|
||||
|
|
|
|||
|
|
@ -222,12 +222,12 @@ TEST_F(TestInstrFromString, test_alu_muladd_neg3)
|
|||
add_dest_from_string("R1999.w");
|
||||
add_dest_from_string("R2000.y");
|
||||
AluInstr expect(op3_muladd_ieee,
|
||||
1,
|
||||
{new Register(1999, 3, pin_none),
|
||||
new Register(1998, 2, pin_none),
|
||||
new Register(2000, 1, pin_none)},
|
||||
new Register(g_registers_unused, 1, pin_chan),
|
||||
new Register(1999, 3, pin_none),
|
||||
new Register(1998, 2, pin_none),
|
||||
new Register(2000, 1, pin_none),
|
||||
{alu_last_instr});
|
||||
check("ALU MULADD_IEEE __.y : R1999.w R1998.z -R2000.y {L}", expect);
|
||||
check("ALU MULADD_IEEE __.y@chan : R1999.w R1998.z -R2000.y {L}", expect);
|
||||
}
|
||||
|
||||
TEST_F(TestInstrFromString, test_alu_mov_bs)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue