mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-07 20:08:13 +00:00
Check for VK_SUBOPTIMAL_KHR also in vkQueuePresentKHR (#11113)
This is already handled for vkAcquireNextImageKHR.
This commit is contained in:
@@ -10235,12 +10235,12 @@ static bool VULKAN_Submit(
|
|||||||
presentData->windowData->frameCounter =
|
presentData->windowData->frameCounter =
|
||||||
(presentData->windowData->frameCounter + 1) % MAX_FRAMES_IN_FLIGHT;
|
(presentData->windowData->frameCounter + 1) % MAX_FRAMES_IN_FLIGHT;
|
||||||
|
|
||||||
if (presentResult == VK_SUCCESS || presentResult == VK_ERROR_OUT_OF_DATE_KHR) {
|
if (presentResult == VK_SUCCESS || presentResult == VK_SUBOPTIMAL_KHR || presentResult == VK_ERROR_OUT_OF_DATE_KHR) {
|
||||||
// If presenting, the swapchain is using the in-flight fence
|
// If presenting, the swapchain is using the in-flight fence
|
||||||
presentData->windowData->inFlightFences[presentData->windowData->frameCounter] = (SDL_GPUFence*)vulkanCommandBuffer->inFlightFence;
|
presentData->windowData->inFlightFences[presentData->windowData->frameCounter] = (SDL_GPUFence*)vulkanCommandBuffer->inFlightFence;
|
||||||
(void)SDL_AtomicIncRef(&vulkanCommandBuffer->inFlightFence->referenceCount);
|
(void)SDL_AtomicIncRef(&vulkanCommandBuffer->inFlightFence->referenceCount);
|
||||||
|
|
||||||
if (presentResult == VK_ERROR_OUT_OF_DATE_KHR) {
|
if (presentResult == VK_SUBOPTIMAL_KHR || presentResult == VK_ERROR_OUT_OF_DATE_KHR) {
|
||||||
presentData->windowData->needsSwapchainRecreate = true;
|
presentData->windowData->needsSwapchainRecreate = true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user