QtBase  v6.3.1
Public Attributes | List of all members
VmaDefragmentationInfo2 Struct Reference

Parameters for defragmentation. More...

#include <vk_mem_alloc.h>

Collaboration diagram for VmaDefragmentationInfo2:
Collaboration graph
[legend]

Public Attributes

VmaDefragmentationFlags flags
 Reserved for future use. Should be 0. More...
 
uint32_t allocationCount
 Number of allocations in pAllocations array. More...
 
VmaAllocationpAllocations
 Pointer to array of allocations that can be defragmented. More...
 
VkBool32 * pAllocationsChanged
 Optional, output. Pointer to array that will be filled with information whether the allocation at certain index has been changed during defragmentation. More...
 
uint32_t poolCount
 Numer of pools in pPools array. More...
 
VmaPoolpPools
 Either null or pointer to array of pools to be defragmented. More...
 
VkDeviceSize maxCpuBytesToMove
 Maximum total numbers of bytes that can be copied while moving allocations to different places using transfers on CPU side, like memcpy(), memmove(). More...
 
uint32_t maxCpuAllocationsToMove
 Maximum number of allocations that can be moved to a different place using transfers on CPU side, like memcpy(), memmove(). More...
 
VkDeviceSize maxGpuBytesToMove
 Maximum total numbers of bytes that can be copied while moving allocations to different places using transfers on GPU side, posted to commandBuffer. More...
 
uint32_t maxGpuAllocationsToMove
 Maximum number of allocations that can be moved to a different place using transfers on GPU side, posted to commandBuffer. More...
 
VkCommandBuffer commandBuffer
 Optional. Command buffer where GPU copy commands will be posted. More...
 

Detailed Description

Parameters for defragmentation.

To be used with function vmaDefragmentationBegin().

Definition at line 3119 of file vk_mem_alloc.h.

Member Data Documentation

◆ allocationCount

uint32_t VmaDefragmentationInfo2::allocationCount

Number of allocations in pAllocations array.

Definition at line 3125 of file vk_mem_alloc.h.

◆ commandBuffer

VkCommandBuffer VmaDefragmentationInfo2::commandBuffer

Optional. Command buffer where GPU copy commands will be posted.

If not null, it must be a valid command buffer handle that supports Transfer queue type. It must be in the recording state and outside of a render pass instance. You need to submit it and make sure it finished execution before calling vmaDefragmentationEnd().

Passing null means that only CPU defragmentation will be performed.

Definition at line 3188 of file vk_mem_alloc.h.

◆ flags

VmaDefragmentationFlags VmaDefragmentationInfo2::flags

Reserved for future use. Should be 0.

Definition at line 3122 of file vk_mem_alloc.h.

◆ maxCpuAllocationsToMove

uint32_t VmaDefragmentationInfo2::maxCpuAllocationsToMove

Maximum number of allocations that can be moved to a different place using transfers on CPU side, like memcpy(), memmove().

UINT32_MAX means no limit.

Definition at line 3169 of file vk_mem_alloc.h.

◆ maxCpuBytesToMove

VkDeviceSize VmaDefragmentationInfo2::maxCpuBytesToMove

Maximum total numbers of bytes that can be copied while moving allocations to different places using transfers on CPU side, like memcpy(), memmove().

VK_WHOLE_SIZE means no limit.

Definition at line 3164 of file vk_mem_alloc.h.

◆ maxGpuAllocationsToMove

uint32_t VmaDefragmentationInfo2::maxGpuAllocationsToMove

Maximum number of allocations that can be moved to a different place using transfers on GPU side, posted to commandBuffer.

UINT32_MAX means no limit.

Definition at line 3179 of file vk_mem_alloc.h.

◆ maxGpuBytesToMove

VkDeviceSize VmaDefragmentationInfo2::maxGpuBytesToMove

Maximum total numbers of bytes that can be copied while moving allocations to different places using transfers on GPU side, posted to commandBuffer.

VK_WHOLE_SIZE means no limit.

Definition at line 3174 of file vk_mem_alloc.h.

◆ pAllocations

VmaAllocation* VmaDefragmentationInfo2::pAllocations

Pointer to array of allocations that can be defragmented.

The array should have allocationCount elements. The array should not contain nulls. Elements in the array should be unique - same allocation cannot occur twice. It is safe to pass allocations that are in the lost state - they are ignored. All allocations not present in this array are considered non-moveable during this defragmentation.

Definition at line 3134 of file vk_mem_alloc.h.

◆ pAllocationsChanged

VkBool32* VmaDefragmentationInfo2::pAllocationsChanged

Optional, output. Pointer to array that will be filled with information whether the allocation at certain index has been changed during defragmentation.

The array should have allocationCount elements. You can pass null if you are not interested in this information.

Definition at line 3140 of file vk_mem_alloc.h.

◆ poolCount

uint32_t VmaDefragmentationInfo2::poolCount

Numer of pools in pPools array.

Definition at line 3143 of file vk_mem_alloc.h.

◆ pPools

VmaPool* VmaDefragmentationInfo2::pPools

Either null or pointer to array of pools to be defragmented.

All the allocations in the specified pools can be moved during defragmentation and there is no way to check if they were really moved as in pAllocationsChanged, so you must query all the allocations in all these pools for new VkDeviceMemory and offset using vmaGetAllocationInfo() if you might need to recreate buffers and images bound to them.

The array should have poolCount elements. The array should not contain nulls. Elements in the array should be unique - same pool cannot occur twice.

Using this array is equivalent to specifying all allocations from the pools in pAllocations. It might be more efficient.

Definition at line 3159 of file vk_mem_alloc.h.


The documentation for this struct was generated from the following file: