vkd3d: Add support for InterlockedIncrement64.

To be used for cookies. Works on 32-bit as well, compiler emits 8b CAS loop
for us.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
This commit is contained in:
Hans-Kristian Arntzen 2020-10-12 11:15:35 +02:00
parent 4dff80661a
commit 3f1132ee8c
2 changed files with 2 additions and 0 deletions

View File

@ -125,6 +125,7 @@ FORCEINLINE uint32_t vkd3d_atomic_uint32_decrement(uint32_t *target, vkd3d_memor
# ifndef __MINGW32__
# define InterlockedIncrement(target) vkd3d_atomic_uint32_increment(target, vkd3d_memory_order_seq_cst)
# define InterlockedDecrement(target) vkd3d_atomic_uint32_decrement(target, vkd3d_memory_order_seq_cst)
# define InterlockedIncrement64(target) __atomic_add_fetch(target, 1, vkd3d_memory_order_seq_cst)
# endif
#else

View File

@ -77,6 +77,7 @@ typedef unsigned long UINT64;
typedef long long DECLSPEC_ALIGN(8) INT64;
typedef unsigned long long DECLSPEC_ALIGN(8) UINT64;
# endif
typedef INT64 LONG64;
typedef long LONG_PTR;
typedef unsigned long ULONG_PTR;