Module: Mesa
Branch: master
Commit: e487ae1b998c06b429cd071021d387c02c872142
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=e487ae1b998c06b429cd071021d387c02c872142

Author: Michel Zou <[email protected]>
Date:   Wed Feb 10 14:25:38 2021 +0100

vulkan: Fix windows api conflict

Closes #4247

Acked-by: Jason Ekstrand <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8956>

---

 src/vulkan/util/vk_dispatch_table_gen.py | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/vulkan/util/vk_dispatch_table_gen.py 
b/src/vulkan/util/vk_dispatch_table_gen.py
index f962f449a36..76bf2710ea8 100644
--- a/src/vulkan/util/vk_dispatch_table_gen.py
+++ b/src/vulkan/util/vk_dispatch_table_gen.py
@@ -195,6 +195,16 @@ TEMPLATE_C = Template(COPYRIGHT + """\
 #include "util/macros.h"
 #include "string.h"
 
+/* Windows api conflict */
+#ifdef _WIN32
+#ifdef CreateSemaphore
+#undef CreateSemaphore
+#endif
+#ifdef CreateEvent
+#undef CreateEvent
+#endif
+#endif
+
 <%def name="load_dispatch_table(type, VkType, ProcAddr, entrypoints)">
 void
 vk_${type}_dispatch_table_load(struct vk_${type}_dispatch_table *table,

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to