diff options
author | David Reveman <reveman@google.com> | 2019-02-15 18:47:25 -0500 |
---|---|---|
committer | David Reveman <reveman@google.com> | 2019-02-16 10:02:27 -0500 |
commit | 74e99bbd622ecd9ba171476453673809c76e0841 (patch) | |
tree | 63197cc9b8d16bbf1057924129c29a3e726a7355 /BUILD.gn | |
parent | b64ca452d1bdf73be923c9ca779e9b18d0501fd1 (diff) | |
download | goldfish-opengl-74e99bbd622ecd9ba171476453673809c76e0841.tar.gz |
[vulkan] Fuchsia build support
This initial patch attempts to minimize changes to existing code
by adding a fuchsia compat layer that matches what is expected
from android/linux. Multi platform support can be improved in
follow up changes by introducing a more appropriate platform layer.
BUILD.gn is limited to target_os=fuchsia but can be improved to
support other platforms.
Change-Id: I7c69a4368d3560032ff341ee8a5a58c01b50ab5e
Diffstat (limited to 'BUILD.gn')
-rw-r--r-- | BUILD.gn | 96 |
1 files changed, 96 insertions, 0 deletions
diff --git a/BUILD.gn b/BUILD.gn new file mode 100644 index 00000000..4efc6d87 --- /dev/null +++ b/BUILD.gn @@ -0,0 +1,96 @@ +source_set("goldfish_vulkan") { + sources = [ + "android-emu/android/base/AlignedBuf.cpp", + "android-emu/android/base/AlignedBuf.h", + "android-emu/android/base/Pool.cpp", + "android-emu/android/base/Pool.h", + "android-emu/android/base/SubAllocator.cpp", + "android-emu/android/base/SubAllocator.h", + "android-emu/android/base/files/MemStream.cpp", + "android-emu/android/base/files/MemStream.h", + "android-emu/android/base/files/Stream.cpp", + "android-emu/android/base/files/Stream.h", + "android-emu/android/base/files/StreamSerializing.cpp", + "android-emu/android/base/files/StreamSerializing.h", + "shared/OpenglCodecCommon/ChecksumCalculator.cpp", + "shared/OpenglCodecCommon/ChecksumCalculator.h", + "shared/OpenglCodecCommon/glUtils.cpp", + "shared/OpenglCodecCommon/glUtils.h", + "shared/OpenglCodecCommon/goldfish_address_space.cpp", + "shared/OpenglCodecCommon/goldfish_address_space.h", + "shared/OpenglCodecCommon/goldfish_dma.cpp", + "shared/OpenglCodecCommon/goldfish_dma.h", + "system/OpenglSystemCommon/HostConnection.cpp", + "system/OpenglSystemCommon/HostConnection.h", + "system/OpenglSystemCommon/ProcessPipe.cpp", + "system/OpenglSystemCommon/ProcessPipe.h", + "system/OpenglSystemCommon/QemuPipeStream.cpp", + "system/OpenglSystemCommon/QemuPipeStream.h", + "system/OpenglSystemCommon/ThreadInfo.cpp", + "system/OpenglSystemCommon/ThreadInfo.h", + "system/renderControl_enc/renderControl_enc.cpp", + "system/renderControl_enc/renderControl_enc.h", + "system/vulkan/func_table.cpp", + "system/vulkan/func_table.h", + "system/vulkan/goldfish_vulkan.cpp", + "system/vulkan_enc/HostVisibleMemoryVirtualization.cpp", + "system/vulkan_enc/HostVisibleMemoryVirtualization.h", + "system/vulkan_enc/ResourceTracker.cpp", + "system/vulkan_enc/ResourceTracker.h", + "system/vulkan_enc/Resources.cpp", + "system/vulkan_enc/Resources.h", + "system/vulkan_enc/Validation.cpp", + "system/vulkan_enc/Validation.h", + "system/vulkan_enc/VkEncoder.cpp", + "system/vulkan_enc/VkEncoder.h", + "system/vulkan_enc/VulkanHandleMapping.cpp", + "system/vulkan_enc/VulkanHandleMapping.h", + "system/vulkan_enc/VulkanStream.cpp", + "system/vulkan_enc/VulkanStream.h", + "system/vulkan_enc/goldfish_vk_deepcopy_guest.cpp", + "system/vulkan_enc/goldfish_vk_deepcopy_guest.h", + "system/vulkan_enc/goldfish_vk_extension_structs_guest.cpp", + "system/vulkan_enc/goldfish_vk_extension_structs_guest.h", + "system/vulkan_enc/goldfish_vk_marshaling_guest.cpp", + "system/vulkan_enc/goldfish_vk_marshaling_guest.h", + "system/vulkan_enc/goldfish_vk_transform_guest.cpp", + "system/vulkan_enc/goldfish_vk_transform_guest.h", + ] + + include_dirs = [ + "android-emu", + "host/include/libOpenglRender", + "shared/OpenglCodecCommon", + "system/OpenglSystemCommon", + "system/renderControl_enc", + "system/vulkan_enc", + "system/include", + ] + + defines = [ + "LOG_TAG=\"goldfish_vulkan\"", + "GOLDFISH_VULKAN", + "GOLDFISH_NO_GL", + "VK_USE_PLATFORM_ANDROID_KHR", + "PLATFORM_SDK_VERSION=1", + "PAGE_SIZE=4096", + ] + + cflags_cc = [ + "-Wno-unused-function", + "-Wno-unused-variable", + ] + + if (target_os == "fuchsia") { + sources += [ "fuchsia/port.cc" ] + + include_dirs += [ + "//third_party/vulkan_loader_and_validation_layers/include", + "fuchsia/include", + ] + + defines += [ + "QEMU_PIPE_PATH=\"/dev/sys/platform/acpi/goldfish/goldfish-pipe\"", + ] + } +} |