mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-02 16:05:46 +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))
|
||||
{
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue