Module: Mesa
Branch: master
Commit: 66e17b410ad21c0ac7adffa5def588bce9770efe
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=66e17b410ad21c0ac7adffa5def588bce9770efe

Author: Bas Nieuwenhuizen <[email protected]>
Date:   Tue Feb  2 04:05:12 2021 +0100

radv: Enable sharing with DCC with modifiers.

Also disable any heuristics.

Reviewed-by: Samuel Pitoiset <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8817>

---

 src/amd/vulkan/radv_image.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/amd/vulkan/radv_image.c b/src/amd/vulkan/radv_image.c
index b3552f2c116..13d6898adda 100644
--- a/src/amd/vulkan/radv_image.c
+++ b/src/amd/vulkan/radv_image.c
@@ -195,7 +195,7 @@ radv_use_dcc_for_image(struct radv_device *device,
        if (device->instance->debug_flags & RADV_DEBUG_NO_DCC)
                return false;
 
-       if (image->shareable)
+       if (image->shareable && image->tiling != 
VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT)
                return false;
 
        /* TODO: Enable DCC for storage images. */
@@ -209,7 +209,8 @@ radv_use_dcc_for_image(struct radv_device *device,
            vk_format_get_plane_count(format) > 1)
                return false;
 
-       if (!radv_image_use_fast_clear_for_image(device, image))
+       if (!radv_image_use_fast_clear_for_image(device, image) &&
+           image->tiling != VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT)
                return false;
 
        /* Do not enable DCC for mipmapped arrays because performance is worse. 
*/

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to