vulkan/wsi: Signal buffer memory object when blitting

When we're using the PRIME path and using vkCmdCopyImageToBuffer to copy
to a linear image, the buffer memory is what's shared with the window
system.  For legacy drivers that depend on memory signaling via
wsi_memory_signal_submit_info, we need to tell the driver to signal the
buffer memory, not the image memory or else the window system may wait
on a driver-internal buffer and not wait for the copy to complete.

Cc: mesa-stable
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34218>
(cherry picked from commit cf23ffcbae)
This commit is contained in:
Faith Ekstrand 2025-03-24 16:40:53 -05:00 committed by Eric Engestrom
parent 9fb56e2780
commit 79f960cb1d
2 changed files with 3 additions and 2 deletions

View file

@ -1464,7 +1464,7 @@
"description": "vulkan/wsi: Signal buffer memory object when blitting",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null,
"notes": null

View file

@ -1527,7 +1527,8 @@ wsi_common_queue_present(const struct wsi_device *wsi,
has_signal_dma_buf = false;
mem_signal = (struct wsi_memory_signal_submit_info) {
.sType = VK_STRUCTURE_TYPE_WSI_MEMORY_SIGNAL_SUBMIT_INFO_MESA,
.memory = image->memory,
.memory = swapchain->blit.type == WSI_SWAPCHAIN_NO_BLIT ?
image->memory : image->blit.memory,
};
__vk_append_struct(&submit_info, &mem_signal);
}