Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions include/vk_mem_alloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,12 @@ extern "C" {
#define VMA_CALL_POST
#endif

// Define this macro to decorate pNext pointers with an attribute specifying the Vulkan
// structure that will be extended via the pNext chain.
#ifndef VMA_EXTENDS_VK_STRUCT
#define VMA_EXTENDS_VK_STRUCT(vkStruct)
#endif

// Define this macro to decorate pointers with an attribute specifying the
// length of the array they point to if they are not null.
//
Expand Down Expand Up @@ -1319,7 +1325,7 @@ typedef struct VmaPoolCreateInfo
Please note that some structures, e.g. `VkMemoryPriorityAllocateInfoEXT`, `VkMemoryDedicatedAllocateInfoKHR`,
can be attached automatically by this library when using other, more convenient of its features.
*/
void* VMA_NULLABLE pMemoryAllocateNext;
void* VMA_NULLABLE VMA_EXTENDS_VK_STRUCT(VkMemoryAllocateInfo) pMemoryAllocateNext;
} VmaPoolCreateInfo;

/** @} */
Expand Down Expand Up @@ -2227,7 +2233,7 @@ VMA_CALL_PRE VkResult VMA_CALL_POST vmaBindBufferMemory2(
VmaAllocation VMA_NOT_NULL allocation,
VkDeviceSize allocationLocalOffset,
VkBuffer VMA_NOT_NULL_NON_DISPATCHABLE buffer,
const void* VMA_NULLABLE pNext);
const void* VMA_NULLABLE VMA_EXTENDS_VK_STRUCT(VkBindBufferMemoryInfoKHR) pNext);

/** \brief Binds image to allocation.

Expand Down Expand Up @@ -2264,7 +2270,7 @@ VMA_CALL_PRE VkResult VMA_CALL_POST vmaBindImageMemory2(
VmaAllocation VMA_NOT_NULL allocation,
VkDeviceSize allocationLocalOffset,
VkImage VMA_NOT_NULL_NON_DISPATCHABLE image,
const void* VMA_NULLABLE pNext);
const void* VMA_NULLABLE VMA_EXTENDS_VK_STRUCT(VkBindImageMemoryInfoKHR) pNext);

/** \brief Creates a new `VkBuffer`, allocates and binds memory for it.

Expand Down