[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>
This commit is contained in:
MaranBr 2025-12-31 01:17:24 +01:00 • committed by crueter
parent 8ad1d0c317
commit 2b4d13c205
No known key found for this signature in database
GPG key ID: 425ACD2D4830EBC6

View file

@ -76,21 +76,20 @@ public:
TryReleasePendingFences<false>(); TryReleasePendingFences<false>();
} }
const bool should_flush = ShouldFlush(); const bool should_flush = ShouldFlush();
const bool delay_fence = Settings::IsGPULevelHigh() || (Settings::IsGPULevelMedium() && should_flush);
CommitAsyncFlushes(); CommitAsyncFlushes();
TFence new_fence = CreateFence(!should_flush); TFence new_fence = CreateFence(!should_flush);
if constexpr (can_async_check) { if constexpr (can_async_check) {
guard.lock(); guard.lock();
} }
if (Settings::IsGPULevelLow() || (Settings::IsGPULevelMedium() && !should_flush)) { if (delay_fence) {
func();
} else {
uncommitted_operations.emplace_back(std::move(func)); uncommitted_operations.emplace_back(std::move(func));
} }
if (!uncommitted_operations.empty()) { pending_operations.emplace_back(std::move(uncommitted_operations));
pending_operations.emplace_back(std::move(uncommitted_operations));
uncommitted_operations.clear();
}
QueueFence(new_fence); QueueFence(new_fence);
if (!delay_fence) {
func();
}
fences.push(std::move(new_fence)); fences.push(std::move(new_fence));
if (should_flush) { if (should_flush) {
rasterizer.FlushCommands(); rasterizer.FlushCommands();