1 2 /* 3 * Copyright 2016 Google Inc. 4 * 5 * Use of this source code is governed by a BSD-style license that can be 6 * found in the LICENSE file. 7 */ 8 9 #ifndef GrVkDefines_DEFINED 10 #define GrVkDefines_DEFINED 11 12 #ifdef SK_VULKAN 13 14 #if defined(SK_BUILD_FOR_WIN) || defined(SK_BUILD_FOR_WIN32) 15 # if !defined(VK_USE_PLATFORM_WIN32_KHR) 16 # define VK_USE_PLATFORM_WIN32_KHR 17 # endif 18 #elif defined(SK_BUILD_FOR_ANDROID) 19 # if !defined(VK_USE_PLATFORM_ANDROID_KHR) 20 # define VK_USE_PLATFORM_ANDROID_KHR 21 # endif 22 #elif defined(SK_BUILD_FOR_UNIX) 23 # if defined(__Fuchsia__) 24 # if !defined(VK_USE_PLATFORM_MAGMA_KHR) 25 # define VK_USE_PLATFORM_MAGMA_KHR 26 # endif 27 # else 28 # if !defined(VK_USE_PLATFORM_XCB_KHR) 29 # define VK_USE_PLATFORM_XCB_KHR 30 # endif 31 # endif 32 #endif 33 34 #include <vulkan/vulkan.h> 35 36 #define SKIA_REQUIRED_VULKAN_HEADER_VERSION 17 37 #if VK_HEADER_VERSION < SKIA_REQUIRED_VULKAN_HEADER_VERSION 38 #error "Vulkan header version is too low" 39 #endif 40 41 #endif 42 43 #endif 44