From cdb559c39d5380caff91535969d91abbd57bc935 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Wed, 24 Jan 2024 20:25:46 +0100 Subject: [PATCH] vkd3d: Use vkd3d_atomic_increment_u32() in d3d12_command_queue_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 2307659d..69516663 100644 --- a/libs/vkd3d/command.c +++ b/libs/vkd3d/command.c @@ -6230,7 +6230,7 @@ static HRESULT STDMETHODCALLTYPE d3d12_command_queue_QueryInterface(ID3D12Comman static ULONG STDMETHODCALLTYPE d3d12_command_queue_AddRef(ID3D12CommandQueue *iface) { struct d3d12_command_queue *command_queue = impl_from_ID3D12CommandQueue(iface); - ULONG refcount = InterlockedIncrement(&command_queue->refcount); + unsigned int refcount = vkd3d_atomic_increment_u32(&command_queue->refcount); TRACE("%p increasing refcount to %u.\n", command_queue, refcount); @@ -6272,7 +6272,7 @@ static void d3d12_command_queue_op_array_destroy(struct d3d12_command_queue_op_a static ULONG STDMETHODCALLTYPE d3d12_command_queue_Release(ID3D12CommandQueue *iface) { struct d3d12_command_queue *command_queue = impl_from_ID3D12CommandQueue(iface); - ULONG refcount = InterlockedDecrement(&command_queue->refcount); + unsigned int refcount = InterlockedDecrement((LONG *)&command_queue->refcount); TRACE("%p decreasing refcount to %u.\n", command_queue, refcount); diff --git a/libs/vkd3d/vkd3d_private.h b/libs/vkd3d/vkd3d_private.h index de7a129a..a6e8c0a7 100644 --- a/libs/vkd3d/vkd3d_private.h +++ b/libs/vkd3d/vkd3d_private.h @@ -1622,7 +1622,7 @@ struct d3d12_command_queue_op_array struct d3d12_command_queue { ID3D12CommandQueue ID3D12CommandQueue_iface; - LONG refcount; + unsigned int refcount; D3D12_COMMAND_QUEUE_DESC desc;