Mesa (staging/21.1): radv: Allow DCC images to be compressed with foreign queues.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jun 16 06:40:59 UTC 2021


Module: Mesa
Branch: staging/21.1
Commit: a13c8e9cc2a103cc6ee6d32e62b0d8ed67e01cb5
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=a13c8e9cc2a103cc6ee6d32e62b0d8ed67e01cb5

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>
(cherry picked from commit 720ee494e53e29a65a3c19bb302d013403bd1d57)

---

 .pick_status.json           | 2 +-
 src/amd/vulkan/radv_image.c | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/.pick_status.json b/.pick_status.json
index 3fa8fd55de6..e5053710c49 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -1570,7 +1570,7 @@
         "description": "radv: Allow DCC images to be compressed with foreign queues.",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": "8b9033ad0a007ffe76f0f691c5540ce1b7c28499"
     },
diff --git a/src/amd/vulkan/radv_image.c b/src/amd/vulkan/radv_image.c
index 2de899bee2d..3db4612e9db 100644
--- a/src/amd/vulkan/radv_image.c
+++ b/src/amd/vulkan/radv_image.c
@@ -1983,6 +1983,9 @@ bool
 radv_layout_dcc_compressed(const struct radv_device *device, const struct radv_image *image,
                            VkImageLayout layout, bool in_render_loop, unsigned queue_mask)
 {
+   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) && radv_image_has_dcc(image))
       return true;



More information about the mesa-commit mailing list