Mesa (main): broadcom/compiler: Flags are per-thread state in V3D 4.2+
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Aug 10 09:03:21 UTC 2021
Module: Mesa
Branch: main
Commit: 314eb97dcb9e1c90d1404e3d8a06b812592d083f
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=314eb97dcb9e1c90d1404e3d8a06b812592d083f
Author: Iago Toral Quiroga <itoral at igalia.com>
Date: Mon Aug 9 08:27:59 2021 +0200
broadcom/compiler: Flags are per-thread state in V3D 4.2+
This means they survive a thread switch, so we can remove redundant
flag setups across thread switches.
Reviewed-by: Alejandro Piñeiro <apinheiro at igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12278>
---
src/broadcom/compiler/vir_opt_redundant_flags.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/src/broadcom/compiler/vir_opt_redundant_flags.c b/src/broadcom/compiler/vir_opt_redundant_flags.c
index 8749f3cd647..4609ef9c361 100644
--- a/src/broadcom/compiler/vir_opt_redundant_flags.c
+++ b/src/broadcom/compiler/vir_opt_redundant_flags.c
@@ -107,9 +107,14 @@ vir_opt_redundant_flags_block(struct v3d_compile *c, struct qblock *block)
continue;
}
- /* Flags aren't preserved across a thrsw. */
- if (inst->qpu.sig.thrsw)
- last_flags = NULL;
+ /* Flags aren't preserved across a thrsw.
+ *
+ * In V3D 4.2+ flags are preserved across thread switches.
+ */
+ if (c->devinfo->ver < 42) {
+ if (inst->qpu.sig.thrsw)
+ last_flags = NULL;
+ }
if (inst->qpu.flags.apf != V3D_QPU_PF_NONE ||
inst->qpu.flags.mpf != V3D_QPU_PF_NONE) {
More information about the mesa-commit
mailing list