diff --git a/libs/vkd3d/command.c b/libs/vkd3d/command.c index a0e88382..9648a9f4 100644 --- a/libs/vkd3d/command.c +++ b/libs/vkd3d/command.c @@ -2320,7 +2320,7 @@ static HRESULT STDMETHODCALLTYPE d3d12_command_list_QueryInterface(ID3D12Graphic static ULONG STDMETHODCALLTYPE d3d12_command_list_AddRef(ID3D12GraphicsCommandList5 *iface) { struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList5(iface); - ULONG refcount = InterlockedIncrement(&list->refcount); + unsigned int refcount = vkd3d_atomic_increment_u32(&list->refcount); TRACE("%p increasing refcount to %u.\n", list, refcount); @@ -2335,7 +2335,7 @@ static void vkd3d_pipeline_bindings_cleanup(struct vkd3d_pipeline_bindings *bind static ULONG STDMETHODCALLTYPE d3d12_command_list_Release(ID3D12GraphicsCommandList5 *iface) { struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList5(iface); - ULONG refcount = InterlockedDecrement(&list->refcount); + unsigned int refcount = InterlockedDecrement((LONG *)&list->refcount); TRACE("%p decreasing refcount to %u.\n", list, refcount); diff --git a/libs/vkd3d/vkd3d_private.h b/libs/vkd3d/vkd3d_private.h index 709b969f..de7a129a 100644 --- a/libs/vkd3d/vkd3d_private.h +++ b/libs/vkd3d/vkd3d_private.h @@ -1466,7 +1466,7 @@ enum vkd3d_pipeline_bind_point struct d3d12_command_list { ID3D12GraphicsCommandList5 ID3D12GraphicsCommandList5_iface; - LONG refcount; + unsigned int refcount; D3D12_COMMAND_LIST_TYPE type; VkQueueFlags vk_queue_flags;