Top Description Fields Constructors Methods
org.lwjgl.vulkan

public Class KHRExternalSemaphoreWin32

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

An application using external memory may wish to synchronize access to that memory using semaphores. This extension enables an application to export semaphore payload to and import semaphore payload from Windows handles.
VK_KHR_external_semaphore_win32
Name String
VK_KHR_external_semaphore_win32
Extension Type
Device extension
Registered Extension Number
79
Revision
1
Extension and Version Dependencies
VK_KHR_external_semaphore
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_SEMAPHORE_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
nvkGetSemaphoreWin32HandleKHR(VkDevice device, long pGetWin32HandleInfo, long pHandle)

Unsafe version of: GetSemaphoreWin32HandleKHR

public static int
nvkImportSemaphoreWin32HandleKHR(VkDevice device, long pImportSemaphoreWin32HandleInfo)

Unsafe version of: ImportSemaphoreWin32HandleKHR

public static int
vkGetSemaphoreWin32HandleKHR(VkDevice
the logical device that created the semaphore being exported.
device
,
VkSemaphoreGetWin32HandleInfoKHR
a pointer to a VkSemaphoreGetWin32HandleInfoKHR structure containing parameters of the export operation.
pGetWin32HandleInfo
,
PointerBuffer
will return the Windows handle representing the semaphore state.
pHandle
)

Get a Windows HANDLE for a semaphore.

public static int
vkImportSemaphoreWin32HandleKHR(VkDevice
the logical device that created the semaphore.
device
,
VkImportSemaphoreWin32HandleInfoKHR
a pointer to a VkImportSemaphoreWin32HandleInfoKHR structure specifying the semaphore and import parameters.
pImportSemaphoreWin32HandleInfo
)

Import a semaphore from a Windows HANDLE.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

VK_KHR_EXTERNAL_SEMAPHORE_WIN32_EXTENSION_NAMEback to summary
public static final String VK_KHR_EXTERNAL_SEMAPHORE_WIN32_EXTENSION_NAME

The extension name.

VK_KHR_EXTERNAL_SEMAPHORE_WIN32_SPEC_VERSIONback to summary
public static final int VK_KHR_EXTERNAL_SEMAPHORE_WIN32_SPEC_VERSION

The extension specification version.

VK_STRUCTURE_TYPE_D3D12_FENCE_SUBMIT_INFO_KHRback to summary
public static final int VK_STRUCTURE_TYPE_D3D12_FENCE_SUBMIT_INFO_KHR

Extends VkStructureType.

Enum values:
VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHRback to summary
public static final int VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR

Extends VkStructureType.

Enum values:
VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHRback to summary
public static final int VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR

Extends VkStructureType.

Enum values:
VK_STRUCTURE_TYPE_SEMAPHORE_GET_WIN32_HANDLE_INFO_KHRback to summary
public static final int VK_STRUCTURE_TYPE_SEMAPHORE_GET_WIN32_HANDLE_INFO_KHR

Extends VkStructureType.

Enum values:

Constructor Detail

KHRExternalSemaphoreWin32back to summary
protected KHRExternalSemaphoreWin32()

Method Detail

nvkGetSemaphoreWin32HandleKHRback to summary
public static int nvkGetSemaphoreWin32HandleKHR(VkDevice device, long pGetWin32HandleInfo, long pHandle)

Unsafe version of: GetSemaphoreWin32HandleKHR

nvkImportSemaphoreWin32HandleKHRback to summary
public static int nvkImportSemaphoreWin32HandleKHR(VkDevice device, long pImportSemaphoreWin32HandleInfo)

Unsafe version of: ImportSemaphoreWin32HandleKHR

vkGetSemaphoreWin32HandleKHRback to summary
public static int vkGetSemaphoreWin32HandleKHR(VkDevice device, VkSemaphoreGetWin32HandleInfoKHR pGetWin32HandleInfo, PointerBuffer pHandle)

Get a Windows HANDLE for a semaphore.

C Specification

To export a Windows handle representing the payload of a semaphore, call:


VkResult vkGetSemaphoreWin32HandleKHR(
    VkDevice                                    device,
    const VkSemaphoreGetWin32HandleInfoKHR*     pGetWin32HandleInfo,
    HANDLE*                                     pHandle);
Description

For handle types defined as NT handles, the handles returned by vkGetSemaphoreWin32HandleKHR are owned by the application. To avoid leaking resources, the application must release ownership of them using the CloseHandle system call when they are no longer needed.

Exporting a Windows handle from a semaphore may have side effects depending on the transference of the specified handle type, as described in Importing Semaphore Payloads.

Valid Usage (Implicit)
  • device must be a valid VkDevice handle
  • pGetWin32HandleInfo must be a valid pointer to a valid VkSemaphoreGetWin32HandleInfoKHR 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

VkSemaphoreGetWin32HandleInfoKHR

Parameters
device:VkDevice

the logical device that created the semaphore being exported.

pGetWin32HandleInfo:VkSemaphoreGetWin32HandleInfoKHR

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

pHandle:PointerBuffer

will return the Windows handle representing the semaphore state.

Annotations
@NativeType:VkResult
vkImportSemaphoreWin32HandleKHRback to summary
public static int vkImportSemaphoreWin32HandleKHR(VkDevice device, VkImportSemaphoreWin32HandleInfoKHR pImportSemaphoreWin32HandleInfo)

Import a semaphore from a Windows HANDLE.

C Specification

To import a semaphore payload from a Windows handle, call:


VkResult vkImportSemaphoreWin32HandleKHR(
    VkDevice                                    device,
    const VkImportSemaphoreWin32HandleInfoKHR*  pImportSemaphoreWin32HandleInfo);
Description

Importing a semaphore payload from Windows handles does not transfer ownership of the handle to the Vulkan implementation. For handle types defined as NT handles, the application must release ownership using the CloseHandle system call when the handle is no longer needed.

Applications can import the same semaphore payload into multiple instances of Vulkan, into the same instance from which it was exported, and multiple times into a given Vulkan instance.

Valid Usage (Implicit)
Return Codes
On success, this command returns
On failure, this command returns
See Also

VkImportSemaphoreWin32HandleInfoKHR

Parameters
device:VkDevice

the logical device that created the semaphore.

pImportSemaphoreWin32HandleInfo:VkImportSemaphoreWin32HandleInfoKHR

a pointer to a VkImportSemaphoreWin32HandleInfoKHR structure specifying the semaphore and import parameters.

Annotations
@NativeType:VkResult