Lines Matching defs:allocator
89 // many small allocations. The AMD allocator will start making blocks at 1/8 the max size and
106 VmaAllocator allocator;
107 vmaCreateAllocator(&info, &allocator);
111 allocator, std::move(interface), caps->mustUseCoherentHostVisibleMemory()));
113 allocator, std::move(interface), caps->mustUseCoherentHostVisibleMemory(), cacheFlag));
117 GrVkAMDMemoryAllocator::GrVkAMDMemoryAllocator(VmaAllocator allocator,
125 : fAllocator(allocator)
140 static void FirstPreAllocMemory(VmaAllocator allocator, VmaAllocationCreateInfo info) {
143 if (allocator == nullptr) {
146 VkResult result = vmaCreateFakeImage(allocator, &fakeImage);
153 result = vmaAllocateReservedMemoryForImage(allocator, fakeImage, &info, &reservedAllocation, nullptr);
157 vmaDestroyFakeImage(allocator, fakeImage);
162 result = vmaBindImageMemory(allocator, reservedAllocation, fakeImage);
167 vmaDestroyFakeImage(allocator, fakeImage);
168 vmaFreeReservedMemory(allocator, reservedAllocation);
172 static void PreAllocMemory(VmaAllocator allocator, VmaAllocation reservedAllocation) {
174 if (allocator == nullptr) {
177 VkResult result = vmaCreateFakeImage(allocator, &fakeImage);
184 result = vmaBindImageMemory(allocator, reservedAllocation, fakeImage);
189 vmaDestroyFakeImage(allocator, fakeImage);
190 vmaFreeReservedMemory(allocator, reservedAllocation);