mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-02-12 22:54:15 +01:00
When a fence has been missed, we can avoid locking *most* of the time via the double-checked locking pattern. We still lock before a second check in case the scheduler caused us to miss the fence. If the scheduler did cause us to miss the fence, we can drop the lock prior to executing the callback function, as a second micro-optimization. Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu>