Clear operations from present queue when framebuffer changes are released.

This commit is contained in:
Dario 2024-09-15 12:05:57 -03:00
parent 5749e90548
commit d884392b71

View File

@ -490,7 +490,7 @@ namespace RT64 {
skipPresent = skipPresent || ext.swapChain->isEmpty();
const Present &present = presents[processCursor];
Present &present = presents[processCursor];
ext.workloadQueue->waitForWorkloadId(present.workloadId);
if (!presentThreadRunning) {
@ -505,12 +505,13 @@ namespace RT64 {
threadPresent(present, swapChainValid);
}
if (!present.paused) {
if (!present.fbOperations.empty()) {
const std::scoped_lock lock(screenFbChangePoolMutex);
screenFbChangePool.release(present.fbOperations.front().writeChanges.id);
present.fbOperations.clear();
}
if (!present.paused) {
threadAdvanceBarrier();
}