vkMapMemory
vkMapMemory is a Vulkan API function that maps a region of a device memory object into the host address space. It enables the CPU to access memory that is bound to Vulkan resources, such as buffers or images, by obtaining a pointer to the mapped region.
The function signature is VkResult vkMapMemory(VkDevice device, VkDeviceMemory memory, VkDeviceSize offset, VkDeviceSize size, VkMemoryMapFlags flags, void**
Mapping requires that the memory object was allocated from a memory type that has the VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT
The host can read from and write to the mapped region, but synchronization with device operations is
Typical errors include VK_ERROR_OUT_OF_HOST_MEMORY and VK_ERROR_MEMORY_MAP_FAILED.