Signed-off-by: Hans-Kristian Arntzen post@arntzen-software.no --- include/private/vkd3d_common.h | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/include/private/vkd3d_common.h b/include/private/vkd3d_common.h index 1ac8a63..6134dbd 100644 --- a/include/private/vkd3d_common.h +++ b/include/private/vkd3d_common.h @@ -152,6 +152,9 @@ static inline LONG InterlockedDecrement(LONG volatile *x)
#if HAVE_SYNC_ADD_AND_FETCH # define atomic_add_fetch(ptr, val) __sync_add_and_fetch(ptr, val) +#elif defined(_MSC_VER) +/* InterlockedAdd returns value after increment, like add_and_fetch. */ +# define atomic_add_fetch(ptr, val) InterlockedAdd(ptr, val) #else # error "atomic_add_fetch() not implemented for this platform" #endif /* HAVE_SYNC_ADD_AND_FETCH */