mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-11-05 22:15:05 +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) {
|
span<u8> Buffer::GetReadOnlyBackingSpan(bool isFirstUsage, const std::function<void()> &flushHostCallback) {
|
||||||
std::scoped_lock lock{stateMutex};
|
if (!isDirect) {
|
||||||
if (dirtyState == DirtyState::GpuDirty)
|
std::unique_lock lock{stateMutex};
|
||||||
SynchronizeGuestImmediate(isFirstUsage, flushHostCallback);
|
if (dirtyState == DirtyState::GpuDirty)
|
||||||
|
SynchronizeGuestImmediate(isFirstUsage, flushHostCallback);
|
||||||
|
} else {
|
||||||
|
RefreshGpuWritesActiveDirect(true, flushHostCallback);
|
||||||
|
}
|
||||||
|
|
||||||
return mirror;
|
return mirror;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user