VkMappedMemoryRange(3)

# VkMappedMemoryRange(3) Manual Page

## Name

VkMappedMemoryRange - Structure specifying a mapped memory range

## C Specification

The `VkMappedMemoryRange` structure is defined as:

    typedef struct VkMappedMemoryRange {
        VkStructureType    sType;
        const void*        pNext;
        VkDeviceMemory     memory;
        VkDeviceSize       offset;
        VkDeviceSize       size;
    } VkMappedMemoryRange;

## Members

- `sType` is the type of this structure.

- `pNext` is `NULL` or a pointer to an extension-specific structure.

- `memory` is the memory object to which this range belongs.

- `offset` is the zero-based byte offset from the beginning of the memory object.

- `size` is either the size of range, or `VK_WHOLE_SIZE` to affect the range from `offset` to the end of the current mapping of the allocation.

## Description

Valid Usage

- `memory` must be currently host mapped

- If `size` is not equal to `VK_WHOLE_SIZE`, `offset` and `size` must specify a range contained within the currently mapped range of `memory`

- If `size` is equal to `VK_WHOLE_SIZE`, `offset` must be within the currently mapped range of `memory`

- If `size` is equal to `VK_WHOLE_SIZE`, the end of the current mapping of `memory` must be a multiple of VkPhysicalDeviceLimits::`nonCoherentAtomSize` bytes from the beginning of the memory object.

- `offset` must be a multiple of VkPhysicalDeviceLimits::`nonCoherentAtomSize`

- If `size` is not equal to `VK_WHOLE_SIZE`, `size` must either be a multiple of VkPhysicalDeviceLimits::`nonCoherentAtomSize`, or `offset` plus `size` must equal the size of `memory`.

Valid Usage (Implicit)

- `sType` must be `VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE`

- `pNext` must be `NULL`

- `memory` must be a valid VkDeviceMemory handle

## See Also

VkDeviceMemory, `VkDeviceSize`, VkStructureType, vkFlushMappedMemoryRanges, vkInvalidateMappedMemoryRanges

## 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 (c) 2014-2020 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.