Reland "Make compiling the amd vulkan memory allocator optional."
This reverts commit 6a5a91e1643ae6f692feb8fc67d6b8319cbdb63f.
Reason for revert: chrome gn updated, so this should roll fine now
Original change's description:
> Revert "Make compiling the amd vulkan memory allocator optional."
>
> This reverts commit 23da19863e321349393c61312293b090ec792287.
>
> Reason for revert: break chrome roll, need to land chrome change first
>
> Original change's description:
> > Make compiling the amd vulkan memory allocator optional.
> >
> > Change-Id: I79b9f78b52f215076a371cbd0ff057d61dd855f0
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/285380
> > Reviewed-by: Brian Osman <brianosman@google.com>
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
>
> TBR=egdaniel@google.com,brianosman@google.com,penghuang@chromium.org
>
> Change-Id: Ifc17a07f5cdfcf7b38272e5c44e5b894019cf44a
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/285538
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>
TBR=egdaniel@google.com,brianosman@google.com,penghuang@chromium.org
# Not skipping CQ checks because original CL landed > 1 day ago.
Change-Id: I4767039236137d3eaece2e16abef57278ce199ed
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/285662
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
diff --git a/BUILD.gn b/BUILD.gn
index 755200d..2b41c7d 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -89,6 +89,9 @@
if (skia_use_gl && skia_use_angle) {
defines += [ "SK_ANGLE" ]
}
+ if (skia_use_vma) {
+ defines += [ "SK_USE_VMA" ]
+ }
}
# Any code that's linked into Skia-the-library should use this config via += skia_library_configs.
@@ -562,7 +565,9 @@
if (skia_use_vulkan) {
public_defines += [ "SK_VULKAN" ]
- deps += [ "third_party/vulkanmemoryallocator" ]
+ if (skia_use_vma) {
+ deps += [ "third_party/vulkanmemoryallocator" ]
+ }
sources += skia_vk_sources
if (skia_enable_vulkan_debug_layers) {
public_defines += [ "SK_ENABLE_VK_LAYERS" ]