summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_vulkan/vk_compute_pass.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* renderer_vulkan: Make unconditional use of VK_KHR_timeline_semaphoreReinUsesLisp2020-09-191-3/+1
| | | | | | | | | | | | | | | | | | | | | | | 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.
* vulkan: Remove unnecessary includesLioncash2020-04-291-1/+1
| | | | | | | Reduces some header churn and reduces rebuilds when some header internals change. While we're at it we can also resolve a missing include in buffer_cache.
* vk_compute_pass: Implement indexed quadsReinUsesLisp2020-04-171-0/+19
| | | | | | | | | | | | | Implement indexed quads (GL_QUADS used with glDrawElements*) with a compute pass conversion. The compute shader converts from uint8/uint16/uint32 indices to uint32. The format is passed through push constants to avoid having different variants of the same shader. - Used by Fast RMX - Used by Xenoblade Chronicles 2 (it still has graphical due to synchronization issues on Vulkan)
* buffer_cache: Return handles instead of pointer to handlesReinUsesLisp2020-04-161-2/+2
| | | | | | | | | | | The original idea of returning pointers is that handles can be moved. The problem is that the implementation didn't take that in mind and made everything harder to work with. This commit drops pointer to handles and returns the handles themselves. While it is still true that handles can be invalidated, this way we get an old handle instead of a dangling pointer. This problem can be solved in the future with sparse buffers.
* renderer_vulkan: Drop Vulkan-HppReinUsesLisp2020-04-111-15/+14
|
* vk_compute_pass: Add compute passes to emulate missing Vulkan featuresReinUsesLisp2020-01-081-0/+77
This currently only supports quad arrays and u8 indices. In the future we can remove quad arrays with a table written from the CPU, but this was used to bootstrap the other passes helpers and it was left in the code. The blob code is generated from the "shaders/" directory. Read the instructions there to know how to generate the SPIR-V.