From d66f61cd5f46fda30c3c3f02a9223f1838a60daa Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Mon, 29 Jan 2024 17:33:23 +0100 Subject: [PATCH] vkd3d: Use vkd3d_atomic_increment_u32() in d3d12_query_heap_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 dbf84016..a6c12002 100644 --- a/libs/vkd3d/resource.c +++ b/libs/vkd3d/resource.c @@ -4429,7 +4429,7 @@ static HRESULT STDMETHODCALLTYPE d3d12_query_heap_QueryInterface(ID3D12QueryHeap static ULONG STDMETHODCALLTYPE d3d12_query_heap_AddRef(ID3D12QueryHeap *iface) { struct d3d12_query_heap *heap = impl_from_ID3D12QueryHeap(iface); - ULONG refcount = InterlockedIncrement(&heap->refcount); + unsigned int refcount = vkd3d_atomic_increment_u32(&heap->refcount); TRACE("%p increasing refcount to %u.\n", heap, refcount); @@ -4439,7 +4439,7 @@ static ULONG STDMETHODCALLTYPE d3d12_query_heap_AddRef(ID3D12QueryHeap *iface) static ULONG STDMETHODCALLTYPE d3d12_query_heap_Release(ID3D12QueryHeap *iface) { struct d3d12_query_heap *heap = impl_from_ID3D12QueryHeap(iface); - ULONG refcount = InterlockedDecrement(&heap->refcount); + unsigned int refcount = InterlockedDecrement((LONG *)&heap->refcount); TRACE("%p decreasing refcount to %u.\n", heap, refcount); diff --git a/libs/vkd3d/vkd3d_private.h b/libs/vkd3d/vkd3d_private.h index 731afe0a..bfe4d514 100644 --- a/libs/vkd3d/vkd3d_private.h +++ b/libs/vkd3d/vkd3d_private.h @@ -1085,7 +1085,7 @@ HRESULT d3d12_descriptor_heap_create(struct d3d12_device *device, struct d3d12_query_heap { ID3D12QueryHeap ID3D12QueryHeap_iface; - LONG refcount; + unsigned int refcount; VkQueryPool vk_query_pool;