vkd3d-common: Introduce vkd3d_atomic_exchange_ptr().

This commit is contained in:
Henri Verbeet
2024-04-18 19:15:52 +02:00
committed by Alexandre Julliard
parent b1c326ce56
commit af33caf036
Notes: Alexandre Julliard 2024-04-25 00:15:41 +02:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/829
3 changed files with 32 additions and 38 deletions

View File

@@ -2473,7 +2473,7 @@ void vkd3d_view_decref(void *view, struct d3d12_device *device)
static inline void d3d12_desc_replace(struct d3d12_desc *dst, void *view, struct d3d12_device *device)
{
if ((view = vkd3d_atomic_exchange_pointer(&dst->s.u.object, view)))
if ((view = vkd3d_atomic_exchange_ptr(&dst->s.u.object, view)))
vkd3d_view_decref(view, device);
}