Android-x86
Fork

  • R/O
  • HTTP
  • SSH
  • HTTPS

external-mesa: コミット

external/mesa


コミットメタ情報

リビジョン196a68dfbc3bbb26193f1a7b10c9dbd75338ffbb (tree)
日時2020-02-11 02:01:38
作者Georg Lehmann <dadschoorse@gmai...>
コミッターDylan Baker

ログメッセージ

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>
(cherry picked from commit 7283c33b981f975361e3bfa62a339c88f2642cbb)

変更サマリ

差分

--- a/.pick_status.json
+++ b/.pick_status.json
@@ -22,7 +22,7 @@
2222 "description": "Vulkan overlay: use the corresponding image index for each swapchain",
2323 "nominated": true,
2424 "nomination_type": 0,
25- "resolution": 0,
25+ "resolution": 1,
2626 "master_sha": null,
2727 "because_sha": null
2828 },
--- a/src/vulkan/overlay-layer/overlay.cpp
+++ b/src/vulkan/overlay-layer/overlay.cpp
@@ -1668,15 +1668,18 @@ static VkResult overlay_QueuePresentKHR(
16681668 struct swapchain_data *swapchain_data =
16691669 FIND(struct swapchain_data, swapchain);
16701670
1671+ uint32_t image_index = pPresentInfo->pImageIndices[i];
1672+
16711673 before_present(swapchain_data,
16721674 queue_data,
16731675 pPresentInfo->pWaitSemaphores,
16741676 pPresentInfo->waitSemaphoreCount,
1675- pPresentInfo->pImageIndices[i]);
1677+ image_index);
16761678
16771679 VkPresentInfoKHR present_info = *pPresentInfo;
16781680 present_info.swapchainCount = 1;
16791681 present_info.pSwapchains = &swapchain;
1682+ present_info.pImageIndices = &image_index;
16801683
16811684 uint64_t ts0 = os_time_get();
16821685 result = queue_data->device->vtable.QueuePresentKHR(queue, &present_info);
@@ -1688,11 +1691,13 @@ static VkResult overlay_QueuePresentKHR(
16881691 VkSwapchainKHR swapchain = pPresentInfo->pSwapchains[i];
16891692 struct swapchain_data *swapchain_data =
16901693 FIND(struct swapchain_data, swapchain);
1694+
1695+ uint32_t image_index = pPresentInfo->pImageIndices[i];
1696+
16911697 VkPresentInfoKHR present_info = *pPresentInfo;
16921698 present_info.swapchainCount = 1;
16931699 present_info.pSwapchains = &swapchain;
1694-
1695- uint32_t image_index = pPresentInfo->pImageIndices[i];
1700+ present_info.pImageIndices = &image_index;
16961701
16971702 struct overlay_draw *draw = before_present(swapchain_data,
16981703 queue_data,
旧リポジトリブラウザで表示