Mesa (main): intel/fs/ra: Fix payload node setup for SIMD16 on Gen4-5

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Jun 7 17:08:46 UTC 2021


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

Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Mon Jun  7 10:18:03 2021 -0500

intel/fs/ra: Fix payload node setup for SIMD16 on Gen4-5

Since 40e1d798c6d5, we are now using physical register numbers for
everything which makes it all simpler.  In particular, we no longer need
the special case for setting up the payload for SIMD16 on Gen4-5.  This
fixes a pile of piglit tests on ILK and similar.

Fixes: 40e1d798c6d5 "intel/fs: Use ra_alloc_contig_reg_class()..."
Reviewed-by: Emma Anholt <emma at anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11221>

---

 src/intel/compiler/brw_fs_reg_allocate.cpp | 19 ++-----------------
 1 file changed, 2 insertions(+), 17 deletions(-)

diff --git a/src/intel/compiler/brw_fs_reg_allocate.cpp b/src/intel/compiler/brw_fs_reg_allocate.cpp
index 028922a0416..a383eb1ae54 100644
--- a/src/intel/compiler/brw_fs_reg_allocate.cpp
+++ b/src/intel/compiler/brw_fs_reg_allocate.cpp
@@ -671,23 +671,8 @@ fs_reg_alloc::build_interference_graph(bool allow_spilling)
    ralloc_steal(mem_ctx, g);
 
    /* Set up the payload nodes */
-   for (int i = 0; i < payload_node_count; i++) {
-      /* Mark each payload node as being allocated to its physical register.
-       *
-       * The alternative would be to have per-physical-register classes, which
-       * would just be silly.
-       */
-      if (devinfo->ver <= 5 && fs->dispatch_width >= 16) {
-         /* We have to divide by 2 here because we only have even numbered
-          * registers.  Some of the payload registers will be odd, but
-          * that's ok because their physical register numbers have already
-          * been assigned.  The only thing this is used for is interference.
-          */
-         ra_set_node_reg(g, first_payload_node + i, i / 2);
-      } else {
-         ra_set_node_reg(g, first_payload_node + i, i);
-      }
-   }
+   for (int i = 0; i < payload_node_count; i++)
+      ra_set_node_reg(g, first_payload_node + i, i);
 
    if (first_mrf_hack_node >= 0) {
       /* Mark each MRF reg node as being allocated to its physical



More information about the mesa-commit mailing list