Commit df1bd07dee4e167bec5ac8b606461f2007bc7b10

Sam Lantinga 2022-10-11T07:25:27

d3d12: actually execute the pending commands before processing resize This makes sure all the resources are in the expected state Fix the D3D12 case in https://github.com/libsdl-org/SDL/issues/6376

1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/src/render/direct3d12/SDL_render_d3d12.c b/src/render/direct3d12/SDL_render_d3d12.c
index ad01497..79cf30e 100644
--- a/src/render/direct3d12/SDL_render_d3d12.c
+++ b/src/render/direct3d12/SDL_render_d3d12.c
@@ -1285,8 +1285,7 @@ D3D12_CreateWindowSizeDependentResources(SDL_Renderer * renderer)
     D3D12_CPU_DESCRIPTOR_HANDLE rtvDescriptor;
 
     /* Release resources in the current command list */
-    D3D_CALL(data->commandList, Close);
-    D3D12_ResetCommandList(data);
+    D3D12_IssueBatch(data);
     D3D_CALL(data->commandList, OMSetRenderTargets, 0, NULL, FALSE, NULL);
 
     /* Release render targets */