| Flutter Impeller |

vk.h
Go to the documentation of this file.
1 // Copyright 2013 The Flutter Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #pragma once
6
7 #include "flutter/fml/build_config.h"
8 #include "flutter/fml/logging.h"
9
10 #define VK_NO_PROTOTYPES
11
12 #if FML_OS_IOS
13
14 // #ifndef VK_USE_PLATFORM_IOS_MVK
15 // #define VK_USE_PLATFORM_IOS_MVK
16 // #endif // VK_USE_PLATFORM_IOS_MVK
17
18 #ifndef VK_USE_PLATFORM_METAL_EXT
19 #define VK_USE_PLATFORM_METAL_EXT
20 #endif // VK_USE_PLATFORM_METAL_EXT
21
22 #elif FML_OS_MACOSX
23
24 // #ifndef VK_USE_PLATFORM_MACOS_MVK
25 // #define VK_USE_PLATFORM_MACOS_MVK
26 // #endif // VK_USE_PLATFORM_MACOS_MVK
27
28 #ifndef VK_USE_PLATFORM_METAL_EXT
29 #define VK_USE_PLATFORM_METAL_EXT
30 #endif // VK_USE_PLATFORM_METAL_EXT
31
32 #elif FML_OS_ANDROID
33
34 #ifndef VK_USE_PLATFORM_ANDROID_KHR
35 #define VK_USE_PLATFORM_ANDROID_KHR
36 #endif // VK_USE_PLATFORM_ANDROID_KHR
37
38 #elif FML_OS_LINUX
39
40 // Nothing for now.
41
42 #elif FML_OS_WIN
43
44 #ifndef VK_USE_PLATFORM_WIN32_KHR
45 #define VK_USE_PLATFORM_WIN32_KHR
46 #endif // VK_USE_PLATFORM_WIN32_KHR
47
48 #elif OS_FUCHSIA
49
50 #ifndef VK_USE_PLATFORM_ANDROID_KHR
51 #define VK_USE_PLATFORM_ANDROID_KHR
52 #endif // VK_USE_PLATFORM_ANDROID_KHR
53
54 #endif // FML_OS
55
56 #if !defined(NDEBUG)
57 #define VULKAN_HPP_ASSERT FML_CHECK
58 #else
59 #define VULKAN_HPP_ASSERT(ignored) \
60 {}
61 #endif
62
63 #define VULKAN_HPP_NAMESPACE impeller::vk
64 #define VULKAN_HPP_ASSERT_ON_RESULT(ignored) \
65 { [[maybe_unused]] auto res = (ignored); }
66 #define VULKAN_HPP_NO_EXCEPTIONS
67
68 #include "vulkan/vulkan.hpp" // IWYU pragma: keep.
69
70 static_assert(VK_HEADER_VERSION >= 215, "Vulkan headers must not be too old.");