VkMemoryMapInfo
The VkMemoryMapInfo structure is defined as:
typedef struct VkMemoryMapInfo {
VkStructureType sType;
const void* pNext;
VkMemoryMapFlags flags;
VkDeviceMemory memory;
VkDeviceSize offset;
VkDeviceSize size;
} VkMemoryMapInfo;
or the equivalent
typedef VkMemoryMapInfo VkMemoryMapInfoKHR;
sTypeis a VkStructureType value identifying this structure.pNextisNULLor a pointer to a structure extending this structure.flagsis a bitmask of VkMemoryMapFlagBits specifying additional parameters of the memory map operation.memoryis the VkDeviceMemory object to be mapped.offsetis a zero-based byte offset from the beginning of the memory object.sizeis the size of the memory range to map, orVK_WHOLE_SIZEto map fromoffsetto the end of the allocation.
Valid Usage
VUID-VkMemoryMapInfo-memory-07958
memory must not be currently host mapped
VUID-VkMemoryMapInfo-offset-07959
offset must be less than the size of memory
VUID-VkMemoryMapInfo-size-07960
If size is not equal to VK_WHOLE_SIZE, size must be
greater than 0
VUID-VkMemoryMapInfo-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-VkMemoryMapInfo-memory-07962
memory must have been created with a memory type that reports
VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT
VUID-VkMemoryMapInfo-memory-07963
memory must not have been allocated with multiple instances
VUID-VkMemoryMapInfo-flags-09569
If VK_MEMORY_MAP_PLACED_BIT_EXT is set in flags, the
memoryMapPlaced feature must be
enabled
VUID-VkMemoryMapInfo-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-VkMemoryMapInfo-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-VkMemoryMapInfo-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-VkMemoryMapInfo-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-VkMemoryMapInfo-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-VkMemoryMapInfo-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-VkMemoryMapInfo-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-VkMemoryMapInfo-sType-sType
sType must be VK_STRUCTURE_TYPE_MEMORY_MAP_INFO
VUID-VkMemoryMapInfo-pNext-pNext
pNext must be NULL or a pointer to a valid instance of VkMemoryMapPlacedInfoEXT
VUID-VkMemoryMapInfo-sType-unique
The sType value of each structure in the pNext chain must be unique
VUID-VkMemoryMapInfo-flags-parameter
flags must be a valid combination of VkMemoryMapFlagBits values
VUID-VkMemoryMapInfo-memory-parameter
memory must be a valid VkDeviceMemory handle
Host Synchronization
- Host access to
memorymust be externally synchronized ::