Accept non-linear tiling for multi-planar formats on GFX9+, as long
as DCC is disabled. DCC support is possible in theory, but untested
for now.
GFX8 is still restricted to linear tiling because it's not yet clear
how modifiers should be handled on these chips for multi-planar
formats. Each plane may need a different modifier.
Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10134>
if(modifier == DRM_FORMAT_MOD_LINEAR)
return true;
- if (util_format_get_num_planes(format) > 1)
+ /* GFX8 may need a different modifier for each plane */
+ if (info->chip_class < GFX9 && util_format_get_num_planes(format) > 1)
return false;
uint32_t allowed_swizzles = 0xFFFFFFFF;
return false;
if (ac_modifier_has_dcc(modifier)) {
+ /* TODO: support multi-planar formats with DCC */
+ if (util_format_get_num_planes(format) > 1)
+ return false;
+
if (!info->has_graphics)
return false;