diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2023-10-29 16:24:44 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-29 16:24:44 +0100 |
commit | b5b93e6741f28f1b276e1ad2899beff9af87afff (patch) | |
tree | 4a761a7fddaa9fabd925d9b1bf956d3530e2d7e4 /src/core/hle/service/nvnflinger/buffer_queue_producer.cpp | |
parent | Merge pull request #11803 from flodavid/improve-controller-applet-click (diff) | |
parent | nvnflinger: fix reporting and freeing of preallocated buffers (diff) | |
download | yuzu-b5b93e6741f28f1b276e1ad2899beff9af87afff.tar yuzu-b5b93e6741f28f1b276e1ad2899beff9af87afff.tar.gz yuzu-b5b93e6741f28f1b276e1ad2899beff9af87afff.tar.bz2 yuzu-b5b93e6741f28f1b276e1ad2899beff9af87afff.tar.lz yuzu-b5b93e6741f28f1b276e1ad2899beff9af87afff.tar.xz yuzu-b5b93e6741f28f1b276e1ad2899beff9af87afff.tar.zst yuzu-b5b93e6741f28f1b276e1ad2899beff9af87afff.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/service/nvnflinger/buffer_queue_producer.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/hle/service/nvnflinger/buffer_queue_producer.cpp b/src/core/hle/service/nvnflinger/buffer_queue_producer.cpp index dc6917d5d..6e7a49658 100644 --- a/src/core/hle/service/nvnflinger/buffer_queue_producer.cpp +++ b/src/core/hle/service/nvnflinger/buffer_queue_producer.cpp @@ -134,7 +134,7 @@ Status BufferQueueProducer::WaitForFreeSlotThenRelock(bool async, s32* found, St const s32 max_buffer_count = core->GetMaxBufferCountLocked(async); if (async && core->override_max_buffer_count) { if (core->override_max_buffer_count < max_buffer_count) { - LOG_ERROR(Service_Nvnflinger, "async mode is invalid with buffer count override"); + *found = BufferQueueCore::INVALID_BUFFER_SLOT; return Status::BadValue; } } @@ -142,7 +142,8 @@ Status BufferQueueProducer::WaitForFreeSlotThenRelock(bool async, s32* found, St // Free up any buffers that are in slots beyond the max buffer count for (s32 s = max_buffer_count; s < BufferQueueDefs::NUM_BUFFER_SLOTS; ++s) { ASSERT(slots[s].buffer_state == BufferState::Free); - if (slots[s].graphic_buffer != nullptr) { + if (slots[s].graphic_buffer != nullptr && slots[s].buffer_state == BufferState::Free && + !slots[s].is_preallocated) { core->FreeBufferLocked(s); *return_flags |= Status::ReleaseAllBuffers; } |