Top Description Fields Constructors Methods
org.lwjgl.vulkan

public Class KHRExternalFenceWin32

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 fences. This extension enables an application to export fence payload to and import fence payload from Windows handles.
VK_KHR_external_fence_win32
Name String
VK_KHR_external_fence_win32
Extension Type
Device extension
Registered Extension Number
115
Revision
1
Extension and Version Dependencies
VK_KHR_external_fence
Contact
Other Extension Metadata
Last Modified Date
2017-05-08
IP Status
No known IP claims.
Contributors

Field Summary

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

The extension specification version.

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
nvkGetFenceWin32HandleKHR(VkDevice device, long pGetWin32HandleInfo, long pHandle)

Unsafe version of: GetFenceWin32HandleKHR

public static int
nvkImportFenceWin32HandleKHR(VkDevice device, long pImportFenceWin32HandleInfo)

Unsafe version of: ImportFenceWin32HandleKHR

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

Get a Windows HANDLE for a fence.

public static int
vkImportFenceWin32HandleKHR(VkDevice
the logical device that created the fence.
device
,
VkImportFenceWin32HandleInfoKHR
a pointer to a VkImportFenceWin32HandleInfoKHR structure specifying the fence and import parameters.
pImportFenceWin32HandleInfo
)

Import a fence from a Windows HANDLE.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

VK_KHR_EXTERNAL_FENCE_WIN32_EXTENSION_NAMEback to summary
public static final String VK_KHR_EXTERNAL_FENCE_WIN32_EXTENSION_NAME

The extension name.

VK_KHR_EXTERNAL_FENCE_WIN32_SPEC_VERSIONback to summary
public static final int VK_KHR_EXTERNAL_FENCE_WIN32_SPEC_VERSION

The extension specification version.

VK_STRUCTURE_TYPE_EXPORT_FENCE_WIN32_HANDLE_INFO_KHRback to summary
public static final int VK_STRUCTURE_TYPE_EXPORT_FENCE_WIN32_HANDLE_INFO_KHR

Extends VkStructureType.

Enum values:
VK_STRUCTURE_TYPE_FENCE_GET_WIN32_HANDLE_INFO_KHRback to summary
public static final int VK_STRUCTURE_TYPE_FENCE_GET_WIN32_HANDLE_INFO_KHR

Extends VkStructureType.

Enum values:
VK_STRUCTURE_TYPE_IMPORT_FENCE_WIN32_HANDLE_INFO_KHRback to summary
public static final int VK_STRUCTURE_TYPE_IMPORT_FENCE_WIN32_HANDLE_INFO_KHR

Extends VkStructureType.

Enum values:

Constructor Detail

KHRExternalFenceWin32back to summary
protected KHRExternalFenceWin32()

Method Detail

nvkGetFenceWin32HandleKHRback to summary
public static int nvkGetFenceWin32HandleKHR(VkDevice device, long pGetWin32HandleInfo, long pHandle)

Unsafe version of: GetFenceWin32HandleKHR

nvkImportFenceWin32HandleKHRback to summary
public static int nvkImportFenceWin32HandleKHR(VkDevice device, long pImportFenceWin32HandleInfo)

Unsafe version of: ImportFenceWin32HandleKHR

vkGetFenceWin32HandleKHRback to summary
public static int vkGetFenceWin32HandleKHR(VkDevice device, VkFenceGetWin32HandleInfoKHR pGetWin32HandleInfo, PointerBuffer pHandle)

Get a Windows HANDLE for a fence.

C Specification

To export a Windows handle representing the state of a fence, call:


VkResult vkGetFenceWin32HandleKHR(
    VkDevice                                    device,
    const VkFenceGetWin32HandleInfoKHR*         pGetWin32HandleInfo,
    HANDLE*                                     pHandle);
Description

For handle types defined as NT handles, the handles returned by vkGetFenceWin32HandleKHR 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 fence may have side effects depending on the transference of the specified handle type, as described in Importing Fence Payloads.

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

VkFenceGetWin32HandleInfoKHR

Parameters
device:VkDevice

the logical device that created the fence being exported.

pGetWin32HandleInfo:VkFenceGetWin32HandleInfoKHR

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

pHandle:PointerBuffer

will return the Windows handle representing the fence state.

Annotations
@NativeType:VkResult
vkImportFenceWin32HandleKHRback to summary
public static int vkImportFenceWin32HandleKHR(VkDevice device, VkImportFenceWin32HandleInfoKHR pImportFenceWin32HandleInfo)

Import a fence from a Windows HANDLE.

C Specification

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


VkResult vkImportFenceWin32HandleKHR(
    VkDevice                                    device,
    const VkImportFenceWin32HandleInfoKHR*      pImportFenceWin32HandleInfo);
Description

Importing a fence 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 fence 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
  • fence must not be associated with any queue command that has not yet completed execution on that queue
Valid Usage (Implicit)
Return Codes
On success, this command returns
On failure, this command returns
See Also

VkImportFenceWin32HandleInfoKHR

Parameters
device:VkDevice

the logical device that created the fence.

pImportFenceWin32HandleInfo:VkImportFenceWin32HandleInfoKHR

a pointer to a VkImportFenceWin32HandleInfoKHR structure specifying the fence and import parameters.

Annotations
@NativeType:VkResult