1
0
Fork 0
forked from suyu/suyu
suyu/src/video_core/renderer_vulkan
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
..
shaders vk_compute_pass: Implement indexed quads 2020-04-16 21:12:32 -03:00
fixed_pipeline_state.cpp video_core: Remove unused variables 2020-07-21 00:57:25 -04:00
fixed_pipeline_state.h vk_pipeline_cache: Avoid hashing and comparing dynamic state when possible 2020-06-26 20:57:22 -03:00
maxwell_to_vk.cpp video_core: Enforce -Werror=switch 2020-09-16 17:48:01 -03:00
maxwell_to_vk.h vk_graphics_pipeline: Implement viewport swizzles with NV_viewport_swizzle 2020-05-04 18:31:17 -03:00
nsight_aftermath_tracker.cpp common/fileutil: Convert namespace to Common::FS 2020-08-16 06:52:40 -04:00
nsight_aftermath_tracker.h renderer_vulkan: Integrate Nvidia Nsight Aftermath on Windows 2020-04-14 00:39:21 -03:00
renderer_vulkan.cpp renderer_vulkan: Make unconditional use of VK_KHR_timeline_semaphore 2020-09-19 01:46:37 -03:00
renderer_vulkan.h renderer_vulkan: Make unconditional use of VK_KHR_timeline_semaphore 2020-09-19 01:46:37 -03:00
vk_blit_screen.cpp renderer_vulkan: Make unconditional use of VK_KHR_timeline_semaphore 2020-09-19 01:46:37 -03:00
vk_blit_screen.h renderer_vulkan: Make unconditional use of VK_KHR_timeline_semaphore 2020-09-19 01:46:37 -03:00
vk_buffer_cache.cpp video_core: Remove all Core::System references in renderer 2020-09-06 05:28:48 -03:00
vk_buffer_cache.h video_core: Remove all Core::System references in renderer 2020-09-06 05:28:48 -03:00
vk_command_pool.cpp renderer_vulkan: Make unconditional use of VK_KHR_timeline_semaphore 2020-09-19 01:46:37 -03:00
vk_command_pool.h renderer_vulkan: Make unconditional use of VK_KHR_timeline_semaphore 2020-09-19 01:46:37 -03:00
vk_compute_pass.cpp renderer_vulkan: Make unconditional use of VK_KHR_timeline_semaphore 2020-09-19 01:46:37 -03:00
vk_compute_pass.h renderer_vulkan: Make unconditional use of VK_KHR_timeline_semaphore 2020-09-19 01:46:37 -03:00
vk_compute_pipeline.cpp renderer_vulkan: Make unconditional use of VK_KHR_timeline_semaphore 2020-09-19 01:46:37 -03:00
vk_compute_pipeline.h vulkan: Remove unnecessary includes 2020-04-28 21:54:46 -04:00
vk_descriptor_pool.cpp renderer_vulkan: Make unconditional use of VK_KHR_timeline_semaphore 2020-09-19 01:46:37 -03:00
vk_descriptor_pool.h renderer_vulkan: Make unconditional use of VK_KHR_timeline_semaphore 2020-09-19 01:46:37 -03:00
vk_device.cpp renderer_vulkan: Make unconditional use of VK_KHR_timeline_semaphore 2020-09-19 01:46:37 -03:00
vk_device.h Address feedback, add shader compile notifier, update setting text 2020-08-16 12:02:22 -04:00
vk_fence_manager.cpp renderer_vulkan: Make unconditional use of VK_KHR_timeline_semaphore 2020-09-19 01:46:37 -03:00
vk_fence_manager.h video_core: Remove all Core::System references in renderer 2020-09-06 05:28:48 -03:00
vk_graphics_pipeline.cpp renderer_vulkan: Make unconditional use of VK_KHR_timeline_semaphore 2020-09-19 01:46:37 -03:00
vk_graphics_pipeline.h Remove unneeded newlines, optional Registry in shader params 2020-08-16 16:33:21 -04:00
vk_image.cpp vk_image: Make use of designated initializers where applicable 2020-07-16 18:24:26 -04:00
vk_image.h renderer_vulkan: Drop Vulkan-Hpp 2020-04-10 22:49:02 -03:00
vk_master_semaphore.cpp renderer_vulkan: Make unconditional use of VK_KHR_timeline_semaphore 2020-09-19 01:46:37 -03:00
vk_master_semaphore.h renderer_vulkan: Make unconditional use of VK_KHR_timeline_semaphore 2020-09-19 01:46:37 -03:00
vk_memory_manager.cpp vk_memory_manager: Make use of designated initializers where applicable 2020-07-16 18:26:30 -04:00
vk_memory_manager.h vk_memory_manager: Remove unified memory model flag 2020-04-21 22:06:38 -03:00
vk_pipeline_cache.cpp video_core: Remove all Core::System references in renderer 2020-09-06 05:28:48 -03:00
vk_pipeline_cache.h renderer_vulkan: Make unconditional use of VK_KHR_timeline_semaphore 2020-09-19 01:46:37 -03:00
vk_query_cache.cpp renderer_vulkan: Make unconditional use of VK_KHR_timeline_semaphore 2020-09-19 01:46:37 -03:00
vk_query_cache.h renderer_vulkan: Make unconditional use of VK_KHR_timeline_semaphore 2020-09-19 01:46:37 -03:00
vk_rasterizer.cpp renderer_vulkan: Make unconditional use of VK_KHR_timeline_semaphore 2020-09-19 01:46:37 -03:00
vk_rasterizer.h renderer_vulkan: Make unconditional use of VK_KHR_timeline_semaphore 2020-09-19 01:46:37 -03:00
vk_renderpass_cache.cpp vk_renderpass_cache: Make use of designated initializers where applicable 2020-07-16 18:57:23 -04:00
vk_renderpass_cache.h vk_rasterizer: Pack texceptions and color formats on invalid formats 2020-04-24 22:21:29 -03:00
vk_resource_pool.cpp renderer_vulkan: Make unconditional use of VK_KHR_timeline_semaphore 2020-09-19 01:46:37 -03:00
vk_resource_pool.h renderer_vulkan: Make unconditional use of VK_KHR_timeline_semaphore 2020-09-19 01:46:37 -03:00
vk_sampler_cache.cpp vulkan: Silence more -Wmissing-field-initializer warnings 2020-08-03 12:28:57 -04:00
vk_sampler_cache.h renderer_vulkan: Drop Vulkan-Hpp 2020-04-10 22:49:02 -03:00
vk_scheduler.cpp renderer_vulkan: Make unconditional use of VK_KHR_timeline_semaphore 2020-09-19 01:46:37 -03:00
vk_scheduler.h renderer_vulkan: Make unconditional use of VK_KHR_timeline_semaphore 2020-09-19 01:46:37 -03:00
vk_shader_decompiler.cpp Merge pull request #4394 from lioncash/unused6 2020-07-23 19:54:59 -07:00
vk_shader_decompiler.h vk_rasterizer: Implement storage texels 2020-06-02 02:16:33 -03:00
vk_shader_util.cpp vk_shader_util: Make use of designated initializers where applicable 2020-07-16 19:17:41 -04:00
vk_shader_util.h vulkan: Remove unnecessary includes 2020-04-28 21:54:46 -04:00
vk_staging_buffer_pool.cpp renderer_vulkan: Make unconditional use of VK_KHR_timeline_semaphore 2020-09-19 01:46:37 -03:00
vk_staging_buffer_pool.h renderer_vulkan: Make unconditional use of VK_KHR_timeline_semaphore 2020-09-19 01:46:37 -03:00
vk_state_tracker.cpp video_core: Remove all Core::System references in renderer 2020-09-06 05:28:48 -03:00
vk_state_tracker.h video_core: Remove all Core::System references in renderer 2020-09-06 05:28:48 -03:00
vk_stream_buffer.cpp renderer_vulkan: Make unconditional use of VK_KHR_timeline_semaphore 2020-09-19 01:46:37 -03:00
vk_stream_buffer.h renderer_vulkan: Make unconditional use of VK_KHR_timeline_semaphore 2020-09-19 01:46:37 -03:00
vk_swapchain.cpp renderer_vulkan: Make unconditional use of VK_KHR_timeline_semaphore 2020-09-19 01:46:37 -03:00
vk_swapchain.h renderer_vulkan: Make unconditional use of VK_KHR_timeline_semaphore 2020-09-19 01:46:37 -03:00
vk_texture_cache.cpp renderer_vulkan: Make unconditional use of VK_KHR_timeline_semaphore 2020-09-19 01:46:37 -03:00
vk_texture_cache.h renderer_vulkan: Make unconditional use of VK_KHR_timeline_semaphore 2020-09-19 01:46:37 -03:00
vk_update_descriptor.cpp vk_update_descriptor: Upload descriptor sets data directly 2020-06-18 17:47:19 -03:00
vk_update_descriptor.h vk_update_descriptor: Upload descriptor sets data directly 2020-06-18 17:47:19 -03:00
wrapper.cpp renderer_vulkan: Make unconditional use of VK_KHR_timeline_semaphore 2020-09-19 01:46:37 -03:00
wrapper.h renderer_vulkan: Make unconditional use of VK_KHR_timeline_semaphore 2020-09-19 01:46:37 -03:00