Use buffer size instead of allocation size for Buffer constructor

Fixes a validation error.
This commit is contained in:
Robin Kertels 2022-02-28 22:28:22 +01:00 committed by PixelyIon
parent 752245c3c8
commit 82296ac5b8

View File

@ -114,7 +114,7 @@ namespace skyline::gpu::memory {
VmaAllocationInfo allocationInfo;
ThrowOnFail(vmaCreateBuffer(vmaAllocator, &static_cast<const VkBufferCreateInfo &>(bufferCreateInfo), &allocationCreateInfo, &buffer, &allocation, &allocationInfo));
return Buffer(reinterpret_cast<u8 *>(allocationInfo.pMappedData), allocationInfo.size, vmaAllocator, buffer, allocation);
return Buffer(reinterpret_cast<u8 *>(allocationInfo.pMappedData), size, vmaAllocator, buffer, allocation);
}
Image MemoryManager::AllocateImage(const vk::ImageCreateInfo &createInfo) {