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

Method CreateAllocationRequest

include/vk_mem_alloc.h:8128–8150  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8126#endif // VMA_STATS_STRING_ENABLED
8127
8128bool VmaBlockMetadata_Linear::CreateAllocationRequest(
8129 VkDeviceSize allocSize,
8130 VkDeviceSize allocAlignment,
8131 bool upperAddress,
8132 VmaSuballocationType allocType,
8133 uint32_t strategy,
8134 VmaAllocationRequest* pAllocationRequest)
8135{
8136 VMA_ASSERT(allocSize > 0);
8137 VMA_ASSERT(allocType != VMA_SUBALLOCATION_TYPE_FREE);
8138 VMA_ASSERT(pAllocationRequest != VMA_NULL);
8139 VMA_HEAVY_ASSERT(Validate());
8140
8141 if(allocSize > GetSize())
8142 return false;
8143
8144 pAllocationRequest->size = allocSize;
8145 return upperAddress ?
8146 CreateAllocationRequest_UpperAddress(
8147 allocSize, allocAlignment, allocType, strategy, pAllocationRequest) :
8148 CreateAllocationRequest_LowerAddress(
8149 allocSize, allocAlignment, allocType, strategy, pAllocationRequest);
8150}
8151
8152VkResult VmaBlockMetadata_Linear::CheckCorruption(const void* pBlockData)
8153{

Callers 5

AllocateMethod · 0.80
AllocateFromBlockMethod · 0.80
ReallocWithinBlockMethod · 0.80

Calls 4

ValidateFunction · 0.85
RoundupAllocRequestMethod · 0.80
IsFreeMethod · 0.80
GetSizeFunction · 0.50

Tested by

no test coverage detected