Mesa (staging/21.1): intel/vec4: Also use MOV_FOR_SCRATCH for swizzle resolves

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sat Jun 5 16:30:18 UTC 2021


Module: Mesa
Branch: staging/21.1
Commit: 138946952177bd20026af6c245eb34c7aa8046c1
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=138946952177bd20026af6c245eb34c7aa8046c1

Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Wed Jun  2 23:08:13 2021 -0500

intel/vec4: Also use MOV_FOR_SCRATCH for swizzle resolves

In 2db88679432b, we introduced a new meta-op MOV_FOR_SCRATCH which is
identical to MOV except it lets us identify MOVs emitted during spilling
so we know not to re-spill those instructions.  We emit them from
shuffle_for_64bit_data whenever the new for_scratch parameter is true.
Unfortunately, we missed the one used for resolving swizzles.

Fixes: 2db88679432b "intel/vec4: Don't spill fp64 registers more..."
Tested-by: Dave Airlie <airlied at redhat.com>
Reviewed-by: Dave Airlie <airlied at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11155>
(cherry picked from commit 06ae2723d103f485bfdc2d18e3625ce7417ffc9c)

---

 .pick_status.json                   | 2 +-
 src/intel/compiler/brw_vec4_nir.cpp | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index cc56684e990..de1e790999f 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -877,7 +877,7 @@
         "description": "intel/vec4: Also use MOV_FOR_SCRATCH for swizzle resolves",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": "2db88679432bd34a2c4ed761baec747192fa3e60"
     },
diff --git a/src/intel/compiler/brw_vec4_nir.cpp b/src/intel/compiler/brw_vec4_nir.cpp
index 188175adc41..b759e367125 100644
--- a/src/intel/compiler/brw_vec4_nir.cpp
+++ b/src/intel/compiler/brw_vec4_nir.cpp
@@ -2154,7 +2154,7 @@ vec4_visitor::shuffle_64bit_data(dst_reg dst, src_reg src, bool for_write,
    /* Resolve swizzle in src */
    if (src.swizzle != BRW_SWIZZLE_XYZW) {
       dst_reg data = dst_reg(this, glsl_type::dvec4_type);
-      bld.MOV(data, src);
+      bld.emit(mov_op, data, src);
       src = src_reg(data);
    }
 



More information about the mesa-commit mailing list