eden-miror/src/video_core/renderer_vulkan
MaranBr a27d35463e
[video_core] Improve synchronization and refactor buffer cache timing logic (#4182)
This simplifies the GPU accuracy setting by removing the intermediate Balanced mode and setting High as the default on desktop platforms.

It introduces a dedicated setting for GPU fence behavior, allowing the synchronization policy to be configured independently of GPU accuracy.

The Vulkan buffer cache now tracks GPU recording timeline ticks and waits only when necessary, reducing unnecessary synchronization while maintaining correctness for hard-to-trace graphical bugs.

GPU buffer readback has also been refined to synchronize only the affected upload regions when needed, and default DMA behavior has been updated to align with the new GPU accuracy model.

### TL;DR

The fix for particles freezing and unfreezing in mid-air in `Super Mario Odyssey` has been improved, resulting in less of a performance hit.
This game requires the new `Enable GPU Buffer Readback` option to be enabled to fix this issue.

The vertex explosions that occurred in `Super Mario Bros. Wonder`, especially in World 4, have been completely eliminated. You can now enjoy a smooth experience without graphical glitches exploding across the screen.
This game requires the new `GPU Fence Behavior` option to be set to `Strict` to fully fix this issue.

The flickering issue inside certain Shrines in `The Legend of Zelda: Tears of the Kingdom` has also been fixed.
For now, this game requires the new `GPU Fence Behavior` option to be set to `Accurate` to fully fix this issue.

These options are intended to fix graphical bugs in games that require better synchronization behavior between CPU and GPU, so other games may be affected as well.

Co-authored-by: xbzk <xbzk@eden-emu.dev>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4182
Reviewed-by: Lizzie <lizzie@eden-emu.dev>
2026-07-10 05:25:12 +02:00
..
present [video_core, hle] remove redundant parent references in system structs (#3908) 2026-06-23 06:31:25 +02:00
blit_image.cpp [video_core, hle] remove redundant parent references in system structs (#3908) 2026-06-23 06:31:25 +02:00
blit_image.h [vk] remove unused vk_texture_manager.cpp and unused shader conversions (#3432) 2026-01-31 20:33:35 +01:00
fixed_pipeline_state.cpp [vulkan] 3rd Vulkan Global Maintenance (#4189) 2026-07-09 04:22:43 +02:00
fixed_pipeline_state.h [vulkan] 3rd Vulkan Global Maintenance (#4189) 2026-07-09 04:22:43 +02:00
maxwell_to_vk.cpp [vulkan] 3rd Vulkan Global Maintenance (#4189) 2026-07-09 04:22:43 +02:00
maxwell_to_vk.h [dynarmic, common] pagetable clustering (#3215) 2026-01-13 00:27:31 +01:00
pipeline_helper.h [vulkan, android] Mediacodec implementation + Vulkan fixes (#4191) 2026-07-09 06:55:54 +02:00
pipeline_statistics.cpp [video_core, hle] remove redundant parent references in system structs (#3908) 2026-06-23 06:31:25 +02:00
pipeline_statistics.h [video_core, hle] remove redundant parent references in system structs (#3908) 2026-06-23 06:31:25 +02:00
renderer_vulkan.cpp [video_core, hle] remove redundant parent references in system structs (#3908) 2026-06-23 06:31:25 +02:00
renderer_vulkan.h [vk] Unify RAII in Vulkan (#2679) 2025-10-08 04:01:24 +02:00
vk_blit_screen.cpp [video_core, hle] remove redundant parent references in system structs (#3908) 2026-06-23 06:31:25 +02:00
vk_blit_screen.h [video_core, hle] remove redundant parent references in system structs (#3908) 2026-06-23 06:31:25 +02:00
vk_buffer_cache.cpp [video_core] Improve synchronization and refactor buffer cache timing logic (#4182) 2026-07-10 05:25:12 +02:00
vk_buffer_cache.h [video_core] Improve synchronization and refactor buffer cache timing logic (#4182) 2026-07-10 05:25:12 +02:00
vk_buffer_cache_base.cpp Buffer Cache: Fully rework the buffer cache. 2023-04-29 00:46:31 +02:00
vk_command_pool.cpp general: fix spelling mistakes 2023-03-12 11:33:01 -04:00
vk_command_pool.h general: Convert source file copyright comments over to SPDX 2022-04-23 05:55:32 -04:00
vk_compute_pass.cpp [vulkan, android] Mediacodec implementation + Vulkan fixes (#4191) 2026-07-09 06:55:54 +02:00
vk_compute_pass.h [video_core, hle] remove redundant parent references in system structs (#3908) 2026-06-23 06:31:25 +02:00
vk_compute_pipeline.cpp [vulkan, android] Mediacodec implementation + Vulkan fixes (#4191) 2026-07-09 06:55:54 +02:00
vk_compute_pipeline.h [vulkan, android] Mediacodec implementation + Vulkan fixes (#4191) 2026-07-09 06:55:54 +02:00
vk_descriptor_pool.cpp [video_core, hle] remove redundant parent references in system structs (#3908) 2026-06-23 06:31:25 +02:00
vk_descriptor_pool.h [video_core, hle] remove redundant parent references in system structs (#3908) 2026-06-23 06:31:25 +02:00
vk_fence_manager.cpp Clang format and ddress feedback 2023-04-24 12:38:47 +02:00
vk_fence_manager.h Query Cache: address issues 2023-09-23 23:05:30 +02:00
vk_graphics_pipeline.cpp [Vulkan] Regression Fix - Return BindVertexBuffer2EXT old path (#4199) 2026-07-10 05:00:49 +02:00
vk_graphics_pipeline.h [vk] Clamp dynamic descriptors based on device limits (#4115) 2026-06-30 04:33:30 +02:00
vk_master_semaphore.cpp [vulkan] 3rd Vulkan Global Maintenance (#4189) 2026-07-09 04:22:43 +02:00
vk_master_semaphore.h [vk] Fix lost wakeup in fence mode using atomic wait (#3598) 2026-02-24 06:37:28 +01:00
vk_pipeline_cache.cpp [vulkan, android] Mediacodec implementation + Vulkan fixes (#4191) 2026-07-09 06:55:54 +02:00
vk_pipeline_cache.h [spirv] nuke spirv-opt (#3877) 2026-04-25 21:54:27 +02:00
vk_present_manager.cpp [*] basic in-house cpp linting (#4039) 2026-06-04 05:49:07 +02:00
vk_present_manager.h [vk] fix crash introduced in 9a07bd0570 (#3685) 2026-03-06 19:52:17 +01:00
vk_query_cache.cpp [vulkan, android] Mediacodec implementation + Vulkan fixes (#4191) 2026-07-09 06:55:54 +02:00
vk_query_cache.h [vulkan] 2nd Vulkan Global Maintenance (#3853) 2026-04-24 16:37:18 +02:00
vk_rasterizer.cpp [vulkan] 3rd Vulkan Global Maintenance (#4189) 2026-07-09 04:22:43 +02:00
vk_rasterizer.h [vulkan] 3rd Vulkan Global Maintenance (#4189) 2026-07-09 04:22:43 +02:00
vk_render_pass_cache.cpp Revert "[vk] Simplified layouts per driver configuration (#3271)" (#3571) 2026-02-19 04:07:45 +01:00
vk_render_pass_cache.h [*] change all std::unordered_map and std::unordered_set into ankerl::unordered_dense::map/set variants (#3442) 2026-02-10 03:34:07 +01:00
vk_resource_pool.cpp general: fix spelling mistakes 2023-03-12 11:33:01 -04:00
vk_resource_pool.h general: Convert source file copyright comments over to SPDX 2022-04-23 05:55:32 -04:00
vk_scheduler.cpp [video_core] Improve synchronization and refactor buffer cache timing logic (#4182) 2026-07-10 05:25:12 +02:00
vk_scheduler.h [video_core] Improve synchronization and refactor buffer cache timing logic (#4182) 2026-07-10 05:25:12 +02:00
vk_shader_util.cpp Revert some wip changes 2025-04-28 16:14:42 -03:00
vk_shader_util.h Revert some wip changes 2025-04-28 16:14:42 -03:00
vk_staging_buffer_pool.cpp [common] rework BitField and BitUtil, use concepts whenever possible (#4076) 2026-07-09 03:47:04 +02:00
vk_staging_buffer_pool.h revert [vk] Fast UBO: fix tracking, resize heuristics, add debug guard (#2695) (#2706) 2025-10-09 21:37:27 +02:00
vk_state_tracker.cpp [video_core, hle] remove redundant parent references in system structs (#3908) 2026-06-23 06:31:25 +02:00
vk_state_tracker.h [vulkan] 2nd Vulkan Global Maintenance (#3853) 2026-04-24 16:37:18 +02:00
vk_swapchain.cpp [*] basic in-house cpp linting (#4039) 2026-06-04 05:49:07 +02:00
vk_swapchain.h [vk] unify VkSurfaceKHR with Android and the rest of platforms; remove technically incorrect nullptr() ctor for handles (#2971) 2026-03-05 07:32:18 +01:00
vk_texture_cache.cpp [vulkan, android] Mediacodec implementation + Vulkan fixes (#4191) 2026-07-09 06:55:54 +02:00
vk_texture_cache.h [vulkan, android] Mediacodec implementation + Vulkan fixes (#4191) 2026-07-09 06:55:54 +02:00
vk_texture_cache_base.cpp general: Convert source file copyright comments over to SPDX 2022-04-23 05:55:32 -04:00
vk_turbo_mode.cpp [*] basic in-house cpp linting (#4039) 2026-06-04 05:49:07 +02:00
vk_turbo_mode.h [*] basic in-house cpp linting (#4039) 2026-06-04 05:49:07 +02:00
vk_update_descriptor.cpp [vk] Clamp dynamic descriptors based on device limits (#4115) 2026-06-30 04:33:30 +02:00
vk_update_descriptor.h [vk] Clamp dynamic descriptors based on device limits (#4115) 2026-06-30 04:33:30 +02:00