载入中...
搜索中...
未找到
Vma.cpp
浏览该文件的文档.
1#if defined(VKB_ENABLE_VMA)
2
3// 这个翻译单元是 VMA 实现的唯一宿主(EVBackends 组)。gpgpu(EVWorld 组)直接调用
4// vmaCreateBuffer / vmaDestroyBuffer / vmaMapMemory / vmaUnmapMemory 这些 C 入口,
5// 而 VMA 是非类 C API,拿不到 EVENGINE_API_<GROUP> 那种类级导出标注:只有把 VMA
6// 自己的 VMA_CALL_PRE 钩子定义成 dllexport,这些入口才会进入 EVBackends.dll 的
7// 导出表(否则 EVWorld 链接期报 LNK2019)。非 SHARED 模式未定义
8// EVENGINE_EXPORTS_BACKENDS,保持原样。
9#if defined(EVENGINE_EXPORTS_BACKENDS) && defined(_WIN32)
10#define VMA_CALL_PRE __declspec(dllexport)
11#endif
12
13#define VMA_IMPLEMENTATION
14#if __has_include(<vma/vk_mem_alloc.h>)
15#include <vma/vk_mem_alloc.h>
16#elif __has_include(<vulkan/vk_mem_alloc.h>)
17#include <vulkan/vk_mem_alloc.h>
18#else
19#error "EVENGINE_VULKAN_USE_VMA requires the bundled vk_mem_alloc.h"
20#endif
21
22#endif