mirror of
https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator
synced 2024-11-05 12:20:07 +00:00
Add macros VMA_CALL_PRE, VMA_CALL_POST to easily declare public functions as exported
Fixes #76
This commit is contained in:
parent
744459ff8c
commit
5c2c7f3e7a
@ -1718,6 +1718,18 @@ available through VmaAllocatorCreateInfo::pRecordSettings.
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Define these macros to decorate all public functions with additional code,
|
||||||
|
// before and after returned type, appropriately. This may be useful for
|
||||||
|
// exporing the functions when compiling VMA as a separate library. Example:
|
||||||
|
// #define VMA_CALL_PRE __declspec(dllexport)
|
||||||
|
// #define VMA_CALL_POST __cdecl
|
||||||
|
#ifndef VMA_CALL_PRE
|
||||||
|
#define VMA_CALL_PRE
|
||||||
|
#endif
|
||||||
|
#ifndef VMA_CALL_POST
|
||||||
|
#define VMA_CALL_POST
|
||||||
|
#endif
|
||||||
|
|
||||||
/** \struct VmaAllocator
|
/** \struct VmaAllocator
|
||||||
\brief Represents main object of this library initialized.
|
\brief Represents main object of this library initialized.
|
||||||
|
|
||||||
@ -1943,19 +1955,19 @@ typedef struct VmaAllocatorCreateInfo
|
|||||||
} VmaAllocatorCreateInfo;
|
} VmaAllocatorCreateInfo;
|
||||||
|
|
||||||
/// Creates Allocator object.
|
/// Creates Allocator object.
|
||||||
VkResult vmaCreateAllocator(
|
VMA_CALL_PRE VkResult VMA_CALL_POST vmaCreateAllocator(
|
||||||
const VmaAllocatorCreateInfo* pCreateInfo,
|
const VmaAllocatorCreateInfo* pCreateInfo,
|
||||||
VmaAllocator* pAllocator);
|
VmaAllocator* pAllocator);
|
||||||
|
|
||||||
/// Destroys allocator object.
|
/// Destroys allocator object.
|
||||||
void vmaDestroyAllocator(
|
VMA_CALL_PRE void VMA_CALL_POST vmaDestroyAllocator(
|
||||||
VmaAllocator allocator);
|
VmaAllocator allocator);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
PhysicalDeviceProperties are fetched from physicalDevice by the allocator.
|
PhysicalDeviceProperties are fetched from physicalDevice by the allocator.
|
||||||
You can access it here, without fetching it again on your own.
|
You can access it here, without fetching it again on your own.
|
||||||
*/
|
*/
|
||||||
void vmaGetPhysicalDeviceProperties(
|
VMA_CALL_PRE void VMA_CALL_POST vmaGetPhysicalDeviceProperties(
|
||||||
VmaAllocator allocator,
|
VmaAllocator allocator,
|
||||||
const VkPhysicalDeviceProperties** ppPhysicalDeviceProperties);
|
const VkPhysicalDeviceProperties** ppPhysicalDeviceProperties);
|
||||||
|
|
||||||
@ -1963,7 +1975,7 @@ void vmaGetPhysicalDeviceProperties(
|
|||||||
PhysicalDeviceMemoryProperties are fetched from physicalDevice by the allocator.
|
PhysicalDeviceMemoryProperties are fetched from physicalDevice by the allocator.
|
||||||
You can access it here, without fetching it again on your own.
|
You can access it here, without fetching it again on your own.
|
||||||
*/
|
*/
|
||||||
void vmaGetMemoryProperties(
|
VMA_CALL_PRE void VMA_CALL_POST vmaGetMemoryProperties(
|
||||||
VmaAllocator allocator,
|
VmaAllocator allocator,
|
||||||
const VkPhysicalDeviceMemoryProperties** ppPhysicalDeviceMemoryProperties);
|
const VkPhysicalDeviceMemoryProperties** ppPhysicalDeviceMemoryProperties);
|
||||||
|
|
||||||
@ -1973,7 +1985,7 @@ void vmaGetMemoryProperties(
|
|||||||
This is just a convenience function. Same information can be obtained using
|
This is just a convenience function. Same information can be obtained using
|
||||||
vmaGetMemoryProperties().
|
vmaGetMemoryProperties().
|
||||||
*/
|
*/
|
||||||
void vmaGetMemoryTypeProperties(
|
VMA_CALL_PRE void VMA_CALL_POST vmaGetMemoryTypeProperties(
|
||||||
VmaAllocator allocator,
|
VmaAllocator allocator,
|
||||||
uint32_t memoryTypeIndex,
|
uint32_t memoryTypeIndex,
|
||||||
VkMemoryPropertyFlags* pFlags);
|
VkMemoryPropertyFlags* pFlags);
|
||||||
@ -1986,7 +1998,7 @@ This function must be used if you make allocations with
|
|||||||
when a new frame begins. Allocations queried using vmaGetAllocationInfo() cannot
|
when a new frame begins. Allocations queried using vmaGetAllocationInfo() cannot
|
||||||
become lost in the current frame.
|
become lost in the current frame.
|
||||||
*/
|
*/
|
||||||
void vmaSetCurrentFrameIndex(
|
VMA_CALL_PRE void VMA_CALL_POST vmaSetCurrentFrameIndex(
|
||||||
VmaAllocator allocator,
|
VmaAllocator allocator,
|
||||||
uint32_t frameIndex);
|
uint32_t frameIndex);
|
||||||
|
|
||||||
@ -2017,7 +2029,7 @@ typedef struct VmaStats
|
|||||||
} VmaStats;
|
} VmaStats;
|
||||||
|
|
||||||
/// Retrieves statistics from current state of the Allocator.
|
/// Retrieves statistics from current state of the Allocator.
|
||||||
void vmaCalculateStats(
|
VMA_CALL_PRE void VMA_CALL_POST vmaCalculateStats(
|
||||||
VmaAllocator allocator,
|
VmaAllocator allocator,
|
||||||
VmaStats* pStats);
|
VmaStats* pStats);
|
||||||
|
|
||||||
@ -2030,12 +2042,12 @@ void vmaCalculateStats(
|
|||||||
/// Builds and returns statistics as string in JSON format.
|
/// Builds and returns statistics as string in JSON format.
|
||||||
/** @param[out] ppStatsString Must be freed using vmaFreeStatsString() function.
|
/** @param[out] ppStatsString Must be freed using vmaFreeStatsString() function.
|
||||||
*/
|
*/
|
||||||
void vmaBuildStatsString(
|
VMA_CALL_PRE void VMA_CALL_POST vmaBuildStatsString(
|
||||||
VmaAllocator allocator,
|
VmaAllocator allocator,
|
||||||
char** ppStatsString,
|
char** ppStatsString,
|
||||||
VkBool32 detailedMap);
|
VkBool32 detailedMap);
|
||||||
|
|
||||||
void vmaFreeStatsString(
|
VMA_CALL_PRE void VMA_CALL_POST vmaFreeStatsString(
|
||||||
VmaAllocator allocator,
|
VmaAllocator allocator,
|
||||||
char* pStatsString);
|
char* pStatsString);
|
||||||
|
|
||||||
@ -2270,7 +2282,7 @@ device doesn't support any memory type with requested features for the specific
|
|||||||
type of resource you want to use it for. Please check parameters of your
|
type of resource you want to use it for. Please check parameters of your
|
||||||
resource, like image layout (OPTIMAL versus LINEAR) or mip level count.
|
resource, like image layout (OPTIMAL versus LINEAR) or mip level count.
|
||||||
*/
|
*/
|
||||||
VkResult vmaFindMemoryTypeIndex(
|
VMA_CALL_PRE VkResult VMA_CALL_POST vmaFindMemoryTypeIndex(
|
||||||
VmaAllocator allocator,
|
VmaAllocator allocator,
|
||||||
uint32_t memoryTypeBits,
|
uint32_t memoryTypeBits,
|
||||||
const VmaAllocationCreateInfo* pAllocationCreateInfo,
|
const VmaAllocationCreateInfo* pAllocationCreateInfo,
|
||||||
@ -2288,7 +2300,7 @@ It is just a convenience function, equivalent to calling:
|
|||||||
- `vmaFindMemoryTypeIndex`
|
- `vmaFindMemoryTypeIndex`
|
||||||
- `vkDestroyBuffer`
|
- `vkDestroyBuffer`
|
||||||
*/
|
*/
|
||||||
VkResult vmaFindMemoryTypeIndexForBufferInfo(
|
VMA_CALL_PRE VkResult VMA_CALL_POST vmaFindMemoryTypeIndexForBufferInfo(
|
||||||
VmaAllocator allocator,
|
VmaAllocator allocator,
|
||||||
const VkBufferCreateInfo* pBufferCreateInfo,
|
const VkBufferCreateInfo* pBufferCreateInfo,
|
||||||
const VmaAllocationCreateInfo* pAllocationCreateInfo,
|
const VmaAllocationCreateInfo* pAllocationCreateInfo,
|
||||||
@ -2306,7 +2318,7 @@ It is just a convenience function, equivalent to calling:
|
|||||||
- `vmaFindMemoryTypeIndex`
|
- `vmaFindMemoryTypeIndex`
|
||||||
- `vkDestroyImage`
|
- `vkDestroyImage`
|
||||||
*/
|
*/
|
||||||
VkResult vmaFindMemoryTypeIndexForImageInfo(
|
VMA_CALL_PRE VkResult VMA_CALL_POST vmaFindMemoryTypeIndexForImageInfo(
|
||||||
VmaAllocator allocator,
|
VmaAllocator allocator,
|
||||||
const VkImageCreateInfo* pImageCreateInfo,
|
const VkImageCreateInfo* pImageCreateInfo,
|
||||||
const VmaAllocationCreateInfo* pAllocationCreateInfo,
|
const VmaAllocationCreateInfo* pAllocationCreateInfo,
|
||||||
@ -2451,14 +2463,14 @@ typedef struct VmaPoolStats {
|
|||||||
@param pCreateInfo Parameters of pool to create.
|
@param pCreateInfo Parameters of pool to create.
|
||||||
@param[out] pPool Handle to created pool.
|
@param[out] pPool Handle to created pool.
|
||||||
*/
|
*/
|
||||||
VkResult vmaCreatePool(
|
VMA_CALL_PRE VkResult VMA_CALL_POST vmaCreatePool(
|
||||||
VmaAllocator allocator,
|
VmaAllocator allocator,
|
||||||
const VmaPoolCreateInfo* pCreateInfo,
|
const VmaPoolCreateInfo* pCreateInfo,
|
||||||
VmaPool* pPool);
|
VmaPool* pPool);
|
||||||
|
|
||||||
/** \brief Destroys #VmaPool object and frees Vulkan device memory.
|
/** \brief Destroys #VmaPool object and frees Vulkan device memory.
|
||||||
*/
|
*/
|
||||||
void vmaDestroyPool(
|
VMA_CALL_PRE void VMA_CALL_POST vmaDestroyPool(
|
||||||
VmaAllocator allocator,
|
VmaAllocator allocator,
|
||||||
VmaPool pool);
|
VmaPool pool);
|
||||||
|
|
||||||
@ -2468,7 +2480,7 @@ void vmaDestroyPool(
|
|||||||
@param pool Pool object.
|
@param pool Pool object.
|
||||||
@param[out] pPoolStats Statistics of specified pool.
|
@param[out] pPoolStats Statistics of specified pool.
|
||||||
*/
|
*/
|
||||||
void vmaGetPoolStats(
|
VMA_CALL_PRE void VMA_CALL_POST vmaGetPoolStats(
|
||||||
VmaAllocator allocator,
|
VmaAllocator allocator,
|
||||||
VmaPool pool,
|
VmaPool pool,
|
||||||
VmaPoolStats* pPoolStats);
|
VmaPoolStats* pPoolStats);
|
||||||
@ -2479,7 +2491,7 @@ void vmaGetPoolStats(
|
|||||||
@param pool Pool.
|
@param pool Pool.
|
||||||
@param[out] pLostAllocationCount Number of allocations marked as lost. Optional - pass null if you don't need this information.
|
@param[out] pLostAllocationCount Number of allocations marked as lost. Optional - pass null if you don't need this information.
|
||||||
*/
|
*/
|
||||||
void vmaMakePoolAllocationsLost(
|
VMA_CALL_PRE void VMA_CALL_POST vmaMakePoolAllocationsLost(
|
||||||
VmaAllocator allocator,
|
VmaAllocator allocator,
|
||||||
VmaPool pool,
|
VmaPool pool,
|
||||||
size_t* pLostAllocationCount);
|
size_t* pLostAllocationCount);
|
||||||
@ -2498,7 +2510,7 @@ Possible return values:
|
|||||||
`VMA_ASSERT` is also fired in that case.
|
`VMA_ASSERT` is also fired in that case.
|
||||||
- Other value: Error returned by Vulkan, e.g. memory mapping failure.
|
- Other value: Error returned by Vulkan, e.g. memory mapping failure.
|
||||||
*/
|
*/
|
||||||
VkResult vmaCheckPoolCorruption(VmaAllocator allocator, VmaPool pool);
|
VMA_CALL_PRE VkResult VMA_CALL_POST vmaCheckPoolCorruption(VmaAllocator allocator, VmaPool pool);
|
||||||
|
|
||||||
/** \struct VmaAllocation
|
/** \struct VmaAllocation
|
||||||
\brief Represents single memory allocation.
|
\brief Represents single memory allocation.
|
||||||
@ -2579,7 +2591,7 @@ You should free the memory using vmaFreeMemory() or vmaFreeMemoryPages().
|
|||||||
It is recommended to use vmaAllocateMemoryForBuffer(), vmaAllocateMemoryForImage(),
|
It is recommended to use vmaAllocateMemoryForBuffer(), vmaAllocateMemoryForImage(),
|
||||||
vmaCreateBuffer(), vmaCreateImage() instead whenever possible.
|
vmaCreateBuffer(), vmaCreateImage() instead whenever possible.
|
||||||
*/
|
*/
|
||||||
VkResult vmaAllocateMemory(
|
VMA_CALL_PRE VkResult VMA_CALL_POST vmaAllocateMemory(
|
||||||
VmaAllocator allocator,
|
VmaAllocator allocator,
|
||||||
const VkMemoryRequirements* pVkMemoryRequirements,
|
const VkMemoryRequirements* pVkMemoryRequirements,
|
||||||
const VmaAllocationCreateInfo* pCreateInfo,
|
const VmaAllocationCreateInfo* pCreateInfo,
|
||||||
@ -2605,7 +2617,7 @@ All allocations are made using same parameters. All of them are created out of t
|
|||||||
If any allocation fails, all allocations already made within this function call are also freed, so that when
|
If any allocation fails, all allocations already made within this function call are also freed, so that when
|
||||||
returned result is not `VK_SUCCESS`, `pAllocation` array is always entirely filled with `VK_NULL_HANDLE`.
|
returned result is not `VK_SUCCESS`, `pAllocation` array is always entirely filled with `VK_NULL_HANDLE`.
|
||||||
*/
|
*/
|
||||||
VkResult vmaAllocateMemoryPages(
|
VMA_CALL_PRE VkResult VMA_CALL_POST vmaAllocateMemoryPages(
|
||||||
VmaAllocator allocator,
|
VmaAllocator allocator,
|
||||||
const VkMemoryRequirements* pVkMemoryRequirements,
|
const VkMemoryRequirements* pVkMemoryRequirements,
|
||||||
const VmaAllocationCreateInfo* pCreateInfo,
|
const VmaAllocationCreateInfo* pCreateInfo,
|
||||||
@ -2619,7 +2631,7 @@ VkResult vmaAllocateMemoryPages(
|
|||||||
|
|
||||||
You should free the memory using vmaFreeMemory().
|
You should free the memory using vmaFreeMemory().
|
||||||
*/
|
*/
|
||||||
VkResult vmaAllocateMemoryForBuffer(
|
VMA_CALL_PRE VkResult VMA_CALL_POST vmaAllocateMemoryForBuffer(
|
||||||
VmaAllocator allocator,
|
VmaAllocator allocator,
|
||||||
VkBuffer buffer,
|
VkBuffer buffer,
|
||||||
const VmaAllocationCreateInfo* pCreateInfo,
|
const VmaAllocationCreateInfo* pCreateInfo,
|
||||||
@ -2627,7 +2639,7 @@ VkResult vmaAllocateMemoryForBuffer(
|
|||||||
VmaAllocationInfo* pAllocationInfo);
|
VmaAllocationInfo* pAllocationInfo);
|
||||||
|
|
||||||
/// Function similar to vmaAllocateMemoryForBuffer().
|
/// Function similar to vmaAllocateMemoryForBuffer().
|
||||||
VkResult vmaAllocateMemoryForImage(
|
VMA_CALL_PRE VkResult VMA_CALL_POST vmaAllocateMemoryForImage(
|
||||||
VmaAllocator allocator,
|
VmaAllocator allocator,
|
||||||
VkImage image,
|
VkImage image,
|
||||||
const VmaAllocationCreateInfo* pCreateInfo,
|
const VmaAllocationCreateInfo* pCreateInfo,
|
||||||
@ -2638,7 +2650,7 @@ VkResult vmaAllocateMemoryForImage(
|
|||||||
|
|
||||||
Passing `VK_NULL_HANDLE` as `allocation` is valid. Such function call is just skipped.
|
Passing `VK_NULL_HANDLE` as `allocation` is valid. Such function call is just skipped.
|
||||||
*/
|
*/
|
||||||
void vmaFreeMemory(
|
VMA_CALL_PRE void VMA_CALL_POST vmaFreeMemory(
|
||||||
VmaAllocator allocator,
|
VmaAllocator allocator,
|
||||||
VmaAllocation allocation);
|
VmaAllocation allocation);
|
||||||
|
|
||||||
@ -2652,7 +2664,7 @@ It may be internally optimized to be more efficient than calling vmaFreeMemory()
|
|||||||
Allocations in `pAllocations` array can come from any memory pools and types.
|
Allocations in `pAllocations` array can come from any memory pools and types.
|
||||||
Passing `VK_NULL_HANDLE` as elements of `pAllocations` array is valid. Such entries are just skipped.
|
Passing `VK_NULL_HANDLE` as elements of `pAllocations` array is valid. Such entries are just skipped.
|
||||||
*/
|
*/
|
||||||
void vmaFreeMemoryPages(
|
VMA_CALL_PRE void VMA_CALL_POST vmaFreeMemoryPages(
|
||||||
VmaAllocator allocator,
|
VmaAllocator allocator,
|
||||||
size_t allocationCount,
|
size_t allocationCount,
|
||||||
VmaAllocation* pAllocations);
|
VmaAllocation* pAllocations);
|
||||||
@ -2663,7 +2675,7 @@ In version 2.2.0 it used to try to change allocation's size without moving or re
|
|||||||
In current version it returns `VK_SUCCESS` only if `newSize` equals current allocation's size.
|
In current version it returns `VK_SUCCESS` only if `newSize` equals current allocation's size.
|
||||||
Otherwise returns `VK_ERROR_OUT_OF_POOL_MEMORY`, indicating that allocation's size could not be changed.
|
Otherwise returns `VK_ERROR_OUT_OF_POOL_MEMORY`, indicating that allocation's size could not be changed.
|
||||||
*/
|
*/
|
||||||
VkResult vmaResizeAllocation(
|
VMA_CALL_PRE VkResult VMA_CALL_POST vmaResizeAllocation(
|
||||||
VmaAllocator allocator,
|
VmaAllocator allocator,
|
||||||
VmaAllocation allocation,
|
VmaAllocation allocation,
|
||||||
VkDeviceSize newSize);
|
VkDeviceSize newSize);
|
||||||
@ -2684,7 +2696,7 @@ you can avoid calling it too often.
|
|||||||
(e.g. due to defragmentation or allocation becoming lost).
|
(e.g. due to defragmentation or allocation becoming lost).
|
||||||
- If you just want to check if allocation is not lost, vmaTouchAllocation() will work faster.
|
- If you just want to check if allocation is not lost, vmaTouchAllocation() will work faster.
|
||||||
*/
|
*/
|
||||||
void vmaGetAllocationInfo(
|
VMA_CALL_PRE void VMA_CALL_POST vmaGetAllocationInfo(
|
||||||
VmaAllocator allocator,
|
VmaAllocator allocator,
|
||||||
VmaAllocation allocation,
|
VmaAllocation allocation,
|
||||||
VmaAllocationInfo* pAllocationInfo);
|
VmaAllocationInfo* pAllocationInfo);
|
||||||
@ -2703,7 +2715,7 @@ Lost allocation and the buffer/image still need to be destroyed.
|
|||||||
If the allocation has been created without #VMA_ALLOCATION_CREATE_CAN_BECOME_LOST_BIT flag,
|
If the allocation has been created without #VMA_ALLOCATION_CREATE_CAN_BECOME_LOST_BIT flag,
|
||||||
this function always returns `VK_TRUE`.
|
this function always returns `VK_TRUE`.
|
||||||
*/
|
*/
|
||||||
VkBool32 vmaTouchAllocation(
|
VMA_CALL_PRE VkBool32 VMA_CALL_POST vmaTouchAllocation(
|
||||||
VmaAllocator allocator,
|
VmaAllocator allocator,
|
||||||
VmaAllocation allocation);
|
VmaAllocation allocation);
|
||||||
|
|
||||||
@ -2720,7 +2732,7 @@ If the flag was not used, the value of pointer `pUserData` is just copied to
|
|||||||
allocation's `pUserData`. It is opaque, so you can use it however you want - e.g.
|
allocation's `pUserData`. It is opaque, so you can use it however you want - e.g.
|
||||||
as a pointer, ordinal number or some handle to you own data.
|
as a pointer, ordinal number or some handle to you own data.
|
||||||
*/
|
*/
|
||||||
void vmaSetAllocationUserData(
|
VMA_CALL_PRE void VMA_CALL_POST vmaSetAllocationUserData(
|
||||||
VmaAllocator allocator,
|
VmaAllocator allocator,
|
||||||
VmaAllocation allocation,
|
VmaAllocation allocation,
|
||||||
void* pUserData);
|
void* pUserData);
|
||||||
@ -2735,7 +2747,7 @@ Returned allocation is not tied to any specific memory pool or memory type and
|
|||||||
not bound to any image or buffer. It has size = 0. It cannot be turned into
|
not bound to any image or buffer. It has size = 0. It cannot be turned into
|
||||||
a real, non-empty allocation.
|
a real, non-empty allocation.
|
||||||
*/
|
*/
|
||||||
void vmaCreateLostAllocation(
|
VMA_CALL_PRE void VMA_CALL_POST vmaCreateLostAllocation(
|
||||||
VmaAllocator allocator,
|
VmaAllocator allocator,
|
||||||
VmaAllocation* pAllocation);
|
VmaAllocation* pAllocation);
|
||||||
|
|
||||||
@ -2773,7 +2785,7 @@ This function always fails when called for allocation that was created with
|
|||||||
#VMA_ALLOCATION_CREATE_CAN_BECOME_LOST_BIT flag. Such allocations cannot be
|
#VMA_ALLOCATION_CREATE_CAN_BECOME_LOST_BIT flag. Such allocations cannot be
|
||||||
mapped.
|
mapped.
|
||||||
*/
|
*/
|
||||||
VkResult vmaMapMemory(
|
VMA_CALL_PRE VkResult VMA_CALL_POST vmaMapMemory(
|
||||||
VmaAllocator allocator,
|
VmaAllocator allocator,
|
||||||
VmaAllocation allocation,
|
VmaAllocation allocation,
|
||||||
void** ppData);
|
void** ppData);
|
||||||
@ -2782,7 +2794,7 @@ VkResult vmaMapMemory(
|
|||||||
|
|
||||||
For details, see description of vmaMapMemory().
|
For details, see description of vmaMapMemory().
|
||||||
*/
|
*/
|
||||||
void vmaUnmapMemory(
|
VMA_CALL_PRE void VMA_CALL_POST vmaUnmapMemory(
|
||||||
VmaAllocator allocator,
|
VmaAllocator allocator,
|
||||||
VmaAllocation allocation);
|
VmaAllocation allocation);
|
||||||
|
|
||||||
@ -2802,7 +2814,7 @@ Warning! `offset` and `size` are relative to the contents of given `allocation`.
|
|||||||
If you mean whole allocation, you can pass 0 and `VK_WHOLE_SIZE`, respectively.
|
If you mean whole allocation, you can pass 0 and `VK_WHOLE_SIZE`, respectively.
|
||||||
Do not pass allocation's offset as `offset`!!!
|
Do not pass allocation's offset as `offset`!!!
|
||||||
*/
|
*/
|
||||||
void vmaFlushAllocation(VmaAllocator allocator, VmaAllocation allocation, VkDeviceSize offset, VkDeviceSize size);
|
VMA_CALL_PRE void VMA_CALL_POST vmaFlushAllocation(VmaAllocator allocator, VmaAllocation allocation, VkDeviceSize offset, VkDeviceSize size);
|
||||||
|
|
||||||
/** \brief Invalidates memory of given allocation.
|
/** \brief Invalidates memory of given allocation.
|
||||||
|
|
||||||
@ -2820,7 +2832,7 @@ Warning! `offset` and `size` are relative to the contents of given `allocation`.
|
|||||||
If you mean whole allocation, you can pass 0 and `VK_WHOLE_SIZE`, respectively.
|
If you mean whole allocation, you can pass 0 and `VK_WHOLE_SIZE`, respectively.
|
||||||
Do not pass allocation's offset as `offset`!!!
|
Do not pass allocation's offset as `offset`!!!
|
||||||
*/
|
*/
|
||||||
void vmaInvalidateAllocation(VmaAllocator allocator, VmaAllocation allocation, VkDeviceSize offset, VkDeviceSize size);
|
VMA_CALL_PRE void VMA_CALL_POST vmaInvalidateAllocation(VmaAllocator allocator, VmaAllocation allocation, VkDeviceSize offset, VkDeviceSize size);
|
||||||
|
|
||||||
/** \brief Checks magic number in margins around all allocations in given memory types (in both default and custom pools) in search for corruptions.
|
/** \brief Checks magic number in margins around all allocations in given memory types (in both default and custom pools) in search for corruptions.
|
||||||
|
|
||||||
@ -2838,7 +2850,7 @@ Possible return values:
|
|||||||
`VMA_ASSERT` is also fired in that case.
|
`VMA_ASSERT` is also fired in that case.
|
||||||
- Other value: Error returned by Vulkan, e.g. memory mapping failure.
|
- Other value: Error returned by Vulkan, e.g. memory mapping failure.
|
||||||
*/
|
*/
|
||||||
VkResult vmaCheckCorruption(VmaAllocator allocator, uint32_t memoryTypeBits);
|
VMA_CALL_PRE VkResult VMA_CALL_POST vmaCheckCorruption(VmaAllocator allocator, uint32_t memoryTypeBits);
|
||||||
|
|
||||||
/** \struct VmaDefragmentationContext
|
/** \struct VmaDefragmentationContext
|
||||||
\brief Represents Opaque object that represents started defragmentation process.
|
\brief Represents Opaque object that represents started defragmentation process.
|
||||||
@ -2988,7 +3000,7 @@ Warning! Between the call to vmaDefragmentationBegin() and vmaDefragmentationEnd
|
|||||||
For more information and important limitations regarding defragmentation, see documentation chapter:
|
For more information and important limitations regarding defragmentation, see documentation chapter:
|
||||||
[Defragmentation](@ref defragmentation).
|
[Defragmentation](@ref defragmentation).
|
||||||
*/
|
*/
|
||||||
VkResult vmaDefragmentationBegin(
|
VMA_CALL_PRE VkResult VMA_CALL_POST vmaDefragmentationBegin(
|
||||||
VmaAllocator allocator,
|
VmaAllocator allocator,
|
||||||
const VmaDefragmentationInfo2* pInfo,
|
const VmaDefragmentationInfo2* pInfo,
|
||||||
VmaDefragmentationStats* pStats,
|
VmaDefragmentationStats* pStats,
|
||||||
@ -2999,7 +3011,7 @@ VkResult vmaDefragmentationBegin(
|
|||||||
Use this function to finish defragmentation started by vmaDefragmentationBegin().
|
Use this function to finish defragmentation started by vmaDefragmentationBegin().
|
||||||
It is safe to pass `context == null`. The function then does nothing.
|
It is safe to pass `context == null`. The function then does nothing.
|
||||||
*/
|
*/
|
||||||
VkResult vmaDefragmentationEnd(
|
VMA_CALL_PRE VkResult VMA_CALL_POST vmaDefragmentationEnd(
|
||||||
VmaAllocator allocator,
|
VmaAllocator allocator,
|
||||||
VmaDefragmentationContext context);
|
VmaDefragmentationContext context);
|
||||||
|
|
||||||
@ -3043,7 +3055,7 @@ you should measure that on your platform.
|
|||||||
|
|
||||||
For more information, see [Defragmentation](@ref defragmentation) chapter.
|
For more information, see [Defragmentation](@ref defragmentation) chapter.
|
||||||
*/
|
*/
|
||||||
VkResult vmaDefragment(
|
VMA_CALL_PRE VkResult VMA_CALL_POST vmaDefragment(
|
||||||
VmaAllocator allocator,
|
VmaAllocator allocator,
|
||||||
VmaAllocation* pAllocations,
|
VmaAllocation* pAllocations,
|
||||||
size_t allocationCount,
|
size_t allocationCount,
|
||||||
@ -3063,7 +3075,7 @@ allocations, calls to `vkBind*Memory()` or `vkMapMemory()` won't happen from mul
|
|||||||
|
|
||||||
It is recommended to use function vmaCreateBuffer() instead of this one.
|
It is recommended to use function vmaCreateBuffer() instead of this one.
|
||||||
*/
|
*/
|
||||||
VkResult vmaBindBufferMemory(
|
VMA_CALL_PRE VkResult VMA_CALL_POST vmaBindBufferMemory(
|
||||||
VmaAllocator allocator,
|
VmaAllocator allocator,
|
||||||
VmaAllocation allocation,
|
VmaAllocation allocation,
|
||||||
VkBuffer buffer);
|
VkBuffer buffer);
|
||||||
@ -3078,7 +3090,7 @@ This function is similar to vmaBindBufferMemory(), but it provides additional pa
|
|||||||
If `pNext` is not null, #VmaAllocator object must have been created with #VMA_ALLOCATOR_CREATE_KHR_BIND_MEMORY2_BIT flag.
|
If `pNext` is not null, #VmaAllocator object must have been created with #VMA_ALLOCATOR_CREATE_KHR_BIND_MEMORY2_BIT flag.
|
||||||
Otherwise the call fails.
|
Otherwise the call fails.
|
||||||
*/
|
*/
|
||||||
VkResult vmaBindBufferMemory2(
|
VMA_CALL_PRE VkResult VMA_CALL_POST vmaBindBufferMemory2(
|
||||||
VmaAllocator allocator,
|
VmaAllocator allocator,
|
||||||
VmaAllocation allocation,
|
VmaAllocation allocation,
|
||||||
VkDeviceSize allocationLocalOffset,
|
VkDeviceSize allocationLocalOffset,
|
||||||
@ -3097,7 +3109,7 @@ allocations, calls to `vkBind*Memory()` or `vkMapMemory()` won't happen from mul
|
|||||||
|
|
||||||
It is recommended to use function vmaCreateImage() instead of this one.
|
It is recommended to use function vmaCreateImage() instead of this one.
|
||||||
*/
|
*/
|
||||||
VkResult vmaBindImageMemory(
|
VMA_CALL_PRE VkResult VMA_CALL_POST vmaBindImageMemory(
|
||||||
VmaAllocator allocator,
|
VmaAllocator allocator,
|
||||||
VmaAllocation allocation,
|
VmaAllocation allocation,
|
||||||
VkImage image);
|
VkImage image);
|
||||||
@ -3112,7 +3124,7 @@ This function is similar to vmaBindImageMemory(), but it provides additional par
|
|||||||
If `pNext` is not null, #VmaAllocator object must have been created with #VMA_ALLOCATOR_CREATE_KHR_BIND_MEMORY2_BIT flag.
|
If `pNext` is not null, #VmaAllocator object must have been created with #VMA_ALLOCATOR_CREATE_KHR_BIND_MEMORY2_BIT flag.
|
||||||
Otherwise the call fails.
|
Otherwise the call fails.
|
||||||
*/
|
*/
|
||||||
VkResult vmaBindImageMemory2(
|
VMA_CALL_PRE VkResult VMA_CALL_POST vmaBindImageMemory2(
|
||||||
VmaAllocator allocator,
|
VmaAllocator allocator,
|
||||||
VmaAllocation allocation,
|
VmaAllocation allocation,
|
||||||
VkDeviceSize allocationLocalOffset,
|
VkDeviceSize allocationLocalOffset,
|
||||||
@ -3145,7 +3157,7 @@ and VMA_ALLOCATION_CREATE_NEVER_ALLOCATE_BIT is not used), it creates dedicated
|
|||||||
allocation for this buffer, just like when using
|
allocation for this buffer, just like when using
|
||||||
VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT.
|
VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT.
|
||||||
*/
|
*/
|
||||||
VkResult vmaCreateBuffer(
|
VMA_CALL_PRE VkResult VMA_CALL_POST vmaCreateBuffer(
|
||||||
VmaAllocator allocator,
|
VmaAllocator allocator,
|
||||||
const VkBufferCreateInfo* pBufferCreateInfo,
|
const VkBufferCreateInfo* pBufferCreateInfo,
|
||||||
const VmaAllocationCreateInfo* pAllocationCreateInfo,
|
const VmaAllocationCreateInfo* pAllocationCreateInfo,
|
||||||
@ -3164,13 +3176,13 @@ vmaFreeMemory(allocator, allocation);
|
|||||||
|
|
||||||
It it safe to pass null as buffer and/or allocation.
|
It it safe to pass null as buffer and/or allocation.
|
||||||
*/
|
*/
|
||||||
void vmaDestroyBuffer(
|
VMA_CALL_PRE void VMA_CALL_POST vmaDestroyBuffer(
|
||||||
VmaAllocator allocator,
|
VmaAllocator allocator,
|
||||||
VkBuffer buffer,
|
VkBuffer buffer,
|
||||||
VmaAllocation allocation);
|
VmaAllocation allocation);
|
||||||
|
|
||||||
/// Function similar to vmaCreateBuffer().
|
/// Function similar to vmaCreateBuffer().
|
||||||
VkResult vmaCreateImage(
|
VMA_CALL_PRE VkResult VMA_CALL_POST vmaCreateImage(
|
||||||
VmaAllocator allocator,
|
VmaAllocator allocator,
|
||||||
const VkImageCreateInfo* pImageCreateInfo,
|
const VkImageCreateInfo* pImageCreateInfo,
|
||||||
const VmaAllocationCreateInfo* pAllocationCreateInfo,
|
const VmaAllocationCreateInfo* pAllocationCreateInfo,
|
||||||
@ -3189,7 +3201,7 @@ vmaFreeMemory(allocator, allocation);
|
|||||||
|
|
||||||
It it safe to pass null as image and/or allocation.
|
It it safe to pass null as image and/or allocation.
|
||||||
*/
|
*/
|
||||||
void vmaDestroyImage(
|
VMA_CALL_PRE void VMA_CALL_POST vmaDestroyImage(
|
||||||
VmaAllocator allocator,
|
VmaAllocator allocator,
|
||||||
VkImage image,
|
VkImage image,
|
||||||
VmaAllocation allocation);
|
VmaAllocation allocation);
|
||||||
@ -15757,7 +15769,7 @@ void VmaAllocator_T::PrintDetailedMap(VmaJsonWriter& json)
|
|||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// Public interface
|
// Public interface
|
||||||
|
|
||||||
VkResult vmaCreateAllocator(
|
VMA_CALL_PRE VkResult VMA_CALL_POST vmaCreateAllocator(
|
||||||
const VmaAllocatorCreateInfo* pCreateInfo,
|
const VmaAllocatorCreateInfo* pCreateInfo,
|
||||||
VmaAllocator* pAllocator)
|
VmaAllocator* pAllocator)
|
||||||
{
|
{
|
||||||
@ -15767,7 +15779,7 @@ VkResult vmaCreateAllocator(
|
|||||||
return (*pAllocator)->Init(pCreateInfo);
|
return (*pAllocator)->Init(pCreateInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
void vmaDestroyAllocator(
|
VMA_CALL_PRE void VMA_CALL_POST vmaDestroyAllocator(
|
||||||
VmaAllocator allocator)
|
VmaAllocator allocator)
|
||||||
{
|
{
|
||||||
if(allocator != VK_NULL_HANDLE)
|
if(allocator != VK_NULL_HANDLE)
|
||||||
@ -15778,7 +15790,7 @@ void vmaDestroyAllocator(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void vmaGetPhysicalDeviceProperties(
|
VMA_CALL_PRE void VMA_CALL_POST vmaGetPhysicalDeviceProperties(
|
||||||
VmaAllocator allocator,
|
VmaAllocator allocator,
|
||||||
const VkPhysicalDeviceProperties **ppPhysicalDeviceProperties)
|
const VkPhysicalDeviceProperties **ppPhysicalDeviceProperties)
|
||||||
{
|
{
|
||||||
@ -15786,7 +15798,7 @@ void vmaGetPhysicalDeviceProperties(
|
|||||||
*ppPhysicalDeviceProperties = &allocator->m_PhysicalDeviceProperties;
|
*ppPhysicalDeviceProperties = &allocator->m_PhysicalDeviceProperties;
|
||||||
}
|
}
|
||||||
|
|
||||||
void vmaGetMemoryProperties(
|
VMA_CALL_PRE void VMA_CALL_POST vmaGetMemoryProperties(
|
||||||
VmaAllocator allocator,
|
VmaAllocator allocator,
|
||||||
const VkPhysicalDeviceMemoryProperties** ppPhysicalDeviceMemoryProperties)
|
const VkPhysicalDeviceMemoryProperties** ppPhysicalDeviceMemoryProperties)
|
||||||
{
|
{
|
||||||
@ -15794,7 +15806,7 @@ void vmaGetMemoryProperties(
|
|||||||
*ppPhysicalDeviceMemoryProperties = &allocator->m_MemProps;
|
*ppPhysicalDeviceMemoryProperties = &allocator->m_MemProps;
|
||||||
}
|
}
|
||||||
|
|
||||||
void vmaGetMemoryTypeProperties(
|
VMA_CALL_PRE void VMA_CALL_POST vmaGetMemoryTypeProperties(
|
||||||
VmaAllocator allocator,
|
VmaAllocator allocator,
|
||||||
uint32_t memoryTypeIndex,
|
uint32_t memoryTypeIndex,
|
||||||
VkMemoryPropertyFlags* pFlags)
|
VkMemoryPropertyFlags* pFlags)
|
||||||
@ -15804,7 +15816,7 @@ void vmaGetMemoryTypeProperties(
|
|||||||
*pFlags = allocator->m_MemProps.memoryTypes[memoryTypeIndex].propertyFlags;
|
*pFlags = allocator->m_MemProps.memoryTypes[memoryTypeIndex].propertyFlags;
|
||||||
}
|
}
|
||||||
|
|
||||||
void vmaSetCurrentFrameIndex(
|
VMA_CALL_PRE void VMA_CALL_POST vmaSetCurrentFrameIndex(
|
||||||
VmaAllocator allocator,
|
VmaAllocator allocator,
|
||||||
uint32_t frameIndex)
|
uint32_t frameIndex)
|
||||||
{
|
{
|
||||||
@ -15816,7 +15828,7 @@ void vmaSetCurrentFrameIndex(
|
|||||||
allocator->SetCurrentFrameIndex(frameIndex);
|
allocator->SetCurrentFrameIndex(frameIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
void vmaCalculateStats(
|
VMA_CALL_PRE void VMA_CALL_POST vmaCalculateStats(
|
||||||
VmaAllocator allocator,
|
VmaAllocator allocator,
|
||||||
VmaStats* pStats)
|
VmaStats* pStats)
|
||||||
{
|
{
|
||||||
@ -15827,7 +15839,7 @@ void vmaCalculateStats(
|
|||||||
|
|
||||||
#if VMA_STATS_STRING_ENABLED
|
#if VMA_STATS_STRING_ENABLED
|
||||||
|
|
||||||
void vmaBuildStatsString(
|
VMA_CALL_PRE void VMA_CALL_POST vmaBuildStatsString(
|
||||||
VmaAllocator allocator,
|
VmaAllocator allocator,
|
||||||
char** ppStatsString,
|
char** ppStatsString,
|
||||||
VkBool32 detailedMap)
|
VkBool32 detailedMap)
|
||||||
@ -15935,7 +15947,7 @@ void vmaBuildStatsString(
|
|||||||
*ppStatsString = pChars;
|
*ppStatsString = pChars;
|
||||||
}
|
}
|
||||||
|
|
||||||
void vmaFreeStatsString(
|
VMA_CALL_PRE void VMA_CALL_POST vmaFreeStatsString(
|
||||||
VmaAllocator allocator,
|
VmaAllocator allocator,
|
||||||
char* pStatsString)
|
char* pStatsString)
|
||||||
{
|
{
|
||||||
@ -15952,7 +15964,7 @@ void vmaFreeStatsString(
|
|||||||
/*
|
/*
|
||||||
This function is not protected by any mutex because it just reads immutable data.
|
This function is not protected by any mutex because it just reads immutable data.
|
||||||
*/
|
*/
|
||||||
VkResult vmaFindMemoryTypeIndex(
|
VMA_CALL_PRE VkResult VMA_CALL_POST vmaFindMemoryTypeIndex(
|
||||||
VmaAllocator allocator,
|
VmaAllocator allocator,
|
||||||
uint32_t memoryTypeBits,
|
uint32_t memoryTypeBits,
|
||||||
const VmaAllocationCreateInfo* pAllocationCreateInfo,
|
const VmaAllocationCreateInfo* pAllocationCreateInfo,
|
||||||
@ -16031,7 +16043,7 @@ VkResult vmaFindMemoryTypeIndex(
|
|||||||
return (*pMemoryTypeIndex != UINT32_MAX) ? VK_SUCCESS : VK_ERROR_FEATURE_NOT_PRESENT;
|
return (*pMemoryTypeIndex != UINT32_MAX) ? VK_SUCCESS : VK_ERROR_FEATURE_NOT_PRESENT;
|
||||||
}
|
}
|
||||||
|
|
||||||
VkResult vmaFindMemoryTypeIndexForBufferInfo(
|
VMA_CALL_PRE VkResult VMA_CALL_POST vmaFindMemoryTypeIndexForBufferInfo(
|
||||||
VmaAllocator allocator,
|
VmaAllocator allocator,
|
||||||
const VkBufferCreateInfo* pBufferCreateInfo,
|
const VkBufferCreateInfo* pBufferCreateInfo,
|
||||||
const VmaAllocationCreateInfo* pAllocationCreateInfo,
|
const VmaAllocationCreateInfo* pAllocationCreateInfo,
|
||||||
@ -16064,7 +16076,7 @@ VkResult vmaFindMemoryTypeIndexForBufferInfo(
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
VkResult vmaFindMemoryTypeIndexForImageInfo(
|
VMA_CALL_PRE VkResult VMA_CALL_POST vmaFindMemoryTypeIndexForImageInfo(
|
||||||
VmaAllocator allocator,
|
VmaAllocator allocator,
|
||||||
const VkImageCreateInfo* pImageCreateInfo,
|
const VkImageCreateInfo* pImageCreateInfo,
|
||||||
const VmaAllocationCreateInfo* pAllocationCreateInfo,
|
const VmaAllocationCreateInfo* pAllocationCreateInfo,
|
||||||
@ -16097,7 +16109,7 @@ VkResult vmaFindMemoryTypeIndexForImageInfo(
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
VkResult vmaCreatePool(
|
VMA_CALL_PRE VkResult VMA_CALL_POST vmaCreatePool(
|
||||||
VmaAllocator allocator,
|
VmaAllocator allocator,
|
||||||
const VmaPoolCreateInfo* pCreateInfo,
|
const VmaPoolCreateInfo* pCreateInfo,
|
||||||
VmaPool* pPool)
|
VmaPool* pPool)
|
||||||
@ -16120,7 +16132,7 @@ VkResult vmaCreatePool(
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
void vmaDestroyPool(
|
VMA_CALL_PRE void VMA_CALL_POST vmaDestroyPool(
|
||||||
VmaAllocator allocator,
|
VmaAllocator allocator,
|
||||||
VmaPool pool)
|
VmaPool pool)
|
||||||
{
|
{
|
||||||
@ -16145,7 +16157,7 @@ void vmaDestroyPool(
|
|||||||
allocator->DestroyPool(pool);
|
allocator->DestroyPool(pool);
|
||||||
}
|
}
|
||||||
|
|
||||||
void vmaGetPoolStats(
|
VMA_CALL_PRE void VMA_CALL_POST vmaGetPoolStats(
|
||||||
VmaAllocator allocator,
|
VmaAllocator allocator,
|
||||||
VmaPool pool,
|
VmaPool pool,
|
||||||
VmaPoolStats* pPoolStats)
|
VmaPoolStats* pPoolStats)
|
||||||
@ -16157,7 +16169,7 @@ void vmaGetPoolStats(
|
|||||||
allocator->GetPoolStats(pool, pPoolStats);
|
allocator->GetPoolStats(pool, pPoolStats);
|
||||||
}
|
}
|
||||||
|
|
||||||
void vmaMakePoolAllocationsLost(
|
VMA_CALL_PRE void VMA_CALL_POST vmaMakePoolAllocationsLost(
|
||||||
VmaAllocator allocator,
|
VmaAllocator allocator,
|
||||||
VmaPool pool,
|
VmaPool pool,
|
||||||
size_t* pLostAllocationCount)
|
size_t* pLostAllocationCount)
|
||||||
@ -16176,7 +16188,7 @@ void vmaMakePoolAllocationsLost(
|
|||||||
allocator->MakePoolAllocationsLost(pool, pLostAllocationCount);
|
allocator->MakePoolAllocationsLost(pool, pLostAllocationCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
VkResult vmaCheckPoolCorruption(VmaAllocator allocator, VmaPool pool)
|
VMA_CALL_PRE VkResult VMA_CALL_POST vmaCheckPoolCorruption(VmaAllocator allocator, VmaPool pool)
|
||||||
{
|
{
|
||||||
VMA_ASSERT(allocator && pool);
|
VMA_ASSERT(allocator && pool);
|
||||||
|
|
||||||
@ -16187,7 +16199,7 @@ VkResult vmaCheckPoolCorruption(VmaAllocator allocator, VmaPool pool)
|
|||||||
return allocator->CheckPoolCorruption(pool);
|
return allocator->CheckPoolCorruption(pool);
|
||||||
}
|
}
|
||||||
|
|
||||||
VkResult vmaAllocateMemory(
|
VMA_CALL_PRE VkResult VMA_CALL_POST vmaAllocateMemory(
|
||||||
VmaAllocator allocator,
|
VmaAllocator allocator,
|
||||||
const VkMemoryRequirements* pVkMemoryRequirements,
|
const VkMemoryRequirements* pVkMemoryRequirements,
|
||||||
const VmaAllocationCreateInfo* pCreateInfo,
|
const VmaAllocationCreateInfo* pCreateInfo,
|
||||||
@ -16230,7 +16242,7 @@ VkResult vmaAllocateMemory(
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
VkResult vmaAllocateMemoryPages(
|
VMA_CALL_PRE VkResult VMA_CALL_POST vmaAllocateMemoryPages(
|
||||||
VmaAllocator allocator,
|
VmaAllocator allocator,
|
||||||
const VkMemoryRequirements* pVkMemoryRequirements,
|
const VkMemoryRequirements* pVkMemoryRequirements,
|
||||||
const VmaAllocationCreateInfo* pCreateInfo,
|
const VmaAllocationCreateInfo* pCreateInfo,
|
||||||
@ -16283,7 +16295,7 @@ VkResult vmaAllocateMemoryPages(
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
VkResult vmaAllocateMemoryForBuffer(
|
VMA_CALL_PRE VkResult VMA_CALL_POST vmaAllocateMemoryForBuffer(
|
||||||
VmaAllocator allocator,
|
VmaAllocator allocator,
|
||||||
VkBuffer buffer,
|
VkBuffer buffer,
|
||||||
const VmaAllocationCreateInfo* pCreateInfo,
|
const VmaAllocationCreateInfo* pCreateInfo,
|
||||||
@ -16335,7 +16347,7 @@ VkResult vmaAllocateMemoryForBuffer(
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
VkResult vmaAllocateMemoryForImage(
|
VMA_CALL_PRE VkResult VMA_CALL_POST vmaAllocateMemoryForImage(
|
||||||
VmaAllocator allocator,
|
VmaAllocator allocator,
|
||||||
VkImage image,
|
VkImage image,
|
||||||
const VmaAllocationCreateInfo* pCreateInfo,
|
const VmaAllocationCreateInfo* pCreateInfo,
|
||||||
@ -16386,7 +16398,7 @@ VkResult vmaAllocateMemoryForImage(
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
void vmaFreeMemory(
|
VMA_CALL_PRE void VMA_CALL_POST vmaFreeMemory(
|
||||||
VmaAllocator allocator,
|
VmaAllocator allocator,
|
||||||
VmaAllocation allocation)
|
VmaAllocation allocation)
|
||||||
{
|
{
|
||||||
@ -16415,7 +16427,7 @@ void vmaFreeMemory(
|
|||||||
&allocation);
|
&allocation);
|
||||||
}
|
}
|
||||||
|
|
||||||
void vmaFreeMemoryPages(
|
VMA_CALL_PRE void VMA_CALL_POST vmaFreeMemoryPages(
|
||||||
VmaAllocator allocator,
|
VmaAllocator allocator,
|
||||||
size_t allocationCount,
|
size_t allocationCount,
|
||||||
VmaAllocation* pAllocations)
|
VmaAllocation* pAllocations)
|
||||||
@ -16444,7 +16456,7 @@ void vmaFreeMemoryPages(
|
|||||||
allocator->FreeMemory(allocationCount, pAllocations);
|
allocator->FreeMemory(allocationCount, pAllocations);
|
||||||
}
|
}
|
||||||
|
|
||||||
VkResult vmaResizeAllocation(
|
VMA_CALL_PRE VkResult VMA_CALL_POST vmaResizeAllocation(
|
||||||
VmaAllocator allocator,
|
VmaAllocator allocator,
|
||||||
VmaAllocation allocation,
|
VmaAllocation allocation,
|
||||||
VkDeviceSize newSize)
|
VkDeviceSize newSize)
|
||||||
@ -16458,7 +16470,7 @@ VkResult vmaResizeAllocation(
|
|||||||
return allocator->ResizeAllocation(allocation, newSize);
|
return allocator->ResizeAllocation(allocation, newSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
void vmaGetAllocationInfo(
|
VMA_CALL_PRE void VMA_CALL_POST vmaGetAllocationInfo(
|
||||||
VmaAllocator allocator,
|
VmaAllocator allocator,
|
||||||
VmaAllocation allocation,
|
VmaAllocation allocation,
|
||||||
VmaAllocationInfo* pAllocationInfo)
|
VmaAllocationInfo* pAllocationInfo)
|
||||||
@ -16479,7 +16491,7 @@ void vmaGetAllocationInfo(
|
|||||||
allocator->GetAllocationInfo(allocation, pAllocationInfo);
|
allocator->GetAllocationInfo(allocation, pAllocationInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
VkBool32 vmaTouchAllocation(
|
VMA_CALL_PRE VkBool32 VMA_CALL_POST vmaTouchAllocation(
|
||||||
VmaAllocator allocator,
|
VmaAllocator allocator,
|
||||||
VmaAllocation allocation)
|
VmaAllocation allocation)
|
||||||
{
|
{
|
||||||
@ -16499,7 +16511,7 @@ VkBool32 vmaTouchAllocation(
|
|||||||
return allocator->TouchAllocation(allocation);
|
return allocator->TouchAllocation(allocation);
|
||||||
}
|
}
|
||||||
|
|
||||||
void vmaSetAllocationUserData(
|
VMA_CALL_PRE void VMA_CALL_POST vmaSetAllocationUserData(
|
||||||
VmaAllocator allocator,
|
VmaAllocator allocator,
|
||||||
VmaAllocation allocation,
|
VmaAllocation allocation,
|
||||||
void* pUserData)
|
void* pUserData)
|
||||||
@ -16521,7 +16533,7 @@ void vmaSetAllocationUserData(
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void vmaCreateLostAllocation(
|
VMA_CALL_PRE void VMA_CALL_POST vmaCreateLostAllocation(
|
||||||
VmaAllocator allocator,
|
VmaAllocator allocator,
|
||||||
VmaAllocation* pAllocation)
|
VmaAllocation* pAllocation)
|
||||||
{
|
{
|
||||||
@ -16541,7 +16553,7 @@ void vmaCreateLostAllocation(
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
VkResult vmaMapMemory(
|
VMA_CALL_PRE VkResult VMA_CALL_POST vmaMapMemory(
|
||||||
VmaAllocator allocator,
|
VmaAllocator allocator,
|
||||||
VmaAllocation allocation,
|
VmaAllocation allocation,
|
||||||
void** ppData)
|
void** ppData)
|
||||||
@ -16564,7 +16576,7 @@ VkResult vmaMapMemory(
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
void vmaUnmapMemory(
|
VMA_CALL_PRE void VMA_CALL_POST vmaUnmapMemory(
|
||||||
VmaAllocator allocator,
|
VmaAllocator allocator,
|
||||||
VmaAllocation allocation)
|
VmaAllocation allocation)
|
||||||
{
|
{
|
||||||
@ -16584,7 +16596,7 @@ void vmaUnmapMemory(
|
|||||||
allocator->Unmap(allocation);
|
allocator->Unmap(allocation);
|
||||||
}
|
}
|
||||||
|
|
||||||
void vmaFlushAllocation(VmaAllocator allocator, VmaAllocation allocation, VkDeviceSize offset, VkDeviceSize size)
|
VMA_CALL_PRE void VMA_CALL_POST vmaFlushAllocation(VmaAllocator allocator, VmaAllocation allocation, VkDeviceSize offset, VkDeviceSize size)
|
||||||
{
|
{
|
||||||
VMA_ASSERT(allocator && allocation);
|
VMA_ASSERT(allocator && allocation);
|
||||||
|
|
||||||
@ -16604,7 +16616,7 @@ void vmaFlushAllocation(VmaAllocator allocator, VmaAllocation allocation, VkDevi
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void vmaInvalidateAllocation(VmaAllocator allocator, VmaAllocation allocation, VkDeviceSize offset, VkDeviceSize size)
|
VMA_CALL_PRE void VMA_CALL_POST vmaInvalidateAllocation(VmaAllocator allocator, VmaAllocation allocation, VkDeviceSize offset, VkDeviceSize size)
|
||||||
{
|
{
|
||||||
VMA_ASSERT(allocator && allocation);
|
VMA_ASSERT(allocator && allocation);
|
||||||
|
|
||||||
@ -16624,7 +16636,7 @@ void vmaInvalidateAllocation(VmaAllocator allocator, VmaAllocation allocation, V
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
VkResult vmaCheckCorruption(VmaAllocator allocator, uint32_t memoryTypeBits)
|
VMA_CALL_PRE VkResult VMA_CALL_POST vmaCheckCorruption(VmaAllocator allocator, uint32_t memoryTypeBits)
|
||||||
{
|
{
|
||||||
VMA_ASSERT(allocator);
|
VMA_ASSERT(allocator);
|
||||||
|
|
||||||
@ -16635,7 +16647,7 @@ VkResult vmaCheckCorruption(VmaAllocator allocator, uint32_t memoryTypeBits)
|
|||||||
return allocator->CheckCorruption(memoryTypeBits);
|
return allocator->CheckCorruption(memoryTypeBits);
|
||||||
}
|
}
|
||||||
|
|
||||||
VkResult vmaDefragment(
|
VMA_CALL_PRE VkResult VMA_CALL_POST vmaDefragment(
|
||||||
VmaAllocator allocator,
|
VmaAllocator allocator,
|
||||||
VmaAllocation* pAllocations,
|
VmaAllocation* pAllocations,
|
||||||
size_t allocationCount,
|
size_t allocationCount,
|
||||||
@ -16670,7 +16682,7 @@ VkResult vmaDefragment(
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
VkResult vmaDefragmentationBegin(
|
VMA_CALL_PRE VkResult VMA_CALL_POST vmaDefragmentationBegin(
|
||||||
VmaAllocator allocator,
|
VmaAllocator allocator,
|
||||||
const VmaDefragmentationInfo2* pInfo,
|
const VmaDefragmentationInfo2* pInfo,
|
||||||
VmaDefragmentationStats* pStats,
|
VmaDefragmentationStats* pStats,
|
||||||
@ -16706,7 +16718,7 @@ VkResult vmaDefragmentationBegin(
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
VkResult vmaDefragmentationEnd(
|
VMA_CALL_PRE VkResult VMA_CALL_POST vmaDefragmentationEnd(
|
||||||
VmaAllocator allocator,
|
VmaAllocator allocator,
|
||||||
VmaDefragmentationContext context)
|
VmaDefragmentationContext context)
|
||||||
{
|
{
|
||||||
@ -16734,7 +16746,7 @@ VkResult vmaDefragmentationEnd(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
VkResult vmaBindBufferMemory(
|
VMA_CALL_PRE VkResult VMA_CALL_POST vmaBindBufferMemory(
|
||||||
VmaAllocator allocator,
|
VmaAllocator allocator,
|
||||||
VmaAllocation allocation,
|
VmaAllocation allocation,
|
||||||
VkBuffer buffer)
|
VkBuffer buffer)
|
||||||
@ -16748,7 +16760,7 @@ VkResult vmaBindBufferMemory(
|
|||||||
return allocator->BindBufferMemory(allocation, 0, buffer, VMA_NULL);
|
return allocator->BindBufferMemory(allocation, 0, buffer, VMA_NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
VkResult vmaBindBufferMemory2(
|
VMA_CALL_PRE VkResult VMA_CALL_POST vmaBindBufferMemory2(
|
||||||
VmaAllocator allocator,
|
VmaAllocator allocator,
|
||||||
VmaAllocation allocation,
|
VmaAllocation allocation,
|
||||||
VkDeviceSize allocationLocalOffset,
|
VkDeviceSize allocationLocalOffset,
|
||||||
@ -16764,7 +16776,7 @@ VkResult vmaBindBufferMemory2(
|
|||||||
return allocator->BindBufferMemory(allocation, allocationLocalOffset, buffer, pNext);
|
return allocator->BindBufferMemory(allocation, allocationLocalOffset, buffer, pNext);
|
||||||
}
|
}
|
||||||
|
|
||||||
VkResult vmaBindImageMemory(
|
VMA_CALL_PRE VkResult VMA_CALL_POST vmaBindImageMemory(
|
||||||
VmaAllocator allocator,
|
VmaAllocator allocator,
|
||||||
VmaAllocation allocation,
|
VmaAllocation allocation,
|
||||||
VkImage image)
|
VkImage image)
|
||||||
@ -16778,7 +16790,7 @@ VkResult vmaBindImageMemory(
|
|||||||
return allocator->BindImageMemory(allocation, 0, image, VMA_NULL);
|
return allocator->BindImageMemory(allocation, 0, image, VMA_NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
VkResult vmaBindImageMemory2(
|
VMA_CALL_PRE VkResult VMA_CALL_POST vmaBindImageMemory2(
|
||||||
VmaAllocator allocator,
|
VmaAllocator allocator,
|
||||||
VmaAllocation allocation,
|
VmaAllocation allocation,
|
||||||
VkDeviceSize allocationLocalOffset,
|
VkDeviceSize allocationLocalOffset,
|
||||||
@ -16794,7 +16806,7 @@ VkResult vmaBindImageMemory2(
|
|||||||
return allocator->BindImageMemory(allocation, allocationLocalOffset, image, pNext);
|
return allocator->BindImageMemory(allocation, allocationLocalOffset, image, pNext);
|
||||||
}
|
}
|
||||||
|
|
||||||
VkResult vmaCreateBuffer(
|
VMA_CALL_PRE VkResult VMA_CALL_POST vmaCreateBuffer(
|
||||||
VmaAllocator allocator,
|
VmaAllocator allocator,
|
||||||
const VkBufferCreateInfo* pBufferCreateInfo,
|
const VkBufferCreateInfo* pBufferCreateInfo,
|
||||||
const VmaAllocationCreateInfo* pAllocationCreateInfo,
|
const VmaAllocationCreateInfo* pAllocationCreateInfo,
|
||||||
@ -16907,7 +16919,7 @@ VkResult vmaCreateBuffer(
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
void vmaDestroyBuffer(
|
VMA_CALL_PRE void VMA_CALL_POST vmaDestroyBuffer(
|
||||||
VmaAllocator allocator,
|
VmaAllocator allocator,
|
||||||
VkBuffer buffer,
|
VkBuffer buffer,
|
||||||
VmaAllocation allocation)
|
VmaAllocation allocation)
|
||||||
@ -16945,7 +16957,7 @@ void vmaDestroyBuffer(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
VkResult vmaCreateImage(
|
VMA_CALL_PRE VkResult VMA_CALL_POST vmaCreateImage(
|
||||||
VmaAllocator allocator,
|
VmaAllocator allocator,
|
||||||
const VkImageCreateInfo* pImageCreateInfo,
|
const VkImageCreateInfo* pImageCreateInfo,
|
||||||
const VmaAllocationCreateInfo* pAllocationCreateInfo,
|
const VmaAllocationCreateInfo* pAllocationCreateInfo,
|
||||||
@ -17047,7 +17059,7 @@ VkResult vmaCreateImage(
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
void vmaDestroyImage(
|
VMA_CALL_PRE void VMA_CALL_POST vmaDestroyImage(
|
||||||
VmaAllocator allocator,
|
VmaAllocator allocator,
|
||||||
VkImage image,
|
VkImage image,
|
||||||
VmaAllocation allocation)
|
VmaAllocation allocation)
|
||||||
|
Loading…
Reference in New Issue
Block a user