When mapping with VK_WHOLE_SIZE, account for any offset

This commit is contained in:
baldurk
2018-09-25 17:32:45 +01:00
parent d0b650778b
commit 2eb01151c3
@@ -536,7 +536,7 @@ VkResult WrappedVulkan::vkMapMemory(VkDevice device, VkDeviceMemory mem, VkDevic
state.refData = NULL;
state.mapOffset = offset;
state.mapSize = size == VK_WHOLE_SIZE ? memrecord->Length : size;
state.mapSize = size == VK_WHOLE_SIZE ? (memrecord->Length - offset) : size;
state.mapFlushed = false;
*ppData = realData;