vkd3d/libs/vkd3d
Giovanni Mascellani bb2fa97c33 vkd3d: Do not keep the CS queue locked while processing it.
d3d12_command_queue_flush_ops() can renter itself while processing signal
events. Since we don't use recursive mutexes, we currently have to check
some of the queue variables without holding the mutex, which is not safe.

This is solved by allowing the queue to release its mutex while it is
processing entries: when flushing, the queue is briefly locked, the
is_flushing flag is set, the queue content is copied away and the
queue is unlocked again. After having processed the entries, the
queue is locked again to check is something else was added in the
meantime. This is repeated until the queue is empty (or a wait operation
is blocking it).

This should also remove some latency when a thread pushes to the queue
while another one is processing it, but I didn't try to measure any
impact. While it is expected that with this patch the queue mutex
will be locked and unlocked more frequently, it should also remain
locked for less time, hopefully creating little contention.
2023-03-08 20:14:39 +01:00
..
command.c vkd3d: Do not keep the CS queue locked while processing it. 2023-03-08 20:14:39 +01:00
device.c vkd3d: Remove a double space in a trace message. 2023-02-23 21:46:49 +01:00
libvkd3d.pc.in build: Add some standard files. 2016-10-28 12:34:12 +02:00
resource.c vkd3d: Initialize image aspect for NULL SRVs. 2023-02-07 22:08:00 +01:00
state.c vkd3d: Do not allow synchronization primitives to fail. 2023-02-02 20:51:27 +01:00
utils.c vkd3d: Do not allow synchronization primitives to fail. 2023-02-02 20:51:27 +01:00
vkd3d_main.c vkd3d: Allow writing log output via a custom callback. 2022-06-07 19:38:57 +02:00
vkd3d_private.h vkd3d: Do not keep the CS queue locked while processing it. 2023-03-08 20:14:39 +01:00
vkd3d_shaders.h vkd3d: Implement d3d12_command_list_ClearUnorderedAccessViewFloat(). 2019-11-25 16:06:59 +01:00
vkd3d.map vkd3d: Allow writing log output via a custom callback. 2022-06-07 19:38:57 +02:00
vulkan_procs.h vkd3d: Use Vulkan timeline semaphores for D3D12 fences. 2022-03-24 19:47:24 +01:00