vk: throw if vmaMapMemory fails

MINIDUMP-PX
This commit is contained in:
Flyinghead 2023-04-02 22:02:53 +02:00
parent 9d6bfd4786
commit 252ad711f1
1 changed files with 3 additions and 1 deletions

View File

@ -63,7 +63,9 @@ public:
if (allocInfo.pMappedData != nullptr)
return allocInfo.pMappedData;
void *p;
vmaMapMemory(allocator, allocation, &p);
VkResult res = vmaMapMemory(allocator, allocation, &p);
if (res != VK_SUCCESS)
vk::throwResultException((vk::Result)res, "vmaMapMemory failed");
VkMemoryPropertyFlags flags;
vmaGetMemoryTypeProperties(allocator, allocInfo.memoryType, &flags);
if ((flags & VK_MEMORY_PROPERTY_HOST_CACHED_BIT) && (flags & VK_MEMORY_PROPERTY_HOST_COHERENT_BIT) == 0)