mirror of
https://github.com/Takiiiiiiii/strato.git
synced 2025-07-17 08:46:39 +00:00
Fix Buffer::SynchronizeGuest
Non-Blocking Behavior
The buffer's non-blocking behavior could lead to an invalid state where the dirty state doesn't adequately represent the buffer's true state, the check has now been moved inside the CAS loop as its behavior changes depending on the dirty state. In addition, `SynchronizeGuest` returns a boolean denoting if the synchronization was successful now to make code flows depending on non-blocking synchronization cleaner.
This commit is contained in:
@ -234,9 +234,10 @@ namespace skyline::gpu {
|
||||
* @param skipTrap If true, setting up a CPU trap will be skipped and the dirty state will be Clean/CpuDirty
|
||||
* @param nonBlocking If true, the call will return immediately if the fence is not signalled, skipping the sync
|
||||
* @param setDirty If true, the buffer will be marked as CpuDirty rather than Clean
|
||||
* @return If the buffer's contents were successfully synchronized, this'll only be false on non-blocking operations or lack of a guest buffer
|
||||
* @note The buffer **must** be locked prior to calling this
|
||||
*/
|
||||
void SynchronizeGuest(bool skipTrap = false, bool nonBlocking = false, bool setDirty = false);
|
||||
bool SynchronizeGuest(bool skipTrap = false, bool nonBlocking = false, bool setDirty = false);
|
||||
|
||||
/**
|
||||
* @brief Synchronizes the guest buffer with the host buffer immediately, flushing GPU work if necessary
|
||||
|
Reference in New Issue
Block a user