Mesa (main): broadcom/compiler: fix condition encoding bug
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Oct 27 06:20:58 UTC 2021
Module: Mesa
Branch: main
Commit: 0a277fabce9dad868d5b38b9ba1d7be4afb62f62
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=0a277fabce9dad868d5b38b9ba1d7be4afb62f62
Author: Iago Toral Quiroga <itoral at igalia.com>
Date: Mon Oct 25 13:12:35 2021 +0200
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 at igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13527>
---
src/broadcom/qpu/qpu_pack.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/broadcom/qpu/qpu_pack.c b/src/broadcom/qpu/qpu_pack.c
index eee1e9f95a5..a1b6b543719 100644
--- a/src/broadcom/qpu/qpu_pack.c
+++ b/src/broadcom/qpu/qpu_pack.c
@@ -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))
More information about the mesa-commit
mailing list