summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/nvflinger
diff options
context:
space:
mode:
authorliamwhite <liamwhite@users.noreply.github.com>2022-10-25 12:45:51 +0200
committerGitHub <noreply@github.com>2022-10-25 12:45:51 +0200
commit3c38bd7cf0dbe73f72c008cb6fc0df38b50dc986 (patch)
tree94deaac51d8ca9abd7c9b3f4bce3a420c6ab8ac8 /src/core/hle/service/nvflinger
parentMerge pull request #8873 from vonchenplus/fix_legacy_location_error (diff)
parentcore: barrier service thread shutdown (diff)
downloadyuzu-3c38bd7cf0dbe73f72c008cb6fc0df38b50dc986.tar
yuzu-3c38bd7cf0dbe73f72c008cb6fc0df38b50dc986.tar.gz
yuzu-3c38bd7cf0dbe73f72c008cb6fc0df38b50dc986.tar.bz2
yuzu-3c38bd7cf0dbe73f72c008cb6fc0df38b50dc986.tar.lz
yuzu-3c38bd7cf0dbe73f72c008cb6fc0df38b50dc986.tar.xz
yuzu-3c38bd7cf0dbe73f72c008cb6fc0df38b50dc986.tar.zst
yuzu-3c38bd7cf0dbe73f72c008cb6fc0df38b50dc986.zip
Diffstat (limited to 'src/core/hle/service/nvflinger')
-rw-r--r--src/core/hle/service/nvflinger/nvflinger.cpp12
-rw-r--r--src/core/hle/service/nvflinger/nvflinger.h2
2 files changed, 10 insertions, 4 deletions
diff --git a/src/core/hle/service/nvflinger/nvflinger.cpp b/src/core/hle/service/nvflinger/nvflinger.cpp
index aa14d2cbc..dad93b38e 100644
--- a/src/core/hle/service/nvflinger/nvflinger.cpp
+++ b/src/core/hle/service/nvflinger/nvflinger.cpp
@@ -102,15 +102,19 @@ NVFlinger::~NVFlinger() {
system.CoreTiming().UnscheduleEvent(single_composition_event, {});
}
+ ShutdownLayers();
+
+ if (nvdrv) {
+ nvdrv->Close(disp_fd);
+ }
+}
+
+void NVFlinger::ShutdownLayers() {
for (auto& display : displays) {
for (size_t layer = 0; layer < display.GetNumLayers(); ++layer) {
display.GetLayer(layer).Core().NotifyShutdown();
}
}
-
- if (nvdrv) {
- nvdrv->Close(disp_fd);
- }
}
void NVFlinger::SetNVDrvInstance(std::shared_ptr<Nvidia::Module> instance) {
diff --git a/src/core/hle/service/nvflinger/nvflinger.h b/src/core/hle/service/nvflinger/nvflinger.h
index 99509bc5b..b8191c595 100644
--- a/src/core/hle/service/nvflinger/nvflinger.h
+++ b/src/core/hle/service/nvflinger/nvflinger.h
@@ -48,6 +48,8 @@ public:
explicit NVFlinger(Core::System& system_, HosBinderDriverServer& hos_binder_driver_server_);
~NVFlinger();
+ void ShutdownLayers();
+
/// Sets the NVDrv module instance to use to send buffers to the GPU.
void SetNVDrvInstance(std::shared_ptr<Nvidia::Module> instance);