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 c44f3ef65..9da9d19a0 100644 --- a/libs/vkd3d/resource.c +++ b/libs/vkd3d/resource.c @@ -1284,7 +1284,7 @@ static HRESULT STDMETHODCALLTYPE d3d12_resource_QueryInterface(ID3D12Resource1 * static ULONG STDMETHODCALLTYPE d3d12_resource_AddRef(ID3D12Resource1 *iface) { struct d3d12_resource *resource = impl_from_ID3D12Resource1(iface); - ULONG refcount = InterlockedIncrement(&resource->refcount); + unsigned int refcount = vkd3d_atomic_increment_u32(&resource->refcount);
TRACE("%p increasing refcount to %u.\n", resource, refcount);
@@ -1302,7 +1302,7 @@ static ULONG STDMETHODCALLTYPE d3d12_resource_AddRef(ID3D12Resource1 *iface) static ULONG STDMETHODCALLTYPE d3d12_resource_Release(ID3D12Resource1 *iface) { struct d3d12_resource *resource = impl_from_ID3D12Resource1(iface); - ULONG refcount = InterlockedDecrement(&resource->refcount); + unsigned int refcount = InterlockedDecrement((LONG *)&resource->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 68941537c..47709ffc8 100644 --- a/libs/vkd3d/vkd3d_private.h +++ b/libs/vkd3d/vkd3d_private.h @@ -721,7 +721,7 @@ struct d3d12_resource_tile_info struct d3d12_resource { ID3D12Resource1 ID3D12Resource1_iface; - LONG refcount; + unsigned int refcount; unsigned int internal_refcount;
D3D12_RESOURCE_DESC desc;