aboutsummaryrefslogtreecommitdiffhomepage
path: root/third_party/vulkanmemoryallocator/GrVulkanMemoryAllocator.cpp
diff options
context:
space:
mode:
authorGravatar Greg Daniel <egdaniel@google.com>2018-05-25 11:02:16 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-05-25 15:24:42 +0000
commit26c0e4c1f54759249c2d61b50fb5430bd73793f2 (patch)
tree42dee870d6db76cc4a532f77914bfbf837918be1 /third_party/vulkanmemoryallocator/GrVulkanMemoryAllocator.cpp
parente7e6e22912cec1bd59348fd3889c7d8ae7b6bdc4 (diff)
Create API for GrVkMemoryAllocator and impliment use of AMD VulkanMemoryAllocator on this API.
Bug: skia: Change-Id: I1e122e1b11ab308c2f83cb98c36c81511f4507d0 Reviewed-on: https://skia-review.googlesource.com/129980 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Jim Van Verth <jvanverth@google.com>
Diffstat (limited to 'third_party/vulkanmemoryallocator/GrVulkanMemoryAllocator.cpp')
-rw-r--r--third_party/vulkanmemoryallocator/GrVulkanMemoryAllocator.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/third_party/vulkanmemoryallocator/GrVulkanMemoryAllocator.cpp b/third_party/vulkanmemoryallocator/GrVulkanMemoryAllocator.cpp
new file mode 100644
index 0000000000..58884630c5
--- /dev/null
+++ b/third_party/vulkanmemoryallocator/GrVulkanMemoryAllocator.cpp
@@ -0,0 +1,16 @@
+/*
+ * Copyright 2018 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+// Workaround to make sure we align non-coherent memory to nonCoherentAtomSize.
+#define VMA_DEBUG_ALIGNMENT 256
+
+// We use our own functions pointers
+#define VMA_STATIC_VULKAN_FUNCTIONS 0
+
+#define VMA_IMPLEMENTATION
+#include "GrVulkanMemoryAllocator.h"
+