From 4b3e906c227d1073927c5504ad98bb37ec8a06a8 Mon Sep 17 00:00:00 2001 From: Billy Laws Date: Sun, 6 Nov 2022 19:17:08 +0000 Subject: [PATCH] Update cached buffer execution number when megabuffering --- app/src/main/cpp/skyline/gpu/buffer.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/cpp/skyline/gpu/buffer.cpp b/app/src/main/cpp/skyline/gpu/buffer.cpp index feff2aaf..1d35eaca 100644 --- a/app/src/main/cpp/skyline/gpu/buffer.cpp +++ b/app/src/main/cpp/skyline/gpu/buffer.cpp @@ -340,8 +340,10 @@ namespace skyline::gpu { return {}; // If the active execution has changed all previous allocations are now invalid - if (executionNumber != lastExecutionNumber) [[unlikely]] + if (executionNumber != lastExecutionNumber) [[unlikely]] { ResetMegabufferState(); + lastExecutionNumber = executionNumber; + } // If more than half the buffer has been megabuffered in chunks within the same execution assume this will generally be the case for this buffer and just megabuffer the whole thing without chunking if (unifiedMegaBufferEnabled || megaBufferViewAccumulatedSize > (backing.size() / 2)) {