Mesa (staging/21.0): st/mesa: fix broken moves for u2i64 and related ops

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Jan 21 22:55:16 UTC 2021


Module: Mesa
Branch: staging/21.0
Commit: 4956c6bfc57b28de5c844ed35cc88ea555d43b0f
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=4956c6bfc57b28de5c844ed35cc88ea555d43b0f

Author: Ilia Mirkin <imirkin at alum.mit.edu>
Date:   Wed Jan 13 02:14:07 2021 -0500

st/mesa: fix broken moves for u2i64 and related ops

These ops just put out mov's directly, which screws up the assignment
logic -- it just tries to only process the "last" mov. Don't try to do
the more optimized thing for 64-bit types, where this is just much
trickier.

Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
Reviewed-by: Dave Airlie <airlied at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8463>
(cherry picked from commit 55c42b7885701098cff9cc0fd0ffe08b0a90ea8b)

---

 .pick_status.json                          | 2 +-
 src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/.pick_status.json b/.pick_status.json
index 4869fb7a562..370dd24bfc0 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -1822,7 +1822,7 @@
         "description": "st/mesa: fix broken moves for u2i64 and related ops",
         "nominated": false,
         "nomination_type": null,
-        "resolution": 4,
+        "resolution": 1,
         "master_sha": null,
         "because_sha": null
     },
diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index 740fb927f47..9e9289b41cb 100644
--- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -3263,6 +3263,7 @@ glsl_to_tgsi_visitor::visit(ir_assignment *ir)
               ir->rhs == ((glsl_to_tgsi_instruction *)this->instructions.get_tail())->ir &&
               !((glsl_to_tgsi_instruction *)this->instructions.get_tail())->is_64bit_expanded &&
               type_size(ir->lhs->type) == 1 &&
+              !ir->lhs->type->is_64bit() &&
               l.writemask == ((glsl_to_tgsi_instruction *)this->instructions.get_tail())->dst[0].writemask) {
       /* To avoid emitting an extra MOV when assigning an expression to a
        * variable, emit the last instruction of the expression again, but



More information about the mesa-commit mailing list