Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ValveSoftware/vkd3d.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJózef Kucia <jkucia@codeweavers.com>2019-06-13 14:47:34 +0300
committerAlexandre Julliard <julliard@winehq.org>2019-06-13 21:56:35 +0300
commit0baf0302d1b342e73a61f6ec051a6fd700bbc09d (patch)
tree3f057efb8bcba28fd6f85a3d05e6575f063e30b3 /include
parent18442763f1683ac7c47f17588b0632c3b34ac1f2 (diff)
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>
Diffstat (limited to 'include')
-rw-r--r--include/private/vkd3d_common.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/include/private/vkd3d_common.h b/include/private/vkd3d_common.h
index 24420924..16c31e63 100644
--- a/include/private/vkd3d_common.h
+++ b/include/private/vkd3d_common.h
@@ -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 */