diff options
| author | 2023-10-21 16:47:43 -0400 | |
|---|---|---|
| committer | 2023-10-21 20:03:41 -0400 | |
| commit | 8c59543ee32c8bff575bab7ec1e70f76f8eda437 (patch) | |
| tree | afeee77ba66daf7ec6bff18515c8fbf1bb8468e0 /src/core/hle/service/nvnflinger | |
| parent | Merge pull request #11831 from liamwhite/hosversionbetween (diff) | |
| download | yuzu-8c59543ee32c8bff575bab7ec1e70f76f8eda437.tar.gz yuzu-8c59543ee32c8bff575bab7ec1e70f76f8eda437.tar.xz yuzu-8c59543ee32c8bff575bab7ec1e70f76f8eda437.zip | |
kernel: update KProcess
Diffstat (limited to 'src/core/hle/service/nvnflinger')
| -rw-r--r-- | src/core/hle/service/nvnflinger/nvnflinger.cpp | 15 | ||||
| -rw-r--r-- | src/core/hle/service/nvnflinger/nvnflinger.h | 3 |
2 files changed, 2 insertions, 16 deletions
diff --git a/src/core/hle/service/nvnflinger/nvnflinger.cpp b/src/core/hle/service/nvnflinger/nvnflinger.cpp index a07c621d9..bebb45eae 100644 --- a/src/core/hle/service/nvnflinger/nvnflinger.cpp +++ b/src/core/hle/service/nvnflinger/nvnflinger.cpp | |||
| @@ -66,7 +66,6 @@ Nvnflinger::Nvnflinger(Core::System& system_, HosBinderDriverServer& hos_binder_ | |||
| 66 | "ScreenComposition", | 66 | "ScreenComposition", |
| 67 | [this](std::uintptr_t, s64 time, | 67 | [this](std::uintptr_t, s64 time, |
| 68 | std::chrono::nanoseconds ns_late) -> std::optional<std::chrono::nanoseconds> { | 68 | std::chrono::nanoseconds ns_late) -> std::optional<std::chrono::nanoseconds> { |
| 69 | { const auto lock_guard = Lock(); } | ||
| 70 | vsync_signal.Set(); | 69 | vsync_signal.Set(); |
| 71 | return std::chrono::nanoseconds(GetNextTicks()); | 70 | return std::chrono::nanoseconds(GetNextTicks()); |
| 72 | }); | 71 | }); |
| @@ -99,6 +98,7 @@ Nvnflinger::~Nvnflinger() { | |||
| 99 | } | 98 | } |
| 100 | 99 | ||
| 101 | ShutdownLayers(); | 100 | ShutdownLayers(); |
| 101 | vsync_thread = {}; | ||
| 102 | 102 | ||
| 103 | if (nvdrv) { | 103 | if (nvdrv) { |
| 104 | nvdrv->Close(disp_fd); | 104 | nvdrv->Close(disp_fd); |
| @@ -106,6 +106,7 @@ Nvnflinger::~Nvnflinger() { | |||
| 106 | } | 106 | } |
| 107 | 107 | ||
| 108 | void Nvnflinger::ShutdownLayers() { | 108 | void Nvnflinger::ShutdownLayers() { |
| 109 | const auto lock_guard = Lock(); | ||
| 109 | for (auto& display : displays) { | 110 | for (auto& display : displays) { |
| 110 | for (size_t layer = 0; layer < display.GetNumLayers(); ++layer) { | 111 | for (size_t layer = 0; layer < display.GetNumLayers(); ++layer) { |
| 111 | display.GetLayer(layer).Core().NotifyShutdown(); | 112 | display.GetLayer(layer).Core().NotifyShutdown(); |
| @@ -229,16 +230,6 @@ VI::Layer* Nvnflinger::FindLayer(u64 display_id, u64 layer_id) { | |||
| 229 | return display->FindLayer(layer_id); | 230 | return display->FindLayer(layer_id); |
| 230 | } | 231 | } |
| 231 | 232 | ||
| 232 | const VI::Layer* Nvnflinger::FindLayer(u64 display_id, u64 layer_id) const { | ||
| 233 | const auto* const display = FindDisplay(display_id); | ||
| 234 | |||
| 235 | if (display == nullptr) { | ||
| 236 | return nullptr; | ||
| 237 | } | ||
| 238 | |||
| 239 | return display->FindLayer(layer_id); | ||
| 240 | } | ||
| 241 | |||
| 242 | VI::Layer* Nvnflinger::FindOrCreateLayer(u64 display_id, u64 layer_id) { | 233 | VI::Layer* Nvnflinger::FindOrCreateLayer(u64 display_id, u64 layer_id) { |
| 243 | auto* const display = FindDisplay(display_id); | 234 | auto* const display = FindDisplay(display_id); |
| 244 | 235 | ||
| @@ -288,7 +279,6 @@ void Nvnflinger::Compose() { | |||
| 288 | auto nvdisp = nvdrv->GetDevice<Nvidia::Devices::nvdisp_disp0>(disp_fd); | 279 | auto nvdisp = nvdrv->GetDevice<Nvidia::Devices::nvdisp_disp0>(disp_fd); |
| 289 | ASSERT(nvdisp); | 280 | ASSERT(nvdisp); |
| 290 | 281 | ||
| 291 | guard->unlock(); | ||
| 292 | Common::Rectangle<int> crop_rect{ | 282 | Common::Rectangle<int> crop_rect{ |
| 293 | static_cast<int>(buffer.crop.Left()), static_cast<int>(buffer.crop.Top()), | 283 | static_cast<int>(buffer.crop.Left()), static_cast<int>(buffer.crop.Top()), |
| 294 | static_cast<int>(buffer.crop.Right()), static_cast<int>(buffer.crop.Bottom())}; | 284 | static_cast<int>(buffer.crop.Right()), static_cast<int>(buffer.crop.Bottom())}; |
| @@ -299,7 +289,6 @@ void Nvnflinger::Compose() { | |||
| 299 | buffer.fence.fences, buffer.fence.num_fences); | 289 | buffer.fence.fences, buffer.fence.num_fences); |
| 300 | 290 | ||
| 301 | MicroProfileFlip(); | 291 | MicroProfileFlip(); |
| 302 | guard->lock(); | ||
| 303 | 292 | ||
| 304 | swap_interval = buffer.swap_interval; | 293 | swap_interval = buffer.swap_interval; |
| 305 | 294 | ||
diff --git a/src/core/hle/service/nvnflinger/nvnflinger.h b/src/core/hle/service/nvnflinger/nvnflinger.h index 14c783582..959d8b46b 100644 --- a/src/core/hle/service/nvnflinger/nvnflinger.h +++ b/src/core/hle/service/nvnflinger/nvnflinger.h | |||
| @@ -117,9 +117,6 @@ private: | |||
| 117 | /// Finds the layer identified by the specified ID in the desired display. | 117 | /// Finds the layer identified by the specified ID in the desired display. |
| 118 | [[nodiscard]] VI::Layer* FindLayer(u64 display_id, u64 layer_id); | 118 | [[nodiscard]] VI::Layer* FindLayer(u64 display_id, u64 layer_id); |
| 119 | 119 | ||
| 120 | /// Finds the layer identified by the specified ID in the desired display. | ||
| 121 | [[nodiscard]] const VI::Layer* FindLayer(u64 display_id, u64 layer_id) const; | ||
| 122 | |||
| 123 | /// Finds the layer identified by the specified ID in the desired display, | 120 | /// Finds the layer identified by the specified ID in the desired display, |
| 124 | /// or creates the layer if it is not found. | 121 | /// or creates the layer if it is not found. |
| 125 | /// To be used when the system expects the specified ID to already exist. | 122 | /// To be used when the system expects the specified ID to already exist. |