ac/surface: allow non-DCC modifiers for YUV on GFX9+
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>
This commit is contained in:
parent
979e138695
commit
35e25ea1d0
|
@ -194,7 +194,8 @@ bool ac_is_modifier_supported(const struct radeon_info *info,
|
|||
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;
|
||||
|
@ -214,6 +215,10 @@ bool ac_is_modifier_supported(const struct radeon_info *info,
|
|||
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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue