diff options
author | Liam <byteslice@airmail.cc> | 2023-10-21 22:47:43 +0200 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2023-10-22 02:03:41 +0200 |
commit | 8c59543ee32c8bff575bab7ec1e70f76f8eda437 (patch) | |
tree | afeee77ba66daf7ec6bff18515c8fbf1bb8468e0 /src/core/hle/service/nvnflinger/nvnflinger.cpp | |
parent | Merge pull request #11831 from liamwhite/hosversionbetween (diff) | |
download | yuzu-8c59543ee32c8bff575bab7ec1e70f76f8eda437.tar yuzu-8c59543ee32c8bff575bab7ec1e70f76f8eda437.tar.gz yuzu-8c59543ee32c8bff575bab7ec1e70f76f8eda437.tar.bz2 yuzu-8c59543ee32c8bff575bab7ec1e70f76f8eda437.tar.lz yuzu-8c59543ee32c8bff575bab7ec1e70f76f8eda437.tar.xz yuzu-8c59543ee32c8bff575bab7ec1e70f76f8eda437.tar.zst yuzu-8c59543ee32c8bff575bab7ec1e70f76f8eda437.zip |
Diffstat (limited to 'src/core/hle/service/nvnflinger/nvnflinger.cpp')
-rw-r--r-- | src/core/hle/service/nvnflinger/nvnflinger.cpp | 15 |
1 files changed, 2 insertions, 13 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_ "ScreenComposition", [this](std::uintptr_t, s64 time, std::chrono::nanoseconds ns_late) -> std::optional<std::chrono::nanoseconds> { - { const auto lock_guard = Lock(); } vsync_signal.Set(); return std::chrono::nanoseconds(GetNextTicks()); }); @@ -99,6 +98,7 @@ Nvnflinger::~Nvnflinger() { } ShutdownLayers(); + vsync_thread = {}; if (nvdrv) { nvdrv->Close(disp_fd); @@ -106,6 +106,7 @@ Nvnflinger::~Nvnflinger() { } void Nvnflinger::ShutdownLayers() { + const auto lock_guard = Lock(); for (auto& display : displays) { for (size_t layer = 0; layer < display.GetNumLayers(); ++layer) { display.GetLayer(layer).Core().NotifyShutdown(); @@ -229,16 +230,6 @@ VI::Layer* Nvnflinger::FindLayer(u64 display_id, u64 layer_id) { return display->FindLayer(layer_id); } -const VI::Layer* Nvnflinger::FindLayer(u64 display_id, u64 layer_id) const { - const auto* const display = FindDisplay(display_id); - - if (display == nullptr) { - return nullptr; - } - - return display->FindLayer(layer_id); -} - VI::Layer* Nvnflinger::FindOrCreateLayer(u64 display_id, u64 layer_id) { auto* const display = FindDisplay(display_id); @@ -288,7 +279,6 @@ void Nvnflinger::Compose() { auto nvdisp = nvdrv->GetDevice<Nvidia::Devices::nvdisp_disp0>(disp_fd); ASSERT(nvdisp); - guard->unlock(); Common::Rectangle<int> crop_rect{ static_cast<int>(buffer.crop.Left()), static_cast<int>(buffer.crop.Top()), static_cast<int>(buffer.crop.Right()), static_cast<int>(buffer.crop.Bottom())}; @@ -299,7 +289,6 @@ void Nvnflinger::Compose() { buffer.fence.fences, buffer.fence.num_fences); MicroProfileFlip(); - guard->lock(); swap_interval = buffer.swap_interval; |