mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-07 11:58:12 +00:00
GPU: Fix wrong Vulkan swapchain size when retrying acquire
(cherry picked from commit d8ac51859e
)
This commit is contained in:

committed by
Sam Lantinga

parent
f0e85a2a9c
commit
30e3eba20a
@@ -9951,13 +9951,6 @@ static bool VULKAN_INTERNAL_AcquireSwapchainTexture(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (swapchainTextureWidth) {
|
|
||||||
*swapchainTextureWidth = windowData->width;
|
|
||||||
}
|
|
||||||
if (swapchainTextureHeight) {
|
|
||||||
*swapchainTextureHeight = windowData->height;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (windowData->inFlightFences[windowData->frameCounter] != NULL) {
|
if (windowData->inFlightFences[windowData->frameCounter] != NULL) {
|
||||||
if (block) {
|
if (block) {
|
||||||
// If we are blocking, just wait for the fence!
|
// If we are blocking, just wait for the fence!
|
||||||
@@ -10009,6 +10002,14 @@ static bool VULKAN_INTERNAL_AcquireSwapchainTexture(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (swapchainTextureWidth) {
|
||||||
|
*swapchainTextureWidth = windowData->width;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (swapchainTextureHeight) {
|
||||||
|
*swapchainTextureHeight = windowData->height;
|
||||||
|
}
|
||||||
|
|
||||||
swapchainTextureContainer = &windowData->textureContainers[swapchainImageIndex];
|
swapchainTextureContainer = &windowData->textureContainers[swapchainImageIndex];
|
||||||
|
|
||||||
// We need a special execution dependency with pWaitDstStageMask or image transition can start before acquire finishes
|
// We need a special execution dependency with pWaitDstStageMask or image transition can start before acquire finishes
|
||||||
|
Reference in New Issue
Block a user