-
Notifications
You must be signed in to change notification settings - Fork 331
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor Vulkan includes, avoid warnings on GCC
- Loading branch information
Showing
3 changed files
with
34 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#ifndef RMLUI_BACKENDS_INCLUDE_VULKAN_H | ||
#define RMLUI_BACKENDS_INCLUDE_VULKAN_H | ||
|
||
#if defined RMLUI_PLATFORM_UNIX | ||
#define VK_USE_PLATFORM_XCB_KHR 1 | ||
#endif | ||
#define VMA_STATIC_VULKAN_FUNCTIONS 0 | ||
#define VMA_DYNAMIC_VULKAN_FUNCTIONS 1 | ||
#endif | ||
|
||
#if defined _MSC_VER | ||
#pragma warning(push, 0) | ||
#elif defined __clang__ | ||
#pragma clang diagnostic push | ||
#pragma clang diagnostic ignored "-Wall" | ||
#pragma clang diagnostic ignored "-Wextra" | ||
#pragma clang diagnostic ignored "-Wnullability-extension" | ||
#pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments" | ||
#pragma clang diagnostic ignored "-Wnullability-completeness" | ||
#elif defined __GNUC__ | ||
#pragma GCC system_header | ||
#endif | ||
|
||
#include "RmlUi_Vulkan/vulkan.h" | ||
// Always include "vulkan.h" first, this comment prevents clang-format from reordering the includes. | ||
#include "RmlUi_Vulkan/vk_mem_alloc.h" | ||
|
||
#if defined _MSC_VER | ||
#pragma warning(pop) | ||
#elif defined __clang__ | ||
#pragma clang diagnostic pop | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters