mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-15 08:00:11 +00:00
wined3d: Make the CS thread yield CPU when it can't block waiting.
It can't block because there are pending queries.
This commit is contained in:
parent
ecdeab593b
commit
fcccca153a
|
@ -3422,8 +3422,13 @@ static DWORD WINAPI wined3d_cs_run(void *ctx)
|
||||||
if (wined3d_cs_queue_is_empty(cs, queue))
|
if (wined3d_cs_queue_is_empty(cs, queue))
|
||||||
{
|
{
|
||||||
YieldProcessor();
|
YieldProcessor();
|
||||||
if (++spin_count >= WINED3D_CS_SPIN_COUNT && list_empty(&cs->query_poll_list))
|
if (++spin_count >= WINED3D_CS_SPIN_COUNT)
|
||||||
wined3d_cs_wait_event(cs);
|
{
|
||||||
|
if (list_empty(&cs->query_poll_list))
|
||||||
|
wined3d_cs_wait_event(cs);
|
||||||
|
else
|
||||||
|
Sleep(0);
|
||||||
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue