diff options
Diffstat (limited to 'vcpkg/ports/dawn/005-bsd-support.patch')
| -rw-r--r-- | vcpkg/ports/dawn/005-bsd-support.patch | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/vcpkg/ports/dawn/005-bsd-support.patch b/vcpkg/ports/dawn/005-bsd-support.patch new file mode 100644 index 0000000..ecbe73c --- /dev/null +++ b/vcpkg/ports/dawn/005-bsd-support.patch @@ -0,0 +1,42 @@ +diff --git a/include/dawn/native/VulkanBackend.h b/include/dawn/native/VulkanBackend.h +index 201bc324..3221ad2e 100644 +--- a/include/dawn/native/VulkanBackend.h ++++ b/include/dawn/native/VulkanBackend.h +@@ -83,7 +83,7 @@ struct ExternalImageExportInfoVk : ExternalImageExportInfo { + }; + + // Can't use DAWN_PLATFORM_IS(LINUX) since header included in both Dawn and Chrome +-#if defined(__linux__) || defined(__Fuchsia__) ++#if defined(__linux__) || defined(__Fuchsia__) || defined(__OpenBSD__) || defined(__FreeBSD__) + + // Common properties of external images represented by FDs. On successful import the file + // descriptor's ownership is transferred to the Dawn implementation and they shouldn't be +diff --git a/src/dawn/common/Platform.h b/src/dawn/common/Platform.h +index b4ac6100..cbc5c7b8 100644 +--- a/src/dawn/common/Platform.h ++++ b/src/dawn/common/Platform.h +@@ -60,6 +60,11 @@ + #error "Unsupported Windows platform." + #endif + ++#elif defined(__OpenBSD__) || defined(__FreeBSD__) ++#define DAWN_PLATFORM_IS_LINUX 1 ++#define DAWN_PLATFORM_IS_BSD 1 ++#define DAWN_PLATFORM_IS_POSIX 1 ++ + #elif defined(__linux__) + #define DAWN_PLATFORM_IS_LINUX 1 + #define DAWN_PLATFORM_IS_POSIX 1 +diff --git a/src/dawn/native/vulkan/BackendVk.cpp b/src/dawn/native/vulkan/BackendVk.cpp +index 058cbecc..9bae2d27 100644 +--- a/src/dawn/native/vulkan/BackendVk.cpp ++++ b/src/dawn/native/vulkan/BackendVk.cpp +@@ -56,7 +56,7 @@ constexpr char kSwiftshaderLibName[] = "libvk_swiftshader.dylib"; + #endif + + #if DAWN_PLATFORM_IS(LINUX) +-#if DAWN_PLATFORM_IS(ANDROID) ++#if DAWN_PLATFORM_IS(ANDROID) || DAWN_PLATFORM_IS(BSD) + constexpr char kVulkanLibName[] = "libvulkan.so"; + #else + constexpr char kVulkanLibName[] = "libvulkan.so.1"; |