From 1f2fd9c62ee167cae34d34664e6bd972169a3307 Mon Sep 17 00:00:00 2001 From: Rhys Perry Date: Fri, 1 May 2020 11:04:27 +0100 Subject: [PATCH] aco: don't reorder barriers in the scheduler MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Unless we're reordering it around a barrier of the same type No shader-db changes. Signed-off-by: Rhys Perry Reviewed-by: Daniel Schürmann Part-of: --- src/amd/compiler/aco_scheduler.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/amd/compiler/aco_scheduler.cpp b/src/amd/compiler/aco_scheduler.cpp index c1d4e9b3ce8..cb22491bf64 100644 --- a/src/amd/compiler/aco_scheduler.cpp +++ b/src/amd/compiler/aco_scheduler.cpp @@ -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; -- 2.30.2