Skip to content

Commit d8ac518

Browse files
b-dekuslouken
authored andcommitted
GPU: Fix wrong Vulkan swapchain size when retrying acquire
1 parent 3d1a28c commit d8ac518

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

src/gpu/vulkan/SDL_gpu_vulkan.c

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9951,13 +9951,6 @@ static bool VULKAN_INTERNAL_AcquireSwapchainTexture(
99519951
}
99529952
}
99539953

9954-
if (swapchainTextureWidth) {
9955-
*swapchainTextureWidth = windowData->width;
9956-
}
9957-
if (swapchainTextureHeight) {
9958-
*swapchainTextureHeight = windowData->height;
9959-
}
9960-
99619954
if (windowData->inFlightFences[windowData->frameCounter] != NULL) {
99629955
if (block) {
99639956
// If we are blocking, just wait for the fence!
@@ -10009,6 +10002,14 @@ static bool VULKAN_INTERNAL_AcquireSwapchainTexture(
1000910002
}
1001010003
}
1001110004

10005+
if (swapchainTextureWidth) {
10006+
*swapchainTextureWidth = windowData->width;
10007+
}
10008+
10009+
if (swapchainTextureHeight) {
10010+
*swapchainTextureHeight = windowData->height;
10011+
}
10012+
1001210013
swapchainTextureContainer = &windowData->textureContainers[swapchainImageIndex];
1001310014

1001410015
// We need a special execution dependency with pWaitDstStageMask or image transition can start before acquire finishes

0 commit comments

Comments
 (0)