vkd3d: Use vkd3d_atomic_increment_u32() in d3d12_resource_AddRef().

This commit is contained in:
Henri Verbeet 2024-01-29 17:23:49 +01:00 committed by Alexandre Julliard
parent 201fab7d5d
commit 84234a8875
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

@ -1284,7 +1284,7 @@ static HRESULT STDMETHODCALLTYPE d3d12_resource_QueryInterface(ID3D12Resource1 *
static ULONG STDMETHODCALLTYPE d3d12_resource_AddRef(ID3D12Resource1 *iface)
{
struct d3d12_resource *resource = impl_from_ID3D12Resource1(iface);
ULONG refcount = InterlockedIncrement(&resource->refcount);
unsigned int refcount = vkd3d_atomic_increment_u32(&resource->refcount);
TRACE("%p increasing refcount to %u.\n", resource, refcount);
@ -1302,7 +1302,7 @@ static ULONG STDMETHODCALLTYPE d3d12_resource_AddRef(ID3D12Resource1 *iface)
static ULONG STDMETHODCALLTYPE d3d12_resource_Release(ID3D12Resource1 *iface)
{
struct d3d12_resource *resource = impl_from_ID3D12Resource1(iface);
ULONG refcount = InterlockedDecrement(&resource->refcount);
unsigned int refcount = InterlockedDecrement((LONG *)&resource->refcount);
TRACE("%p decreasing refcount to %u.\n", resource, refcount);

View File

@ -721,7 +721,7 @@ struct d3d12_resource_tile_info
struct d3d12_resource
{
ID3D12Resource1 ID3D12Resource1_iface;
LONG refcount;
unsigned int refcount;
unsigned int internal_refcount;
D3D12_RESOURCE_DESC desc;