Henri Verbeet : vkd3d: Use vkd3d_atomic_increment_u32() in d3d12_resource_AddRef().
Module: vkd3d Branch: master Commit: 84234a8875259a6c93a756a7e540805267b5ca3a URL: https://gitlab.winehq.org/wine/vkd3d/-/commit/84234a8875259a6c93a756a7e54080... Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Mon Jan 29 17:23:49 2024 +0100 vkd3d: Use vkd3d_atomic_increment_u32() in d3d12_resource_AddRef(). --- 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 c44f3ef6..9da9d19a 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 68941537..47709ffc 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;
participants (1)
-
Alexandre Julliard