diff options
author | Fernando S <fsahmkow27@gmail.com> | 2022-10-06 21:29:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-06 21:29:53 +0200 |
commit | 1effa578f12f79d7816e3543291f302f126cc1d2 (patch) | |
tree | 14803b31b6817294d40d57446f6fa94c5ff3fe9a /src/core/hle/service/nvflinger/buffer_queue_producer.cpp | |
parent | Merge pull request #9025 from FernandoS27/slava-ukrayini (diff) | |
parent | vulkan_blitter: Fix pool allocation double free. (diff) | |
download | yuzu-1effa578f12f79d7816e3543291f302f126cc1d2.tar yuzu-1effa578f12f79d7816e3543291f302f126cc1d2.tar.gz yuzu-1effa578f12f79d7816e3543291f302f126cc1d2.tar.bz2 yuzu-1effa578f12f79d7816e3543291f302f126cc1d2.tar.lz yuzu-1effa578f12f79d7816e3543291f302f126cc1d2.tar.xz yuzu-1effa578f12f79d7816e3543291f302f126cc1d2.tar.zst yuzu-1effa578f12f79d7816e3543291f302f126cc1d2.zip |
Diffstat (limited to 'src/core/hle/service/nvflinger/buffer_queue_producer.cpp')
-rw-r--r-- | src/core/hle/service/nvflinger/buffer_queue_producer.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/core/hle/service/nvflinger/buffer_queue_producer.cpp b/src/core/hle/service/nvflinger/buffer_queue_producer.cpp index 337431488..d4ab23a10 100644 --- a/src/core/hle/service/nvflinger/buffer_queue_producer.cpp +++ b/src/core/hle/service/nvflinger/buffer_queue_producer.cpp @@ -14,7 +14,7 @@ #include "core/hle/kernel/k_writable_event.h" #include "core/hle/kernel/kernel.h" #include "core/hle/service/kernel_helpers.h" -#include "core/hle/service/nvdrv/nvdrv.h" +#include "core/hle/service/nvdrv/core/nvmap.h" #include "core/hle/service/nvflinger/buffer_queue_core.h" #include "core/hle/service/nvflinger/buffer_queue_producer.h" #include "core/hle/service/nvflinger/consumer_listener.h" @@ -26,8 +26,10 @@ namespace Service::android { BufferQueueProducer::BufferQueueProducer(Service::KernelHelpers::ServiceContext& service_context_, - std::shared_ptr<BufferQueueCore> buffer_queue_core_) - : service_context{service_context_}, core{std::move(buffer_queue_core_)}, slots(core->slots) { + std::shared_ptr<BufferQueueCore> buffer_queue_core_, + Service::Nvidia::NvCore::NvMap& nvmap_) + : service_context{service_context_}, core{std::move(buffer_queue_core_)}, slots(core->slots), + nvmap(nvmap_) { buffer_wait_event = service_context.CreateEvent("BufferQueue:WaitEvent"); } @@ -530,6 +532,8 @@ Status BufferQueueProducer::QueueBuffer(s32 slot, const QueueBufferInput& input, item.is_droppable = core->dequeue_buffer_cannot_block || async; item.swap_interval = swap_interval; + nvmap.DuplicateHandle(item.graphic_buffer->BufferId(), true); + sticky_transform = sticky_transform_; if (core->queue.empty()) { |