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

Author: Timur Kristóf <[email protected]>
Date:   Wed Oct  4 23:24:51 2023 +0200

radv: Don't retile DCC on transfer queues.

Instead, the retile will be executed on another queue type
when the image is transitioned to another queue.

Signed-off-by: Timur Kristóf <[email protected]>
Reviewed-by: Samuel Pitoiset <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25834>

---

 src/amd/vulkan/radv_cmd_buffer.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c
index 52926ff5ee4..48d525b8689 100644
--- a/src/amd/vulkan/radv_cmd_buffer.c
+++ b/src/amd/vulkan/radv_cmd_buffer.c
@@ -10272,9 +10272,9 @@ radv_retile_transition(struct radv_cmd_buffer 
*cmd_buffer, struct radv_image *im
 }
 
 static bool
-radv_image_need_retile(const struct radv_image *image)
+radv_image_need_retile(const struct radv_cmd_buffer *cmd_buffer, const struct 
radv_image *image)
 {
-   return image->planes[0].surface.display_dcc_offset &&
+   return cmd_buffer->qf != RADV_QUEUE_TRANSFER && 
image->planes[0].surface.display_dcc_offset &&
           image->planes[0].surface.display_dcc_offset != 
image->planes[0].surface.meta_offset;
 }
 
@@ -10294,7 +10294,7 @@ radv_handle_color_image_transition(struct 
radv_cmd_buffer *cmd_buffer, struct ra
    if (src_layout == VK_IMAGE_LAYOUT_UNDEFINED) {
       radv_init_color_image_metadata(cmd_buffer, image, src_layout, 
dst_layout, src_queue_mask, dst_queue_mask, range);
 
-      if (radv_image_need_retile(image))
+      if (radv_image_need_retile(cmd_buffer, image))
          radv_retile_transition(cmd_buffer, image, src_layout, dst_layout, 
dst_queue_mask);
       return;
    }
@@ -10316,7 +10316,7 @@ radv_handle_color_image_transition(struct 
radv_cmd_buffer *cmd_buffer, struct ra
          fast_clear_flushed = true;
       }
 
-      if (radv_image_need_retile(image))
+      if (radv_image_need_retile(cmd_buffer, image))
          radv_retile_transition(cmd_buffer, image, src_layout, dst_layout, 
dst_queue_mask);
    } else if (radv_image_has_cmask(image) || radv_image_has_fmask(image)) {
       if (radv_layout_can_fast_clear(cmd_buffer->device, image, 
range->baseMipLevel, src_layout, src_queue_mask) &&

Reply via email to