Debian Codegraph @

src/gpu/vk/vulkanmemoryallocator/BUILD.bazel

raw
1 load("//bazel:skia_rules.bzl", "skia_cc_library", "skia_filegroup")
2
3 package(
4 default_applicable_licenses = ["//:license"],
5 )
6
7 licenses(["notice"])
8
9 # In own group for export to .gni
10 skia_filegroup(
11 name = "vma_srcs",
12 srcs = [
13 "VulkanAMDMemoryAllocator.cpp",
14 "VulkanAMDMemoryAllocator.h",
15 "VulkanMemoryAllocatorPriv.h",
16 ],
17 )
18
19 skia_cc_library(
20 name = "vulkanmemoryallocator",
21 # TODO(kjlubick): make this testonly after updating G3
22 srcs = [
23 "VulkanAMDMemoryAllocator.cpp",
24 "VulkanAMDMemoryAllocator.h",
25 "VulkanMemoryAllocatorWrapper.cpp",
26 ],
27 hdrs = [
28 "VulkanMemoryAllocatorPriv.h",
29 ],
30 copts = [
31 # Because `copts` options don't propagate up the stack, some static errors in
32 # `vk_mem_alloc.h` need to be suppressed in the BUILD rule which includes the library.
33 #
34 # https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator/issues/298
35 "-Wno-unused-variable",
36 # https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator/issues/299
37 "-Wno-implicit-fallthrough",
38 ],
39 implementation_deps = [
40 "//include/third_party/vulkan",
41 ],
42 local_defines = ["SK_USE_INTERNAL_VULKAN_HEADERS"],
43 textual_hdrs = [
44 "VulkanMemoryAllocatorWrapper.h",
45 ],
46 visibility = [
47 # We explicitly do not want to expose this as a public module because we cannot
48 # really have a one-size-fits-all allocator nor one that is runtime-configurable.
49 "//tools:__subpackages__",
50 "//src/gpu/vk:__pkg__",
51 ],
52 deps = [
53 "//:core",
54 "//src/base",
55 "//src/gpu/vk",
56 "@vulkanmemoryallocator//:hdrs",
57 ],
58 )
59
60 # TODO(kjlubick) remove this when SK_USE_VMA is deleted
61 skia_cc_library(
62 name = "vulkanmemoryallocator_priv",
63 hdrs = [
64 "VulkanAMDMemoryAllocator.h",
65 "VulkanMemoryAllocatorPriv.h",
66 ],
67 visibility = [
68 "//src/gpu/ganesh/vk:__pkg__", # TODO(kjlubick) remove when this is not built in
69 ],
70 deps = [":vulkanmemoryallocator"],
71 )