diff --git a/src/Refresh_Driver_D3D11.c b/src/Refresh_Driver_D3D11.c index 8bce5d5..e99e3c7 100644 --- a/src/Refresh_Driver_D3D11.c +++ b/src/Refresh_Driver_D3D11.c @@ -1403,6 +1403,12 @@ static void D3D11_Submit( 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 */ res = ID3D11DeviceContext_FinishCommandList( d3d11CommandBuffer->context, @@ -1775,6 +1781,9 @@ tryCreateDevice: /* Initialize miscellaneous renderer members */ renderer->debugMode = (flags & D3D11_CREATE_DEVICE_DEBUG); + /* Create command buffers to initialize the pool */ + D3D11_INTERNAL_AllocateCommandBuffers(renderer, 2); + /* Create the Refresh Device */ result = (Refresh_Device*) SDL_malloc(sizeof(Refresh_Device)); ASSIGN_DRIVER(D3D11)