Module: vkd3d Branch: master Commit: 315fce8ac5f13db7d9c0e36c89d2a51be26931ca URL: https://gitlab.winehq.org/wine/vkd3d/-/commit/315fce8ac5f13db7d9c0e36c89d2a5...
Author: Henri Verbeet hverbeet@codeweavers.com Date: Thu Jan 11 20:50:07 2024 +0100
vkd3d: Use vkd3d_atomic_increment_u32() in d3d12_command_allocator_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 d4af9d01..f6d405f8 100644 --- a/libs/vkd3d/command.c +++ b/libs/vkd3d/command.c @@ -1635,7 +1635,7 @@ static HRESULT STDMETHODCALLTYPE d3d12_command_allocator_QueryInterface(ID3D12Co static ULONG STDMETHODCALLTYPE d3d12_command_allocator_AddRef(ID3D12CommandAllocator *iface) { struct d3d12_command_allocator *allocator = impl_from_ID3D12CommandAllocator(iface); - ULONG refcount = InterlockedIncrement(&allocator->refcount); + unsigned int refcount = vkd3d_atomic_increment_u32(&allocator->refcount);
TRACE("%p increasing refcount to %u.\n", allocator, refcount);
@@ -1645,7 +1645,7 @@ static ULONG STDMETHODCALLTYPE d3d12_command_allocator_AddRef(ID3D12CommandAlloc static ULONG STDMETHODCALLTYPE d3d12_command_allocator_Release(ID3D12CommandAllocator *iface) { struct d3d12_command_allocator *allocator = impl_from_ID3D12CommandAllocator(iface); - ULONG refcount = InterlockedDecrement(&allocator->refcount); + unsigned int refcount = InterlockedDecrement((LONG *)&allocator->refcount);
TRACE("%p decreasing refcount to %u.\n", allocator, refcount);
diff --git a/libs/vkd3d/vkd3d_private.h b/libs/vkd3d/vkd3d_private.h index 56b43052..709b969f 100644 --- a/libs/vkd3d/vkd3d_private.h +++ b/libs/vkd3d/vkd3d_private.h @@ -1365,7 +1365,7 @@ struct vkd3d_buffer struct d3d12_command_allocator { ID3D12CommandAllocator ID3D12CommandAllocator_iface; - LONG refcount; + unsigned int refcount;
D3D12_COMMAND_LIST_TYPE type; VkQueueFlags vk_queue_flags;