panfrost: Set texel_interleave on Valhall
authorAlyssa Rosenzweig <alyssa@collabora.com>
Tue, 1 Mar 2022 19:18:51 +0000 (14:18 -0500)
committerMarge Bot <emma+marge@anholt.net>
Tue, 1 Mar 2022 19:43:22 +0000 (19:43 +0000)
Instead of specifying the tiling on the texture descriptor, Valhall specifies it
on the plane descriptor. There is a new flag on the texture descriptor
specifying only whether the planes are interleaved or not.

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

src/panfrost/lib/pan_texture.c

index 3104ca6..571980c 100644 (file)
@@ -768,8 +768,14 @@ GENX(panfrost_new_texture)(const struct panfrost_device *dev,
                 else
                         cfg.sample_count = layout->nr_samples;
                 cfg.swizzle = swizzle;
+#if PAN_ARCH >= 9
+                cfg.texel_interleave =
+                        (layout->modifier != DRM_FORMAT_MOD_LINEAR) ||
+                        util_format_is_compressed(format);
+#else
                 cfg.texel_ordering =
                         panfrost_modifier_to_layout(layout->modifier);
+#endif
                 cfg.levels = iview->last_level - iview->first_level + 1;
                 cfg.array_size = array_size;