1 /* 2 * Copyright (c) Meta Platforms, Inc. and affiliates. 3 * All rights reserved. 4 * 5 * This source code is licensed under the BSD-style license found in the 6 * LICENSE file in the root directory of this source tree. 7 */ 8 9 #pragma once 10 11 // 12 // Do NOT include vk_mem_alloc.h directly. 13 // Always include this file (vma_api.h) instead. 14 // 15 16 #define VMA_VULKAN_VERSION 1000000 17 18 #ifdef USE_VULKAN_WRAPPER 19 #define VMA_STATIC_VULKAN_FUNCTIONS 0 20 #else 21 #define VMA_DYNAMIC_VULKAN_FUNCTIONS 0 22 #endif /* USE_VULKAN_WRAPPER */ 23 24 #define VMA_DEFAULT_LARGE_HEAP_BLOCK_SIZE (4ull * 1024 * 1024) 25 #define VMA_SMALL_HEAP_MAX_SIZE (256ull * 1024 * 1024) 26 27 #define VMA_STATS_STRING_ENABLED 0 28 29 #ifdef VULKAN_DEBUG 30 #define VMA_DEBUG_ALIGNMENT 4096 31 #define VMA_DEBUG_ALWAYS_DEDICATED_MEMORY 0 32 #define VMA_DEBUG_DETECT_CORRUPTION 1 33 #define VMA_DEBUG_GLOBAL_MUTEX 1 34 #define VMA_DEBUG_INITIALIZE_ALLOCATIONS 1 35 #define VMA_DEBUG_MARGIN 64 36 #define VMA_DEBUG_MIN_BUFFER_IMAGE_GRANULARITY 256 37 #define VMA_RECORDING_ENABLED 1 38 39 #define VMA_DEBUG_LOG(format, ...) 40 /* 41 #define VMA_DEBUG_LOG(format, ...) do { \ 42 printf(format, __VA_ARGS__); \ 43 printf("\n"); \ 44 } while(false) 45 */ 46 #endif /* VULKAN_DEBUG */ 47 48 #ifdef __clang__ 49 #pragma clang diagnostic push 50 #pragma clang diagnostic ignored "-Wnullability-completeness" 51 #pragma clang diagnostic ignored "-Wunused-variable" 52 #endif /* __clang__ */ 53 54 #include <include/vk_mem_alloc.h> 55 56 #ifdef __clang__ 57 #pragma clang diagnostic pop 58 #endif /* __clang__ */ 59