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