Function Prototype

vkMapMemory2KHR

Map a memory object into application address space

Alternatively, to retrieve a host virtual address pointer to a region of a mappable memory object, call:

VkResult vkMapMemory2KHR(
    VkDevice device,
    const VkMemoryMapInfoKHR* pMemoryMapInfo,
    void** ppData);
  • device is the logical device that owns the memory.
  • pMemoryMapInfo is a pointer to a VkMemoryMapInfoKHR structure describing parameters of the map.
  • ppData is a pointer to a void * variable in which is returned a host-accessible pointer to the beginning of the mapped range. This pointer minus VkMemoryMapInfoKHR::offset must be aligned to at least VkPhysicalDeviceLimits::minMemoryMapAlignment.

This function behaves identically to vkMapMemory except that it gets its parameters via an extensible structure pointer rather than directly as function arguments.

Valid Usage (Implicit)

VUID-vkMapMemory2KHR-device-parameter

device must be a valid VkDevice handle

VUID-vkMapMemory2KHR-pMemoryMapInfo-parameter

pMemoryMapInfo must be a valid pointer to a valid VkMemoryMapInfoKHR structure

VUID-vkMapMemory2KHR-ppData-parameter

ppData must be a valid pointer to a pointer value