projects
/
mesa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
vulkan/wsi: Add callback to set ownership of buffer.
[mesa.git]
/
src
/
vulkan
/
wsi
/
wsi_common.c
diff --git
a/src/vulkan/wsi/wsi_common.c
b/src/vulkan/wsi/wsi_common.c
index d629ea339ac36956e9e7237962d0194d3e049793..44454190840322b2b0bee198786312162842a499 100644
(file)
--- a/
src/vulkan/wsi/wsi_common.c
+++ b/
src/vulkan/wsi/wsi_common.c
@@
-1098,6
+1098,11
@@
wsi_common_acquire_next_image2(const struct wsi_device *wsi,
if (result != VK_SUCCESS)
return result;
if (result != VK_SUCCESS)
return result;
+ if (wsi->set_memory_ownership) {
+ VkDeviceMemory mem = swapchain->get_wsi_image(swapchain, *pImageIndex)->memory;
+ wsi->set_memory_ownership(swapchain->device, mem, true);
+ }
+
if (pAcquireInfo->semaphore != VK_NULL_HANDLE &&
wsi->signal_semaphore_for_memory != NULL) {
struct wsi_image *image =
if (pAcquireInfo->semaphore != VK_NULL_HANDLE &&
wsi->signal_semaphore_for_memory != NULL) {
struct wsi_image *image =
@@
-1219,6
+1224,11
@@
wsi_common_queue_present(const struct wsi_device *wsi,
if (result != VK_SUCCESS)
goto fail_present;
if (result != VK_SUCCESS)
goto fail_present;
+ if (wsi->set_memory_ownership) {
+ VkDeviceMemory mem = swapchain->get_wsi_image(swapchain, image_index)->memory;
+ wsi->set_memory_ownership(swapchain->device, mem, false);
+ }
+
fail_present:
if (pPresentInfo->pResults != NULL)
pPresentInfo->pResults[i] = result;
fail_present:
if (pPresentInfo->pResults != NULL)
pPresentInfo->pResults[i] = result;