aco: Don't use opsel for p_insert.
This doesn't make sense, opsel preserves the not selected half of the register,
p_insert zeros it.
No Foz-DB changes.
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Fixes: 54292e99c7 ("aco: optimize 32-bit extracts and inserts using SDWA")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19253>
This commit is contained in:
@@ -3201,21 +3201,13 @@ apply_insert(opt_ctx& ctx, aco_ptr<Instruction>& instr)
|
||||
SubdwordSel sel = parse_insert(def_info.instr);
|
||||
assert(sel);
|
||||
|
||||
if (instr->isVOP3() && sel.size() == 2 && !sel.sign_extend() &&
|
||||
can_use_opsel(ctx.program->gfx_level, instr->opcode, -1)) {
|
||||
if (instr->vop3().opsel & (1 << 3))
|
||||
return false;
|
||||
if (sel.offset())
|
||||
instr->vop3().opsel |= 1 << 3;
|
||||
} else {
|
||||
if (!can_use_SDWA(ctx.program->gfx_level, instr, true))
|
||||
return false;
|
||||
if (!can_use_SDWA(ctx.program->gfx_level, instr, true))
|
||||
return false;
|
||||
|
||||
to_SDWA(ctx, instr);
|
||||
if (instr->sdwa().dst_sel.size() != 4)
|
||||
return false;
|
||||
static_cast<SDWA_instruction*>(instr.get())->dst_sel = sel;
|
||||
}
|
||||
to_SDWA(ctx, instr);
|
||||
if (instr->sdwa().dst_sel.size() != 4)
|
||||
return false;
|
||||
static_cast<SDWA_instruction*>(instr.get())->dst_sel = sel;
|
||||
|
||||
instr->definitions[0].swapTemp(def_info.instr->definitions[0]);
|
||||
ctx.info[instr->definitions[0].tempId()].label = 0;
|
||||
|
||||
Reference in New Issue
Block a user