1
0
Fork 0
forked from suyu/suyu
Commit graph

9 commits

Author SHA1 Message Date
ReinUsesLisp
58b0ae84b5 renderer_vulkan: Make unconditional use of VK_KHR_timeline_semaphore
This reworks how host<->device synchronization works on the Vulkan
backend. Instead of "protecting" resources with a fence and signalling
these as free when the fence is known to be signalled by the host GPU,
use timeline semaphores.

Vulkan timeline semaphores allow use to work on a subset of D3D12
fences. As far as we are concerned, timeline semaphores are a value set
by the host or the device that can be waited by either of them.

Taking advantange of this, we can have a monolithically increasing
atomic value for each submission to the graphics queue. Instead of
protecting resources with a fence, we simply store the current logical
tick (the atomic value stored in CPU memory). When we want to know if a
resource is free, it can be compared to the current GPU tick.

This greatly simplifies resource management code and the free status of
resources should have less false negatives.

To workaround bugs in validation layers, when these are attached there's
a thread waiting for timeline semaphores.
2020-09-19 01:46:37 -03:00
Lioncash
bafef3d1c9 async_shaders: Mark getters as const member functions
While we're at it, we can also mark them as nodiscard.
2020-08-24 01:15:50 -04:00
ameerj
fde8102a41 Remove unneeded newlines, optional Registry in shader params
Addressing feedback from Rodrigo
2020-08-16 16:33:21 -04:00
ameerj
1b829fbd7a move thread 1/4 count computation into allocate workers method 2020-08-16 12:02:22 -04:00
ameerj
31a76410e8 Address feedback, add shader compile notifier, update setting text 2020-08-16 12:02:22 -04:00
ameerj
4539073ce1 Address feedback. Bruteforce delete duplicates 2020-08-16 12:02:22 -04:00
ameerj
6ac97405df Vk Async pipeline compilation 2020-08-16 12:02:22 -04:00
David Marcec
f48187449e Use conditional var 2020-07-17 14:26:17 +10:00
David Marcec
468bd9c1b0 async shaders 2020-07-17 14:24:57 +10:00