From 95d5c1b8a1ebe4a2ce47206b9ff0af4fbfd5a31a Mon Sep 17 00:00:00 2001 From: Rhys Perry Date: Wed, 29 Apr 2020 17:47:50 +0100 Subject: [PATCH] aco: check instruction format before waiting for a previous SMEM store MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Totals from 7 (0.01% of 127638) affected shaders: CodeSize: 40336 -> 40320 (-0.04%) Instrs: 7807 -> 7803 (-0.05%) Cycles: 118588 -> 118344 (-0.21%); split: -0.23%, +0.02% SMEM: 331 -> 339 (+2.42%) Signed-off-by: Rhys Perry Fixes: 1749953ea3 ('aco/gfx10: Wait for pending SMEM stores before loads') Reviewed-by: Daniel Schürmann Part-of: --- src/amd/compiler/aco_insert_waitcnt.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/amd/compiler/aco_insert_waitcnt.cpp b/src/amd/compiler/aco_insert_waitcnt.cpp index d2d1c76c6c9..196b45fbb75 100644 --- a/src/amd/compiler/aco_insert_waitcnt.cpp +++ b/src/amd/compiler/aco_insert_waitcnt.cpp @@ -460,7 +460,7 @@ wait_imm kill(Instruction* instr, wait_ctx& ctx) imm.lgkm = 0; } - if (ctx.chip_class >= GFX10) { + if (ctx.chip_class >= GFX10 && instr->format == Format::SMEM) { /* GFX10: A store followed by a load at the same address causes a problem because * the load doesn't load the correct values unless we wait for the store first. * This is NOT mitigated by an s_nop. -- 2.30.2