mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-20 08:15:46 +00:00
fix-0-fps-normal-android
This commit is contained in:
parent
d42d379733
commit
f4d2560e1e
1 changed files with 19 additions and 0 deletions
|
@ -73,15 +73,27 @@ public:
|
||||||
|
|
||||||
void SignalFence(std::function<void()>&& func) {
|
void SignalFence(std::function<void()>&& func) {
|
||||||
bool delay_fence = Settings::IsGPULevelHigh();
|
bool delay_fence = Settings::IsGPULevelHigh();
|
||||||
|
#ifdef __ANDROID__
|
||||||
|
if (!delay_fence) {
|
||||||
|
TryReleasePendingFences<false>();
|
||||||
|
}
|
||||||
|
#else
|
||||||
if constexpr (!can_async_check) {
|
if constexpr (!can_async_check) {
|
||||||
TryReleasePendingFences<false>();
|
TryReleasePendingFences<false>();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
const bool should_flush = ShouldFlush();
|
const bool should_flush = ShouldFlush();
|
||||||
CommitAsyncFlushes();
|
CommitAsyncFlushes();
|
||||||
TFence new_fence = CreateFence(!should_flush);
|
TFence new_fence = CreateFence(!should_flush);
|
||||||
|
#ifdef __ANDROID__
|
||||||
|
if (delay_fence) {
|
||||||
|
guard.lock();
|
||||||
|
}
|
||||||
|
#else
|
||||||
if constexpr (can_async_check) {
|
if constexpr (can_async_check) {
|
||||||
guard.lock();
|
guard.lock();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
if (delay_fence) {
|
if (delay_fence) {
|
||||||
uncommitted_operations.emplace_back(std::move(func));
|
uncommitted_operations.emplace_back(std::move(func));
|
||||||
}
|
}
|
||||||
|
@ -94,10 +106,17 @@ public:
|
||||||
if (should_flush) {
|
if (should_flush) {
|
||||||
rasterizer.FlushCommands();
|
rasterizer.FlushCommands();
|
||||||
}
|
}
|
||||||
|
#ifdef __ANDROID__
|
||||||
|
if (delay_fence) {
|
||||||
|
guard.unlock();
|
||||||
|
cv.notify_all();
|
||||||
|
}
|
||||||
|
#else
|
||||||
if constexpr (can_async_check) {
|
if constexpr (can_async_check) {
|
||||||
guard.unlock();
|
guard.unlock();
|
||||||
cv.notify_all();
|
cv.notify_all();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
rasterizer.InvalidateGPUCache();
|
rasterizer.InvalidateGPUCache();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue