Browse Source

fix-0-fps-normal-android

pull/79/head
Pavel Barabanov 8 months ago
committed by crueter
parent
commit
f4d2560e1e
  1. 19
      src/video_core/fence_manager.h

19
src/video_core/fence_manager.h

@ -73,15 +73,27 @@ public:
void SignalFence(std::function<void()>&& func) {
bool delay_fence = Settings::IsGPULevelHigh();
#ifdef __ANDROID__
if (!delay_fence) {
TryReleasePendingFences<false>();
}
#else
if constexpr (!can_async_check) {
TryReleasePendingFences<false>();
}
#endif
const bool should_flush = ShouldFlush();
CommitAsyncFlushes();
TFence new_fence = CreateFence(!should_flush);
#ifdef __ANDROID__
if (delay_fence) {
guard.lock();
}
#else
if constexpr (can_async_check) {
guard.lock();
}
#endif
if (delay_fence) {
uncommitted_operations.emplace_back(std::move(func));
}
@ -94,10 +106,17 @@ public:
if (should_flush) {
rasterizer.FlushCommands();
}
#ifdef __ANDROID__
if (delay_fence) {
guard.unlock();
cv.notify_all();
}
#else
if constexpr (can_async_check) {
guard.unlock();
cv.notify_all();
}
#endif
rasterizer.InvalidateGPUCache();
}

Loading…
Cancel
Save