From 2366f81443af9f27879f8ec07438e676c1769bbd Mon Sep 17 00:00:00 2001 From: PixelyIon Date: Thu, 7 Jul 2022 00:54:43 +0530 Subject: [PATCH] Fix `Buffer::PollFence` incorrectly handling null-`FenceCycle` If a `FenceCycle` isn't attached then `PollFence` returned `false` while it should return if the buffer has any concurrent GPU usages in flight, this has now been fixed by returning `true` in those cases. --- app/src/main/cpp/skyline/gpu/buffer.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/main/cpp/skyline/gpu/buffer.cpp b/app/src/main/cpp/skyline/gpu/buffer.cpp index c4cdd064..c478a7d4 100644 --- a/app/src/main/cpp/skyline/gpu/buffer.cpp +++ b/app/src/main/cpp/skyline/gpu/buffer.cpp @@ -130,10 +130,14 @@ namespace skyline::gpu { } bool Buffer::PollFence() { - if (cycle && cycle->Poll()) { + if (!cycle) + return true; + + if (cycle->Poll()) { cycle = nullptr; return true; } + return false; }