Mesa (main): ir3: Fix getting stp/ldp components in ir3_info

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Aug 20 10:57:11 UTC 2021


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

Author: Connor Abbott <cwabbott0 at gmail.com>
Date:   Fri Jul 23 13:57:24 2021 +0200

ir3: Fix getting stp/ldp components in ir3_info

Noticed by inspection when adding stp_count/ldp_count.

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

---

 src/freedreno/ir3/ir3.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/freedreno/ir3/ir3.c b/src/freedreno/ir3/ir3.c
index 48f9f38cca4..c3cc917c368 100644
--- a/src/freedreno/ir3/ir3.c
+++ b/src/freedreno/ir3/ir3.c
@@ -262,9 +262,8 @@ ir3_collect_info(struct ir3_shader_variant *v)
          }
 
          if ((instr->opc == OPC_STP || instr->opc == OPC_LDP)) {
-            struct ir3_register *base =
-               (instr->opc == OPC_STP) ? instr->srcs[2] : instr->srcs[1];
-            if (base->iim_val * type_size(instr->cat6.type) > 32) {
+            unsigned components = instr->srcs[2]->uim_val;
+            if (components * type_size(instr->cat6.type) > 32) {
                info->multi_dword_ldp_stp = true;
             }
          }



More information about the mesa-commit mailing list