To invalidate ranges of non-coherent memory from the host caches, call:
// Provided by VK_VERSION_1_0 VkResult vkInvalidateMappedMemoryRanges( VkDevice device, uint32_t memoryRangeCount, const VkMappedMemoryRange* pMemoryRanges);
deviceis the logical device that owns the memory ranges.
memoryRangeCountis the length of the
pMemoryRangesis a pointer to an array of VkMappedMemoryRange structures describing the memory ranges to invalidate.
vkInvalidateMappedMemoryRanges guarantees that device writes to the
memory ranges described by
pMemoryRanges, which have been made
available to the host memory domain using the
types, are made visible to the host.
If a range of non-coherent memory is written by the host and then
invalidated without first being flushed, its contents are undefined.
Within each range described by
pMemoryRanges, each set of
nonCoherentAtomSize bytes in that range is invalidated if any byte in
that set has been written by the device since it was first host mapped, or
the last time it was invalidated.
Mapping non-coherent memory does not implicitly invalidate that memory.
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.