=?UTF-8?Q?J=C3=B3zef=20Kucia=20?=: vkd3d: Avoid busy-waiting in fence worker thread.

Alexandre Julliard julliard at winehq.org
Thu Jun 13 15:40:05 CDT 2019


Module: vkd3d
Branch: master
Commit: 206fd23afea6793cce0aba05a680607fc6f2d628
URL:    https://source.winehq.org/git/vkd3d.git/?a=commit;h=206fd23afea6793cce0aba05a680607fc6f2d628

Author: Józef Kucia <jkucia at codeweavers.com>
Date:   Thu Jun 13 13:47:35 2019 +0200

vkd3d: Avoid busy-waiting in fence worker thread.

This might delay updating a d3d12_fence when a fence enqueued later than
other fences is signaled before them. On the other hand, it
significantly reduces CPU usage. I haven't found a program negatively
impacted by this change so far.

Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 libs/vkd3d/command.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libs/vkd3d/command.c b/libs/vkd3d/command.c
index 7634e71..75556f5 100644
--- a/libs/vkd3d/command.c
+++ b/libs/vkd3d/command.c
@@ -362,7 +362,7 @@ static void vkd3d_wait_for_gpu_fences(struct vkd3d_fence_worker *worker)
         return;
 
     vr = VK_CALL(vkWaitForFences(device->vk_device,
-            worker->fence_count, worker->vk_fences, VK_FALSE, 0));
+            worker->fence_count, worker->vk_fences, VK_FALSE, ~(uint64_t)0));
     if (vr == VK_TIMEOUT)
         return;
     if (vr != VK_SUCCESS)




More information about the wine-cvs mailing list