Mesa (main): ir3/cp: Add missing const promotion check

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Oct 12 12:25:05 UTC 2021


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

Author: Connor Abbott <cwabbott0 at gmail.com>
Date:   Mon Sep 27 15:52:23 2021 +0200

ir3/cp: Add missing const promotion check

We need to check the source type for moves when the destination type is
u16, just like the f16 check above.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13142>

---

 src/freedreno/ir3/ir3_cp.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/freedreno/ir3/ir3_cp.c b/src/freedreno/ir3/ir3_cp.c
index e496f1ede29..e1fa6e63ae7 100644
--- a/src/freedreno/ir3/ir3_cp.c
+++ b/src/freedreno/ir3/ir3_cp.c
@@ -428,6 +428,8 @@ reg_cp(struct ir3_cp_ctx *ctx, struct ir3_instruction *instr,
              */
             if (is_cat2_float(instr->opc) || is_cat3_float(instr->opc))
                return false;
+            if (instr->opc == OPC_MOV && type_float(instr->cat1.src_type))
+               return false;
          }
 
          src_reg = ir3_reg_clone(instr->block->shader, src_reg);



More information about the mesa-commit mailing list