mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 06:48:06 +02:00
Vulkan overlay: use the corresponding image index for each swapchain
pImageIndices should be a pointer to the current image index otherwise every swapchain but the first one could have a wrong image index Cc: <mesa-stable@lists.freedesktop.org> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3741> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3741>
This commit is contained in:
parent
eb0195358c
commit
7283c33b98
1 changed files with 8 additions and 3 deletions
|
|
@ -1903,15 +1903,18 @@ static VkResult overlay_QueuePresentKHR(
|
|||
struct swapchain_data *swapchain_data =
|
||||
FIND(struct swapchain_data, swapchain);
|
||||
|
||||
uint32_t image_index = pPresentInfo->pImageIndices[i];
|
||||
|
||||
before_present(swapchain_data,
|
||||
queue_data,
|
||||
pPresentInfo->pWaitSemaphores,
|
||||
pPresentInfo->waitSemaphoreCount,
|
||||
pPresentInfo->pImageIndices[i]);
|
||||
image_index);
|
||||
|
||||
VkPresentInfoKHR present_info = *pPresentInfo;
|
||||
present_info.swapchainCount = 1;
|
||||
present_info.pSwapchains = &swapchain;
|
||||
present_info.pImageIndices = &image_index;
|
||||
|
||||
uint64_t ts0 = os_time_get();
|
||||
result = queue_data->device->vtable.QueuePresentKHR(queue, &present_info);
|
||||
|
|
@ -1923,11 +1926,13 @@ static VkResult overlay_QueuePresentKHR(
|
|||
VkSwapchainKHR swapchain = pPresentInfo->pSwapchains[i];
|
||||
struct swapchain_data *swapchain_data =
|
||||
FIND(struct swapchain_data, swapchain);
|
||||
|
||||
uint32_t image_index = pPresentInfo->pImageIndices[i];
|
||||
|
||||
VkPresentInfoKHR present_info = *pPresentInfo;
|
||||
present_info.swapchainCount = 1;
|
||||
present_info.pSwapchains = &swapchain;
|
||||
|
||||
uint32_t image_index = pPresentInfo->pImageIndices[i];
|
||||
present_info.pImageIndices = &image_index;
|
||||
|
||||
struct overlay_draw *draw = before_present(swapchain_data,
|
||||
queue_data,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue