David Reveman | 630129e | 2019-05-03 01:18:32 -0400 | [diff] [blame] | 1 | shared_library("libvulkan_goldfish") { |
David Reveman | 74e99bb | 2019-02-15 18:47:25 -0500 | [diff] [blame] | 2 | sources = [ |
| 3 | "android-emu/android/base/AlignedBuf.cpp", |
| 4 | "android-emu/android/base/AlignedBuf.h", |
Lingfeng Yang | d5be14d | 2019-10-18 06:14:18 -0700 | [diff] [blame] | 5 | "android-emu/android/base/AndroidSubAllocator.cpp", |
| 6 | "android-emu/android/base/AndroidSubAllocator.h", |
Yilong Li | 8c54b9c | 2020-07-17 21:10:34 -0700 | [diff] [blame] | 7 | "android-emu/android/base/Pool.cpp", |
| 8 | "android-emu/android/base/Pool.h", |
| 9 | "android-emu/android/base/Tracing.cpp", |
| 10 | "android-emu/android/base/Tracing.h", |
David Reveman | 74e99bb | 2019-02-15 18:47:25 -0500 | [diff] [blame] | 11 | "android-emu/android/base/files/MemStream.cpp", |
| 12 | "android-emu/android/base/files/MemStream.h", |
| 13 | "android-emu/android/base/files/Stream.cpp", |
| 14 | "android-emu/android/base/files/Stream.h", |
| 15 | "android-emu/android/base/files/StreamSerializing.cpp", |
| 16 | "android-emu/android/base/files/StreamSerializing.h", |
Yilong Li | 14a93e9 | 2021-05-04 18:37:19 -0700 | [diff] [blame^] | 17 | "android-emu/android/base/fit/Defer.h", |
| 18 | "android-emu/android/base/fit/Function.h", |
| 19 | "android-emu/android/base/fit/FunctionInternal.h", |
| 20 | "android-emu/android/base/fit/Nullable.h", |
| 21 | "android-emu/android/base/fit/ThreadChecker.h", |
| 22 | "android-emu/android/base/fit/ThreadSafety.h", |
| 23 | "android-emu/android/base/fit/UtilityInternal.h", |
Yilong Li | 8c54b9c | 2020-07-17 21:10:34 -0700 | [diff] [blame] | 24 | "android-emu/android/base/ring_buffer.c", |
Lingfeng Yang | 6c7e727 | 2019-08-28 13:37:00 -0700 | [diff] [blame] | 25 | "android-emu/android/base/synchronization/AndroidConditionVariable.h", |
| 26 | "android-emu/android/base/synchronization/AndroidLock.h", |
Lingfeng Yang | 6c7e727 | 2019-08-28 13:37:00 -0700 | [diff] [blame] | 27 | "android-emu/android/base/synchronization/AndroidMessageChannel.cpp", |
Yilong Li | 8c54b9c | 2020-07-17 21:10:34 -0700 | [diff] [blame] | 28 | "android-emu/android/base/synchronization/AndroidMessageChannel.h", |
Yilong Li | 53d06da | 2021-04-27 11:48:26 -0700 | [diff] [blame] | 29 | "android-emu/android/base/synchronization/AndroidObjectPool.h", |
Yilong Li | 8c54b9c | 2020-07-17 21:10:34 -0700 | [diff] [blame] | 30 | "android-emu/android/base/threads/AndroidFunctorThread.cpp", |
Lingfeng Yang | 6c7e727 | 2019-08-28 13:37:00 -0700 | [diff] [blame] | 31 | "android-emu/android/base/threads/AndroidFunctorThread.h", |
| 32 | "android-emu/android/base/threads/AndroidThread.h", |
| 33 | "android-emu/android/base/threads/AndroidThreadStore.h", |
Lingfeng Yang | 6c7e727 | 2019-08-28 13:37:00 -0700 | [diff] [blame] | 34 | "android-emu/android/base/threads/AndroidThreadStore.h", |
Yilong Li | 8c54b9c | 2020-07-17 21:10:34 -0700 | [diff] [blame] | 35 | "android-emu/android/base/threads/AndroidThreadTypes.h", |
Lingfeng Yang | 6c7e727 | 2019-08-28 13:37:00 -0700 | [diff] [blame] | 36 | "android-emu/android/base/threads/AndroidThread_pthread.cpp", |
Lingfeng Yang | f686106 | 2019-08-21 21:05:31 -0700 | [diff] [blame] | 37 | "android-emu/android/base/threads/AndroidWorkPool.cpp", |
Yilong Li | 8c54b9c | 2020-07-17 21:10:34 -0700 | [diff] [blame] | 38 | "android-emu/android/base/threads/AndroidWorkPool.h", |
Roman Kiryanov | 1ef59e4 | 2020-05-11 15:50:11 -0700 | [diff] [blame] | 39 | "shared/GoldfishAddressSpace/goldfish_address_space.cpp", |
| 40 | "shared/GoldfishAddressSpace/goldfish_address_space.h", |
David Reveman | 74e99bb | 2019-02-15 18:47:25 -0500 | [diff] [blame] | 41 | "shared/OpenglCodecCommon/ChecksumCalculator.cpp", |
| 42 | "shared/OpenglCodecCommon/ChecksumCalculator.h", |
| 43 | "shared/OpenglCodecCommon/glUtils.cpp", |
| 44 | "shared/OpenglCodecCommon/glUtils.h", |
David Reveman | 74e99bb | 2019-02-15 18:47:25 -0500 | [diff] [blame] | 45 | "shared/OpenglCodecCommon/goldfish_dma.cpp", |
| 46 | "shared/OpenglCodecCommon/goldfish_dma.h", |
Yilong Li | 5ef2a50 | 2020-05-21 23:51:34 -0700 | [diff] [blame] | 47 | "shared/gralloc_cb/include/gralloc_cb_bp.h", |
Yilong Li | 5ef2a50 | 2020-05-21 23:51:34 -0700 | [diff] [blame] | 48 | "shared/qemupipe/include-types/qemu_pipe_types_bp.h", |
Yilong Li | 8c54b9c | 2020-07-17 21:10:34 -0700 | [diff] [blame] | 49 | "shared/qemupipe/include/qemu_pipe_bp.h", |
Yilong Li | 5ef2a50 | 2020-05-21 23:51:34 -0700 | [diff] [blame] | 50 | "shared/qemupipe/qemu_pipe_common.cpp", |
| 51 | "shared/qemupipe/qemu_pipe_guest.cpp", |
Lingfeng Yang | 5b3a0b7 | 2019-09-25 18:20:35 -0700 | [diff] [blame] | 52 | "system/OpenglSystemCommon/AddressSpaceStream.cpp", |
David Reveman | 74e99bb | 2019-02-15 18:47:25 -0500 | [diff] [blame] | 53 | "system/OpenglSystemCommon/HostConnection.cpp", |
| 54 | "system/OpenglSystemCommon/HostConnection.h", |
| 55 | "system/OpenglSystemCommon/ProcessPipe.cpp", |
| 56 | "system/OpenglSystemCommon/ProcessPipe.h", |
| 57 | "system/OpenglSystemCommon/QemuPipeStream.cpp", |
| 58 | "system/OpenglSystemCommon/QemuPipeStream.h", |
| 59 | "system/OpenglSystemCommon/ThreadInfo.cpp", |
| 60 | "system/OpenglSystemCommon/ThreadInfo.h", |
| 61 | "system/renderControl_enc/renderControl_enc.cpp", |
| 62 | "system/renderControl_enc/renderControl_enc.h", |
David Reveman | 74e99bb | 2019-02-15 18:47:25 -0500 | [diff] [blame] | 63 | "system/vulkan/goldfish_vulkan.cpp", |
Yilong Li | 11da85a | 2021-01-25 16:13:59 -0800 | [diff] [blame] | 64 | "system/vulkan_enc/CommandBufferStagingStream.cpp", |
| 65 | "system/vulkan_enc/CommandBufferStagingStream.h", |
Yilong Li | 5090fde | 2021-02-19 01:47:08 -0800 | [diff] [blame] | 66 | "system/vulkan_enc/DescriptorSetVirtualization.cpp", |
| 67 | "system/vulkan_enc/DescriptorSetVirtualization.h", |
David Reveman | 74e99bb | 2019-02-15 18:47:25 -0500 | [diff] [blame] | 68 | "system/vulkan_enc/HostVisibleMemoryVirtualization.cpp", |
| 69 | "system/vulkan_enc/HostVisibleMemoryVirtualization.h", |
| 70 | "system/vulkan_enc/ResourceTracker.cpp", |
| 71 | "system/vulkan_enc/ResourceTracker.h", |
| 72 | "system/vulkan_enc/Resources.cpp", |
| 73 | "system/vulkan_enc/Resources.h", |
Yilong Li | 53d06da | 2021-04-27 11:48:26 -0700 | [diff] [blame] | 74 | "system/vulkan_enc/SyncFencePool.cpp", |
| 75 | "system/vulkan_enc/SyncFencePool.h", |
David Reveman | 74e99bb | 2019-02-15 18:47:25 -0500 | [diff] [blame] | 76 | "system/vulkan_enc/Validation.cpp", |
| 77 | "system/vulkan_enc/Validation.h", |
| 78 | "system/vulkan_enc/VkEncoder.cpp", |
| 79 | "system/vulkan_enc/VkEncoder.h", |
| 80 | "system/vulkan_enc/VulkanHandleMapping.cpp", |
| 81 | "system/vulkan_enc/VulkanHandleMapping.h", |
Lingfeng Yang | 42ac179 | 2019-02-22 20:13:44 -0800 | [diff] [blame] | 82 | "system/vulkan_enc/VulkanStreamGuest.cpp", |
| 83 | "system/vulkan_enc/VulkanStreamGuest.h", |
Yilong Li | ce2233f | 2021-01-25 23:08:34 +0000 | [diff] [blame] | 84 | "system/vulkan_enc/func_table.cpp", |
| 85 | "system/vulkan_enc/func_table.h", |
Yilong Li | 11da85a | 2021-01-25 16:13:59 -0800 | [diff] [blame] | 86 | "system/vulkan_enc/goldfish_vk_counting_guest.cpp", |
| 87 | "system/vulkan_enc/goldfish_vk_counting_guest.h", |
David Reveman | 74e99bb | 2019-02-15 18:47:25 -0500 | [diff] [blame] | 88 | "system/vulkan_enc/goldfish_vk_deepcopy_guest.cpp", |
| 89 | "system/vulkan_enc/goldfish_vk_deepcopy_guest.h", |
| 90 | "system/vulkan_enc/goldfish_vk_extension_structs_guest.cpp", |
| 91 | "system/vulkan_enc/goldfish_vk_extension_structs_guest.h", |
| 92 | "system/vulkan_enc/goldfish_vk_marshaling_guest.cpp", |
| 93 | "system/vulkan_enc/goldfish_vk_marshaling_guest.h", |
Yilong Li | 11da85a | 2021-01-25 16:13:59 -0800 | [diff] [blame] | 94 | "system/vulkan_enc/goldfish_vk_reserved_marshaling_guest.cpp", |
| 95 | "system/vulkan_enc/goldfish_vk_reserved_marshaling_guest.h", |
David Reveman | 74e99bb | 2019-02-15 18:47:25 -0500 | [diff] [blame] | 96 | "system/vulkan_enc/goldfish_vk_transform_guest.cpp", |
| 97 | "system/vulkan_enc/goldfish_vk_transform_guest.h", |
| 98 | ] |
| 99 | |
| 100 | include_dirs = [ |
| 101 | "android-emu", |
| 102 | "host/include/libOpenglRender", |
Roman Kiryanov | 1ef59e4 | 2020-05-11 15:50:11 -0700 | [diff] [blame] | 103 | "shared/GoldfishAddressSpace/include", |
David Reveman | 74e99bb | 2019-02-15 18:47:25 -0500 | [diff] [blame] | 104 | "shared/OpenglCodecCommon", |
Yilong Li | 5ef2a50 | 2020-05-21 23:51:34 -0700 | [diff] [blame] | 105 | "shared/gralloc_cb/include", |
| 106 | "shared/qemupipe/include", |
| 107 | "shared/qemupipe/include-types", |
David Reveman | 74e99bb | 2019-02-15 18:47:25 -0500 | [diff] [blame] | 108 | "system/OpenglSystemCommon", |
| 109 | "system/renderControl_enc", |
| 110 | "system/vulkan_enc", |
| 111 | "system/include", |
| 112 | ] |
| 113 | |
| 114 | defines = [ |
| 115 | "LOG_TAG=\"goldfish_vulkan\"", |
Lingfeng Yang | 6f9871b | 2020-08-17 15:46:53 -0700 | [diff] [blame] | 116 | "GFXSTREAM", |
David Reveman | 74e99bb | 2019-02-15 18:47:25 -0500 | [diff] [blame] | 117 | "GOLDFISH_NO_GL", |
David Reveman | 5b7c584 | 2019-02-20 01:06:48 -0500 | [diff] [blame] | 118 | "VK_USE_PLATFORM_FUCHSIA", |
David Reveman | 74e99bb | 2019-02-15 18:47:25 -0500 | [diff] [blame] | 119 | "PLATFORM_SDK_VERSION=1", |
| 120 | "PAGE_SIZE=4096", |
| 121 | ] |
| 122 | |
Yilong Li | ced3b8a | 2019-10-17 11:47:05 -0700 | [diff] [blame] | 123 | cflags_c = [ |
| 124 | "-Wno-missing-field-initializers", |
| 125 | "-Wno-newline-eof", |
| 126 | "-Wno-unused-function", |
| 127 | "-Wno-unused-value", |
| 128 | "-Wno-unused-variable", |
| 129 | ] |
| 130 | |
David Reveman | 74e99bb | 2019-02-15 18:47:25 -0500 | [diff] [blame] | 131 | cflags_cc = [ |
David Reveman | 5b7c584 | 2019-02-20 01:06:48 -0500 | [diff] [blame] | 132 | "-Wno-missing-field-initializers", |
David Reveman | aa65ad6 | 2019-05-02 08:23:46 -0400 | [diff] [blame] | 133 | "-Wno-newline-eof", |
David Reveman | 3c7b3ca | 2019-05-01 19:36:26 -0400 | [diff] [blame] | 134 | "-Wno-unused-function", |
| 135 | "-Wno-unused-value", |
| 136 | "-Wno-unused-variable", |
Shai Barack | 5cb1b09 | 2020-09-14 05:06:11 +0000 | [diff] [blame] | 137 | "-Wno-conversion", |
David Reveman | 74e99bb | 2019-02-15 18:47:25 -0500 | [diff] [blame] | 138 | ] |
| 139 | |
David Reveman | 7beff56 | 2019-04-22 16:50:02 +0200 | [diff] [blame] | 140 | ldflags = [ "-static-libstdc++" ] |
| 141 | |
David Reveman | 74e99bb | 2019-02-15 18:47:25 -0500 | [diff] [blame] | 142 | if (target_os == "fuchsia") { |
Yilong Li | 41238b0 | 2020-10-31 13:41:52 -0700 | [diff] [blame] | 143 | sources -= [ |
Yilong Li | 1d6ca34 | 2020-11-02 13:13:31 -0800 | [diff] [blame] | 144 | "shared/OpenglCodecCommon/goldfish_dma.cpp", |
| 145 | "shared/OpenglCodecCommon/goldfish_dma.h", |
Yilong Li | 41238b0 | 2020-10-31 13:41:52 -0700 | [diff] [blame] | 146 | "shared/qemupipe/qemu_pipe_common.cpp", |
| 147 | "shared/qemupipe/qemu_pipe_guest.cpp", |
Yilong Li | 11da85a | 2021-01-25 16:13:59 -0800 | [diff] [blame] | 148 | "system/OpenglSystemCommon/QemuPipeStream.cpp", |
Yilong Li | 41238b0 | 2020-10-31 13:41:52 -0700 | [diff] [blame] | 149 | ] |
David Reveman | 4f45b8c | 2019-04-21 09:10:10 +0200 | [diff] [blame] | 150 | sources += [ |
Craig Stout | 3d2098f | 2019-11-25 15:36:43 -0800 | [diff] [blame] | 151 | "fuchsia/fuchsia_stdio.cc", |
David Reveman | 4f45b8c | 2019-04-21 09:10:10 +0200 | [diff] [blame] | 152 | "fuchsia/port.cc", |
John Bauman | 8153a44 | 2019-10-16 15:41:17 -0700 | [diff] [blame] | 153 | "fuchsia/service_connector.cc", |
David Reveman | 4f45b8c | 2019-04-21 09:10:10 +0200 | [diff] [blame] | 154 | "system/OpenglSystemCommon/QemuPipeStreamFuchsia.cpp", |
Yilong Li | 5a3e369 | 2020-12-01 10:23:29 -0800 | [diff] [blame] | 155 | "system/OpenglSystemCommon/TraceProviderFuchsia.cpp", |
| 156 | "system/OpenglSystemCommon/TraceProviderFuchsia.h", |
David Reveman | 4f45b8c | 2019-04-21 09:10:10 +0200 | [diff] [blame] | 157 | ] |
David Reveman | 74e99bb | 2019-02-15 18:47:25 -0500 | [diff] [blame] | 158 | |
| 159 | include_dirs += [ |
David Reveman | 74e99bb | 2019-02-15 18:47:25 -0500 | [diff] [blame] | 160 | "fuchsia/include", |
Yilong Li | 8c54b9c | 2020-07-17 21:10:34 -0700 | [diff] [blame] | 161 | "//third_party/Vulkan-Headers/include", |
David Reveman | 74e99bb | 2019-02-15 18:47:25 -0500 | [diff] [blame] | 162 | ] |
| 163 | |
David Reveman | 5b7c584 | 2019-02-20 01:06:48 -0500 | [diff] [blame] | 164 | deps = [ |
Yilong Li | 6dc9b5b | 2020-07-17 21:05:22 -0700 | [diff] [blame] | 165 | "//sdk/fidl/fuchsia.hardware.goldfish:fuchsia.hardware.goldfish_llcpp", |
Yilong Li | 4ccb872 | 2020-05-20 19:28:06 -0700 | [diff] [blame] | 166 | "//sdk/fidl/fuchsia.logger:fuchsia.logger_llcpp", |
Yilong Li | 6dc9b5b | 2020-07-17 21:05:22 -0700 | [diff] [blame] | 167 | "//sdk/fidl/fuchsia.sysmem:fuchsia.sysmem_llcpp", |
Yilong Li | 5a3e369 | 2020-12-01 10:23:29 -0800 | [diff] [blame] | 168 | "//sdk/lib/fdio", |
David 'Digit' Turner | 8ceea7c | 2020-10-06 14:46:27 +0200 | [diff] [blame] | 169 | "//src/zircon/lib/zircon", |
Yilong Li | 5a3e369 | 2020-12-01 10:23:29 -0800 | [diff] [blame] | 170 | "//zircon/public/lib/async-cpp", |
John Bauman | 8153a44 | 2019-10-16 15:41:17 -0700 | [diff] [blame] | 171 | "//zircon/public/lib/zx", |
Yilong Li | 5a3e369 | 2020-12-01 10:23:29 -0800 | [diff] [blame] | 172 | "//zircon/system/ulib/async-default", |
| 173 | "//zircon/system/ulib/async-loop:async-loop-cpp", |
Yilong Li | 952139b | 2020-05-21 23:53:46 -0700 | [diff] [blame] | 174 | "//zircon/system/ulib/syslog:syslog-static", |
Yilong Li | 4ccb872 | 2020-05-20 19:28:06 -0700 | [diff] [blame] | 175 | "//zircon/system/ulib/trace:trace-with-static-engine", |
Yilong Li | 5a3e369 | 2020-12-01 10:23:29 -0800 | [diff] [blame] | 176 | "//zircon/system/ulib/trace-provider:trace-provider-with-static-engine", |
Yilong Li | 8ce39b8 | 2020-06-01 12:14:25 -0700 | [diff] [blame] | 177 | "//zircon/system/ulib/zxio", |
David Reveman | 5b7c584 | 2019-02-20 01:06:48 -0500 | [diff] [blame] | 178 | ] |
| 179 | |
David Reveman | 74e99bb | 2019-02-15 18:47:25 -0500 | [diff] [blame] | 180 | defines += [ |
David Reveman | 1b2a779 | 2019-04-08 11:30:05 -0400 | [diff] [blame] | 181 | "QEMU_PIPE_PATH=\"/dev/class/goldfish-pipe/000\"", |
| 182 | "GOLDFISH_ADDRESS_SPACE_DEVICE_NAME=\"/dev/class/goldfish-address-space/000\"", |
David Reveman | 74e99bb | 2019-02-15 18:47:25 -0500 | [diff] [blame] | 183 | ] |
| 184 | } |
| 185 | } |