diff options
author | Liam <byteslice@airmail.cc> | 2023-10-20 16:17:16 +0200 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2023-10-20 16:17:32 +0200 |
commit | 689f346e9728bde1944808dc0b1984349e9895cf (patch) | |
tree | bede50029732fb14417da2c6456555375b2653f3 /src/core/hle/service/nvnflinger/buffer_queue_producer.cpp | |
parent | Merge pull request #11822 from german77/no-name (diff) | |
download | yuzu-689f346e9728bde1944808dc0b1984349e9895cf.tar yuzu-689f346e9728bde1944808dc0b1984349e9895cf.tar.gz yuzu-689f346e9728bde1944808dc0b1984349e9895cf.tar.bz2 yuzu-689f346e9728bde1944808dc0b1984349e9895cf.tar.lz yuzu-689f346e9728bde1944808dc0b1984349e9895cf.tar.xz yuzu-689f346e9728bde1944808dc0b1984349e9895cf.tar.zst yuzu-689f346e9728bde1944808dc0b1984349e9895cf.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; } |