diff options
| author | 2022-10-23 05:45:45 -0400 | |
|---|---|---|
| committer | 2022-10-23 05:45:45 -0400 | |
| commit | 2d90a927c9f7652aa7e259ba57fa22ddbf8bed24 (patch) | |
| tree | 031c7e8278dfea30bbbecd8a971ee4c2fc31feee /src/core/hle/service/nvflinger | |
| parent | Merge pull request #9095 from FernandoS27/meat-good-vegetable-bad (diff) | |
| download | yuzu-2d90a927c9f7652aa7e259ba57fa22ddbf8bed24.tar.gz yuzu-2d90a927c9f7652aa7e259ba57fa22ddbf8bed24.tar.xz yuzu-2d90a927c9f7652aa7e259ba57fa22ddbf8bed24.zip | |
core: barrier service thread shutdown
Diffstat (limited to 'src/core/hle/service/nvflinger')
| -rw-r--r-- | src/core/hle/service/nvflinger/nvflinger.cpp | 12 | ||||
| -rw-r--r-- | src/core/hle/service/nvflinger/nvflinger.h | 2 |
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() { | |||
| 102 | system.CoreTiming().UnscheduleEvent(single_composition_event, {}); | 102 | system.CoreTiming().UnscheduleEvent(single_composition_event, {}); |
| 103 | } | 103 | } |
| 104 | 104 | ||
| 105 | ShutdownLayers(); | ||
| 106 | |||
| 107 | if (nvdrv) { | ||
| 108 | nvdrv->Close(disp_fd); | ||
| 109 | } | ||
| 110 | } | ||
| 111 | |||
| 112 | void NVFlinger::ShutdownLayers() { | ||
| 105 | for (auto& display : displays) { | 113 | for (auto& display : displays) { |
| 106 | for (size_t layer = 0; layer < display.GetNumLayers(); ++layer) { | 114 | for (size_t layer = 0; layer < display.GetNumLayers(); ++layer) { |
| 107 | display.GetLayer(layer).Core().NotifyShutdown(); | 115 | display.GetLayer(layer).Core().NotifyShutdown(); |
| 108 | } | 116 | } |
| 109 | } | 117 | } |
| 110 | |||
| 111 | if (nvdrv) { | ||
| 112 | nvdrv->Close(disp_fd); | ||
| 113 | } | ||
| 114 | } | 118 | } |
| 115 | 119 | ||
| 116 | void NVFlinger::SetNVDrvInstance(std::shared_ptr<Nvidia::Module> instance) { | 120 | 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: | |||
| 48 | explicit NVFlinger(Core::System& system_, HosBinderDriverServer& hos_binder_driver_server_); | 48 | explicit NVFlinger(Core::System& system_, HosBinderDriverServer& hos_binder_driver_server_); |
| 49 | ~NVFlinger(); | 49 | ~NVFlinger(); |
| 50 | 50 | ||
| 51 | void ShutdownLayers(); | ||
| 52 | |||
| 51 | /// Sets the NVDrv module instance to use to send buffers to the GPU. | 53 | /// Sets the NVDrv module instance to use to send buffers to the GPU. |
| 52 | void SetNVDrvInstance(std::shared_ptr<Nvidia::Module> instance); | 54 | void SetNVDrvInstance(std::shared_ptr<Nvidia::Module> instance); |
| 53 | 55 | ||