Class KHRMapMemory2

java.lang.Object
org.lwjgl.vulkan.KHRMapMemory2

public class KHRMapMemory2 extends Object
This extension provides extensible versions of the Vulkan memory map and unmap commands. The new commands are functionally identical to the core commands, except that their parameters are specified using extensible structures that can be used to pass extension-specific information.
Name String
VK_KHR_map_memory2
Extension Type
Device extension
Registered Extension Number
272
Revision
1
Contact
Extension Proposal
VK_KHR_map_memory2
Other Extension Metadata
Last Modified Date
2023-03-14
Interactions and External Dependencies
  • None
Contributors
  • Faith Ekstrand, Collabora
  • Tobias Hector, AMD
  • Field Details

  • Method Details

    • nvkMapMemory2KHR

      public static int nvkMapMemory2KHR(org.lwjgl.vulkan.VkDevice device, long pMemoryMapInfo, long ppData)
      Unsafe version of: MapMemory2KHR
    • vkMapMemory2KHR

      public static int vkMapMemory2KHR(org.lwjgl.vulkan.VkDevice device, VkMemoryMapInfoKHR pMemoryMapInfo, org.lwjgl.PointerBuffer ppData)
      Map a memory object into application address space.
      C Specification

      Alternatively, to retrieve a host virtual address pointer to a region of a mappable memory object, call:

      
       VkResult vkMapMemory2KHR(
           VkDevice                                    device,
           const VkMemoryMapInfoKHR*                   pMemoryMapInfo,
           void**                                      ppData);
      Description

      This function behaves identically to MapMemory except that it gets its parameters via an extensible structure pointer rather than directly as function arguments.

      Valid Usage (Implicit)
      • device must be a valid VkDevice handle
      • pMemoryMapInfo must be a valid pointer to a valid VkMemoryMapInfoKHR structure
      • ppData must be a valid pointer to a pointer value
      Return Codes
      On success, this command returns
      On failure, this command returns
      See Also

      VkMemoryMapInfoKHR

      Parameters:
      device - the logical device that owns the memory.
      pMemoryMapInfo - a pointer to a VkMemoryMapInfoKHR structure describing parameters of the map.
      ppData - a pointer to a void * variable in which is returned a host-accessible pointer to the beginning of the mapped range. This pointer minus VkMemoryMapInfoKHR::offset must be aligned to at least VkPhysicalDeviceLimits::minMemoryMapAlignment.
    • nvkUnmapMemory2KHR

      public static int nvkUnmapMemory2KHR(org.lwjgl.vulkan.VkDevice device, long pMemoryUnmapInfo)
      Unsafe version of: UnmapMemory2KHR
    • vkUnmapMemory2KHR

      public static int vkUnmapMemory2KHR(org.lwjgl.vulkan.VkDevice device, VkMemoryUnmapInfoKHR pMemoryUnmapInfo)
      Unmap a previously mapped memory object.
      C Specification

      Alternatively, to unmap a memory object once host access to it is no longer needed by the application, call:

      
       VkResult vkUnmapMemory2KHR(
           VkDevice                                    device,
           const VkMemoryUnmapInfoKHR*                 pMemoryUnmapInfo);
      Description

      This function behaves identically to UnmapMemory except that it gets its parameters via an extensible structure pointer rather than directly as function arguments.

      Valid Usage (Implicit)
      • device must be a valid VkDevice handle
      • pMemoryUnmapInfo must be a valid pointer to a valid VkMemoryUnmapInfoKHR structure
      Return Codes
      On success, this command returns
      On failure, this command returns
      See Also

      VkMemoryUnmapInfoKHR

      Parameters:
      device - the logical device that owns the memory.
      pMemoryUnmapInfo - a pointer to a VkMemoryUnmapInfoKHR structure describing parameters of the unmap.