| 16273 | } |
| 16274 | |
| 16275 | VMA_CALL_PRE VkResult VMA_CALL_POST vmaAllocateMemory( |
| 16276 | VmaAllocator allocator, |
| 16277 | const VkMemoryRequirements* pVkMemoryRequirements, |
| 16278 | const VmaAllocationCreateInfo* pCreateInfo, |
| 16279 | VmaAllocation* pAllocation, |
| 16280 | VmaAllocationInfo* pAllocationInfo) |
| 16281 | { |
| 16282 | VMA_ASSERT(allocator && pVkMemoryRequirements && pCreateInfo && pAllocation); |
| 16283 | |
| 16284 | VMA_DEBUG_LOG("vmaAllocateMemory"); |
| 16285 | |
| 16286 | VMA_DEBUG_GLOBAL_MUTEX_LOCK |
| 16287 | |
| 16288 | VkResult result = allocator->AllocateMemory( |
| 16289 | *pVkMemoryRequirements, |
| 16290 | false, // requiresDedicatedAllocation |
| 16291 | false, // prefersDedicatedAllocation |
| 16292 | VK_NULL_HANDLE, // dedicatedBuffer |
| 16293 | VK_NULL_HANDLE, // dedicatedImage |
| 16294 | VmaBufferImageUsage::UNKNOWN, // dedicatedBufferImageUsage |
| 16295 | VMA_NULL, // pMemoryAllocateNext |
| 16296 | *pCreateInfo, |
| 16297 | VMA_SUBALLOCATION_TYPE_UNKNOWN, |
| 16298 | 1, // allocationCount |
| 16299 | pAllocation); |
| 16300 | |
| 16301 | if(pAllocationInfo != VMA_NULL && result == VK_SUCCESS) |
| 16302 | { |
| 16303 | allocator->GetAllocationInfo(*pAllocation, pAllocationInfo); |
| 16304 | } |
| 16305 | |
| 16306 | return result; |
| 16307 | } |
| 16308 | |
| 16309 | VMA_CALL_PRE VkResult VMA_CALL_POST vmaAllocateDedicatedMemory( |
| 16310 | VmaAllocator allocator, |