GrVulkanDefines.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*
  2. * Copyright 2017 Google Inc.
  3. *
  4. * Use of this source code is governed by a BSD-style license that can be
  5. * found in the LICENSE file.
  6. */
  7. #ifndef GrVulkanDefines_DEFINED
  8. #define GrVulkanDefines_DEFINED
  9. #include "include/core/SkTypes.h"
  10. #if defined(SK_BUILD_FOR_WIN)
  11. # if !defined(VK_USE_PLATFORM_WIN32_KHR)
  12. # define VK_USE_PLATFORM_WIN32_KHR
  13. # endif
  14. #elif defined(SK_BUILD_FOR_ANDROID)
  15. # if !defined(VK_USE_PLATFORM_ANDROID_KHR)
  16. # define VK_USE_PLATFORM_ANDROID_KHR
  17. # endif
  18. #elif defined(SK_BUILD_FOR_UNIX)
  19. # if !defined(VK_USE_PLATFORM_XCB_KHR)
  20. # define VK_USE_PLATFORM_XCB_KHR
  21. # endif
  22. #elif defined(SK_BUILD_FOR_MAC)
  23. # if !defined(VK_USE_PLATFORM_MACOS_MVK)
  24. # define VK_USE_PLATFORM_MACOS_MVK
  25. # endif
  26. #elif defined(SK_BUILD_FOR_IOS)
  27. # if !defined(VK_USE_PLATFORM_IOS_MVK)
  28. # define VK_USE_PLATFORM_IOS_MVK
  29. # endif
  30. #endif
  31. // We create our own function table and never directly call any functions via vk*(). So no
  32. // need to include the prototype functions. We do them for molten vk however.
  33. #if !defined(SK_MOLTENVK) && !defined(VK_NO_PROTOTYPES)
  34. #define VK_NO_PROTOTYPES
  35. #endif
  36. #include <vulkan/vulkan.h> // IWYU pragma: export
  37. #endif