Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16697>
return MALI_BLOCK_FORMAT_TILED_U_INTERLEAVED;
default:
#if PAN_ARCH >= 5
- if (drm_is_afbc(mod))
+ if (drm_is_afbc(mod) && !(mod & AFBC_FORMAT_MOD_TILED))
return MALI_BLOCK_FORMAT_AFBC;
#endif
+#if PAN_ARCH >= 7
+ if (drm_is_afbc(mod) && (mod & AFBC_FORMAT_MOD_TILED))
+ return MALI_BLOCK_FORMAT_AFBC_TILED;
+#endif
unreachable("Unsupported modifer");
}
#endif
#if PAN_ARCH >= 7
+ /* Tiled headers */
+ if (modifier & AFBC_FORMAT_MOD_TILED)
+ flags |= MALI_AFBC_SURFACE_FLAG_TILED_HEADER;
+
/* Used to make sure AFBC headers don't point outside the AFBC
* body. HW is using the AFBC surface stride to do this check,
* which doesn't work for 3D textures because the surface