vkd3d: Use vkd3d_atomic_increment_u32() in vkd3d_bind_heap_memory().

This commit is contained in:
Henri Verbeet 2024-01-24 20:57:35 +01:00 committed by Alexandre Julliard
parent 06eb8e5f8c
commit 30a00160e2
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

@ -358,7 +358,7 @@ static ULONG STDMETHODCALLTYPE d3d12_heap_Release(ID3D12Heap *iface)
static void d3d12_heap_resource_destroyed(struct d3d12_heap *heap)
{
if (!InterlockedDecrement(&heap->resource_count) && (!heap->refcount || heap->is_private))
if (!InterlockedDecrement((LONG *)&heap->resource_count) && (!heap->refcount || heap->is_private))
d3d12_heap_destroy(heap);
}
@ -2174,7 +2174,7 @@ static HRESULT vkd3d_bind_heap_memory(struct d3d12_device *device,
{
resource->heap = heap;
resource->heap_offset = heap_offset;
InterlockedIncrement(&heap->resource_count);
vkd3d_atomic_increment_u32(&heap->resource_count);
}
else
{

View File

@ -666,7 +666,7 @@ struct d3d12_heap
{
ID3D12Heap ID3D12Heap_iface;
unsigned int refcount;
LONG resource_count;
unsigned int resource_count;
bool is_private;
D3D12_HEAP_DESC desc;