The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

xrt: Undef Status and Bool in vulkan include if we think the xlib header got included.

authored by

Ryan Pavlik and committed by
Jakob Bornecrantz
9463de7e 48fd3e62

+10 -2
+10 -2
src/xrt/include/xrt/xrt_vulkan_includes.h
··· 1 - // Copyright 2018-2020, Collabora, Ltd. 1 + // Copyright 2018-2022, Collabora, Ltd. 2 2 // SPDX-License-Identifier: BSL-1.0 3 3 /*! 4 4 * @file 5 - * @brief Include all of the Vulkan headers in one place. 5 + * @brief Include all of the Vulkan headers in one place, and cope with any "messy" includes implied by it. 6 6 * @author Jakob Bornecrantz <jakob@collabora.com> 7 + * @author Ryan Pavlik <ryan.pavlik@collabora.com> 7 8 * @ingroup xrt_iface 8 9 */ 9 10 ··· 13 14 #include "xrt/xrt_config_have.h" 14 15 15 16 #ifdef XRT_HAVE_VULKAN 17 + // pre-emptively include windows.h if applicable so we can specify our own flags for it. 16 18 #include "xrt/xrt_windows.h" 17 19 18 20 #define VK_NO_PROTOTYPES 19 21 #include <vulkan/vulkan.h> 22 + 23 + #if defined(VK_USE_PLATFORM_XLIB_XRANDR_EXT) || defined(VK_USE_PLATFORM_XLIB_KHR) 24 + // the xlib header is notoriously polluting. 25 + #undef Status 26 + #undef Bool 27 + #endif 20 28 21 29 #ifdef __cplusplus 22 30 extern "C" {