Package org.lwjgl.vulkan
Class KHRExternalMemoryWin32
- java.lang.Object
-
- org.lwjgl.vulkan.KHRExternalMemoryWin32
-
public class KHRExternalMemoryWin32 extends java.lang.Object
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.- Name String
VK_KHR_external_memory_win32
- Extension Type
- Device extension
- Registered Extension Number
- 74
- Revision
- 1
- Extension and Version Dependencies
- Requires Vulkan 1.0
- Requires
VK_KHR_external_memory
- Contact
- James Jones cubanismo
- Last Modified Date
- 2016-10-21
- IP Status
- No known IP claims.
- Contributors
- James Jones, NVIDIA
- Jeff Juliano, NVIDIA
- Carsten Rohde, NVIDIA
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
VK_KHR_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME
The extension name.static int
VK_KHR_EXTERNAL_MEMORY_WIN32_SPEC_VERSION
The extension specification version.static int
VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHR
VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHR
VK_STRUCTURE_TYPE_MEMORY_GET_WIN32_HANDLE_INFO_KHR
VK_STRUCTURE_TYPE_MEMORY_WIN32_HANDLE_PROPERTIES_KHRExtendsVkStructureType
.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static int
nvkGetMemoryWin32HandleKHR(VkDevice device, long pGetWin32HandleInfo, long pHandle)
Unsafe version of:GetMemoryWin32HandleKHR
static int
nvkGetMemoryWin32HandlePropertiesKHR(VkDevice device, int handleType, long handle, long pMemoryWin32HandleProperties)
Unsafe version of:GetMemoryWin32HandlePropertiesKHR
static int
vkGetMemoryWin32HandleKHR(VkDevice device, VkMemoryGetWin32HandleInfoKHR pGetWin32HandleInfo, org.lwjgl.PointerBuffer pHandle)
Get a Windows HANDLE for a memory object.static int
vkGetMemoryWin32HandlePropertiesKHR(VkDevice device, int handleType, long handle, VkMemoryWin32HandlePropertiesKHR pMemoryWin32HandleProperties)
Get Properties of External Memory Win32 Handles.
-
-
-
Field Detail
-
VK_KHR_EXTERNAL_MEMORY_WIN32_SPEC_VERSION
The extension specification version.
-
VK_KHR_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME
The extension name.
-
-
Method Detail
-
nvkGetMemoryWin32HandleKHR
public static int nvkGetMemoryWin32HandleKHR(VkDevice device, long pGetWin32HandleInfo, long pHandle)
Unsafe version of:GetMemoryWin32HandleKHR
-
vkGetMemoryWin32HandleKHR
public static int vkGetMemoryWin32HandleKHR(VkDevice device, VkMemoryGetWin32HandleInfoKHR pGetWin32HandleInfo, org.lwjgl.PointerBuffer pHandle)
Get a Windows HANDLE for a memory object.C Specification
To export a Windows handle representing the underlying resources 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. To avoid leaking resources, the application must release ownership of them using theCloseHandle
system call when they are no longer needed.Valid Usage (Implicit)
device
must be a validVkDevice
handlepGetWin32HandleInfo
must be a valid pointer to a validVkMemoryGetWin32HandleInfoKHR
structurepHandle
must be a valid pointer to aHANDLE
value
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
device
- the logical device that created the device memory being exported.pGetWin32HandleInfo
- a pointer to an instance of theVkMemoryGetWin32HandleInfoKHR
structure containing parameters of the export operation.pHandle
- will return the Windows handle representing the underlying resources of the device memory object.
-
nvkGetMemoryWin32HandlePropertiesKHR
public static int nvkGetMemoryWin32HandlePropertiesKHR(VkDevice device, int handleType, long handle, long pMemoryWin32HandleProperties)
Unsafe version of:GetMemoryWin32HandlePropertiesKHR
-
vkGetMemoryWin32HandlePropertiesKHR
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 be an external memory handle created outside of the Vulkan API.handleType
must not be one of the handle types defined as opaque.
Valid Usage (Implicit)
device
must be a validVkDevice
handlehandleType
must be a validVkExternalMemoryHandleTypeFlagBits
valuepMemoryWin32HandleProperties
must be a valid pointer to aVkMemoryWin32HandlePropertiesKHR
structure
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
device
- the logical device that will be importinghandle
.handleType
- the type of the handlehandle
.handle
- the handle which will be imported.pMemoryWin32HandleProperties
- will return properties ofhandle
.
-
-