mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 11:18:08 +02:00
aco: fix p_bpermute_gfx6 with input at non-zero byte
Same as the other bpermute pseudo instructions.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24693>
(cherry picked from commit 85957dd6e5)
This commit is contained in:
parent
14ae64b72c
commit
f179d999fc
2 changed files with 10 additions and 1 deletions
|
|
@ -4054,7 +4054,7 @@
|
|||
"description": "aco: fix p_bpermute_gfx6 with input at non-zero byte",
|
||||
"nominated": true,
|
||||
"nomination_type": 0,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -1109,6 +1109,15 @@ emit_gfx6_bpermute(Program* program, aco_ptr<Instruction>& instr, Builder& bld)
|
|||
/* Restore original EXEC */
|
||||
bld.sop1(aco_opcode::s_mov_b64, Definition(exec, s2), Operand(temp_exec.physReg(), s2));
|
||||
}
|
||||
|
||||
/* RA assumes that the result is always in the low part of the register, so we have to shift,
|
||||
* if it's not there already.
|
||||
*/
|
||||
if (input.physReg().byte()) {
|
||||
unsigned right_shift = input.physReg().byte() * 8;
|
||||
bld.vop2(aco_opcode::v_lshrrev_b32, dst, Operand::c32(right_shift),
|
||||
Operand(dst.physReg(), v1));
|
||||
}
|
||||
}
|
||||
|
||||
struct copy_operation {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue