mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 21:50:12 +01:00
aco: fix RA validation of 16-bit fma_mix operands
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Daniel Schürmann <daniel@schuermann.dev> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15562>
This commit is contained in:
parent
2bc933f7d5
commit
1ead285d92
1 changed files with 6 additions and 2 deletions
|
|
@ -774,9 +774,13 @@ validate_subdword_operand(chip_class chip, const aco_ptr<Instruction>& instr, un
|
|||
if (instr->isSDWA())
|
||||
return byte + instr->sdwa().sel[index].offset() + instr->sdwa().sel[index].size() <= 4 &&
|
||||
byte % instr->sdwa().sel[index].size() == 0;
|
||||
if (instr->isVOP3P())
|
||||
if (instr->isVOP3P()) {
|
||||
bool fma_mix = instr->opcode == aco_opcode::v_fma_mixlo_f16 ||
|
||||
instr->opcode == aco_opcode::v_fma_mixhi_f16 ||
|
||||
instr->opcode == aco_opcode::v_fma_mix_f32;
|
||||
return ((instr->vop3p().opsel_lo >> index) & 1) == (byte >> 1) &&
|
||||
((instr->vop3p().opsel_hi >> index) & 1) == (byte >> 1);
|
||||
((instr->vop3p().opsel_hi >> index) & 1) == (fma_mix || (byte >> 1));
|
||||
}
|
||||
if (byte == 2 && can_use_opsel(chip, instr->opcode, index))
|
||||
return true;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue