Mesa (master): aco: allocate a temp VGPR for some 8-bit/16-bit reduction ops on GFX10

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri May 29 11:30:53 UTC 2020


Module: Mesa
Branch: master
Commit: 8ece71507db9ca8c1cd01974f81a17d1f52efd0c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=8ece71507db9ca8c1cd01974f81a17d1f52efd0c

Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date:   Mon May 18 17:03:21 2020 +0200

aco: allocate a temp VGPR for some 8-bit/16-bit reduction ops on GFX10

Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02 at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5148>

---

 src/amd/compiler/aco_reduce_assign.cpp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/amd/compiler/aco_reduce_assign.cpp b/src/amd/compiler/aco_reduce_assign.cpp
index 3dd396e2569..708f401d5fe 100644
--- a/src/amd/compiler/aco_reduce_assign.cpp
+++ b/src/amd/compiler/aco_reduce_assign.cpp
@@ -125,10 +125,13 @@ void setup_reduce_temp(Program* program)
                           op == fmin64 || op == fmax64 || op == umin64 ||
                           op == umax64 || op == imin64 || op == imax64 ||
                           op == imul64;
+         bool gfx10_need_vtmp = op == imul8 || op == imax8 || op == imin8 || op == umin8 ||
+                                op == imul16 || op == imax16 || op == imin16 || op == umin16 ||
+                                op == iadd64;
 
          if (program->chip_class >= GFX10 && cluster_size == 64)
             need_vtmp = true;
-         if (program->chip_class >= GFX10 && op == iadd64)
+         if (program->chip_class >= GFX10 && gfx10_need_vtmp)
             need_vtmp = true;
          if (program->chip_class <= GFX7)
             need_vtmp = true;



More information about the mesa-commit mailing list