Module: vkd3d Branch: master Commit: 5a2b82fbd5ca6f7a338425b36e4986670655561c URL: https://gitlab.winehq.org/wine/vkd3d/-/commit/5a2b82fbd5ca6f7a338425b36e4986... Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Thu Jan 11 20:22:57 2024 +0100 vkd3d: Use vkd3d_atomic_increment_u32() in d3d12_fence_AddRef(). --- libs/vkd3d/command.c | 4 ++-- libs/vkd3d/vkd3d_private.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/vkd3d/command.c b/libs/vkd3d/command.c index d146e322..77621009 100644 --- a/libs/vkd3d/command.c +++ b/libs/vkd3d/command.c @@ -926,7 +926,7 @@ static HRESULT STDMETHODCALLTYPE d3d12_fence_QueryInterface(ID3D12Fence1 *iface, static ULONG STDMETHODCALLTYPE d3d12_fence_AddRef(ID3D12Fence1 *iface) { struct d3d12_fence *fence = impl_from_ID3D12Fence1(iface); - ULONG refcount = InterlockedIncrement(&fence->refcount); + unsigned int refcount = vkd3d_atomic_increment_u32(&fence->refcount); TRACE("%p increasing refcount to %u.\n", fence, refcount); @@ -941,7 +941,7 @@ static void d3d12_fence_incref(struct d3d12_fence *fence) static ULONG STDMETHODCALLTYPE d3d12_fence_Release(ID3D12Fence1 *iface) { struct d3d12_fence *fence = impl_from_ID3D12Fence1(iface); - ULONG refcount = InterlockedDecrement(&fence->refcount); + ULONG refcount = InterlockedDecrement((LONG *)&fence->refcount); TRACE("%p decreasing refcount to %u.\n", fence, refcount); diff --git a/libs/vkd3d/vkd3d_private.h b/libs/vkd3d/vkd3d_private.h index 2841122a..763606fd 100644 --- a/libs/vkd3d/vkd3d_private.h +++ b/libs/vkd3d/vkd3d_private.h @@ -622,7 +622,7 @@ struct d3d12_fence { ID3D12Fence1 ID3D12Fence1_iface; LONG internal_refcount; - LONG refcount; + unsigned int refcount; D3D12_FENCE_FLAGS flags;