mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-02 05:48:07 +02:00
vulkan/wsi: Set memory ownership after signaling fences and semaphores
This isn't a functional change today because the set of drivers which use set_ownership and those that use signal_fence/semaphore_for_memory are mutually exclusive. It's important for the next commit, though. Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4037>
This commit is contained in:
parent
6930f08860
commit
18bd05827d
1 changed files with 3 additions and 6 deletions
|
|
@ -891,12 +891,6 @@ wsi_common_acquire_next_image2(const struct wsi_device *wsi,
|
|||
pImageIndex);
|
||||
if (result != VK_SUCCESS && result != VK_SUBOPTIMAL_KHR)
|
||||
return result;
|
||||
|
||||
if (wsi->set_memory_ownership) {
|
||||
VkDeviceMemory mem = swapchain->get_wsi_image(swapchain, *pImageIndex)->memory;
|
||||
wsi->set_memory_ownership(swapchain->device, mem, true);
|
||||
}
|
||||
|
||||
struct wsi_image *image =
|
||||
swapchain->get_wsi_image(swapchain, *pImageIndex);
|
||||
|
||||
|
|
@ -916,6 +910,9 @@ wsi_common_acquire_next_image2(const struct wsi_device *wsi,
|
|||
return signal_result;
|
||||
}
|
||||
|
||||
if (wsi->set_memory_ownership)
|
||||
wsi->set_memory_ownership(swapchain->device, image->memory, true);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue