Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions Apps/Samples/GFxPlayerTiny/GFxPlayerTinyVulkan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1150,16 +1150,18 @@ static int AppMain(LPSTR lpCmdLine)
if (NeedsResize && WindowWidth > 0 && WindowHeight > 0)
{
vkDeviceWaitIdle(vkDevice);
if (pHAL) pHAL->PrepareForReset();
// NOTE: do NOT call pHAL->PrepareForReset() / pHAL->RestoreAfterReset() here.
// On NVIDIA those leave the Vulkan HAL with stale internal state so subsequent
// filled-shape draws are dropped (only outline draws survive). Just recreating
// the swapchain + framebuffers and re-issuing SetMainRenderTarget per frame is
// sufficient — the HAL doesn't cache framebuffers itself.
CleanupSwapchain();
if (!CreateSwapchain() || !CreateDepthResources() || !CreateFramebuffers())
{
OutputDebugStringA("Vulkan: Swapchain resize failed, retrying next frame\n");
if (pHAL) pHAL->RestoreAfterReset();
NeedsResize = true;
continue;
}
if (pHAL) pHAL->RestoreAfterReset();
if (pMovie) pMovie->SetViewport(WindowWidth, WindowHeight, 0, 0, WindowWidth, WindowHeight);
NeedsResize = false;
}
Expand Down