aco: Fix some constant patterns in 16-bit vec4 construction with s_pack.

Fixes: 04e3d7ad93 ("aco: improve nir_op_vec with constant operands")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24286>
This commit is contained in:
Bas Nieuwenhuizen 2023-07-21 21:00:42 +02:00 committed by Marge Bot
parent 2fcf7c7014
commit e536d31a46

View file

@ -1444,6 +1444,8 @@ visit_alu_instr(isel_context* ctx, nir_alu_instr* instr)
else if (packed[i * 2].id())
packed[i] = bld.sop2(aco_opcode::s_pack_ll_b32_b16, bld.def(s1), packed[i * 2],
Operand::c32(const_vals[i * 2 + 1]));
else
packed[i] = Temp(); /* Both constants, so reset the entry */
if (same)
const_vals[i] = const_vals[i * 2] | (const_vals[i * 2 + 1] << 16);