mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-02-27 04:54:15 +01:00
[util] Add sfence helper
This commit is contained in:
parent
9c395fd60d
commit
64074a44a6
@ -632,4 +632,17 @@ namespace dxvk::bit {
|
||||
return float(n) / float(1u << F);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* \brief Flush pending stores, if any
|
||||
*
|
||||
* Needed on x86 after writing to mapped memory or using non-temporal
|
||||
* stores in order to flush write-combined buffers.
|
||||
*/
|
||||
inline void sfence() {
|
||||
#if defined(DXVK_ARCH_X86) && (defined(__GNUC__) || defined(__clang__) || defined(_MSC_VER))
|
||||
_mm_sfence();
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user