diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/skia/vulkan-headers.patch | |
Diffstat (limited to 'vcpkg/ports/skia/vulkan-headers.patch')
| -rw-r--r-- | vcpkg/ports/skia/vulkan-headers.patch | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/vcpkg/ports/skia/vulkan-headers.patch b/vcpkg/ports/skia/vulkan-headers.patch new file mode 100644 index 0000000..358236b --- /dev/null +++ b/vcpkg/ports/skia/vulkan-headers.patch @@ -0,0 +1,43 @@ +diff --git a/BUILD.gn b/BUILD.gn +index 3626895824..31a7fdbc33 100644 +--- a/BUILD.gn ++++ b/BUILD.gn +@@ -938,6 +938,7 @@ optional("gpu_shared") { + } + + if (skia_use_vulkan) { ++ public_deps += [ "//third_party/externals/vulkan-headers:vulkan_headers" ] + public_defines += [ "SK_VULKAN" ] + sources += skia_shared_vk_sources + configs += [ ":use_skia_vulkan_headers" ] +diff --git a/include/private/gpu/vk/SkiaVulkan.h b/include/private/gpu/vk/SkiaVulkan.h +index 1e962ad60a..535ac6b88f 100644 +--- a/include/private/gpu/vk/SkiaVulkan.h ++++ b/include/private/gpu/vk/SkiaVulkan.h +@@ -12,6 +12,10 @@ + + // IWYU pragma: begin_exports + ++#ifdef SK_USE_INTERNAL_VULKAN_HEADERS ++# undef SK_USE_INTERNAL_VULKAN_HEADERS ++#endif ++ + #if defined(SK_USE_INTERNAL_VULKAN_HEADERS) && !defined(SK_BUILD_FOR_GOOGLE3) + #include "include/third_party/vulkan/vulkan/vulkan_core.h" + #else +diff --git a/src/gpu/vk/vulkanmemoryallocator/VulkanMemoryAllocatorWrapper.h b/src/gpu/vk/vulkanmemoryallocator/VulkanMemoryAllocatorWrapper.h +index 487ea7cee4..9662c8cbf6 100644 +--- a/src/gpu/vk/vulkanmemoryallocator/VulkanMemoryAllocatorWrapper.h ++++ b/src/gpu/vk/vulkanmemoryallocator/VulkanMemoryAllocatorWrapper.h +@@ -39,7 +39,11 @@ + // VMA outside of Skia, the client should instead tell Skia not to use VMA. + // Then they should wrap their own instance of VMA into an implementation of + // Skia's VulkanMemoryAllocator interface, and pass that object into context creation. ++#ifdef _WIN32 ++#include "vma/vk_mem_alloc.h" // NO_G3_REWRITE ++#else + #include "vk_mem_alloc.h" // NO_G3_REWRITE ++#endif + #ifdef GR_NEEDED_TO_DEFINE_VULKAN_H + #undef VULKAN_H_ + #endif |