Safe Haskell | None |
---|---|
Language | Haskell2010 |
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
device
is the logical device that created the device memory being exported.
pGetWin32HandleInfo
is 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.
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)
device
must be a validVkDevice
handle
pGetWin32HandleInfo
must be a valid pointer to a validVkMemoryGetWin32HandleInfoKHR
structurepHandle
must be a valid pointer to aHANDLE
value
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
device
is the logical device that will be importinghandle
.
handleType
is the type of the handlehandle
.handle
is the handle which will be imported.pMemoryWin32HandleProperties
will return properties ofhandle
.
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
handle
handleType
must be a validVkExternalMemoryHandleTypeFlagBits
valuepMemoryWin32HandleProperties
must be a valid pointer to aVkMemoryWin32HandlePropertiesKHR
structure
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
handleType
is not0
, it must be supported for import, as reported byVkExternalImageFormatProperties
orVkExternalBufferProperties
.
- The memory from which
handle
was exported, or the memory named byname
must have been created on the same underlying physical device asdevice
. - If
handleType
is not0
, it must be defined as an NT handle or a global share handle. - If
handleType
is 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
,name
must beNULL
. - If
handleType
is not0
andhandle
isNULL
,name
must name a valid memory resource of the type specified byhandleType
. - If
handleType
is not0
andname
isNULL
,handle
must be a valid handle of the type specified byhandleType
. - if
handle
is notNULL
,name
must beNULL
. - If
handle
is notNULL
, it must obey any requirements listed forhandleType
in external memory handle types compatibility. - If
name
is notNULL
, it must obey any requirements listed forhandleType
in external memory handle types compatibility.
Valid Usage (Implicit)
sType
must beVK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHR
- If
handleType
is not0
,handleType
must be a validVkExternalMemoryHandleTypeFlagBits
value
See Also
VkImportMemoryWin32HandleInfoKHR | |
|
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
::handleTypes
does 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 thepNext
chain ofVkMemoryAllocateInfo
.
Valid Usage (Implicit)
sType
must beVK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHR
- If
pAttributes
is notNULL
,pAttributes
must be a valid pointer to a validSECURITY_ATTRIBUTES
value
See Also
VkExportMemoryWin32HandleInfoKHR | |
|
Instances
data VkMemoryWin32HandlePropertiesKHR Source #
VkMemoryWin32HandlePropertiesKHR - Properties of External Memory Windows Handles
See Also
VkMemoryWin32HandlePropertiesKHR | |
|
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
handleType
must have been included inVkExportMemoryAllocateInfo
::handleTypes
whenmemory
was created.
- If
handleType
is defined as an NT handle,vkGetMemoryWin32HandleKHR
must be called no more than once for each valid unique combination ofmemory
andhandleType
. handleType
must be defined as an NT handle or a global share handle.
Valid Usage (Implicit)
sType
must beVK_STRUCTURE_TYPE_MEMORY_GET_WIN32_HANDLE_INFO_KHR
pNext
must beNULL
memory
must be a validVkDeviceMemory
handlehandleType
must be a validVkExternalMemoryHandleTypeFlagBits
value
See Also
VkDeviceMemory
,
VkExternalMemoryHandleTypeFlagBits
,
VkStructureType
,
vkGetMemoryWin32HandleKHR
VkMemoryGetWin32HandleInfoKHR | |
|