From d1232ceeb041650c292b234171c5a28a3af4894d Mon Sep 17 00:00:00 2001 From: PavelBARABANOV Date: Thu, 12 Feb 2026 18:15:36 +0300 Subject: [PATCH] tab --- src/video_core/fence_manager.h | 94 +++++++++++++++++----------------- 1 file changed, 47 insertions(+), 47 deletions(-) diff --git a/src/video_core/fence_manager.h b/src/video_core/fence_manager.h index e60276e85c..45abc81cde 100644 --- a/src/video_core/fence_manager.h +++ b/src/video_core/fence_manager.h @@ -71,58 +71,58 @@ public: uncommitted_operations.emplace_back(std::move(func)); } -void SignalFence(std::function&& func) { - #ifdef __ANDROID__ - const bool early_release_fences = Settings::values.early_release_fences.GetValue(); - #else - constexpr bool early_release_fences = false; - #endif - const bool should_flush = ShouldFlush(); - const bool delay_fence = Settings::IsGPULevelHigh() || - (Settings::IsGPULevelMedium() && should_flush); - CommitAsyncFlushes(); - TFence new_fence = CreateFence(!should_flush); - if (early_release_fences) { - if (!delay_fence) { - TryReleasePendingFences(); - } - if (delay_fence) { - guard.lock(); - uncommitted_operations.emplace_back(std::move(func)); - } - } else { - if constexpr (!can_async_check) { - TryReleasePendingFences(); - } - if constexpr (can_async_check) { - guard.lock(); + void SignalFence(std::function&& func) { + #ifdef __ANDROID__ + const bool early_release_fences = Settings::values.early_release_fences.GetValue(); + #else + constexpr bool early_release_fences = false; + #endif + const bool should_flush = ShouldFlush(); + const bool delay_fence = Settings::IsGPULevelHigh() || + (Settings::IsGPULevelMedium() && should_flush); + CommitAsyncFlushes(); + TFence new_fence = CreateFence(!should_flush); + if (early_release_fences) { + if (!delay_fence) { + TryReleasePendingFences(); + } + if (delay_fence) { + guard.lock(); + uncommitted_operations.emplace_back(std::move(func)); + } + } else { + if constexpr (!can_async_check) { + TryReleasePendingFences(); + } + if constexpr (can_async_check) { + guard.lock(); + } + if (delay_fence) { + uncommitted_operations.emplace_back(std::move(func)); + } } - if (delay_fence) { - uncommitted_operations.emplace_back(std::move(func)); + pending_operations.emplace_back(std::move(uncommitted_operations)); + QueueFence(new_fence); + if (!delay_fence) { + func(); } - } - pending_operations.emplace_back(std::move(uncommitted_operations)); - QueueFence(new_fence); - if (!delay_fence) { - func(); - } - fences.push(std::move(new_fence)); - if (should_flush) { - rasterizer.FlushCommands(); - } - if (early_release_fences) { - if (delay_fence) { - guard.unlock(); - cv.notify_all(); + fences.push(std::move(new_fence)); + if (should_flush) { + rasterizer.FlushCommands(); } - } else { - if constexpr (can_async_check) { - guard.unlock(); - cv.notify_all(); + if (early_release_fences) { + if (delay_fence) { + guard.unlock(); + cv.notify_all(); + } + } else { + if constexpr (can_async_check) { + guard.unlock(); + cv.notify_all(); + } } + rasterizer.InvalidateGPUCache(); } - rasterizer.InvalidateGPUCache(); -} void SignalSyncPoint(u32 value) { syncpoint_manager.IncrementGuest(value);