Top Description Fields Constructors Methods
org.lwjgl.vulkan

public Class KHRMapMemory2

extends Object
Class Inheritance
Imports
org.lwjgl.*, org.lwjgl.system.*

This extension provides extensible versions of the Vulkan memory map and unmap entry points. The new entry points are functionally identical to the core entry points, except that their parameters are specified using extensible structures that can be used to pass extension-specific information.
VK_KHR_map_memory2
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 Summary

Modifier and TypeField and Description
public static final String
public static final int
VK_KHR_MAP_MEMORY_2_SPEC_VERSION

The extension specification version.

public static final int
VK_STRUCTURE_TYPE_MEMORY_MAP_INFO_KHR

Extends VkStructureType.

public static final int

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public static int
nvkMapMemory2KHR(VkDevice device, long pMemoryMapInfo, long ppData)

Unsafe version of: MapMemory2KHR

public static int
nvkUnmapMemory2KHR(VkDevice device, long pMemoryUnmapInfo)

Unsafe version of: UnmapMemory2KHR

public static int
vkMapMemory2KHR(VkDevice
the logical device that owns the memory.
device
,
VkMemoryMapInfoKHR
a pointer to a VkMemoryMapInfoKHR structure describing parameters of the map.
pMemoryMapInfo
,
PointerBuffer
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.
ppData
)

Map a memory object into application address space.

public static int
vkUnmapMemory2KHR(VkDevice
the logical device that owns the memory.
device
,
VkMemoryUnmapInfoKHR
a pointer to a VkMemoryUnmapInfoKHR structure describing parameters of the unmap.
pMemoryUnmapInfo
)

Unmap a previously mapped memory object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

VK_KHR_MAP_MEMORY_2_EXTENSION_NAMEback to summary
public static final String VK_KHR_MAP_MEMORY_2_EXTENSION_NAME

The extension name.

VK_KHR_MAP_MEMORY_2_SPEC_VERSIONback to summary
public static final int VK_KHR_MAP_MEMORY_2_SPEC_VERSION

The extension specification version.

VK_STRUCTURE_TYPE_MEMORY_MAP_INFO_KHRback to summary
public static final int VK_STRUCTURE_TYPE_MEMORY_MAP_INFO_KHR

Extends VkStructureType.

Enum values:
VK_STRUCTURE_TYPE_MEMORY_UNMAP_INFO_KHRback to summary
public static final int VK_STRUCTURE_TYPE_MEMORY_UNMAP_INFO_KHR

Extends VkStructureType.

Enum values:

Constructor Detail

KHRMapMemory2back to summary
protected KHRMapMemory2()

Method Detail

nvkMapMemory2KHRback to summary
public static int nvkMapMemory2KHR(VkDevice device, long pMemoryMapInfo, long ppData)

Unsafe version of: MapMemory2KHR

nvkUnmapMemory2KHRback to summary
public static int nvkUnmapMemory2KHR(VkDevice device, long pMemoryUnmapInfo)

Unsafe version of: UnmapMemory2KHR

vkMapMemory2KHRback to summary
public static int vkMapMemory2KHR(VkDevice device, VkMemoryMapInfoKHR pMemoryMapInfo, 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:VkDevice

the logical device that owns the memory.

pMemoryMapInfo:VkMemoryMapInfoKHR

a pointer to a VkMemoryMapInfoKHR structure describing parameters of the map.

ppData:PointerBuffer

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.

Annotations
@NativeType:VkResult
vkUnmapMemory2KHRback to summary
public static int vkUnmapMemory2KHR(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
See Also

VkMemoryUnmapInfoKHR

Parameters
device:VkDevice

the logical device that owns the memory.

pMemoryUnmapInfo:VkMemoryUnmapInfoKHR

a pointer to a VkMemoryUnmapInfoKHR structure describing parameters of the unmap.

Annotations
@NativeType:VkResult