vkd3d: Avoid holding mutex while waiting for fences.

We maintain separate arrays for enqueued fences and fences owned by the
fence worker thread.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Józef Kucia
2019-06-13 13:47:34 +02:00
committed by Alexandre Julliard
parent 18442763f1
commit 0baf0302d1
3 changed files with 142 additions and 57 deletions

View File

@@ -118,7 +118,7 @@ static inline LONG InterlockedIncrement(LONG volatile *x)
return __sync_add_and_fetch(x, 1);
}
# else
# error "InterlockedIncrement not implemented for this platform"
# error "InterlockedIncrement() not implemented for this platform"
# endif /* HAVE_SYNC_ADD_AND_FETCH */
# if HAVE_SYNC_SUB_AND_FETCH
@@ -127,8 +127,14 @@ static inline LONG InterlockedDecrement(LONG volatile *x)
return __sync_sub_and_fetch(x, 1);
}
# else
# error "InterlockedDecrement not implemented for this platform"
# error "InterlockedDecrement() not implemented for this platform"
# endif
#endif /* _WIN32 */
#if HAVE_SYNC_ADD_AND_FETCH
# define atomic_add_fetch(ptr, val) __sync_add_and_fetch(ptr, val)
#else
# error "atomic_add_fetch() not implemented for this platform"
#endif /* HAVE_SYNC_ADD_AND_FETCH */
#endif /* __VKD3D_COMMON_H */