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

This commit is contained in:
Ryan Pavlik 2022-04-05 17:13:03 -05:00 committed by Jakob Bornecrantz
parent 48fd3e626c
commit 9463de7e6f

View file

@ -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 <jakob@collabora.com>
* @author Ryan Pavlik <ryan.pavlik@collabora.com>
* @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 <vulkan/vulkan.h>
#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