diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/gpu/vk/GrVulkanDefines.h | 43 |
1 files changed, 23 insertions, 20 deletions
diff --git a/tools/gpu/vk/GrVulkanDefines.h b/tools/gpu/vk/GrVulkanDefines.h index 2052341dbb..78d09545be 100644 --- a/tools/gpu/vk/GrVulkanDefines.h +++ b/tools/gpu/vk/GrVulkanDefines.h @@ -10,26 +10,29 @@ #include "SkTypes.h" -#if defined(SK_BUILD_FOR_WIN) -# if !defined(VK_USE_PLATFORM_WIN32_KHR) -# define VK_USE_PLATFORM_WIN32_KHR -# endif -#elif defined(SK_BUILD_FOR_ANDROID) -# if !defined(VK_USE_PLATFORM_ANDROID_KHR) -# define VK_USE_PLATFORM_ANDROID_KHR -# endif -#elif defined(SK_BUILD_FOR_UNIX) -# if !defined(VK_USE_PLATFORM_XCB_KHR) -# define VK_USE_PLATFORM_XCB_KHR -# endif -#endif - -// We create our own function table and never directly call any functions via vk*(). So no need to -// include the prototype functions. -#if !defined(VK_NO_PROTOTYPES) -#define VK_NO_PROTOTYPES -#endif + #ifdef SK_MOLTENVK + #include <MoltenVk/mvk_vulkan.h> + #else + #if defined(SK_BUILD_FOR_WIN) + # if !defined(VK_USE_PLATFORM_WIN32_KHR) + # define VK_USE_PLATFORM_WIN32_KHR + # endif + #elif defined(SK_BUILD_FOR_ANDROID) + # if !defined(VK_USE_PLATFORM_ANDROID_KHR) + # define VK_USE_PLATFORM_ANDROID_KHR + # endif + #elif defined(SK_BUILD_FOR_UNIX) + # if !defined(VK_USE_PLATFORM_XCB_KHR) + # define VK_USE_PLATFORM_XCB_KHR + # endif + #endif -#include <vulkan/vulkan.h> // IWYU pragma: export + // We create our own function table and never directly call any functions via vk*(). So no + // need to include the prototype functions. + #if !defined(VK_NO_PROTOTYPES) + #define VK_NO_PROTOTYPES + #endif + #include <vulkan/vulkan.h> // IWYU pragma: export + #endif #endif |