[fence_manager] fence-only non-stubbed forced delay (up to 70% less delays than gpu>fast)

This commit is contained in:
xbzk 2026-04-14 13:23:55 -03:00
parent af9a5af3c0
commit 4d2df72067
9 changed files with 54 additions and 33 deletions

View file

@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project
@ -71,14 +71,15 @@ public:
uncommitted_operations.emplace_back(std::move(func));
}
void SignalFence(std::function<void()>&& func) {
void SignalFence(std::function<void()>&& func, bool force_delay = false) {
if constexpr (!can_async_check) {
TryReleasePendingFences<false>();
}
const bool should_flush = ShouldFlush();
const bool delay_fence = Settings::IsGPULevelHigh() || (Settings::IsGPULevelMedium() && should_flush);
const bool delay_fence = force_delay || Settings::IsGPULevelHigh() ||
(Settings::IsGPULevelMedium() && should_flush);
CommitAsyncFlushes();
TFence new_fence = CreateFence(!should_flush);
TFence new_fence = CreateFence(!should_flush && !force_delay);
if constexpr (can_async_check) {
guard.lock();
}