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

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Jun 3 06:31:37 UTC 2021


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

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>

---

 src/intel/compiler/brw_vec4_nir.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/intel/compiler/brw_vec4_nir.cpp b/src/intel/compiler/brw_vec4_nir.cpp
index 4c5dfd00f84..e942cfc9ac4 100644
--- a/src/intel/compiler/brw_vec4_nir.cpp
+++ b/src/intel/compiler/brw_vec4_nir.cpp
@@ -2177,7 +2177,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