mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-29 17:52:18 +01:00
[util] Implement spin on ARM64
This commit is contained in:
parent
57cee691b3
commit
2218462ff2
@ -21,7 +21,13 @@ namespace dxvk::sync {
|
||||
void spin(uint32_t spinCount, const Fn& fn) {
|
||||
while (unlikely(!fn())) {
|
||||
for (uint32_t i = 1; i < spinCount; i++) {
|
||||
#if defined(DXVK_ARCH_X86)
|
||||
_mm_pause();
|
||||
#elif defined(DXVK_ARCH_ARM64)
|
||||
__asm__ __volatile__ ("yield");
|
||||
#else
|
||||
#error "Pause/Yield not implemented for this architecture."
|
||||
#endif
|
||||
if (fn())
|
||||
return;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user