mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-11-25 21:54:17 +01:00
Fix GetReadOnlyBackingSpan for non-direct buffers
This was missed in the initial implementation
This commit is contained in:
parent
4e5141f879
commit
1a6165f74d
@ -620,9 +620,13 @@ namespace skyline::gpu {
|
||||
}
|
||||
|
||||
span<u8> Buffer::GetReadOnlyBackingSpan(bool isFirstUsage, const std::function<void()> &flushHostCallback) {
|
||||
std::scoped_lock lock{stateMutex};
|
||||
if (dirtyState == DirtyState::GpuDirty)
|
||||
SynchronizeGuestImmediate(isFirstUsage, flushHostCallback);
|
||||
if (!isDirect) {
|
||||
std::unique_lock lock{stateMutex};
|
||||
if (dirtyState == DirtyState::GpuDirty)
|
||||
SynchronizeGuestImmediate(isFirstUsage, flushHostCallback);
|
||||
} else {
|
||||
RefreshGpuWritesActiveDirect(true, flushHostCallback);
|
||||
}
|
||||
|
||||
return mirror;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user