C Specification

The VkMemoryMapInfoKHR structure is defined as:

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

Members

  • sType is a VkStructureType value identifying this structure.

  • pNext is NULL or a pointer to a structure extending this structure.

  • flags is reserved for future use.

  • 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-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

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

  • VUID-VkMemoryMapInfoKHR-flags-zerobitmask
    flags must be 0

  • VUID-VkMemoryMapInfoKHR-memory-parameter
    memory must be a valid VkDeviceMemory handle

Host Synchronization
  • Host access to memory must be externally synchronized

See Also

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 2014-2023 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0