Fix infinite while loop in D3D11_INTERNAL_WaitForFence

d3d11
Caleb Cornett 2024-02-11 00:40:48 -06:00 committed by cosmonaut
parent e7d258dd36
commit 8f2e70948d
1 changed files with 9 additions and 9 deletions

View File

@ -3655,17 +3655,17 @@ static void D3D11_INTERNAL_WaitForFence(
SDL_LockMutex(renderer->contextLock);
res = ID3D11DeviceContext_GetData(
renderer->immediateContext,
(ID3D11Asynchronous*) fence->handle,
&queryData,
sizeof(queryData),
0
);
while (res != S_OK)
do
{
/* Spin until we get a result back... */
res = ID3D11DeviceContext_GetData(
renderer->immediateContext,
(ID3D11Asynchronous*)fence->handle,
&queryData,
sizeof(queryData),
0
);
}
while (res != S_OK); /* Spin until we get a result back... */
SDL_UnlockMutex(renderer->contextLock);
}