summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_vulkan/vk_resource_manager.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* renderer_vulkan: Make unconditional use of VK_KHR_timeline_semaphoreReinUsesLisp2020-09-191-196/+0
| | | | | | | | | | | | | | | | | | | | | | | 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.
* renderer_vulkan: Drop Vulkan-HppReinUsesLisp2020-04-111-5/+5
|
* vk_resource_manager: Add entry to VKFence to test its usageReinUsesLisp2019-12-191-0/+8
|
* vk_resource_manager: Implement VKFenceWatch move constructorReinUsesLisp2019-12-191-0/+8
| | | | | | This allows us to put VKFenceWatch inside a std::vector without storing it in heap. On move we have to signal the fences where the new protected resource is, adding some overhead.
* video_core: Add missing override specifiersLioncash2019-03-271-1/+1
| | | | | | Ensures that the signatures will always match with the base class. Also silences a few compilation warnings.
* vk_resource_manager: Minor VKFenceWatch changesReinUsesLisp2019-02-241-1/+1
|
* vk_resource_manager: Implement a command buffer pool with VKFencedPoolReinUsesLisp2019-02-141-1/+7
|
* vk_resource_manager: Add VKFencedPool interfaceReinUsesLisp2019-02-141-0/+32
| | | | | | | Handles a pool of resources protected by fences. Manages resource overflow allocating more resources. This class is intended to be used through inheritance.
* vk_resource_manager: Implement VKResourceManager and fence allocatorReinUsesLisp2019-02-141-0/+23
| | | | | CommitFence iterates a pool of fences until one is found. If all fences are being used at the same time, allocate more.
* vk_resource_manager: Implement VKFenceWatchReinUsesLisp2019-02-141-0/+30
| | | | | | A fence watch is used to keep track of the usage of a fence and protect a resource or set of resources without having to inherit from their handlers.
* vk_resource_manager: Implement VKFenceReinUsesLisp2019-02-141-0/+63
| | | | | | | | | | Fences take ownership of objects, protecting them from GPU-side or driver-side concurrent access. They must be commited from the resource manager. Their usage flow is: commit the fence from the resource manager, protect resources with it and use them, send the fence to an execution queue and Wait for it if needed and then call Release. Used resources will automatically be signaled when they are free to be reused.
* vk_resource_manager: Add VKResource interfaceReinUsesLisp2019-02-141-0/+26
VKResource is an interface that gets signaled by a fence when it is free to be reused.