1package {
2    default_team: "trendy_team_android_developer_tools",
3    // See: http://go/android-license-faq
4    // A large-scale-change added 'default_applicable_licenses' to import
5    // all of the 'license_kinds' from "hardware_google_gfxstream_license"
6    // to get the below license kinds:
7    //   SPDX-license-identifier-Apache-2.0
8    //   SPDX-license-identifier-MIT
9    default_applicable_licenses: ["hardware_google_gfxstream_license"],
10}
11
12cc_library_static {
13    name: "libgfxstream_host_vulkan_server",
14    defaults: [
15        "gfxstream_defaults",
16        "gfxstream_host_cc_defaults",
17    ],
18    header_libs: [
19        "gfxstream_gl_host_common_headers",
20        "gfxstream_opengl_headers",
21        "libgfxstream_host_vulkan_cereal_common",
22    ],
23    whole_static_libs: [
24        "libgfxstream_host_tracing",
25    ],
26    shared_libs: [
27        "liblog",
28    ],
29    static_libs: [
30        "gfxstream_base",
31        "gfxstream_host_common",
32        "libgfxstream_host_apigen_codec_common",
33        "libgfxstream_host_backend",
34        "libgfxstream_host_compressedtextures",
35        "libgfxstream_host_features",
36        "libgfxstream_host_vulkan_cereal",
37        "libgfxstream_host_vulkan_emulatedtextures",
38        "libgfxstream_thirdparty_glm",
39    ],
40    cflags: [
41        "-fvisibility=hidden",
42        "-Wno-inconsistent-missing-override",
43        "-Wno-unused-value",
44        "-Wno-return-type",
45        "-Wno-return-type-c-linkage",
46        "-Wno-unused-parameter",
47        "-Wno-unused-variable",
48        "-Wno-unused-function",
49        "-Wno-uninitialized",
50        "-Wno-unreachable-code-loop-increment",
51    ],
52    srcs: [
53        "BorrowedImageVk.cpp",
54        "BufferVk.cpp",
55        "ColorBufferVk.cpp",
56        "CompositorVk.cpp",
57        "DebugUtilsHelper.cpp",
58        "DeviceLostHelper.cpp",
59        "DeviceOpTracker.cpp",
60        "DisplaySurfaceVk.cpp",
61        "DisplayVk.cpp",
62        "PostWorkerVk.cpp",
63        "RenderThreadInfoVk.cpp",
64        "SwapChainStateVk.cpp",
65        "vk_util.cpp",
66        "VkAndroidNativeBuffer.cpp",
67        "VkCommonOperations.cpp",
68        "VkDecoder.cpp",
69        "VkDecoderGlobalState.cpp",
70        "VkDecoderSnapshot.cpp",
71        "VkDecoderSnapshotUtils.cpp",
72        "VkEmulatedPhysicalDeviceMemory.cpp",
73        "VkFormatUtils.cpp",
74        "VkReconstruction.cpp",
75        "VulkanDispatch.cpp",
76        "VulkanHandleMapping.cpp",
77        "VulkanStream.cpp",
78    ],
79    // http://b/178667698 - clang-tidy crashes with VulkanStream.cpp
80    // https://android-review.googlesource.com/c/device/generic/vulkan-cereal/+/1560695/
81    // http://b/255937616 - clang-tidy can take long with VkDecoder.cpp
82    tidy_disabled_srcs: [
83        "VulkanStream.cpp",
84        "VkDecoderGlobalState.cpp", // took more than 400 seconds
85        "VkDecoder.cpp",
86    ],
87}
88
89// Run with `atest --host gfxstream_vkformatutils_tests`
90cc_test_host {
91    name: "gfxstream_vkformatutils_tests",
92    defaults: ["gfxstream_defaults"],
93    srcs: [
94        "VkFormatUtils_unittest.cpp",
95    ],
96    shared_libs: [
97        "libbase",
98        "liblog",
99    ],
100    static_libs: [
101        "libgfxstream_thirdparty_glm",
102        "gfxstream_host_common",
103        "libgfxstream_host_vulkan_server",
104        "libgtest",
105        "libgmock",
106    ],
107    test_options: {
108        unit_test: true,
109    },
110}
111
112// Run with `atest --host gfxstream_vkguestmemoryutils_tests`
113cc_test_host {
114    name: "gfxstream_vkemulatedphysicaldevicememory_tests",
115    defaults: ["gfxstream_defaults"],
116    srcs: [
117        "VkEmulatedPhysicalDeviceMemoryTests.cpp",
118    ],
119    shared_libs: [
120        "libbase",
121        "liblog",
122    ],
123    static_libs: [
124        "gfxstream_base",
125        "gfxstream_host_common",
126        "libgfxstream_host_features",
127        "libgfxstream_host_vulkan_server",
128        "libgtest",
129        "libgmock",
130    ],
131    test_options: {
132        unit_test: true,
133    },
134    test_suites: [
135        "general-tests",
136    ],
137}
138