Class KHRExternalMemoryWin32
- java.lang.Object
-
- org.lwjgl.vulkan.KHRExternalMemoryWin32
-
public class KHRExternalMemoryWin32 extends java.lang.ObjectAn 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
- Requires Vulkan 1.0
- Requires
VK_KHR_external_memory
- Contact
- James Jones cubanismo
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
Fields Modifier and Type Field Description static java.lang.StringVK_KHR_EXTERNAL_MEMORY_WIN32_EXTENSION_NAMEThe extension name.static intVK_KHR_EXTERNAL_MEMORY_WIN32_SPEC_VERSIONThe extension specification version.static intVK_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 intnvkGetMemoryWin32HandleKHR(org.lwjgl.vulkan.VkDevice device, long pGetWin32HandleInfo, long pHandle)Unsafe version of:GetMemoryWin32HandleKHRstatic intnvkGetMemoryWin32HandlePropertiesKHR(org.lwjgl.vulkan.VkDevice device, int handleType, long handle, long pMemoryWin32HandleProperties)Unsafe version of:GetMemoryWin32HandlePropertiesKHRstatic intvkGetMemoryWin32HandleKHR(org.lwjgl.vulkan.VkDevice device, VkMemoryGetWin32HandleInfoKHR pGetWin32HandleInfo, org.lwjgl.PointerBuffer pHandle)Get a Windows HANDLE for a memory object.static intvkGetMemoryWin32HandlePropertiesKHR(org.lwjgl.vulkan.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(org.lwjgl.vulkan.VkDevice device, long pGetWin32HandleInfo, long pHandle)Unsafe version of:GetMemoryWin32HandleKHR
-
vkGetMemoryWin32HandleKHR
public static int vkGetMemoryWin32HandleKHR(org.lwjgl.vulkan.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 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
vkGetMemoryWin32HandleKHRare owned by the application and hold a reference to their payload. To avoid leaking resources, the application must release ownership of them using theCloseHandlesystem 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)
devicemust be a validVkDevicehandlepGetWin32HandleInfomust be a valid pointer to a validVkMemoryGetWin32HandleInfoKHRstructurepHandlemust be a valid pointer to aHANDLEvalue
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 aVkMemoryGetWin32HandleInfoKHRstructure containing parameters of the export operation.pHandle- will return the Windows handle representing the payload of the device memory object.
-
nvkGetMemoryWin32HandlePropertiesKHR
public static int nvkGetMemoryWin32HandlePropertiesKHR(org.lwjgl.vulkan.VkDevice device, int handleType, long handle, long pMemoryWin32HandleProperties)Unsafe version of:GetMemoryWin32HandlePropertiesKHR
-
vkGetMemoryWin32HandlePropertiesKHR
public static int vkGetMemoryWin32HandlePropertiesKHR(org.lwjgl.vulkan.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
handlemust be an external memory handle created outside of the Vulkan APIhandleTypemust not be one of the handle types defined as opaque
Valid Usage (Implicit)
devicemust be a validVkDevicehandlehandleTypemust be a validVkExternalMemoryHandleTypeFlagBitsvaluepMemoryWin32HandlePropertiesmust be a valid pointer to aVkMemoryWin32HandlePropertiesKHRstructure
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
device- the logical device that will be importinghandle.handleType- aVkExternalMemoryHandleTypeFlagBitsvalue specifying the type of the handlehandle.handle- the handle which will be imported.pMemoryWin32HandleProperties- a pointer to aVkMemoryWin32HandlePropertiesKHRstructure in which properties ofhandleare returned.
-
-