diff --git a/src/broadcom/compiler/vir_opt_redundant_flags.c b/src/broadcom/compiler/vir_opt_redundant_flags.c index b61514f6c99..61ebf5dfa24 100644 --- a/src/broadcom/compiler/vir_opt_redundant_flags.c +++ b/src/broadcom/compiler/vir_opt_redundant_flags.c @@ -107,6 +107,10 @@ 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; + if (inst->qpu.flags.apf != V3D_QPU_PF_NONE || inst->qpu.flags.mpf != V3D_QPU_PF_NONE) { if (last_flags &&