Mesa (main): aco: don't move descriptor loads below buffer loads

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Jun 14 16:06:20 UTC 2021


Module: Mesa
Branch: main
Commit: bc71222cd9766cda87223d608ed571d2d79b4600
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=bc71222cd9766cda87223d608ed571d2d79b4600

Author: Rhys Perry <pendingchaos02 at gmail.com>
Date:   Fri Nov 27 17:26:46 2020 +0000

aco: don't move descriptor loads below buffer loads

fossil-db (GFX10.3):
Totals from 52870 (36.15% of 146267) affected shaders:
VGPRs: 2109936 -> 2110056 (+0.01%); split: -0.01%, +0.01%
CodeSize: 134898056 -> 134812748 (-0.06%); split: -0.08%, +0.02%
MaxWaves: 1347354 -> 1347346 (-0.00%)
Instrs: 25598063 -> 25575415 (-0.09%); split: -0.11%, +0.02%
Latency: 432491613 -> 432047723 (-0.10%); split: -0.12%, +0.02%
InvThroughput: 90940977 -> 90927545 (-0.01%); split: -0.03%, +0.01%
VClause: 570039 -> 570019 (-0.00%); split: -0.05%, +0.04%
SClause: 1145076 -> 1139040 (-0.53%); split: -0.60%, +0.07%
Copies: 1513949 -> 1513102 (-0.06%); split: -0.32%, +0.26%
Branches: 524279 -> 524275 (-0.00%); split: -0.03%, +0.03%

Signed-off-by: Rhys Perry <pendingchaos02 at gmail.com>
Reviewed-by: Daniel Schürmann <daniel at schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6489>

---

 src/amd/compiler/aco_scheduler.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/amd/compiler/aco_scheduler.cpp b/src/amd/compiler/aco_scheduler.cpp
index bdd27bdb0c7..89c68baa81a 100644
--- a/src/amd/compiler/aco_scheduler.cpp
+++ b/src/amd/compiler/aco_scheduler.cpp
@@ -647,6 +647,9 @@ void schedule_SMEM(sched_ctx& ctx, Block* block,
          break;
       if (candidate->isVMEM())
          break;
+      /* don't move descriptor loads below buffer loads */
+      if (candidate->format == Format::SMEM && current->operands[0].size() == 4 && candidate->operands[0].size() == 2)
+         break;
 
       bool can_move_down = true;
 



More information about the mesa-commit mailing list