Blender V4.3
vk_memory.hh File Reference
#include "vk_common.hh"

Go to the source code of this file.

Namespaces

namespace  blender
 
namespace  blender::gpu
 

Macros

#define VK_ALLOCATION_CALLBACKS    static constexpr const VkAllocationCallbacks *vk_allocation_callbacks = nullptr;
 

Macro Definition Documentation

◆ VK_ALLOCATION_CALLBACKS

#define VK_ALLOCATION_CALLBACKS    static constexpr const VkAllocationCallbacks *vk_allocation_callbacks = nullptr;

VK_ALLOCATION_CALLBACKS initializes allocation callbacks for host allocations. The macro creates a local static variable with the name vk_allocation_callbacks that can be passed to VULKAN API functions that expect const VkAllocationCallbacks *pAllocator.

When Blender is compiled with WITH_VULKAN_GUARDEDALLOC this will use MEM_guardedalloc for host allocations that the driver does on behalf of blender. More internal allocations are still being allocated via the implementation inside the VULKAN device driver.

When WITH_VULKAN_GUARDEDALLOC=Off the memory allocation implemented in the vulkan device driver is used for both internal and application focused memory operations.

Definition at line 58 of file vk_memory.hh.

Referenced by blender::gpu::VKQueryPool::begin_query(), blender::gpu::render_graph::VKCommandBufferWrapper::begin_recording(), blender::gpu::VKSampler::create(), blender::gpu::VKDescriptorSetLayouts::deinit(), blender::gpu::VKDiscardPool::destroy_discarded_resources(), blender::gpu::VKVertexBuffer::ensure_buffer_view(), blender::gpu::VKShaderModule::finalize(), blender::gpu::VKSampler::free(), blender::gpu::VKPipelinePool::free_data(), blender::gpu::VKDescriptorSetLayouts::get_or_create(), blender::gpu::VKPipelinePool::get_or_create_compute_pipeline(), blender::gpu::VKPipelinePool::get_or_create_graphics_pipeline(), blender::gpu::VKPipelinePool::init(), blender::gpu::VKVertexBuffer::release_data(), blender::gpu::VKPipelinePool::remove(), blender::gpu::VKFence::signal(), blender::gpu::VKImageView::VKImageView(), blender::gpu::render_graph::VKCommandBufferWrapper::~VKCommandBufferWrapper(), blender::gpu::VKDescriptorPools::~VKDescriptorPools(), blender::gpu::VKFence::~VKFence(), and blender::gpu::VKQueryPool::~VKQueryPool().