Skip to content

Commit

Permalink
[GPU] Fix crash in nvidia user-mode win32 driver when game window is …
Browse files Browse the repository at this point in the history
…minimized during swapchain resize (libsdl-org#11848)
  • Loading branch information
kg authored Jan 4, 2025
1 parent 0a5d2f3 commit a58bc3e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/gpu/vulkan/SDL_gpu_vulkan.c
Original file line number Diff line number Diff line change
Expand Up @@ -4463,6 +4463,7 @@ static Uint32 VULKAN_INTERNAL_CreateSwapchain(
&windowData->surface)) {
return false;
}
SDL_assert(windowData->surface);

if (!VULKAN_INTERNAL_QuerySwapchainSupport(
renderer,
Expand Down Expand Up @@ -9471,6 +9472,9 @@ static bool VULKAN_SupportsSwapchainComposition(
}

surface = windowData->surface;
if (!surface) {
SET_STRING_ERROR_AND_RETURN("Window has no Vulkan surface", false);
}

if (VULKAN_INTERNAL_QuerySwapchainSupport(
renderer,
Expand Down Expand Up @@ -9516,6 +9520,9 @@ static bool VULKAN_SupportsPresentMode(
}

surface = windowData->surface;
if (!surface) {
SET_STRING_ERROR_AND_RETURN("Window has no Vulkan surface", false);
}

if (VULKAN_INTERNAL_QuerySwapchainSupport(
renderer,
Expand Down

0 comments on commit a58bc3e

Please sign in to comment.