aco: use integer access for neg_lo/neg_hi

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21766>
This commit is contained in:
Georg Lehmann 2023-03-07 14:07:23 +01:00 committed by Marge Bot
parent 60cd3ba39f
commit a47c3f84fb
2 changed files with 5 additions and 8 deletions

View file

@ -1038,8 +1038,7 @@ emit_idot_instruction(isel_context* ctx, nir_alu_instr* instr, aco_opcode op, Te
VALU_instruction& vop3p =
bld.vop3p(op, Definition(dst), src[0], src[1], src[2], 0x0, 0x7)->valu();
vop3p.clamp = clamp;
u_foreach_bit (i, neg_lo)
vop3p.neg_lo[i] = true;
vop3p.neg_lo = neg_lo;
}
void

View file

@ -3741,17 +3741,15 @@ propagate_swizzles(VALU_instruction* instr, uint8_t opsel_lo, uint8_t opsel_hi)
assert((opsel_hi & 1) == opsel_hi);
uint8_t tmp_lo = instr->opsel_lo;
uint8_t tmp_hi = instr->opsel_hi;
bool neg_lo[3] = {instr->neg_lo[0], instr->neg_lo[1], instr->neg_lo[2]};
bool neg_hi[3] = {instr->neg_hi[0], instr->neg_hi[1], instr->neg_hi[2]};
uint8_t neg_lo = instr->neg_lo;
uint8_t neg_hi = instr->neg_hi;
if (opsel_lo == 1) {
instr->opsel_lo = tmp_hi;
for (unsigned i = 0; i < 3; i++)
instr->neg_lo[i] = neg_hi[i];
instr->neg_lo = neg_hi;
}
if (opsel_hi == 0) {
instr->opsel_hi = tmp_lo;
for (unsigned i = 0; i < 3; i++)
instr->neg_hi[i] = neg_lo[i];
instr->neg_hi = neg_lo;
}
}