mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 11:18:08 +02:00
aco: fix byte_align_scalar for 3 dword vectors
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Daniel Schürmann <daniel@schuermann.dev> Fixes:fe08f0ccf9('aco: add byte_align_scalar() & trim_subdword_vector() helper functions') Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4710> (cherry picked from commit8faf85f687)
This commit is contained in:
parent
4c6cc7277f
commit
e98a278dcd
2 changed files with 12 additions and 5 deletions
|
|
@ -2065,7 +2065,7 @@
|
|||
"description": "aco: fix byte_align_scalar for 3 dword vectors",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"master_sha": null,
|
||||
"because_sha": "fe08f0ccf94a7315bded5868b4f6a8bae744de79"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -430,10 +430,17 @@ void byte_align_scalar(isel_context *ctx, Temp vec, Operand offset, Temp dst)
|
|||
emit_split_vector(ctx, dst, 2);
|
||||
else
|
||||
emit_extract_vector(ctx, tmp, 0, dst);
|
||||
} else if (vec.size() == 4) {
|
||||
Temp lo = bld.tmp(s2), hi = bld.tmp(s2);
|
||||
bld.pseudo(aco_opcode::p_split_vector, Definition(lo), Definition(hi), vec);
|
||||
hi = bld.pseudo(aco_opcode::p_extract_vector, bld.def(s1), hi, Operand(0u));
|
||||
} else if (vec.size() == 3 || vec.size() == 4) {
|
||||
Temp lo = bld.tmp(s2), hi;
|
||||
if (vec.size() == 3) {
|
||||
/* this can happen if we use VMEM for a uniform load */
|
||||
hi = bld.tmp(s1);
|
||||
bld.pseudo(aco_opcode::p_split_vector, Definition(lo), Definition(hi), vec);
|
||||
} else {
|
||||
hi = bld.tmp(s2);
|
||||
bld.pseudo(aco_opcode::p_split_vector, Definition(lo), Definition(hi), vec);
|
||||
hi = bld.pseudo(aco_opcode::p_extract_vector, bld.def(s1), hi, Operand(0u));
|
||||
}
|
||||
if (select != Temp())
|
||||
hi = bld.sop2(aco_opcode::s_cselect_b32, bld.def(s1), hi, Operand(0u), bld.scc(select));
|
||||
lo = bld.sop2(aco_opcode::s_lshr_b64, bld.def(s2), bld.def(s1, scc), lo, shift);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue