Skip to content

Commit 2fd73c3

Browse files
Added assert in vmaCreateImage about disjoint images not supported
See #372
1 parent 539c0a8 commit 2fd73c3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

include/vk_mem_alloc.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16538,6 +16538,9 @@ VMA_CALL_PRE VkResult VMA_CALL_POST vmaCreateImage(
1653816538
{
1653916539
VMA_ASSERT(allocator && pImageCreateInfo && pAllocationCreateInfo && pImage && pAllocation);
1654016540

16541+
VMA_ASSERT((pImageCreateInfo->flags & VK_IMAGE_CREATE_DISJOINT_BIT_COPY) == 0 &&
16542+
"vmaCreateImage() doesn't support disjoint multi-planar images. Please allocate memory for the planes using vmaAllocateMemory() and bind them using vmaBindImageMemory2().");
16543+
1654116544
if(pImageCreateInfo->extent.width == 0 ||
1654216545
pImageCreateInfo->extent.height == 0 ||
1654316546
pImageCreateInfo->extent.depth == 0 ||

0 commit comments

Comments
 (0)