mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-20 19:55:46 +00:00
NVFlinger: Lock race condition between CPU, Host Timing, VSync.
This commit is contained in:
parent
9140f5d1f3
commit
2c0431e5ed
3 changed files with 11 additions and 0 deletions
|
@ -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.");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue