Skip to content

Commit ca5ce7d

Browse files
committed
Added VMA_EXTENDS_VK_STRUCT
1 parent 0aa3989 commit ca5ce7d

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

include/vk_mem_alloc.h

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,10 @@ extern "C" {
234234
#define VMA_CALL_POST
235235
#endif
236236

237+
#ifndef VMA_EXTENDS_VK_STRUCT
238+
#define VMA_EXTENDS_VK_STRUCT(vkStruct)
239+
#endif
240+
237241
// Define this macro to decorate pointers with an attribute specifying the
238242
// length of the array they point to if they are not null.
239243
//
@@ -1319,7 +1323,7 @@ typedef struct VmaPoolCreateInfo
13191323
Please note that some structures, e.g. `VkMemoryPriorityAllocateInfoEXT`, `VkMemoryDedicatedAllocateInfoKHR`,
13201324
can be attached automatically by this library when using other, more convenient of its features.
13211325
*/
1322-
void* VMA_NULLABLE pMemoryAllocateNext;
1326+
void* VMA_NULLABLE VMA_EXTENDS_VK_STRUCT(VkMemoryAllocateInfo) pMemoryAllocateNext;
13231327
} VmaPoolCreateInfo;
13241328

13251329
/** @} */
@@ -2227,7 +2231,7 @@ VMA_CALL_PRE VkResult VMA_CALL_POST vmaBindBufferMemory2(
22272231
VmaAllocation VMA_NOT_NULL allocation,
22282232
VkDeviceSize allocationLocalOffset,
22292233
VkBuffer VMA_NOT_NULL_NON_DISPATCHABLE buffer,
2230-
const void* VMA_NULLABLE pNext);
2234+
const void* VMA_NULLABLE VMA_EXTENDS_VK_STRUCT(VkBindBufferMemoryInfoKHR) pNext);
22312235

22322236
/** \brief Binds image to allocation.
22332237

@@ -2264,7 +2268,7 @@ VMA_CALL_PRE VkResult VMA_CALL_POST vmaBindImageMemory2(
22642268
VmaAllocation VMA_NOT_NULL allocation,
22652269
VkDeviceSize allocationLocalOffset,
22662270
VkImage VMA_NOT_NULL_NON_DISPATCHABLE image,
2267-
const void* VMA_NULLABLE pNext);
2271+
const void* VMA_NULLABLE VMA_EXTENDS_VK_STRUCT(VkBindImageMemoryInfoKHR) pNext);
22682272

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

0 commit comments

Comments
 (0)