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@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12278>
This commit is contained in:
Iago Toral Quiroga 2021-08-09 08:27:59 +02:00 committed by Marge Bot
parent b727eaac3c
commit 314eb97dcb
1 changed files with 8 additions and 3 deletions

View File

@ -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) {