VKFLUSHMAPPEDMEMORYR(3)

NAME
vkFlushMappedMemoryRanges - Flush mapped memory ranges.

C SPECIFICATION

To flush ranges of non-coherent memory from the host caches, call:

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

PARAMETERS

    • device is the logical device that owns the memory ranges.

    • memoryRangeCount is the length of the pMemoryRanges array.

    • pMemoryRanges is a pointer to an array of VkMappedMemoryRange structures describing the memory ranges to flush.

DESCRIPTION

vkFlushMappedMemoryRanges must be used to guarantee that host writes to non-coherent memory are visible to the device. It must be called after the host writes to non-coherent memory have completed and before command buffers that will read or write any of those memory locations are submitted to a queue.

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

VkDevice, VkMappedMemoryRange

DOCUMENT NOTES

For more information, see the Vulkan Specification at URL

https://www.khronos.org/registry/vulkan/specs/1.0/xhtml/vkspec.html#vkFlushMappedMemoryRanges

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

COPYRIGHT

Copyright (c) 2014-2016 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

AUTHOR

Khronos Group
    Author.