Commit fcccca15 authored by Matteo Bruni's avatar Matteo Bruni Committed by Alexandre Julliard

wined3d: Make the CS thread yield CPU when it can't block waiting.

It can't block because there are pending queries.
parent ecdeab59
......@@ -3422,8 +3422,13 @@ static DWORD WINAPI wined3d_cs_run(void *ctx)
if (wined3d_cs_queue_is_empty(cs, queue))
{
YieldProcessor();
if (++spin_count >= WINED3D_CS_SPIN_COUNT && list_empty(&cs->query_poll_list))
wined3d_cs_wait_event(cs);
if (++spin_count >= WINED3D_CS_SPIN_COUNT)
{
if (list_empty(&cs->query_poll_list))
wined3d_cs_wait_event(cs);
else
Sleep(0);
}
continue;
}
}
......
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