diff --git a/src/panfrost/bifrost/bi_schedule.c b/src/panfrost/bifrost/bi_schedule.c index b9ab2cbb283..d1a9cd4d934 100644 --- a/src/panfrost/bifrost/bi_schedule.c +++ b/src/panfrost/bifrost/bi_schedule.c @@ -666,6 +666,17 @@ bi_has_cross_passthrough_hazard(bi_tuple *succ, bi_instr *ins) return false; } +/* Is a register written other than the staging mechanism? ATEST is special, + * writing to both a staging register and a regular register (fixed packing)*/ + +static bool +bi_writes_reg(bi_instr *instr) +{ + return (instr->op == BI_OPCODE_ATEST) || + (!bi_is_null(instr->dest[0]) && + !bi_opcode_props[instr->op].sr_write); +} + #ifndef NDEBUG static bi_builder *