radv: stop special-casing multi-planar formats in radv_get_modifier_flags
authorSimon Ser <contact@emersion.fr>
Tue, 4 May 2021 15:18:51 +0000 (17:18 +0200)
committerMarge Bot <eric+marge@anholt.net>
Mon, 10 May 2021 14:31:21 +0000 (14:31 +0000)
commit0e946754945a4af330350c4117fc0dd61d960fd9
treeb0b4a7dd794405cea8b16e3a4803996fa281fa49
parente9c6569227ece212de522f4d5c158385aa71209d
radv: stop special-casing multi-planar formats in radv_get_modifier_flags

In radv_get_modifier_flags, we had a special case for multi-planar
formats. However ac_is_modifier_supported should already take care of
rejecting unsupported modifiers for multi-planar buffers.

Some time ago, ac_is_modifier_supported rejected any non-linear modifier
for multi-planar formats. 35e25ea1d07c ("ac/surface: allow non-DCC modifiers
for YUV on GFX9+") changed that to allow non-DCC modifiers with
multi-planar formats on GFX9+. Since then, the radv check has been out
of sync.

A similar patch was applied to radeonsi in 979e13869538 ("radeonsi: stop
special-casing YUV formats in si_query_dmabuf_modifiers").

This fixes tiling artifacts with NV12 buffers.

Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10623>
src/amd/vulkan/radv_formats.c