Top Description Fields Constructors Methods
org.lwjgl.vulkan

public Class KHRExternalMemoryWin32

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

An application may wish to reference device memory in multiple Vulkan logical devices or instances, in multiple processes, and/or in multiple APIs. This extension enables an application to export Windows handles from Vulkan memory objects and to import Vulkan memory objects from Windows handles exported from other Vulkan memory objects or from similar resources in other APIs.
VK_KHR_external_memory_win32
Name String
VK_KHR_external_memory_win32
Extension Type
Device extension
Registered Extension Number
74
Revision
1
Extension and Version Dependencies
VK_KHR_external_memory
Contact
Other Extension Metadata
Last Modified Date
2016-10-21
IP Status
No known IP claims.
Contributors
  • James Jones, NVIDIA
  • Jeff Juliano, NVIDIA
  • Carsten Rohde, NVIDIA

Field Summary

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

The extension specification version.

public static final int
public static final int
public static final int
public static final int

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public static int
nvkGetMemoryWin32HandleKHR(VkDevice device, long pGetWin32HandleInfo, long pHandle)

Unsafe version of: GetMemoryWin32HandleKHR

public static int
nvkGetMemoryWin32HandlePropertiesKHR(VkDevice device, int handleType, long handle, long pMemoryWin32HandleProperties)

Unsafe version of: GetMemoryWin32HandlePropertiesKHR

public static int
vkGetMemoryWin32HandleKHR(VkDevice
the logical device that created the device memory being exported.
device
,
VkMemoryGetWin32HandleInfoKHR
a pointer to a VkMemoryGetWin32HandleInfoKHR structure containing parameters of the export operation.
pGetWin32HandleInfo
,
PointerBuffer
will return the Windows handle representing the payload of the device memory object.
pHandle
)

Get a Windows HANDLE for a memory object.

public static int
vkGetMemoryWin32HandlePropertiesKHR(VkDevice
the logical device that will be importing handle.
device
,
int
a VkExternalMemoryHandleTypeFlagBits value specifying the type of the handle handle.
handleType
,
long
the handle which will be imported.
handle
,
VkMemoryWin32HandlePropertiesKHR
a pointer to a VkMemoryWin32HandlePropertiesKHR structure in which properties of handle are returned.
pMemoryWin32HandleProperties
)

Get Properties of External Memory Win32 Handles.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

VK_KHR_EXTERNAL_MEMORY_WIN32_EXTENSION_NAMEback to summary
public static final String VK_KHR_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME

The extension name.

VK_KHR_EXTERNAL_MEMORY_WIN32_SPEC_VERSIONback to summary
public static final int VK_KHR_EXTERNAL_MEMORY_WIN32_SPEC_VERSION

The extension specification version.

VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHRback to summary
public static final int VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHR

Extends VkStructureType.

Enum values:
VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHRback to summary
public static final int VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHR

Extends VkStructureType.

Enum values:
VK_STRUCTURE_TYPE_MEMORY_GET_WIN32_HANDLE_INFO_KHRback to summary
public static final int VK_STRUCTURE_TYPE_MEMORY_GET_WIN32_HANDLE_INFO_KHR

Extends VkStructureType.

Enum values:
VK_STRUCTURE_TYPE_MEMORY_WIN32_HANDLE_PROPERTIES_KHRback to summary
public static final int VK_STRUCTURE_TYPE_MEMORY_WIN32_HANDLE_PROPERTIES_KHR

Extends VkStructureType.

Enum values:

Constructor Detail

KHRExternalMemoryWin32back to summary
protected KHRExternalMemoryWin32()

Method Detail

nvkGetMemoryWin32HandleKHRback to summary
public static int nvkGetMemoryWin32HandleKHR(VkDevice device, long pGetWin32HandleInfo, long pHandle)

Unsafe version of: GetMemoryWin32HandleKHR

nvkGetMemoryWin32HandlePropertiesKHRback to summary
public static int nvkGetMemoryWin32HandlePropertiesKHR(VkDevice device, int handleType, long handle, long pMemoryWin32HandleProperties)

Unsafe version of: GetMemoryWin32HandlePropertiesKHR

vkGetMemoryWin32HandleKHRback to summary
public static int vkGetMemoryWin32HandleKHR(VkDevice device, VkMemoryGetWin32HandleInfoKHR pGetWin32HandleInfo, PointerBuffer pHandle)

Get a Windows HANDLE for a memory object.

C Specification

To export a Windows handle representing the payload of a Vulkan device memory object, call:


VkResult vkGetMemoryWin32HandleKHR(
    VkDevice                                    device,
    const VkMemoryGetWin32HandleInfoKHR*        pGetWin32HandleInfo,
    HANDLE*                                     pHandle);
Description

For handle types defined as NT handles, the handles returned by vkGetMemoryWin32HandleKHR are owned by the application and hold a reference to their payload. To avoid leaking resources, the application must release ownership of them using the CloseHandle system call when they are no longer needed.

Note

Non-NT handle types do not add a reference to their associated payload. If the original object owning the payload is destroyed, all resources and handles sharing that payload will become invalid.

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

VkMemoryGetWin32HandleInfoKHR

Parameters
device:VkDevice

the logical device that created the device memory being exported.

pGetWin32HandleInfo:VkMemoryGetWin32HandleInfoKHR

a pointer to a VkMemoryGetWin32HandleInfoKHR structure containing parameters of the export operation.

pHandle:PointerBuffer

will return the Windows handle representing the payload of the device memory object.

Annotations
@NativeType:VkResult
vkGetMemoryWin32HandlePropertiesKHRback to summary
public static int vkGetMemoryWin32HandlePropertiesKHR(VkDevice device, int handleType, long handle, VkMemoryWin32HandlePropertiesKHR pMemoryWin32HandleProperties)

Get Properties of External Memory Win32 Handles.

C Specification

Windows memory handles compatible with Vulkan may also be created by non-Vulkan APIs using methods beyond the scope of this specification. To determine the correct parameters to use when importing such handles, call:


VkResult vkGetMemoryWin32HandlePropertiesKHR(
    VkDevice                                    device,
    VkExternalMemoryHandleTypeFlagBits          handleType,
    HANDLE                                      handle,
    VkMemoryWin32HandlePropertiesKHR*           pMemoryWin32HandleProperties);
Valid Usage
  • handle must point to a valid Windows memory handle
  • handleType must not be one of the handle types defined as opaque
Valid Usage (Implicit)
  • device must be a valid VkDevice handle
  • handleType must be a valid VkExternalMemoryHandleTypeFlagBits value
  • pMemoryWin32HandleProperties must be a valid pointer to a VkMemoryWin32HandlePropertiesKHR structure
Return Codes
On success, this command returns
On failure, this command returns
See Also

VkMemoryWin32HandlePropertiesKHR

Parameters
device:VkDevice

the logical device that will be importing handle.

handleType:int

a VkExternalMemoryHandleTypeFlagBits value specifying the type of the handle handle.

handle:long

the handle which will be imported.

pMemoryWin32HandleProperties:VkMemoryWin32HandlePropertiesKHR

a pointer to a VkMemoryWin32HandlePropertiesKHR structure in which properties of handle are returned.

Annotations
@NativeType:VkResult