VKINVALIDATEMAPPEDME(3)

NAME
vkInvalidateMappedMemoryRanges - Invalidate ranges of mapped memory objects.

C SPECIFICATION

    VkResult vkInvalidateMappedMemoryRanges(
        VkDevice                                    device,
        uint32_t                                    memoryRangeCount,
        const VkMappedMemoryRange*                  pMemoryRanges);

PARAMETERS

device
    A handle to the logical device which owns the specified memory ranges.

memoryRangeCount
    Number of memory ranges described by pMemoryRanges.

pMemoryRanges
    Memory ranges to invalidate.

DESCRIPTION

vkInvalidateMappedMemoryRanges invalidates a number of ranges of a number of mapped memory objects. device is the handle to the device that owns the memory objects referenced by the call. memoryRangeCount specifies the number of memory ranges to invalidate and pMemoryRanges is a pointer to an array of VkMappedMemoryRange structures describing the memory ranges to be invalidated. The definition of VkMappedMemoryRange is:

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

The sType member of each element of pMemoryRanges should be set to VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE. The memory member of the structure specifies the handle to the device memory object containing the mapped region and offset and size specify the starting offset and size of the region, in bytes, respectively. Areas of regions that extend outside the mapped portion of the parent memory object are ignored and have no effect.

After invalidation, any data stored in the referenced region is discarded and should be considered stale.

VALID USAGE

    • device must be a valid VkDevice handle

    • pMemoryRanges must be a pointer to an array of memoryRangeCount valid VkMappedMemoryRange structures

    • memoryRangeCount must be greater than 0

RETURN CODES

On success, this command returns

        • VK_SUCCESS

On failure, this command returns

        • VK_ERROR_OUT_OF_HOST_MEMORY

        • VK_ERROR_OUT_OF_DEVICE_MEMORY

SEE ALSO

vkFlushMappedMemoryRanges

COPYRIGHT

Copyright © 2014-2016 Khronos Group. This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1.0, 8 June 1999. http://opencontent.org/openpub/.

AUTHOR

Khronos Group
    Author.