vulkan: Always map at least 1 byte.

This commit is contained in:
Vincent Lejeune 2016-03-31 00:21:57 +02:00
parent b46fc2fc49
commit c95c4c32e6

View File

@ -499,7 +499,7 @@ namespace vk
void *map(u64 offset, u64 size)
{
void *data = nullptr;
CHECK_RESULT(vkMapMemory(m_device, memory->memory, offset, size, 0, &data));
CHECK_RESULT(vkMapMemory(m_device, memory->memory, offset, std::max<u64>(size, 1u), 0, &data));
return data;
}