Skip to content

Commit

Permalink
SDL: Discard pending render passes on exit
Browse files Browse the repository at this point in the history
  • Loading branch information
flibitijibibo authored Jan 14, 2025
1 parent f642f6c commit e9dd55e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/FNA3D_Driver_SDL.c
Original file line number Diff line number Diff line change
Expand Up @@ -4017,6 +4017,9 @@ static void SDLGPU_DestroyDevice(FNA3D_Device *device)
// Completely flush command buffers and stall
SDL_LockMutex(renderer->copyPassMutex);

/* Ignore any pending render passes, they're getting canceled anyway */
renderer->needNewRenderPass = 0;

SDLGPU_INTERNAL_FlushCommands(renderer);
// avoid command buffer leaks by explicitly canceling newly-acquired command buffers
SDL_CancelGPUCommandBuffer(renderer->uploadCommandBuffer);
Expand Down

0 comments on commit e9dd55e

Please sign in to comment.