Commit e6dc3d37 by Yiwei Zhang

Disable VK_KHR_external_memory_fd for Android build

Android relies on VK_ANDROID_external_memory_android_hardware_buffer. Bug: b/158094132 Change-Id: I75498d38fc1d3e5c3a2b21df35fdef32d9f597a0 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/50248 Presubmit-Ready: Yiwei Zhang <zzyiwei@google.com> Reviewed-by: 's avatarDavid Turner <digit@google.com> Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com> Reviewed-by: 's avatarChris Forbes <chrisforbes@google.com> Kokoro-Result: kokoro <noreply+kokoro@google.com> Tested-by: 's avatarYiwei Zhang <zzyiwei@google.com>
parent f29e2bf7
......@@ -86,9 +86,11 @@ constexpr int SUBPIXEL_PRECISION_MASK = 0xFFFFFFFF >> (32 - SUBPIXEL_PRECISION_B
} // namespace vk
#if defined(__linux__) || defined(__ANDROID__)
#if defined(__linux__) && !defined(__ANDROID__)
# define SWIFTSHADER_EXTERNAL_MEMORY_OPAQUE_FD 1
# define SWIFTSHADER_EXTERNAL_SEMAPHORE_OPAQUE_FD 1
#elif defined(__ANDROID__)
# define SWIFTSHADER_EXTERNAL_SEMAPHORE_OPAQUE_FD 1
#endif
constexpr VkDeviceSize MAX_MEMORY_ALLOCATION_SIZE = 0x40000000ull; // 0x40000000 = 1 GiB
......
......@@ -170,7 +170,7 @@ private:
};
#if SWIFTSHADER_EXTERNAL_MEMORY_OPAQUE_FD
# if defined(__linux__) || defined(__ANDROID__)
# if defined(__linux__) && !defined(__ANDROID__)
# include "VkDeviceMemoryExternalLinux.hpp"
# else
# error "Missing VK_KHR_external_memory_fd implementation for this platform!"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment