vkd3d: Use vkd3d_atomic_increment_u32() in d3d12_heap_AddRef().

This commit is contained in:
Henri Verbeet 2024-01-24 20:52:39 +01:00 committed by Alexandre Julliard
parent cc72a8d311
commit fd385ab994
Notes: Alexandre Julliard 2024-02-01 00:32:06 +01:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/619
2 changed files with 3 additions and 3 deletions

View File

@ -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);

View File

@ -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;