From: Henri Verbeet hverbeet@codeweavers.com
--- libs/vkd3d/resource.c | 4 ++-- libs/vkd3d/vkd3d_private.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/libs/vkd3d/resource.c b/libs/vkd3d/resource.c index 53978e654..f607b1787 100644 --- a/libs/vkd3d/resource.c +++ b/libs/vkd3d/resource.c @@ -1003,7 +1003,7 @@ static void d3d12_resource_destroy(struct d3d12_resource *resource, struct d3d12
static ULONG d3d12_resource_incref(struct d3d12_resource *resource) { - ULONG refcount = InterlockedIncrement(&resource->internal_refcount); + unsigned int refcount = vkd3d_atomic_increment_u32(&resource->internal_refcount);
TRACE("%p increasing refcount to %u.\n", resource, refcount);
@@ -1012,7 +1012,7 @@ static ULONG d3d12_resource_incref(struct d3d12_resource *resource)
static ULONG d3d12_resource_decref(struct d3d12_resource *resource) { - ULONG refcount = InterlockedDecrement(&resource->internal_refcount); + unsigned int refcount = InterlockedDecrement((LONG *)&resource->internal_refcount);
TRACE("%p decreasing refcount to %u.\n", resource, refcount);
diff --git a/libs/vkd3d/vkd3d_private.h b/libs/vkd3d/vkd3d_private.h index 4b4daa53d..68941537c 100644 --- a/libs/vkd3d/vkd3d_private.h +++ b/libs/vkd3d/vkd3d_private.h @@ -722,7 +722,7 @@ struct d3d12_resource { ID3D12Resource1 ID3D12Resource1_iface; LONG refcount; - LONG internal_refcount; + unsigned int internal_refcount;
D3D12_RESOURCE_DESC desc; const struct vkd3d_format *format;