vulkan: Fix windows api conflict

It must be undefined in the header too

Fixes: e487ae1b
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8975>
This commit is contained in:
Michel Zou
2021-02-11 09:11:42 +01:00
committed by Marge Bot
parent a27d76a2d9
commit 664a803879
2 changed files with 13 additions and 10 deletions

View File

@@ -52,6 +52,16 @@ TEMPLATE_H = Template(COPYRIGHT + """\
#include "vk_extensions.h"
/* Windows api conflict */
#ifdef _WIN32
#ifdef CreateSemaphore
#undef CreateSemaphore
#endif
#ifdef CreateEvent
#undef CreateEvent
#endif
#endif
#ifdef __cplusplus
extern "C" {
#endif
@@ -195,16 +205,6 @@ 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,