r600/sfn: take number of dest values into account

With the write mask removed we have to run the loop correctly.

Fixes: b870988b77
    r600/sfn: Stop referencing legacy functionality

Related: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9490
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24533>
This commit is contained in:
Gert Wollny 2023-08-07 08:51:23 +02:00 committed by Marge Bot
parent 0bce97ce83
commit f7226181b4

View file

@ -2719,7 +2719,7 @@ emit_alu_comb_with_zero(const nir_alu_instr& alu, EAluOp opcode, Shader& shader)
auto& value_factory = shader.value_factory();
AluInstr *ir = nullptr;
auto pin = pin_for_components(alu);
for (int i = 0; i < 4; ++i) {
for (unsigned i = 0; i < nir_dest_num_components(alu.dest.dest); ++i) {
ir = new AluInstr(opcode,
value_factory.dest(alu.dest, i, pin),
value_factory.zero(),
@ -2961,7 +2961,7 @@ emit_alu_trans_op2_eg(const nir_alu_instr& alu, EAluOp opcode, Shader& shader)
AluInstr *ir = nullptr;
auto pin = pin_for_components(alu);
for (int i = 0; i < 4; ++i) {
for (unsigned i = 0; i < nir_dest_num_components(alu.dest.dest); ++i) {
ir = new AluInstr(opcode,
value_factory.dest(alu.dest.dest, i, pin),
value_factory.src(src0, i),