diff --git a/src/xrt/include/xrt/xrt_vulkan_includes.h b/src/xrt/include/xrt/xrt_vulkan_includes.h index b324995de..7f4b92ccf 100644 --- a/src/xrt/include/xrt/xrt_vulkan_includes.h +++ b/src/xrt/include/xrt/xrt_vulkan_includes.h @@ -1,9 +1,10 @@ -// Copyright 2018-2020, Collabora, Ltd. +// Copyright 2018-2022, Collabora, Ltd. // SPDX-License-Identifier: BSL-1.0 /*! * @file - * @brief Include all of the Vulkan headers in one place. + * @brief Include all of the Vulkan headers in one place, and cope with any "messy" includes implied by it. * @author Jakob Bornecrantz + * @author Ryan Pavlik * @ingroup xrt_iface */ @@ -13,11 +14,18 @@ #include "xrt/xrt_config_have.h" #ifdef XRT_HAVE_VULKAN +// pre-emptively include windows.h if applicable so we can specify our own flags for it. #include "xrt/xrt_windows.h" #define VK_NO_PROTOTYPES #include +#if defined(VK_USE_PLATFORM_XLIB_XRANDR_EXT) || defined(VK_USE_PLATFORM_XLIB_KHR) +// the xlib header is notoriously polluting. +#undef Status +#undef Bool +#endif + #ifdef __cplusplus extern "C" { #endif