Make semaphores unique per swap chain image

Fixes #1210
This commit is contained in:
Sascha Willems 2025-06-09 19:57:47 +02:00
parent 422d54e387
commit 64ba099002
4 changed files with 77 additions and 59 deletions

View file

@ -3,7 +3,7 @@
*
* A swap chain is a collection of framebuffers used for rendering and presentation to the windowing system
*
* Copyright (C) 2016-2024 by Sascha Willems - www.saschawillems.de
* Copyright (C) 2016-2025 by Sascha Willems - www.saschawillems.de
*
* This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT)
*/
@ -341,7 +341,6 @@ void VulkanSwapChain::create(uint32_t& width, uint32_t& height, bool vsync, bool
}
vkDestroySwapchainKHR(device, oldSwapchain, nullptr);
}
uint32_t imageCount{ 0 };
VK_CHECK_RESULT(vkGetSwapchainImagesKHR(device, swapChain, &imageCount, nullptr));
// Get the swap chain images

View file

@ -3,7 +3,7 @@
*
* A swap chain is a collection of framebuffers used for rendering and presentation to the windowing system
*
* Copyright (C) 2016-2024 by Sascha Willems - www.saschawillems.de
* Copyright (C) 2016-2025 by Sascha Willems - www.saschawillems.de
*
* This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT)
*/
@ -41,6 +41,7 @@ public:
std::vector<VkImage> images{};
std::vector<VkImageView> imageViews{};
uint32_t queueNodeIndex{ UINT32_MAX };
uint32_t imageCount{ 0 };
#if defined(VK_USE_PLATFORM_WIN32_KHR)
void initSurface(void* platformHandle, void* platformWindow);