Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions taichi/rhi/vulkan/vulkan_device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2455,9 +2455,12 @@ void VulkanDevice::create_vma_allocator() {
allocatorInfo.device = device_;
allocatorInfo.instance = instance_;

VolkDeviceTable table;
VmaVulkanFunctions vk_vma_functions{nullptr};
VmaVulkanFunctions vk_vma_functions{};
vk_vma_functions.vkGetInstanceProcAddr = vkGetInstanceProcAddr;
vk_vma_functions.vkGetDeviceProcAddr = vkGetDeviceProcAddr;

// Let VMA grab the functions by itself
/*
volkLoadDeviceTable(&table, device_);
vk_vma_functions.vkGetPhysicalDeviceProperties =
PFN_vkGetPhysicalDeviceProperties(vkGetInstanceProcAddr(
Expand Down Expand Up @@ -2499,6 +2502,7 @@ void VulkanDevice::create_vma_allocator() {
table.vkGetDeviceBufferMemoryRequirements;
vk_vma_functions.vkGetDeviceImageMemoryRequirements =
table.vkGetDeviceImageMemoryRequirements;
*/

allocatorInfo.pVulkanFunctions = &vk_vma_functions;

Expand Down
2 changes: 1 addition & 1 deletion taichi/rhi/vulkan/vulkan_memory_allocator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

#define VMA_IMPLEMENTATION
#define VMA_DEDICATED_ALLOCATION 0
#define VMA_DYNAMIC_VULKAN_FUNCTIONS 0
#define VMA_DYNAMIC_VULKAN_FUNCTIONS 1
#include "vk_mem_alloc.h"