broadcom/compiler: fix condition encoding bug

When both AC and MC are set, AC is encoded in bits 0..1 not 0..3.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13527>
This commit is contained in:
Iago Toral Quiroga 2021-10-25 13:12:35 +02:00 committed by Marge Bot
parent 3fbd6662b7
commit 0a277fabce

View file

@ -425,8 +425,13 @@ v3d_qpu_flags_pack(const struct v3d_device_info *devinfo,
if (flags_present & MUF)
*packed_cond |= cond->muf - V3D_QPU_UF_ANDZ + 4;
if (flags_present & AC)
*packed_cond |= (cond->ac - V3D_QPU_COND_IFA) << 2;
if (flags_present & AC) {
if (*packed_cond & (1 << 6))
*packed_cond |= cond->ac - V3D_QPU_COND_IFA;
else
*packed_cond |= (cond->ac -
V3D_QPU_COND_IFA) << 2;
}
if (flags_present & MC) {
if (*packed_cond & (1 << 6))