Mesa (main): radv: Allow DCC images to be compressed with foreign queues.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Jun 14 11:37:16 UTC 2021


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

Author: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Date:   Fri May 14 14:08:12 2021 +0200

radv: Allow DCC images to be compressed with foreign queues.

Otherwise we would always decompress when transitioning to the
foreign queue.

Fixes: 8b9033ad0a0 ("radv: Support DCC modifiers fully.")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10802>

---

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

diff --git a/src/amd/vulkan/radv_image.c b/src/amd/vulkan/radv_image.c
index 1847de34b5c..f18f96ca491 100644
--- a/src/amd/vulkan/radv_image.c
+++ b/src/amd/vulkan/radv_image.c
@@ -1974,6 +1974,9 @@ radv_layout_dcc_compressed(const struct radv_device *device, const struct radv_i
    if (!radv_dcc_enabled(image, level))
       return false;
 
+   if (image->tiling == VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT && queue_mask & (1u << RADV_QUEUE_FOREIGN))
+      return true;
+
    /* If the image is read-only, we can always just keep it compressed */
    if (!(image->usage & RADV_IMAGE_USAGE_WRITE_BITS))
       return true;



More information about the mesa-commit mailing list