aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/fence_manager.h
diff options
context:
space:
mode:
authorMaranBr <maranbr@outlook.com>2025-12-31 01:17:24 +0100
committercrueter <crueter@eden-emu.dev>2025-12-31 01:17:24 +0100
commit2b4d13c205cda607c34fd1b67d9bc7bab4cb6371 (patch)
treeeefe09c9e840ad8314d423c7fdf0e10f2607a4ef /src/video_core/fence_manager.h
parent8ad1d0c31789c9f7d8805ec264c93d89fefb5ed6 (diff)
[video_core] Fix SignalFence and restore OpenGL rendering (#3224)
Fixes OpenGL crashing on launch Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3224 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.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/video_core/fence_manager.h b/src/video_core/fence_manager.h
index 61e4da9609..e4c4329e81 100644
--- a/src/video_core/fence_manager.h
+++ b/src/video_core/fence_manager.h
@@ -76,21 +76,20 @@ public:
TryReleasePendingFences<false>();
}
const bool should_flush = ShouldFlush();
+ const bool delay_fence = Settings::IsGPULevelHigh() || (Settings::IsGPULevelMedium() && should_flush);
CommitAsyncFlushes();
TFence new_fence = CreateFence(!should_flush);
if constexpr (can_async_check) {
guard.lock();
}
- if (Settings::IsGPULevelLow() || (Settings::IsGPULevelMedium() && !should_flush)) {
- func();
- } else {
+ if (delay_fence) {
uncommitted_operations.emplace_back(std::move(func));
}
- if (!uncommitted_operations.empty()) {
- pending_operations.emplace_back(std::move(uncommitted_operations));
- uncommitted_operations.clear();
- }
+ 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();