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