Commit Graph

9 Commits

Author SHA1 Message Date
Georg Lehmann 21dabb315d vkd3d: Unify _mm_pause detection.
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
2021-04-19 12:05:12 +02:00
Joshua Ashton 45d4296a54 vkd3d: Rename vkd3d_uint32_atomic to vkd3d_atomic_uint32
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-06-24 21:13:35 +02:00
Joshua Ashton 033f76e3ae vkd3d: Define our own memory orders
We shouldn't potentially override stuff in the std library and this allows us to map directly to __ATOMIC_* memory orders which is more correct.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-06-24 21:13:35 +02:00
Hans-Kristian Arntzen 2b7ef38248 Revert "vkd3d: make spinlock_t atomic to make clang happy"
This reverts commit 7b1dce2667.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-06-24 13:40:03 +02:00
Georg Lehmann 7b1dce2667 vkd3d: make spinlock_t atomic to make clang happy
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
2020-06-24 13:26:31 +02:00
Georg Lehmann a95e56675a vkd3d: use pause while spinning on x86
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
2020-06-17 09:49:08 +02:00
Joshua Ashton cd5d01d25c vkd3d: Refactor atomics
There is no stdatomic available on MSVC so let's clean things up.

This moves all the atomic helpers to vkd3d_atomic.h and implements all platform's spinlocks in entirely the same way.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-06-15 20:40:10 +02:00
Hans-Kristian Arntzen ca7c027cd1 vkd3d: Replace dummy atomic_fetch_add with atomic loads.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-04-17 15:46:09 +02:00
Philip Rebohle b577b5c329 vkd3d-common: Implement spinlock.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-03-27 13:33:03 +01:00