MCPcopy Create free account
hub / github.com/ErrorAtLine0/infinipaint / AllocateFromBlock

Method AllocateFromBlock

include/vk_mem_alloc.h:11738–11762  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11736}
11737
11738VkResult VmaBlockVector::AllocateFromBlock(
11739 VmaDeviceMemoryBlock* pBlock,
11740 VkDeviceSize size,
11741 VkDeviceSize alignment,
11742 VmaAllocationCreateFlags allocFlags,
11743 void* pUserData,
11744 VmaSuballocationType suballocType,
11745 uint32_t strategy,
11746 VmaAllocation* pAllocation)
11747{
11748 const bool isUpperAddress = (allocFlags & VMA_ALLOCATION_CREATE_UPPER_ADDRESS_BIT) != 0;
11749
11750 VmaAllocationRequest currRequest = {};
11751 if (pBlock->m_pMetadata->CreateAllocationRequest(
11752 size,
11753 alignment,
11754 isUpperAddress,
11755 suballocType,
11756 strategy,
11757 &currRequest))
11758 {
11759 return CommitAllocationRequest(currRequest, pBlock, alignment, allocFlags, pUserData, suballocType, pAllocation);
11760 }
11761 return VK_ERROR_OUT_OF_DEVICE_MEMORY;
11762}
11763
11764VkResult VmaBlockVector::CommitAllocationRequest(
11765 VmaAllocationRequest& allocRequest,

Callers 1

AllocInOtherBlockMethod · 0.80

Calls 1

Tested by

no test coverage detected