summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/vi
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2020-02-27 15:47:02 +0100
committerFernando Sahmkow <fsahmkow27@gmail.com>2020-06-27 17:35:18 +0200
commitcc3aa959265480e1990b10ee37ebf1c0ade3da64 (patch)
tree0188b3adeab5cb83362f296e6894d70b53cb86e0 /src/core/hle/service/vi
parentSVC: Add locks to the memory management. (diff)
downloadyuzu-cc3aa959265480e1990b10ee37ebf1c0ade3da64.tar
yuzu-cc3aa959265480e1990b10ee37ebf1c0ade3da64.tar.gz
yuzu-cc3aa959265480e1990b10ee37ebf1c0ade3da64.tar.bz2
yuzu-cc3aa959265480e1990b10ee37ebf1c0ade3da64.tar.lz
yuzu-cc3aa959265480e1990b10ee37ebf1c0ade3da64.tar.xz
yuzu-cc3aa959265480e1990b10ee37ebf1c0ade3da64.tar.zst
yuzu-cc3aa959265480e1990b10ee37ebf1c0ade3da64.zip
Diffstat (limited to 'src/core/hle/service/vi')
-rw-r--r--src/core/hle/service/vi/vi.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/hle/service/vi/vi.cpp b/src/core/hle/service/vi/vi.cpp
index 46e14c2a3..157092074 100644
--- a/src/core/hle/service/vi/vi.cpp
+++ b/src/core/hle/service/vi/vi.cpp
@@ -511,6 +511,7 @@ private:
LOG_DEBUG(Service_VI, "called. id=0x{:08X} transaction={:X}, flags=0x{:08X}", id,
static_cast<u32>(transaction), flags);
+ nv_flinger->Lock();
auto& buffer_queue = nv_flinger->FindBufferQueue(id);
switch (transaction) {
@@ -550,6 +551,7 @@ private:
[=](std::shared_ptr<Kernel::Thread> thread, Kernel::HLERequestContext& ctx,
Kernel::ThreadWakeupReason reason) {
// Repeat TransactParcel DequeueBuffer when a buffer is available
+ nv_flinger->Lock();
auto& buffer_queue = nv_flinger->FindBufferQueue(id);
auto result = buffer_queue.DequeueBuffer(width, height);
ASSERT_MSG(result != std::nullopt, "Could not dequeue buffer.");