Matteo Bruni : wined3d: Call YieldProcessor() when spinning waiting for CS commands.
Module: wine Branch: master Commit: ecdeab593bdb42c6c8854cdef9c59daba9ba6ce1 URL: https://gitlab.winehq.org/wine/wine/-/commit/ecdeab593bdb42c6c8854cdef9c59da... Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Sun May 6 03:14:21 2018 +0200 wined3d: Call YieldProcessor() when spinning waiting for CS commands. Yielding to other threads might help to get new packets and (very slightly) reduce contention on the queue head and tail pointers. --- dlls/wined3d/cs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c index 14f2ca9bb4a..2cd53cd7a5b 100644 --- a/dlls/wined3d/cs.c +++ b/dlls/wined3d/cs.c @@ -3421,6 +3421,7 @@ static DWORD WINAPI wined3d_cs_run(void *ctx) queue = &cs->queue[WINED3D_CS_QUEUE_DEFAULT]; 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); continue;
participants (1)
-
Alexandre Julliard