Module: vkd3d Branch: master Commit: db37be2a702e14a5eb986efaedcb8acb3c2b4941 URL: https://gitlab.winehq.org/wine/vkd3d/-/commit/db37be2a702e14a5eb986efaedcb8a...
Author: Henri Verbeet hverbeet@codeweavers.com Date: Mon Jan 29 17:28:25 2024 +0100
vkd3d: Use vkd3d_atomic_increment_u32() in d3d12_descriptor_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 e95c90dc..ccc2affc 100644 --- a/libs/vkd3d/resource.c +++ b/libs/vkd3d/resource.c @@ -4010,7 +4010,7 @@ static HRESULT STDMETHODCALLTYPE d3d12_descriptor_heap_QueryInterface(ID3D12Desc static ULONG STDMETHODCALLTYPE d3d12_descriptor_heap_AddRef(ID3D12DescriptorHeap *iface) { struct d3d12_descriptor_heap *heap = impl_from_ID3D12DescriptorHeap(iface); - ULONG refcount = InterlockedIncrement(&heap->refcount); + unsigned int refcount = vkd3d_atomic_increment_u32(&heap->refcount);
TRACE("%p increasing refcount to %u.\n", heap, refcount);
@@ -4020,7 +4020,7 @@ static ULONG STDMETHODCALLTYPE d3d12_descriptor_heap_AddRef(ID3D12DescriptorHeap static ULONG STDMETHODCALLTYPE d3d12_descriptor_heap_Release(ID3D12DescriptorHeap *iface) { struct d3d12_descriptor_heap *heap = impl_from_ID3D12DescriptorHeap(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 47709ffc..731afe0a 100644 --- a/libs/vkd3d/vkd3d_private.h +++ b/libs/vkd3d/vkd3d_private.h @@ -1046,7 +1046,7 @@ struct d3d12_descriptor_heap_vk_set struct d3d12_descriptor_heap { ID3D12DescriptorHeap ID3D12DescriptorHeap_iface; - LONG refcount; + unsigned int refcount; uint64_t serial_id;
D3D12_DESCRIPTOR_HEAP_DESC desc;