mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 04:38:03 +02:00
aco: fix creating v_madak if v_mad_f32 has two sgpr literals
Do not ignore that src1 can be a sgpr.
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2435
Cc: <mesa-stable@lists.freedesktop.org>
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3759>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3759>
(cherry picked from commit ddd767387f)
This commit is contained in:
parent
75ea9c808d
commit
4558bdb95a
2 changed files with 2 additions and 2 deletions
|
|
@ -22,7 +22,7 @@
|
|||
"description": "aco: fix creating v_madak if v_mad_f32 has two sgpr literals",
|
||||
"nominated": true,
|
||||
"nomination_type": 0,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"master_sha": null,
|
||||
"because_sha": null
|
||||
},
|
||||
|
|
|
|||
|
|
@ -2604,7 +2604,7 @@ void select_instruction(opt_ctx &ctx, aco_ptr<Instruction>& instr)
|
|||
continue;
|
||||
/* if one of the operands is sgpr, we cannot add a literal somewhere else on pre-GFX10 or operands other than the 1st */
|
||||
if (instr->operands[i].getTemp().type() == RegType::sgpr && (i > 0 || ctx.program->chip_class < GFX10)) {
|
||||
if (ctx.info[instr->operands[i].tempId()].is_literal()) {
|
||||
if (!sgpr_used && ctx.info[instr->operands[i].tempId()].is_literal()) {
|
||||
literal_uses = ctx.uses[instr->operands[i].tempId()];
|
||||
literal_idx = i;
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue