panfrost: Fix MTK tiled resources mapped as shader images

MTK tiled resources, like AFBC/AFRC resources, must be converted to
linear before being used as a shader image in a CS.

Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
Reviewed-by: Ashley Smith <ashley.smith@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40124>
This commit is contained in:
Loïc Molinari 2026-03-25 14:51:37 +01:00 committed by Marge Bot
parent 23ab18e9e3
commit 547c4ff8cb

View file

@ -262,9 +262,10 @@ panfrost_set_shader_images(struct pipe_context *pctx,
struct panfrost_resource *rsrc = pan_resource(image->resource);
/* Images don't work with AFBC/AFRC, since they require pixel-level
* granularity */
if (drm_is_afbc(rsrc->modifier) || drm_is_afrc(rsrc->modifier)) {
/* Images don't work with AFBC/AFRC/tiled, since they require
* pixel-level granularity */
if (drm_is_afbc(rsrc->modifier) || drm_is_afrc(rsrc->modifier) ||
drm_is_mtk_tiled(rsrc->modifier)) {
pan_resource_modifier_convert(
ctx, rsrc, DRM_FORMAT_MOD_ARM_16X16_BLOCK_U_INTERLEAVED, true,
"Shader image");