| 11736 | } |
| 11737 | |
| 11738 | VkResult 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 | |
| 11764 | VkResult VmaBlockVector::CommitAllocationRequest( |
| 11765 | VmaAllocationRequest& allocRequest, |
no test coverage detected