mirror of
https://github.com/skyline-emu/skyline.git
synced 2025-01-01 11:15:30 +03:00
Fix setDirty
behavior in Buffer::SynchronizeGuest
The condition for `setDirty` in the dirty state CAS was inverted from what it should've been resulting in synchronizing incorrectly, this commit fixes the condition to correct synchronization.
This commit is contained in:
parent
00d434efdc
commit
d1a682eace
@ -166,7 +166,7 @@ namespace skyline::gpu {
|
|||||||
|
|
||||||
auto currentState{dirtyState.load(std::memory_order_relaxed)};
|
auto currentState{dirtyState.load(std::memory_order_relaxed)};
|
||||||
do {
|
do {
|
||||||
if (currentState == DirtyState::CpuDirty || (currentState == DirtyState::Clean && setDirty))
|
if (currentState == DirtyState::CpuDirty || (currentState == DirtyState::Clean && !setDirty))
|
||||||
return true; // If the buffer is synchronized (Clean/CpuDirty), there is no need to synchronize it
|
return true; // If the buffer is synchronized (Clean/CpuDirty), there is no need to synchronize it
|
||||||
else if (currentState == DirtyState::GpuDirty && nonBlocking && !PollFence())
|
else if (currentState == DirtyState::GpuDirty && nonBlocking && !PollFence())
|
||||||
return false; // If the buffer is GPU dirty and the fence is not signalled then we can't block
|
return false; // If the buffer is GPU dirty and the fence is not signalled then we can't block
|
||||||
|
Loading…
Reference in New Issue
Block a user