blob: 76364149086e07daeefacf65f66dad1e3170c735 [file]
load("//bazel:skia_rules.bzl", "skia_cc_library", "skia_filegroup")
package(
default_applicable_licenses = ["//:license"],
)
licenses(["notice"])
# In own group for export to .gni
skia_filegroup(
name = "vma_srcs",
srcs = [
"VulkanAMDMemoryAllocator.cpp",
"VulkanAMDMemoryAllocator.h",
"VulkanMemoryAllocatorPriv.h",
],
)
skia_cc_library(
name = "vulkanmemoryallocator",
# TODO(b/321962001): move this to tools/ after making a version for Android.
srcs = [
"VulkanAMDMemoryAllocator.cpp",
"VulkanAMDMemoryAllocator.h",
"VulkanMemoryAllocatorWrapper.cpp",
],
hdrs = [
"VulkanMemoryAllocatorPriv.h",
],
copts = [
# Because `copts` options don't propagate up the stack, some static errors in
# `vk_mem_alloc.h` need to be suppressed in the BUILD rule which includes the library.
#
# https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator/issues/298
"-Wno-unused-variable",
# https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator/issues/299
"-Wno-implicit-fallthrough",
],
implementation_deps = [
"//include/third_party/vulkan",
],
local_defines = ["SK_USE_INTERNAL_VULKAN_HEADERS"],
textual_hdrs = [
"VulkanMemoryAllocatorWrapper.h",
],
visibility = [
# We explicitly do not want to expose this as a public module because we cannot
# really have a one-size-fits-all allocator nor one that is runtime-configurable.
"//tools:__subpackages__",
"//src/gpu/vk:__pkg__",
],
deps = [
"//:core",
"//src/gpu/vk",
"@vulkanmemoryallocator//:hdrs",
],
)