From bb6b393c15a20d6963e9e6cd5376499157a5429d Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Thu, 18 Jan 2024 19:50:00 +0100 Subject: [PATCH] vkd3d-common: Use vkd3d_atomic_increment_u32() in vkd3d_blob_AddRef(). --- libs/vkd3d-common/blob.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/vkd3d-common/blob.c b/libs/vkd3d-common/blob.c index 0f6d5a5e..0e178d12 100644 --- a/libs/vkd3d-common/blob.c +++ b/libs/vkd3d-common/blob.c @@ -27,7 +27,7 @@ struct vkd3d_blob { ID3D10Blob ID3DBlob_iface; - LONG refcount; + unsigned int refcount; void *buffer; SIZE_T size; @@ -59,7 +59,7 @@ static HRESULT STDMETHODCALLTYPE vkd3d_blob_QueryInterface(ID3DBlob *iface, REFI static ULONG STDMETHODCALLTYPE vkd3d_blob_AddRef(ID3DBlob *iface) { struct vkd3d_blob *blob = impl_from_ID3DBlob(iface); - ULONG refcount = InterlockedIncrement(&blob->refcount); + unsigned int refcount = vkd3d_atomic_increment_u32(&blob->refcount); TRACE("%p increasing refcount to %u.\n", blob, refcount); @@ -69,7 +69,7 @@ static ULONG STDMETHODCALLTYPE vkd3d_blob_AddRef(ID3DBlob *iface) static ULONG STDMETHODCALLTYPE vkd3d_blob_Release(ID3DBlob *iface) { struct vkd3d_blob *blob = impl_from_ID3DBlob(iface); - ULONG refcount = InterlockedDecrement(&blob->refcount); + ULONG refcount = InterlockedDecrement((LONG *)&blob->refcount); TRACE("%p decreasing refcount to %u.\n", blob, refcount);