3b51120a92
Also updated the gn_to_bp.py to handle using the DEPSed vk_mem_alloc.h. When rolled into Android we will copy the vk_mem_alloc.h from a local DEPS checkout into a vma_android folder that will be checked into the skia that lands with Android. We are using vma_android folder instead of the current third_party/vulkanmemoryallocator folder because we soon plan to move the latter into src/ instead of third_party. So just using a different directory allows us to avoid doing an additional change to the auto roller. Bug: skia:13240 Bug: skia:13242 Change-Id: Ia344e13e3f7c7efecc2e6a97a96820f3ae58b5c2 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/531318 Reviewed-by: Kevin Lubick <kjlubick@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Ravi Mistry <rmistry@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com>
35 lines
1.3 KiB
C
35 lines
1.3 KiB
C
/*
|
|
* Copyright 2018 Google Inc.
|
|
*
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*/
|
|
|
|
// We use this header to include vk_mem_alloc.h to make sure we always include GrVkDefines.h first.
|
|
// We need to do this so that the corect defines are setup before we include vulkan.h inside of
|
|
// vk_mem_alloc.h
|
|
|
|
#ifndef GrVulkanMemoryAllocator_DEFINED
|
|
#define GrVulkanMemoryAllocator_DEFINED
|
|
|
|
// We only ever include this from src files which have already included vulkan.
|
|
#ifndef VULKAN_CORE_H_
|
|
#error "vulkan_core.h has not been included before trying to include the GrVulkanMemoryAllocator"
|
|
#endif
|
|
// vk_mem_alloc.h checks to see if VULKAN_H_ has been included before trying to include vulkan.h.
|
|
// However, some builds of Skia may not have access to vulkan.h and just have access to
|
|
// vulkan_core.h. So we pretend we've already included vulkan.h (if it already hasn't been) which
|
|
// will be fine for building internal skia files. If we do fake it out by defining VULKAN_H_ we
|
|
// need to make sure to undefine it incase outside client code does later try to include the
|
|
// real vulkan.h
|
|
#ifndef VULKAN_H_
|
|
#define VULKAN_H_
|
|
#define GR_NEEDED_TO_DEFINE_VULKAN_H
|
|
#endif
|
|
#include "vk_mem_alloc.h"
|
|
#ifdef GR_NEEDED_TO_DEFINE_VULKAN_H
|
|
#undef VULKAN_H_
|
|
#endif
|
|
|
|
#endif
|