mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-01 16:24:12 +01:00
[util] Improve ticket lock implementation
Atomic fetch-and-add on unlock is not needed since no other thread can modify the serving counter after the calling thread acquired the lock. May slightly improve performance in games relying on ID3D10Multithread.
This commit is contained in:
parent
d7f4e44c24
commit
694d6c7f77
@ -26,7 +26,8 @@ namespace dxvk::sync {
|
||||
}
|
||||
|
||||
void unlock() {
|
||||
m_serving.fetch_add(1, std::memory_order_release);
|
||||
uint32_t serveNext = m_serving.load() + 1;
|
||||
m_serving.store(serveNext, std::memory_order_release);
|
||||
}
|
||||
|
||||
private:
|
||||
|
Loading…
Reference in New Issue
Block a user