diff options
| author | MaranBr <maranbr@outlook.com> | 2025-12-09 18:11:05 +0100 |
|---|---|---|
| committer | crueter <crueter@eden-emu.dev> | 2025-12-09 18:11:05 +0100 |
| commit | 9da38715fe3e84794e8f583d7706b72d13dfe2ce (patch) | |
| tree | 970987cfd0e487b73e997fd8212fd69b848df4ca /src/video_core/fence_manager.h | |
| parent | 7157d5167ec1c3517169635011c82fe6f5b49460 (diff) | |
[video_core] Rework GPU Accuracy levels and remove Early Release Fences toggle (#3129)
The GPU Accuracy level is now divided into Performance, Balanced and Accurate.
1. Performance prioritizes speed at all costs. It's faster, but it can be unstable and may have some bugs (which is expected).
2. Balanced maintains excellent performance and is safer against bugs and shader corruption.
3. Accurate is the most precise and the most expensive in terms of hardware. Only a few games still need this level to work properly.
The Release Early Fences toggle has also been removed by @PavelBARABANOV, as it's not needed anymore.
Co-authored-by: PavelBARABANOV <pavelbarabanov94@gmail.com>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3129
Reviewed-by: Caio Oliveira <caiooliveirafarias0@gmail.com>
Reviewed-by: Maufeat <sahyno1996@gmail.com>
Co-authored-by: MaranBr <maranbr@outlook.com>
Co-committed-by: MaranBr <maranbr@outlook.com>
Diffstat (limited to 'src/video_core/fence_manager.h')
| -rw-r--r-- | src/video_core/fence_manager.h | 65 |
1 files changed, 16 insertions, 49 deletions
diff --git a/src/video_core/fence_manager.h b/src/video_core/fence_manager.h index b77235f438..61e4da9609 100644 --- a/src/video_core/fence_manager.h +++ b/src/video_core/fence_manager.h @@ -72,66 +72,33 @@ public: } void SignalFence(std::function<void()>&& func) { - const bool delay_fence = Settings::IsGPULevelHigh(); - - #ifdef __ANDROID__ - const bool use_optimized = Settings::values.early_release_fences.GetValue(); - #else - constexpr bool use_optimized = false; - #endif - + if constexpr (!can_async_check) { + TryReleasePendingFences<false>(); + } const bool should_flush = ShouldFlush(); CommitAsyncFlushes(); TFence new_fence = CreateFence(!should_flush); - - if (use_optimized) { - if (!delay_fence) { - TryReleasePendingFences<false>(); - } - - if (delay_fence) { - guard.lock(); - uncommitted_operations.emplace_back(std::move(func)); - } - } else { - if constexpr (!can_async_check) { - TryReleasePendingFences<false>(); - } - - if constexpr (can_async_check) { - guard.lock(); - } - - if (delay_fence) { - uncommitted_operations.emplace_back(std::move(func)); - } + if constexpr (can_async_check) { + guard.lock(); } - - pending_operations.emplace_back(std::move(uncommitted_operations)); - QueueFence(new_fence); - - if (!delay_fence) { + if (Settings::IsGPULevelLow() || (Settings::IsGPULevelMedium() && !should_flush)) { func(); + } else { + uncommitted_operations.emplace_back(std::move(func)); } - + if (!uncommitted_operations.empty()) { + pending_operations.emplace_back(std::move(uncommitted_operations)); + uncommitted_operations.clear(); + } + QueueFence(new_fence); fences.push(std::move(new_fence)); - if (should_flush) { rasterizer.FlushCommands(); } - - if (use_optimized) { - if (delay_fence) { - guard.unlock(); - cv.notify_all(); - } - } else { - if constexpr (can_async_check) { - guard.unlock(); - cv.notify_all(); - } + if constexpr (can_async_check) { + guard.unlock(); + cv.notify_all(); } - rasterizer.InvalidateGPUCache(); } |
