Fix for command pool crash, fix for hanging on Wait

Caleb Cornett 2023-10-08 16:16:11 -05:00
parent 4fecc829bf
commit e48941eb48
1 changed files with 9 additions and 0 deletions

View File

@ -1403,6 +1403,12 @@ static void D3D11_Submit(
SDL_LockMutex(renderer->contextLock); SDL_LockMutex(renderer->contextLock);
/* Notify the command buffer completion query that we have completed recording */
ID3D11DeviceContext_End(
renderer->immediateContext,
(ID3D11Asynchronous*) d3d11CommandBuffer->completionQuery
);
/* Serialize the commands into the command list */ /* Serialize the commands into the command list */
res = ID3D11DeviceContext_FinishCommandList( res = ID3D11DeviceContext_FinishCommandList(
d3d11CommandBuffer->context, d3d11CommandBuffer->context,
@ -1775,6 +1781,9 @@ tryCreateDevice:
/* Initialize miscellaneous renderer members */ /* Initialize miscellaneous renderer members */
renderer->debugMode = (flags & D3D11_CREATE_DEVICE_DEBUG); renderer->debugMode = (flags & D3D11_CREATE_DEVICE_DEBUG);
/* Create command buffers to initialize the pool */
D3D11_INTERNAL_AllocateCommandBuffers(renderer, 2);
/* Create the Refresh Device */ /* Create the Refresh Device */
result = (Refresh_Device*) SDL_malloc(sizeof(Refresh_Device)); result = (Refresh_Device*) SDL_malloc(sizeof(Refresh_Device));
ASSIGN_DRIVER(D3D11) ASSIGN_DRIVER(D3D11)