eden/src/video_core
CamilleLaVey 3d0eb4b5d7
[vulkan] 1st Vulkan Global Maintenance (#3839)
This pr aims to make a first step into giving Eden's Vulkan backend maintenance with better formatting, understanding and reduce the redundancy between some wrong implementations:

-> ProvokingVertex: Has been reworked completely, now the wiring to ExtendedDynamicState3 (ProvokingVertexMode) it works safe, the gating of the extension no longer requires user enabling on UI, it will be enabled automatically based on what features of the extension are available on driver, depending if first or last mode are available and also will be properly set under TrasformFeedback operations; this way we're gonna ensure all drivers, including Android stock drivers on QCOM, Mali and other mobile vendors drivers access correctly to the extension, fixing some graphical issues (flickering textures or wrong sccisors on vertex that required first mode) generated by the missing first mode handling or the proper clearing on pipeline state. This change will increase/ decrease slightly the performance on some games that changes dynamically between first and last modes, but will also ensure a clear path to GPU to use resources smartly, reducing VRAM consumption in PC and MEM/GPU percentage of use on Android (marginal to 5 - 8% approx).

-> Removal VK_EXT_multi_draw: It has passed some months since the first try to implement this feature, but wasn't completed so functionality was null to negative, taking space in source and using small CPU cicles for initialization during device creation that reduced CPU effectiveness by 2 - 5%, aside that, after reviewing the situation of formally introducing handling for multidraws to reduce the floods of constants draw calls into 1 per batch, seems to not pay the overhead when the multidraw capacity is less or equal to 1, aside that, for the time being batching multidraws will introduce indirections on each batch of command draws, that graphical issues will appear and reducing performance can happen, something it was gonna solve. For the time being it's discarded, but, may be analyzed the chance to introduce it properly in a later date.

-> Removal VK_EXT_indexing_descriptor: Currently the implementation of this feature was partial, with not proper handling on layouts; just the initial checks on device creation and chained up to the pNext feature, currently this extension will require a buffer cache and texture cache rework to set layouts and reduce the amount of use of descriptor into making it a less expensive cost effective, aside that to generate a path for the Bindless Texture and Bindless Buffer, allowing to track state of textures in runtime and ensuring the state of some compiled shaders doesn't change if it's no needed, among other benefits, besides that, enabling this feature was only generating innecessary checks on GPU, so consumption would be higher than it should be.

-> Removal of VK_EXT_swapchain_maintenance1: The use of this feature was really conditional to certain support on newer drivers and cards, which wasn't available for all platforms, I concluded that if the support for this instance wasn't really there, the cost effective between the try to initialize it and running it, won't be good as when it didn't exist on our Vulkan device, with also the constant factor of not being completely implemented, right now I'm aiming to reduce the complexity on Vulkan side to keep it as simple as it could for a future video_core rework, which may start somewhere these weeks.

-> Refined the Maintenance features: Meawhile this features are usually inherent to Vulkan core functionality, sometimes drivers doesn't expose them well, which leads to Eden run Vulkan without really noticing the existence of maintenance features on driver to improve stability, so we're tied to declare them and load them when a device creation starts by asking if driver supports and which, currently 1 - 5 are core maintenance features, meanwhile the 7 - 9 are more experimental and not being available everywhere, so right now to help drivers give attention to this features we not only load them, but also calculate with features bits which features inside Maintenance5 are available to use, that was the initial purpose, but we weren't using the full potential of the extension; I made cleaned part of the unneeded log code for the initialization of this Maintenance5 and it's feature flags, but also making an operation to sanitize depth/ stencil when One is not available in swizzle operations, making it easier to draw it; it's also needed to mention that Maintenance9 was removed from source code until we can have better handling on Arrays2D, aside that, the use of the extension was really conditional to certain drivers being capable of use it, so I remove it.

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3839
Co-authored-by: CamilleLaVey <camillelavey99@gmail.com>
Co-committed-by: CamilleLaVey <camillelavey99@gmail.com>
2026-04-08 23:46:50 +02:00
..
buffer_cache [vk] use static_vector instead of small_vector for TFB and other bindings (#3641) 2026-03-06 15:05:05 +01:00
control [video_core/engines] implement stub NV01 timer, inline other channel engines (#3640) 2026-03-06 15:05:39 +01:00
engines [video_core] Fix Maxwell3D register processing to always mark dirty flags (#3712) 2026-03-17 19:53:28 +01:00
gpu_logging [common/logging] Simplify logging logic and fix issues when logging before system is created (#3688) 2026-03-12 18:29:15 +01:00
host1x [common/logging] Simplify logging logic and fix issues when logging before system is created (#3688) 2026-03-12 18:29:15 +01:00
host_shaders [video_core/host_shaders] unroll lanczos loop for slightly better perf (#3754) 2026-04-06 19:14:13 +02:00
query_cache [common/logging] Simplify logging logic and fix issues when logging before system is created (#3688) 2026-03-12 18:29:15 +01:00
renderer_null nvnflinger/gpu: implement applet capture 2024-02-09 09:20:53 -05:00
renderer_opengl [common/logging] Simplify logging logic and fix issues when logging before system is created (#3688) 2026-03-12 18:29:15 +01:00
renderer_vulkan [vulkan] 1st Vulkan Global Maintenance (#3839) 2026-04-08 23:46:50 +02:00
texture_cache [texture_cache] Skip alias synchronization in texture cache when the image has no aliases. (#3740) 2026-04-02 06:06:16 +02:00
textures [fixup] Revert "[video_core] remove decoders.cpp template<A,B> spam (16 copies of the same function) (#3263)" (#3333) 2026-01-18 05:42:05 +01:00
vulkan_common [vulkan] 1st Vulkan Global Maintenance (#3839) 2026-04-08 23:46:50 +02:00
cache_types.h
capture.h nvnflinger/gpu: implement applet capture 2024-02-09 09:20:53 -05:00
cdma_pusher.cpp [common] use libc++ provided jthread instead of in-house one (which deadlocks on FBSD 14) (#351) 2025-10-01 06:59:35 +02:00
cdma_pusher.h Port changes from Early Access 2025-04-04 03:40:46 +02:00
CMakeLists.txt [cmake] fixes for XCode when having languages other than C/C++ (#3772) 2026-03-26 04:46:43 +01:00
compatible_formats.cpp renderer_vulkan: Fix some missing view formats 2023-07-01 16:03:35 +03:00
compatible_formats.h
delayed_destruction_ring.h [VK] Rework SPIRV Shader Optimization (#238) 2025-07-03 01:13:33 +00:00
dirty_flags.cpp
dirty_flags.h [scheduler, dma, maxwell] Reduce CPU stalls in the GPU command processing pipeline through multiple targeted optimizations (#3296) 2026-01-18 03:45:18 +01:00
dma_pusher.cpp [scheduler, dma, maxwell] Reduce CPU stalls in the GPU command processing pipeline through multiple targeted optimizations (#3296) 2026-01-18 03:45:18 +01:00
dma_pusher.h [video_core] Improve DMA logic and add an option to sync memory operations (#276) 2025-08-20 00:21:25 +02:00
fence_manager.h [video_core] Fix SignalFence and restore OpenGL rendering (#3224) 2025-12-31 01:17:24 +01:00
framebuffer_config.cpp video_core: simplify accelerated surface fetch and crop handling between APIs 2024-01-31 11:27:20 -05:00
framebuffer_config.h nvnflinger/gpu: implement blending 2024-02-09 09:20:53 -05:00
fsr.cpp [common] replace Common::BitCast with libc++ provided one (#2774) 2025-10-22 02:56:28 +02:00
fsr.h [common] replace Common::BitCast with libc++ provided one (#2774) 2025-10-22 02:56:28 +02:00
gpu.cpp [*] 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
gpu.h [vk, opengl] defer checks to topmost call (avoid unnecessary call) (#40) 2025-07-13 03:40:48 +02:00
gpu_thread.cpp [video_core] Rework GPU Accuracy levels and remove Early Release Fences toggle (#3129) 2025-12-09 18:11:05 +01:00
gpu_thread.h [texture_cache, buffer_cache] Added TLS handling + changed command queue for GPU threading. (#3579) 2026-02-20 00:52:07 +01:00
guest_memory.h Core: Clang format and other small issues. 2024-01-18 21:12:30 -05:00
invalidation_accumulator.h
macro.cpp [common/logging] Simplify logging logic and fix issues when logging before system is created (#3688) 2026-03-12 18:29:15 +01:00
macro.h [video_core/engines] Macro HLE inline (#3653) 2026-03-06 15:04:38 +01:00
memory_manager.cpp [common/logging] Simplify logging logic and fix issues when logging before system is created (#3688) 2026-03-12 18:29:15 +01:00
memory_manager.h [meta] fix license headers (#2547) 2025-09-21 21:58:59 +02:00
present.h gpu: dependency-inject scaling/antialiasing filter state for capture layers 2024-02-09 09:20:53 -05:00
pte_kind.h
query_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
rasterizer_download_area.h Rework time service to fix time passing offline. 2024-01-24 04:26:55 +00:00
rasterizer_interface.h [Rasterizer]: Implement "Skip CPU Inner Invalidation" hack 2025-07-09 04:23:22 +02:00
renderer_base.cpp [common/logging] Simplify logging logic and fix issues when logging before system is created (#3688) 2026-03-12 18:29:15 +01:00
renderer_base.h nvnflinger/gpu: implement applet capture 2024-02-09 09:20:53 -05:00
shader_cache.cpp [compat] Debian stable gcc12/clang14 compilation fixes (#2763) 2025-10-18 01:54:43 +02:00
shader_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
shader_environment.cpp [common/logging] Simplify logging logic and fix issues when logging before system is created (#3688) 2026-03-12 18:29:15 +01:00
shader_environment.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
shader_notify.cpp
shader_notify.h
smaa_area_tex.h
smaa_search_tex.h
surface.cpp [vk] Exclude size equal alpha different copies from incompatible copy (#138) 2025-07-27 19:56:22 +02:00
surface.h [common/logging] Simplify logging logic and fix issues when logging before system is created (#3688) 2026-03-12 18:29:15 +01:00
transform_feedback.cpp [common] remove ranges polyfill (#2546) 2025-09-24 19:29:48 +02:00
transform_feedback.h Remove memory allocations in some hot paths 2023-06-22 08:05:10 +01:00
video_core.cpp [common/logging] Simplify logging logic and fix issues when logging before system is created (#3688) 2026-03-12 18:29:15 +01:00
video_core.h