Structures

VkMemoryMapInfoKHR

Structure containing parameters of a memory map operation

The VkMemoryMapInfoKHR structure is defined as:

typedef struct VkMemoryMapInfoKHR {
    VkStructureType sType;
    const void* pNext;
    VkMemoryMapFlags flags;
    VkDeviceMemory memory;
    VkDeviceSize offset;
    VkDeviceSize size;
} VkMemoryMapInfoKHR;
  • sType is a VkStructureType value identifying this structure.
  • pNext is NULL or a pointer to a structure extending this structure.
  • flags is a bitmask of VkMemoryMapFlagBits specifying additional parameters of the memory map operation.
  • memory is the VkDeviceMemory object to be mapped.
  • offset is a zero-based byte offset from the beginning of the memory object.
  • size is the size of the memory range to map, or VK_WHOLE_SIZE to map from offset to the end of the allocation.

Valid Usage

VUID-VkMemoryMapInfoKHR-memory-07958

memory must not be currently host mapped

VUID-VkMemoryMapInfoKHR-offset-07959

offset must be less than the size of memory

VUID-VkMemoryMapInfoKHR-size-07960

If size is not equal to VK_WHOLE_SIZE, size must be greater than 0

VUID-VkMemoryMapInfoKHR-size-07961

If size is not equal to VK_WHOLE_SIZE, size must be less than or equal to the size of the memory minus offset

VUID-VkMemoryMapInfoKHR-memory-07962

memory must have been created with a memory type that reports VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT

VUID-VkMemoryMapInfoKHR-memory-07963

memory must not have been allocated with multiple instances

VUID-VkMemoryMapInfoKHR-flags-09569

If VK_MEMORY_MAP_PLACED_BIT_EXT is set in flags, the memoryMapPlaced feature must be enabled

VUID-VkMemoryMapInfoKHR-flags-09570

If VK_MEMORY_MAP_PLACED_BIT_EXT is set in flags, the pNext chain must include a VkMemoryMapPlacedInfoEXT structure and VkMemoryMapPlacedInfoEXT::pPlacedAddress must not be NULL

VUID-VkMemoryMapInfoKHR-flags-09571

If VK_MEMORY_MAP_PLACED_BIT_EXT is set in flags and the memoryMapRangePlaced feature is not enabled, offset must be zero

VUID-VkMemoryMapInfoKHR-flags-09572

If VK_MEMORY_MAP_PLACED_BIT_EXT is set in flags and the memoryMapRangePlaced feature is not enabled, size must be VK_WHOLE_SIZE or VkMemoryAllocateInfo::allocationSize

VUID-VkMemoryMapInfoKHR-flags-09573

If VK_MEMORY_MAP_PLACED_BIT_EXT is set in flags and the memoryMapRangePlaced feature is enabled, offset must be aligned to an integer multiple of VkPhysicalDeviceMapMemoryPlacedPropertiesEXT::minPlacedMemoryMapAlignment

VUID-VkMemoryMapInfoKHR-flags-09574

If VK_MEMORY_MAP_PLACED_BIT_EXT is set in flags and size is not VK_WHOLE_SIZE, size must be aligned to an integer multiple of VkPhysicalDeviceMapMemoryPlacedPropertiesEXT::minPlacedMemoryMapAlignment

VUID-VkMemoryMapInfoKHR-flags-09651

If VK_MEMORY_MAP_PLACED_BIT_EXT is set in flags and size is VK_WHOLE_SIZE, VkMemoryAllocateInfo::allocationSize must be aligned to an integer multiple of VkPhysicalDeviceMapMemoryPlacedPropertiesEXT::minPlacedMemoryMapAlignment

VUID-VkMemoryMapInfoKHR-flags-09575

If VK_MEMORY_MAP_PLACED_BIT_EXT is set in flags, the memory object must not have been imported from a handle type of VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT or VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_MAPPED_FOREIGN_MEMORY_BIT_EXT

Valid Usage (Implicit)

VUID-VkMemoryMapInfoKHR-sType-sType

sType must be VK_STRUCTURE_TYPE_MEMORY_MAP_INFO_KHR

VUID-VkMemoryMapInfoKHR-pNext-pNext

pNext must be NULL or a pointer to a valid instance of VkMemoryMapPlacedInfoEXT

VUID-VkMemoryMapInfoKHR-sType-unique

The sType value of each struct in the pNext chain must be unique

VUID-VkMemoryMapInfoKHR-flags-parameter

flags must be a valid combination of VkMemoryMapFlagBits values

Host Synchronization

  • Host access to memory must be externally synchronized ::