[PATCH vkd3d 3/4] vkd3d: Avoid busy-waiting in fence worker thread.
Józef Kucia
joseph.kucia at gmail.com
Thu Jun 13 06:47:35 CDT 2019
From: Józef Kucia <jkucia at codeweavers.com>
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>
---
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 7634e71b32ee..75556f5335e3 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)
--
2.21.0
More information about the wine-devel
mailing list