summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/nvflinger/buffer_queue_producer.cpp
diff options
context:
space:
mode:
authorLiam <byteslice@airmail.cc>2022-10-27 03:35:19 +0200
committerLiam <byteslice@airmail.cc>2022-10-27 14:28:02 +0200
commit2cdfbbc07d74548527fbefd738f860ce66f52e34 (patch)
treed80f66ca3c2f53d46bb4cc20c9fa29d377da14eb /src/core/hle/service/nvflinger/buffer_queue_producer.cpp
parentvi: implement CloseDisplay (diff)
downloadyuzu-2cdfbbc07d74548527fbefd738f860ce66f52e34.tar
yuzu-2cdfbbc07d74548527fbefd738f860ce66f52e34.tar.gz
yuzu-2cdfbbc07d74548527fbefd738f860ce66f52e34.tar.bz2
yuzu-2cdfbbc07d74548527fbefd738f860ce66f52e34.tar.lz
yuzu-2cdfbbc07d74548527fbefd738f860ce66f52e34.tar.xz
yuzu-2cdfbbc07d74548527fbefd738f860ce66f52e34.tar.zst
yuzu-2cdfbbc07d74548527fbefd738f860ce66f52e34.zip
Diffstat (limited to 'src/core/hle/service/nvflinger/buffer_queue_producer.cpp')
-rw-r--r--src/core/hle/service/nvflinger/buffer_queue_producer.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/core/hle/service/nvflinger/buffer_queue_producer.cpp b/src/core/hle/service/nvflinger/buffer_queue_producer.cpp
index 77ddbb6ef..41ba44b21 100644
--- a/src/core/hle/service/nvflinger/buffer_queue_producer.cpp
+++ b/src/core/hle/service/nvflinger/buffer_queue_producer.cpp
@@ -742,6 +742,13 @@ Status BufferQueueProducer::Disconnect(NativeWindowApi api) {
return Status::NoError;
}
+ // HACK: We are not Android. Remove handle for items in queue, and clear queue.
+ // Allows synchronous destruction of nvmap handles.
+ for (auto& item : core->queue) {
+ nvmap.FreeHandle(item.graphic_buffer->BufferId(), true);
+ }
+ core->queue.clear();
+
switch (api) {
case NativeWindowApi::Egl:
case NativeWindowApi::Cpu: