agx: Fix lod_mode shift
authorAlyssa Rosenzweig <alyssa@rosenzweig.io>
Mon, 5 Jul 2021 03:25:36 +0000 (23:25 -0400)
committerMarge Bot <eric+marge@anholt.net>
Mon, 5 Jul 2021 20:56:04 +0000 (20:56 +0000)
Was zero before so didn't notice the bug.

Fixes: 9f555388342 ("agx: Pack texture ops")
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11718>

src/asahi/compiler/agx_pack.c

index 12acdf3..11484dd 100644 (file)
@@ -561,7 +561,7 @@ agx_pack_instr(struct util_dynarray *emission, struct util_dynarray *fixups, agx
             (((uint64_t) I->dim) << 40) |
             (((uint64_t) q3) << 43) |
             (((uint64_t) I->mask) << 48) |
-            (((uint64_t) I->lod_mode) << 48) |
+            (((uint64_t) I->lod_mode) << 52) |
             (((uint64_t) (S & BITFIELD_MASK(6))) << 32) |
             (((uint64_t) St) << 62) |
             (((uint64_t) q5) << 63);