Commit 2be29497 by Geoff Lang Committed by Commit Bot

Force the flush through the GetData call in Renderer11::finish.

NVIDIA drivers sometimes go into infinite loops in this code, jbauman@ speculated that these drivers may need to do the flush in the GetData call. BUG=626849 Change-Id: I85408fbe7176242240862225e968f557bd7818cf Reviewed-on: https://chromium-review.googlesource.com/360130Reviewed-by: 's avatarJohn Bauman <jbauman@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
parent fed6d0e2
...@@ -1102,11 +1102,15 @@ gl::Error Renderer11::finish() ...@@ -1102,11 +1102,15 @@ gl::Error Renderer11::finish()
} }
mDeviceContext->End(mSyncQuery); mDeviceContext->End(mSyncQuery);
mDeviceContext->Flush();
unsigned int attempt = 0;
do do
{ {
result = mDeviceContext->GetData(mSyncQuery, NULL, 0, D3D11_ASYNC_GETDATA_DONOTFLUSH); unsigned int flushFrequency = 100;
UINT flags = (attempt % flushFrequency == 0) ? 0 : D3D11_ASYNC_GETDATA_DONOTFLUSH;
attempt++;
result = mDeviceContext->GetData(mSyncQuery, NULL, 0, flags);
if (FAILED(result)) if (FAILED(result))
{ {
return gl::Error(GL_OUT_OF_MEMORY, "Failed to get event query data, result: 0x%X.", result); return gl::Error(GL_OUT_OF_MEMORY, "Failed to get event query data, result: 0x%X.", result);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment