mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-19 21:28:50 +00:00
xrt: Undef Status and Bool in vulkan include if we think the xlib header got included.
This commit is contained in:
parent
48fd3e626c
commit
9463de7e6f
|
@ -1,9 +1,10 @@
|
||||||
// Copyright 2018-2020, Collabora, Ltd.
|
// Copyright 2018-2022, Collabora, Ltd.
|
||||||
// SPDX-License-Identifier: BSL-1.0
|
// SPDX-License-Identifier: BSL-1.0
|
||||||
/*!
|
/*!
|
||||||
* @file
|
* @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 Jakob Bornecrantz <jakob@collabora.com>
|
||||||
|
* @author Ryan Pavlik <ryan.pavlik@collabora.com>
|
||||||
* @ingroup xrt_iface
|
* @ingroup xrt_iface
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -13,11 +14,18 @@
|
||||||
#include "xrt/xrt_config_have.h"
|
#include "xrt/xrt_config_have.h"
|
||||||
|
|
||||||
#ifdef XRT_HAVE_VULKAN
|
#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"
|
#include "xrt/xrt_windows.h"
|
||||||
|
|
||||||
#define VK_NO_PROTOTYPES
|
#define VK_NO_PROTOTYPES
|
||||||
#include <vulkan/vulkan.h>
|
#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
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue