From 0ee91fc0a1c8d461460612c678f59ad606c19c2b Mon Sep 17 00:00:00 2001 From: Corentin Wallez Date: Thu, 28 Nov 2019 09:48:44 +0000 Subject: [PATCH] Vulkan: Choose correct libvulkan on Android Contrary to Linux, libvulkan.so on Android doesn't have the additional .1 at the end (libvulkan.so.1 on Linux) BUG=dawn:286 Change-Id: I22f06121b81e0fe08faae7d105a7c2094e788184 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/14104 Reviewed-by: David Turner Reviewed-by: Austin Eng Commit-Queue: Corentin Wallez --- src/dawn_native/vulkan/BackendVk.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/dawn_native/vulkan/BackendVk.cpp b/src/dawn_native/vulkan/BackendVk.cpp index 02b5b3a9d0..06a2c3417e 100644 --- a/src/dawn_native/vulkan/BackendVk.cpp +++ b/src/dawn_native/vulkan/BackendVk.cpp @@ -22,11 +22,15 @@ #include -#if DAWN_PLATFORM_LINUX +#if defined(DAWN_PLATFORM_LINUX) +# if defined(DAWN_PLATFORM_ANDROID) +const char kVulkanLibName[] = "libvulkan.so"; +# else const char kVulkanLibName[] = "libvulkan.so.1"; -#elif DAWN_PLATFORM_WINDOWS +# endif +#elif defined(DAWN_PLATFORM_WINDOWS) const char kVulkanLibName[] = "vulkan-1.dll"; -#elif DAWN_PLATFORM_FUCHSIA +#elif defined(DAWN_PLATFORM_FUCHSIA) const char kVulkanLibName[] = "libvulkan.so"; #else # error "Unimplemented Vulkan backend platform"