mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 18:18:06 +02:00
aco: don't use opsel to fold constants into dot accumulation sources
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/16296>
This commit is contained in:
parent
ae74474509
commit
fc39c3a0b1
1 changed files with 8 additions and 0 deletions
|
|
@ -912,6 +912,14 @@ propagate_constants_vop3p(opt_ctx& ctx, aco_ptr<Instruction>& instr, ssa_info& i
|
|||
return;
|
||||
}
|
||||
|
||||
/* The accumulation operand of dot product instructions ignores opsel. */
|
||||
bool cannot_use_opsel =
|
||||
(instr->opcode == aco_opcode::v_dot4_i32_i8 || instr->opcode == aco_opcode::v_dot2_i32_i16 ||
|
||||
instr->opcode == aco_opcode::v_dot4_u32_u8 || instr->opcode == aco_opcode::v_dot2_u32_u16) &&
|
||||
i == 2;
|
||||
if (cannot_use_opsel)
|
||||
return;
|
||||
|
||||
/* try to fold inline constants */
|
||||
VOP3P_instruction* vop3p = &instr->vop3p();
|
||||
/* TODO: if bits==32, we might be able to get an inline constant if we sign-extend or shift left
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue