1load("@rules_cc//cc:defs.bzl", "cc_library") 2 3cc_library( 4 name = "gfxstream-vulkan-server", 5 srcs = [ 6 "BorrowedImageVk.cpp", 7 "BufferVk.cpp", 8 "ColorBufferVk.cpp", 9 "CompositorVk.cpp", 10 "DebugUtilsHelper.cpp", 11 "DeviceLostHelper.cpp", 12 "DeviceOpTracker.cpp", 13 "DisplaySurfaceVk.cpp", 14 "DisplayVk.cpp", 15 "PostWorkerVk.cpp", 16 "RenderThreadInfoVk.cpp", 17 "SwapChainStateVk.cpp", 18 "VkAndroidNativeBuffer.cpp", 19 "VkCommonOperations.cpp", 20 "VkDecoder.cpp", 21 "VkDecoderGlobalState.cpp", 22 "VkDecoderSnapshot.cpp", 23 "VkDecoderSnapshotUtils.cpp", 24 "VkEmulatedPhysicalDeviceMemory.cpp", 25 "VkEmulatedPhysicalDeviceQueue.cpp", 26 "VkFormatUtils.cpp", 27 "VkReconstruction.cpp", 28 "VulkanBoxedHandles.cpp", 29 "VulkanDispatch.cpp", 30 "VulkanHandleMapping.cpp", 31 "VulkanStream.cpp", 32 "vk_util.cpp", 33 ] + glob([ 34 "**/*.h", 35 "*.h", 36 ]), 37 hdrs = [ 38 "VkDecoderGlobalState.cpp", 39 "VkSubDecoder.cpp", 40 ], 41 copts = [ 42 "-Wno-return-type-c-linkage", 43 "-Wno-extern-c-compat", 44 ], 45 defines = [ 46 "VK_GFXSTREAM_STRUCTURE_TYPE_EXT", 47 "EMUGL_BUILD", 48 "BUILDING_EMUGL_COMMON_SHARED", 49 "GFXSTREAM_ENABLE_HOST_GLES=1", 50 ] + select({ 51 "@platforms//os:macos": [ 52 "VK_USE_PLATFORM_METAL_EXT", 53 "VK_USE_PLATFORM_MACOS_MVK", 54 ], 55 "@platforms//os:windows": ["VK_USE_PLATFORM_WIN32_KHR"], 56 "@platforms//os:linux": [], 57 "//conditions:default": [], 58 }), 59 includes = [ 60 ".", 61 "cereal", 62 "cereal/common", 63 ], 64 visibility = ["//visibility:public"], 65 deps = [ 66 # "//external/angle:angle-headers", 67 "@aemu//snapshot:aemu-snapshot", 68 "//common/vulkan:gfxstream_vulkan_headers", 69 "//host:gfxstream-compressedTextures", 70 "//host:gfxstream_host_headers", 71 "//host/apigen-codec-common", 72 "//host/gl:gfxstream-gl-host-common", 73 "//host/gl:gl_headers", 74 "//host/vulkan:OpenglRender_vulkan_cereal", 75 "//host/vulkan:emulated_textures", 76 "//third-party/glm", 77 "//third-party/renderdoc", 78 "//utils:gfxstream_utils", 79 ], 80) 81 82cc_library( 83 name = "OpenglRender_vulkan_cereal", 84 srcs = [ 85 "cereal/common/goldfish_vk_deepcopy.cpp", 86 "cereal/common/goldfish_vk_dispatch.cpp", 87 "cereal/common/goldfish_vk_extension_structs.cpp", 88 "cereal/common/goldfish_vk_marshaling.cpp", 89 "cereal/common/goldfish_vk_reserved_marshaling.cpp", 90 "cereal/common/goldfish_vk_transform.cpp", 91 ] + glob([ 92 "**/*.h", 93 "*.h", 94 ]), 95 defines = [ 96 "EMUGL_BUILD", 97 "BUILDING_EMUGL_COMMON_SHARED", 98 "VK_GFXSTREAM_STRUCTURE_TYPE_EXT", 99 "VK_GOOGLE_gfxstream", 100 ] + select({ 101 "@platforms//os:macos": [ 102 "VK_USE_PLATFORM_METAL_EXT", 103 "VK_USE_PLATFORM_MACOS_MVK", 104 ], 105 "@platforms//os:windows": ["VK_USE_PLATFORM_WIN32_KHR"], 106 "@platforms//os:linux": [], 107 "//conditions:default": [], 108 }), 109 includes = [ 110 ".", 111 "cereal/common", 112 ], 113 deps = [ 114 "//:gfxstream-gl-host-common-headers", 115 "//common/vulkan:gfxstream_vulkan_headers", 116 "//host:gfxstream_host_headers", 117 "//host/backend:gfxstream_backend", 118 "//host/features:gfxstream_features", 119 "//host/tracing:gfxstream_host_tracing", 120 "//utils:gfxstream_utils", 121 "@aemu//base:aemu-base-headers", 122 "@aemu//host-common:aemu-host-common-headers", 123 ], 124) 125 126cc_library( 127 name = "emulated_textures", 128 srcs = [ 129 "emulated_textures/AstcTexture.cpp", 130 "emulated_textures/CompressedImageInfo.cpp", 131 "emulated_textures/GpuDecompressionPipeline.cpp", 132 ] + glob([ 133 "**/*.h", 134 "**/*.inl", 135 ]), 136 defines = [ 137 "EMUGL_BUILD", 138 "BUILDING_EMUGL_COMMON_SHARED", 139 "VK_GFXSTREAM_STRUCTURE_TYPE_EXT", 140 "VK_GOOGLE_gfxstream", 141 ] + select({ 142 "@platforms//os:macos": [ 143 "VK_USE_PLATFORM_METAL_EXT", 144 "VK_USE_PLATFORM_MACOS_MVK", 145 ], 146 "@platforms//os:windows": ["VK_USE_PLATFORM_WIN32_KHR"], 147 "@platforms//os:linux": [], 148 "//conditions:default": [], 149 }), 150 includes = [ 151 ".", 152 "cereal/common", 153 ], 154 deps = [ 155 "//:gfxstream-gl-host-common-headers", 156 "//common/vulkan:gfxstream_vulkan_headers", 157 "//host:gfxstream_host_headers", 158 "//utils:gfxstream_utils", 159 "@aemu//host-common:aemu-host-common-headers", 160 ], 161) 162