Mesa (main): pan/va: Pack MKVEC.v2i8 byte lanes

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jun 21 22:55:23 UTC 2022


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

Author: Alyssa Rosenzweig <alyssa at collabora.com>
Date:   Fri Jun 17 11:56:21 2022 -0400

pan/va: Pack MKVEC.v2i8 byte lanes

They are in a different place, but the encoding is otherwise as usual. This will
be required for texture gathers with dynamic offsets.

Signed-off-by: Alyssa Rosenzweig <alyssa at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17101>

---

 src/panfrost/bifrost/valhall/va_pack.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/panfrost/bifrost/valhall/va_pack.c b/src/panfrost/bifrost/valhall/va_pack.c
index 437ec28205d..88cf91e0d24 100644
--- a/src/panfrost/bifrost/valhall/va_pack.c
+++ b/src/panfrost/bifrost/valhall/va_pack.c
@@ -453,8 +453,10 @@ va_pack_alu(const bi_instr *I)
          unsigned offs = (i == 1) ? 26 : 36;
          hex |= (uint64_t) va_pack_widen(src.swizzle, src_info.size) << offs;
       } else if (src_info.lane) {
-         unsigned offs = 28;
-         assert(i == 0 && "todo: MKVEC");
+         unsigned offs = (I->op == BI_OPCODE_MKVEC_V2I8) ?
+                         ((i == 0) ? 38 : 36) :
+                         28;
+
          if (src_info.size == VA_SIZE_16) {
             hex |= (src.swizzle == BI_SWIZZLE_H11 ? 1 : 0) << offs;
          } else if (I->op == BI_OPCODE_BRANCHZ_I16) {



More information about the mesa-commit mailing list