Module: vkd3d Branch: master Commit: fd385ab994611a8c32014dd3bc96f029e66436bb URL: https://gitlab.winehq.org/wine/vkd3d/-/commit/fd385ab994611a8c32014dd3bc96f0...
Author: Henri Verbeet hverbeet@codeweavers.com Date: Wed Jan 24 20:52:39 2024 +0100
vkd3d: Use vkd3d_atomic_increment_u32() in d3d12_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 a360b0ef..7739e678 100644 --- a/libs/vkd3d/resource.c +++ b/libs/vkd3d/resource.c @@ -308,7 +308,7 @@ static HRESULT STDMETHODCALLTYPE d3d12_heap_QueryInterface(ID3D12Heap *iface, static ULONG STDMETHODCALLTYPE d3d12_heap_AddRef(ID3D12Heap *iface) { struct d3d12_heap *heap = impl_from_ID3D12Heap(iface); - ULONG refcount = InterlockedIncrement(&heap->refcount); + unsigned int refcount = vkd3d_atomic_increment_u32(&heap->refcount);
TRACE("%p increasing refcount to %u.\n", heap, refcount);
@@ -345,7 +345,7 @@ static void d3d12_heap_destroy(struct d3d12_heap *heap) static ULONG STDMETHODCALLTYPE d3d12_heap_Release(ID3D12Heap *iface) { struct d3d12_heap *heap = impl_from_ID3D12Heap(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 ec83d350..5b5ef9b0 100644 --- a/libs/vkd3d/vkd3d_private.h +++ b/libs/vkd3d/vkd3d_private.h @@ -665,7 +665,7 @@ VkResult vkd3d_create_timeline_semaphore(const struct d3d12_device *device, uint struct d3d12_heap { ID3D12Heap ID3D12Heap_iface; - LONG refcount; + unsigned int refcount; LONG resource_count;
bool is_private;