vkd3d: Use vkd3d_atomic_increment_u32() in d3d12_device_AddRef().

This commit is contained in:
Henri Verbeet 2024-01-24 20:43:00 +01:00 committed by Alexandre Julliard
parent f61891954e
commit 7d7833f3c0
Notes: Alexandre Julliard 2024-01-29 22:53:07 +01:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/609
2 changed files with 3 additions and 3 deletions

View File

@ -2531,7 +2531,7 @@ static HRESULT STDMETHODCALLTYPE d3d12_device_QueryInterface(ID3D12Device5 *ifac
static ULONG STDMETHODCALLTYPE d3d12_device_AddRef(ID3D12Device5 *iface)
{
struct d3d12_device *device = impl_from_ID3D12Device5(iface);
ULONG refcount = InterlockedIncrement(&device->refcount);
unsigned int refcount = vkd3d_atomic_increment_u32(&device->refcount);
TRACE("%p increasing refcount to %u.\n", device, refcount);
@ -2563,7 +2563,7 @@ static HRESULT device_worker_stop(struct d3d12_device *device)
static ULONG STDMETHODCALLTYPE d3d12_device_Release(ID3D12Device5 *iface)
{
struct d3d12_device *device = impl_from_ID3D12Device5(iface);
ULONG refcount = InterlockedDecrement(&device->refcount);
unsigned int refcount = InterlockedDecrement((LONG *)&device->refcount);
TRACE("%p decreasing refcount to %u.\n", device, refcount);

View File

@ -1749,7 +1749,7 @@ struct vkd3d_desc_object_cache
struct d3d12_device
{
ID3D12Device5 ID3D12Device5_iface;
LONG refcount;
unsigned int refcount;
VkDevice vk_device;
VkPhysicalDevice vk_physical_device;