VkMemoryMapInfo(3)

# VkMemoryMapInfo(3) Manual Page

## Name

VkMemoryMapInfo - Structure containing parameters of a memory map operation

Loading… please wait.

## C Specification

The `VkMemoryMapInfo` structure is defined as:

    // Provided by VK_VERSION_1_4
    typedef struct VkMemoryMapInfo {
        VkStructureType     sType;
        const void*         pNext;
        VkMemoryMapFlags    flags;
        VkDeviceMemory      memory;
        VkDeviceSize        offset;
        VkDeviceSize        size;
    } VkMemoryMapInfo;

or the equivalent

    // Provided by VK_KHR_map_memory2
    typedef VkMemoryMapInfo VkMemoryMapInfoKHR;

## Members

- `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.

## Description

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 struct 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 `memory` must be externally synchronized

## See Also

VK_KHR_map_memory2, VK_VERSION_1_4, VkDeviceMemory, VkDeviceSize, VkMemoryMapFlags, VkStructureType, vkMapMemory2, vkMapMemory2KHR

## Document Notes

For more information, see the Vulkan Specification

This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification, not directly.

## Copyright

Copyright 2014-2025 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0