pan/va: Pack MKVEC.v2i8 byte lanes
authorAlyssa Rosenzweig <alyssa@collabora.com>
Fri, 17 Jun 2022 15:56:21 +0000 (11:56 -0400)
committerMarge Bot <emma+marge@anholt.net>
Tue, 21 Jun 2022 22:42:34 +0000 (22:42 +0000)
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@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17101>

src/panfrost/bifrost/valhall/va_pack.c

index 437ec28..88cf91e 100644 (file)
@@ -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) {