Mesa (main): radv: stop special-casing multi-planar formats in radv_get_modifier_flags

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon May 10 14:41:05 UTC 2021


Module: Mesa
Branch: main
Commit: 0e946754945a4af330350c4117fc0dd61d960fd9
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=0e946754945a4af330350c4117fc0dd61d960fd9

Author: Simon Ser <contact at emersion.fr>
Date:   Tue May  4 17:18:51 2021 +0200

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 at emersion.fr>
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10623>

---

 src/amd/vulkan/radv_formats.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/src/amd/vulkan/radv_formats.c b/src/amd/vulkan/radv_formats.c
index 92172c653cc..7c40541b017 100644
--- a/src/amd/vulkan/radv_formats.c
+++ b/src/amd/vulkan/radv_formats.c
@@ -1134,9 +1134,6 @@ radv_get_modifier_flags(struct radv_physical_device *dev, VkFormat format, uint6
    else
       features = props->optimalTilingFeatures;
 
-   if (modifier != DRM_FORMAT_MOD_LINEAR && vk_format_get_plane_count(format) > 1)
-      return 0;
-
    if (ac_modifier_has_dcc(modifier)) {
       features &= ~VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT;
 



More information about the mesa-commit mailing list