vkd3d: Don't redefine InterlockedIncrement under MinGW

Fixes compiler warnings

Signed-off-by: Joshua Ashton <joshua@froggi.es>
This commit is contained in:
Joshua Ashton 2020-06-24 06:22:26 +01:00 committed by Hans-Kristian Arntzen
parent 2e32cb11ba
commit fb02f28c41
1 changed files with 4 additions and 2 deletions

View File

@ -66,10 +66,12 @@ FORCEINLINE uint32_t vkd3d_uint32_atomic_exchange_explicit(uint32_t *target, uin
# define vkd3d_uint32_atomic_store_explicit(target, value, order) atomic_store_explicit(target, value, order)
# define vkd3d_uint32_atomic_exchange_explicit(target, value, order) atomic_exchange_explicit(target, value, order)
# ifndef __MINGW32__
/* Unfortunately only fetch_add is in stdatomic
* so use the common GCC extensions for these. */
# define InterlockedIncrement(target) __atomic_add_fetch(target, 1, memory_order_seq_cst)
# define InterlockedDecrement(target) __atomic_sub_fetch(target, 1, memory_order_seq_cst)
# define InterlockedIncrement(target) __atomic_add_fetch(target, 1, memory_order_seq_cst)
# define InterlockedDecrement(target) __atomic_sub_fetch(target, 1, memory_order_seq_cst)
# endif
#else