| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Graphics.Vulkan.Extensions.VK_KHR_external_memory_win32
Synopsis
- type LPCWSTR = Ptr CWchar
- pattern VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHR :: VkStructureType
- pattern VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHR :: VkStructureType
- pattern VK_STRUCTURE_TYPE_MEMORY_WIN32_HANDLE_PROPERTIES_KHR :: VkStructureType
- pattern VK_STRUCTURE_TYPE_MEMORY_GET_WIN32_HANDLE_INFO_KHR :: VkStructureType
- pattern VK_KHR_EXTERNAL_MEMORY_WIN32_SPEC_VERSION :: Integral a => a
- pattern VK_KHR_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME :: (Eq a, IsString a) => a
- vkGetMemoryWin32HandleKHR :: ("device" ::: VkDevice) -> ("pGetWin32HandleInfo" ::: Ptr VkMemoryGetWin32HandleInfoKHR) -> ("pHandle" ::: Ptr HANDLE) -> IO VkResult
- vkGetMemoryWin32HandlePropertiesKHR :: ("device" ::: VkDevice) -> ("handleType" ::: VkExternalMemoryHandleTypeFlagBits) -> ("handle" ::: HANDLE) -> ("pMemoryWin32HandleProperties" ::: Ptr VkMemoryWin32HandlePropertiesKHR) -> IO VkResult
- data VkImportMemoryWin32HandleInfoKHR = VkImportMemoryWin32HandleInfoKHR {}
- data VkExportMemoryWin32HandleInfoKHR = VkExportMemoryWin32HandleInfoKHR {
- vkSType :: VkStructureType
- vkPNext :: Ptr ()
- vkPAttributes :: Ptr SECURITY_ATTRIBUTES
- vkDwAccess :: DWORD
- vkName :: LPCWSTR
- data VkMemoryWin32HandlePropertiesKHR = VkMemoryWin32HandlePropertiesKHR {
- vkSType :: VkStructureType
- vkPNext :: Ptr ()
- vkMemoryTypeBits :: Word32
- data VkMemoryGetWin32HandleInfoKHR = VkMemoryGetWin32HandleInfoKHR {}
Documentation
pattern VK_KHR_EXTERNAL_MEMORY_WIN32_SPEC_VERSION :: Integral a => a Source #
pattern VK_KHR_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME :: (Eq a, IsString a) => a Source #
vkGetMemoryWin32HandleKHR :: ("device" ::: VkDevice) -> ("pGetWin32HandleInfo" ::: Ptr VkMemoryGetWin32HandleInfoKHR) -> ("pHandle" ::: Ptr HANDLE) -> IO VkResult Source #
vkGetMemoryWin32HandleKHR - Get a Windows HANDLE for a memory object
Parameters
deviceis the logical device that created the device memory being exported.
pGetWin32HandleInfois a pointer to an instance of theVkMemoryGetWin32HandleInfoKHRstructure containing parameters of the export operation.pHandlewill return the Windows handle representing the underlying resources of the device memory object.
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 the CloseHandle system call when they are no longer needed.
Valid Usage (Implicit)
devicemust be a validVkDevicehandle
pGetWin32HandleInfomust be a valid pointer to a validVkMemoryGetWin32HandleInfoKHRstructurepHandlemust be a valid pointer to aHANDLEvalue
Return Codes
[Success]
- VK_SUCCESS
[Failure]
- VK_ERROR_TOO_MANY_OBJECTS
VK_ERROR_OUT_OF_HOST_MEMORY
See Also
vkGetMemoryWin32HandlePropertiesKHR :: ("device" ::: VkDevice) -> ("handleType" ::: VkExternalMemoryHandleTypeFlagBits) -> ("handle" ::: HANDLE) -> ("pMemoryWin32HandleProperties" ::: Ptr VkMemoryWin32HandlePropertiesKHR) -> IO VkResult Source #
vkGetMemoryWin32HandlePropertiesKHR - Get Properties of External Memory Win32 Handles
Parameters
deviceis the logical device that will be importinghandle.
handleTypeis the type of the handlehandle.handleis the handle which will be imported.pMemoryWin32HandlePropertieswill return properties ofhandle.
Valid Usage
handlemust be an external memory handle created outside of the Vulkan API.
handleTypemust not be one of the handle types defined as opaque.
Valid Usage (Implicit)
devicemust be a validVkDevicehandle
handleTypemust be a validVkExternalMemoryHandleTypeFlagBitsvaluepMemoryWin32HandlePropertiesmust be a valid pointer to aVkMemoryWin32HandlePropertiesKHRstructure
Return Codes
[Success]
- VK_SUCCESS
[Failure]
- VK_ERROR_INVALID_EXTERNAL_HANDLE
See Also
VkDevice,
VkExternalMemoryHandleTypeFlagBits,
VkMemoryWin32HandlePropertiesKHR
data VkImportMemoryWin32HandleInfoKHR Source #
VkImportMemoryWin32HandleInfoKHR - import Win32 memory created on the same physical device
Description
Importing memory objects 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 underlying memory into multiple
instances of Vulkan, into the same instance from which it was exported,
and multiple times into a given Vulkan instance. In all cases, each
import operation must create a distinct VkDeviceMemory object.
Valid Usage
- If
handleTypeis not0, it must be supported for import, as reported byVkExternalImageFormatPropertiesorVkExternalBufferProperties.
- The memory from which
handlewas exported, or the memory named bynamemust have been created on the same underlying physical device asdevice. - If
handleTypeis not0, it must be defined as an NT handle or a global share handle. - If
handleTypeis notVK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT,VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT,VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT, orVK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT,namemust beNULL. - If
handleTypeis not0andhandleisNULL,namemust name a valid memory resource of the type specified byhandleType. - If
handleTypeis not0andnameisNULL,handlemust be a valid handle of the type specified byhandleType. - if
handleis notNULL,namemust beNULL. - If
handleis notNULL, it must obey any requirements listed forhandleTypein external memory handle types compatibility. - If
nameis notNULL, it must obey any requirements listed forhandleTypein external memory handle types compatibility.
Valid Usage (Implicit)
sTypemust beVK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHR
- If
handleTypeis not0,handleTypemust be a validVkExternalMemoryHandleTypeFlagBitsvalue
See Also
Constructors
| VkImportMemoryWin32HandleInfoKHR | |
Fields
| |
Instances
data VkExportMemoryWin32HandleInfoKHR Source #
VkExportMemoryWin32HandleInfoKHR - Structure specifying additional attributes of Windows handles exported from a memory
Description
If this structure is not present, or if pAttributes is set to NULL,
default security descriptor values will be used, and child processes
created by the application will not inherit the handle, as described in
the MSDN documentation for “Synchronization Object Security and Access
Rights”1. Further, if the structure is not present, the access rights
will be
DXGI_SHARED_RESOURCE_READ | DXGI_SHARED_RESOURCE_WRITE
for handles of the following types:
VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT
VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT
And
GENERIC_ALL
for handles of the following types:
VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT
VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT
Valid Usage
- If
VkExportMemoryAllocateInfo::handleTypesdoes not includeVK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT,VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT,VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT, orVK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT, VkExportMemoryWin32HandleInfoKHR must not be in thepNextchain ofVkMemoryAllocateInfo.
Valid Usage (Implicit)
sTypemust beVK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHR
- If
pAttributesis notNULL,pAttributesmust be a valid pointer to a validSECURITY_ATTRIBUTESvalue
See Also
Constructors
| VkExportMemoryWin32HandleInfoKHR | |
Fields
| |
Instances
data VkMemoryWin32HandlePropertiesKHR Source #
VkMemoryWin32HandlePropertiesKHR - Properties of External Memory Windows Handles
See Also
Constructors
| VkMemoryWin32HandlePropertiesKHR | |
Fields
| |
Instances
data VkMemoryGetWin32HandleInfoKHR Source #
VkMemoryGetWin32HandleInfoKHR - Structure describing a Win32 handle semaphore export operation
Description
The properties of the handle returned depend on the value of
handleType. See
VkExternalMemoryHandleTypeFlagBits
for a description of the properties of the defined external memory
handle types.
Valid Usage
handleTypemust have been included inVkExportMemoryAllocateInfo::handleTypeswhenmemorywas created.
- If
handleTypeis defined as an NT handle,vkGetMemoryWin32HandleKHRmust be called no more than once for each valid unique combination ofmemoryandhandleType. handleTypemust be defined as an NT handle or a global share handle.
Valid Usage (Implicit)
sTypemust beVK_STRUCTURE_TYPE_MEMORY_GET_WIN32_HANDLE_INFO_KHR
pNextmust beNULLmemorymust be a validVkDeviceMemoryhandlehandleTypemust be a validVkExternalMemoryHandleTypeFlagBitsvalue
See Also
VkDeviceMemory,
VkExternalMemoryHandleTypeFlagBits,
VkStructureType,
vkGetMemoryWin32HandleKHR
Constructors
| VkMemoryGetWin32HandleInfoKHR | |
Fields
| |