aco: don't reorder barriers in the scheduler

Unless we're reordering it around a barrier of the same type

No shader-db changes.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4880>
This commit is contained in:
Rhys Perry
2020-05-01 11:04:27 +01:00
committed by Marge Bot
parent e1900ee2c7
commit 1f2fd9c62e

View File

@@ -484,7 +484,10 @@ HazardResult perform_hazard_query(hazard_query *query, Instruction *instr)
instr->opcode == aco_opcode::s_setprio)
return hazard_fail_unreorderable;
if (query->barrier_interaction && (query->barrier_interaction & parse_barrier(instr)))
barrier_interaction bar = parse_barrier(instr);
if (query->barrier_interaction && (query->barrier_interaction & bar))
return hazard_fail_barrier;
if (bar && query->barriers && (query->barriers & ~bar))
return hazard_fail_barrier;
if (query->barriers && (query->barriers & get_barrier_interaction(instr)))
return hazard_fail_barrier;