From 490c20f93f85a4e4275bdf96bcb8ffd7f266590c Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sun, 9 Oct 2022 09:57:55 -0700 Subject: [PATCH] d3d12: reset the vertex buffer size when it is released --- src/render/direct3d12/SDL_render_d3d12.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/render/direct3d12/SDL_render_d3d12.c b/src/render/direct3d12/SDL_render_d3d12.c index 1e57b8e01..90b79af3f 100644 --- a/src/render/direct3d12/SDL_render_d3d12.c +++ b/src/render/direct3d12/SDL_render_d3d12.c @@ -352,6 +352,7 @@ D3D12_ReleaseAll(SDL_Renderer * renderer) for (i = 0; i < SDL_D3D12_NUM_VERTEX_BUFFERS; ++i) { SAFE_RELEASE(data->vertexBuffers[i].resource); + data->vertexBuffers[i].size = 0; } data->swapEffect = (DXGI_SWAP_EFFECT) 0;