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: ["gfxstream_defaults"],
15    header_libs: [
16        "gfxstream_gl_host_common_headers",
17        "gfxstream_opengl_headers",
18        "libgfxstream_host_vulkan_cereal_common",
19    ],
20    static_libs: [
21        "gfxstream_base",
22        "gfxstream_host_common",
23        "libgfxstream_host_apigen_codec_common",
24        "libgfxstream_host_compressedtextures",
25        "libgfxstream_host_features",
26        "libgfxstream_host_vulkan_cereal",
27        "libgfxstream_host_vulkan_emulatedtextures",
28        "libgfxstream_thirdparty_glm",
29    ],
30    cflags: [
31        "-fvisibility=hidden",
32        "-Wno-inconsistent-missing-override",
33        "-Wno-unused-value",
34        "-Wno-return-type",
35        "-Wno-return-type-c-linkage",
36        "-Wno-unused-parameter",
37        "-Wno-unused-variable",
38        "-Wno-unused-function",
39        "-Wno-uninitialized",
40        "-Wno-unreachable-code-loop-increment",
41    ],
42    srcs: [
43        "BorrowedImageVk.cpp",
44        "BufferVk.cpp",
45        "ColorBufferVk.cpp",
46        "CompositorVk.cpp",
47        "DebugUtilsHelper.cpp",
48        "DeviceOpTracker.cpp",
49        "DisplaySurfaceVk.cpp",
50        "DisplayVk.cpp",
51        "PostWorkerVk.cpp",
52        "RenderThreadInfoVk.cpp",
53        "SwapChainStateVk.cpp",
54        "vk_util.cpp",
55        "VkAndroidNativeBuffer.cpp",
56        "VkCommonOperations.cpp",
57        "VkDecoder.cpp",
58        "VkDecoderGlobalState.cpp",
59        "VkDecoderSnapshot.cpp",
60        "VkDecoderSnapshotUtils.cpp",
61        "VkEmulatedPhysicalDeviceMemory.cpp",
62        "VkFormatUtils.cpp",
63        "VkReconstruction.cpp",
64        "VulkanDispatch.cpp",
65        "VulkanHandleMapping.cpp",
66        "VulkanStream.cpp",
67    ],
68    // http://b/178667698 - clang-tidy crashes with VulkanStream.cpp
69    // https://android-review.googlesource.com/c/device/generic/vulkan-cereal/+/1560695/
70    // http://b/255937616 - clang-tidy can take long with VkDecoder.cpp
71    tidy_disabled_srcs: [
72        "VulkanStream.cpp",
73        "VkDecoderGlobalState.cpp", // took more than 400 seconds
74        "VkDecoder.cpp",
75    ],
76}
77
78// Run with `atest --host gfxstream_vkformatutils_tests`
79cc_test_host {
80    name: "gfxstream_vkformatutils_tests",
81    defaults: ["gfxstream_defaults"],
82    srcs: [
83        "VkFormatUtils_unittest.cpp",
84    ],
85    shared_libs: [
86        "libbase",
87        "liblog",
88    ],
89    static_libs: [
90        "libgfxstream_thirdparty_glm",
91        "gfxstream_host_common",
92        "libgfxstream_host_vulkan_server",
93        "libgtest",
94        "libgmock",
95    ],
96    test_options: {
97        unit_test: true,
98    },
99}
100
101// Run with `atest --host gfxstream_vkguestmemoryutils_tests`
102cc_test_host {
103    name: "gfxstream_vkemulatedphysicaldevicememory_tests",
104    defaults: ["gfxstream_defaults"],
105    srcs: [
106        "VkEmulatedPhysicalDeviceMemoryTests.cpp",
107    ],
108    shared_libs: [
109        "libbase",
110        "liblog",
111    ],
112    static_libs: [
113        "gfxstream_base",
114        "gfxstream_host_common",
115        "libgfxstream_host_features",
116        "libgfxstream_host_vulkan_server",
117        "libgtest",
118        "libgmock",
119    ],
120    test_options: {
121        unit_test: true,
122    },
123    test_suites: [
124        "general-tests",
125    ],
126}
127