mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d: Use vkd3d_atomic_increment_u32() in d3d12_resource_incref().
This commit is contained in:
parent
6f7aec58ea
commit
a9582a7355
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
@ -1003,7 +1003,7 @@ static void d3d12_resource_destroy(struct d3d12_resource *resource, struct d3d12
|
||||
|
||||
static ULONG d3d12_resource_incref(struct d3d12_resource *resource)
|
||||
{
|
||||
ULONG refcount = InterlockedIncrement(&resource->internal_refcount);
|
||||
unsigned int refcount = vkd3d_atomic_increment_u32(&resource->internal_refcount);
|
||||
|
||||
TRACE("%p increasing refcount to %u.\n", resource, refcount);
|
||||
|
||||
@ -1012,7 +1012,7 @@ static ULONG d3d12_resource_incref(struct d3d12_resource *resource)
|
||||
|
||||
static ULONG d3d12_resource_decref(struct d3d12_resource *resource)
|
||||
{
|
||||
ULONG refcount = InterlockedDecrement(&resource->internal_refcount);
|
||||
unsigned int refcount = InterlockedDecrement((LONG *)&resource->internal_refcount);
|
||||
|
||||
TRACE("%p decreasing refcount to %u.\n", resource, refcount);
|
||||
|
||||
|
@ -722,7 +722,7 @@ struct d3d12_resource
|
||||
{
|
||||
ID3D12Resource1 ID3D12Resource1_iface;
|
||||
LONG refcount;
|
||||
LONG internal_refcount;
|
||||
unsigned int internal_refcount;
|
||||
|
||||
D3D12_RESOURCE_DESC desc;
|
||||
const struct vkd3d_format *format;
|
||||
|
Loading…
Reference in New Issue
Block a user