vkd3d: Use vkd3d_atomic_increment_u32() in vkd3d_instance_incref().

This commit is contained in:
Henri Verbeet 2024-01-24 20:37:37 +01:00 committed by Alexandre Julliard
parent edc406d297
commit 042e269791
Notes: Alexandre Julliard 2024-01-29 22:53:07 +01:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/609
2 changed files with 3 additions and 3 deletions

View File

@ -750,7 +750,7 @@ static void vkd3d_destroy_instance(struct vkd3d_instance *instance)
ULONG vkd3d_instance_incref(struct vkd3d_instance *instance)
{
ULONG refcount = InterlockedIncrement(&instance->refcount);
unsigned int refcount = vkd3d_atomic_increment_u32(&instance->refcount);
TRACE("%p increasing refcount to %u.\n", instance, refcount);
@ -759,7 +759,7 @@ ULONG vkd3d_instance_incref(struct vkd3d_instance *instance)
ULONG vkd3d_instance_decref(struct vkd3d_instance *instance)
{
ULONG refcount = InterlockedDecrement(&instance->refcount);
unsigned int refcount = InterlockedDecrement((LONG *)&instance->refcount);
TRACE("%p decreasing refcount to %u.\n", instance, refcount);

View File

@ -192,7 +192,7 @@ struct vkd3d_instance
uint64_t host_ticks_per_second;
LONG refcount;
unsigned int refcount;
};
#ifdef _WIN32