| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Vulkan.Extensions.VK_KHR_external_memory_win32
Synopsis
- getMemoryWin32HandleKHR :: forall io. MonadIO io => Device -> MemoryGetWin32HandleInfoKHR -> io HANDLE
- getMemoryWin32HandlePropertiesKHR :: forall io. MonadIO io => Device -> ExternalMemoryHandleTypeFlagBits -> HANDLE -> io MemoryWin32HandlePropertiesKHR
- data ImportMemoryWin32HandleInfoKHR = ImportMemoryWin32HandleInfoKHR {}
- data ExportMemoryWin32HandleInfoKHR = ExportMemoryWin32HandleInfoKHR {}
- data MemoryWin32HandlePropertiesKHR = MemoryWin32HandlePropertiesKHR {}
- data MemoryGetWin32HandleInfoKHR = MemoryGetWin32HandleInfoKHR {}
- type KHR_EXTERNAL_MEMORY_WIN32_SPEC_VERSION = 1
- pattern KHR_EXTERNAL_MEMORY_WIN32_SPEC_VERSION :: forall a. Integral a => a
- type KHR_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME = "VK_KHR_external_memory_win32"
- pattern KHR_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
- type LPCWSTR = Ptr CWchar
- type HANDLE = Ptr ()
- type DWORD = Word32
- data SECURITY_ATTRIBUTES
Documentation
getMemoryWin32HandleKHR Source #
Arguments
| :: forall io. MonadIO io | |
| => Device |
|
| -> MemoryGetWin32HandleInfoKHR |
|
| -> io HANDLE |
vkGetMemoryWin32HandleKHR - Get a Windows HANDLE for a memory object
Description
For handle types defined as NT handles, the handles returned by
getMemoryWin32HandleKHR are owned by the application and hold a
reference to their payload. To avoid leaking resources, the application
must release ownership of them using the CloseHandle system 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.
Return Codes
See Also
getMemoryWin32HandlePropertiesKHR Source #
Arguments
| :: forall io. MonadIO io | |
| => Device |
|
| -> ExternalMemoryHandleTypeFlagBits |
|
| -> HANDLE |
|
| -> io MemoryWin32HandlePropertiesKHR |
vkGetMemoryWin32HandlePropertiesKHR - Get Properties of External Memory Win32 Handles
Return Codes
See Also
Device,
ExternalMemoryHandleTypeFlagBits,
MemoryWin32HandlePropertiesKHR
data ImportMemoryWin32HandleInfoKHR Source #
VkImportMemoryWin32HandleInfoKHR - import Win32 memory created on the same physical device
Description
Importing memory object payloads 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 handle ownership
using the CloseHandle system call when the handle is no longer needed.
For handle types defined as NT handles, the imported memory object holds
a reference to its payload.
Note
Non-NT handle import operations 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.
Applications can import the same payload 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 DeviceMemory object.
Valid Usage
- If
handleTypeis not0, it must be supported for import, as reported byExternalImageFormatPropertiesorExternalBufferProperties
- 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 notEXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT,EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT,EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT, orEXTERNAL_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 beSTRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHR
- If
handleTypeis not0,handleTypemust be a validExternalMemoryHandleTypeFlagBitsvalue
See Also
Constructors
| ImportMemoryWin32HandleInfoKHR | |
Fields
| |
Instances
data ExportMemoryWin32HandleInfoKHR Source #
VkExportMemoryWin32HandleInfoKHR - Structure specifying additional attributes of Windows handles exported from a memory
Description
If
ExportMemoryAllocateInfo
is not present in the same pNext chain, this structure is ignored.
If
ExportMemoryAllocateInfo
is present in the pNext chain of
MemoryAllocateInfo with a Windows handleType,
but either ExportMemoryWin32HandleInfoKHR is not present in the
pNext chain, or if it is but 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 used depend
on the handle type.
For handles of the following types:
EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT
EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT
The implementation must ensure the access rights allow read and write access to the memory.
For handles of the following types:
EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT
EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT
The access rights must be:
GENERIC_ALL
Valid Usage
- If
ExportMemoryAllocateInfo::handleTypesdoes not includeEXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT,EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT,EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT, orEXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT, aExportMemoryWin32HandleInfoKHRstructure must not be included in thepNextchain ofMemoryAllocateInfo
Valid Usage (Implicit)
sTypemust beSTRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHR
- If
pAttributesis notNULL,pAttributesmust be a valid pointer to a validSECURITY_ATTRIBUTESvalue
See Also
Constructors
| ExportMemoryWin32HandleInfoKHR | |
Fields
| |
Instances
data MemoryWin32HandlePropertiesKHR Source #
VkMemoryWin32HandlePropertiesKHR - Properties of External Memory Windows Handles
Valid Usage (Implicit)
See Also
Constructors
| MemoryWin32HandlePropertiesKHR | |
Fields
| |
Instances
data MemoryGetWin32HandleInfoKHR Source #
VkMemoryGetWin32HandleInfoKHR - Structure describing a Win32 handle semaphore export operation
Description
The properties of the handle returned depend on the value of
handleType. See
ExternalMemoryHandleTypeFlagBits
for a description of the properties of the defined external memory
handle types.
Valid Usage
handleTypemust have been included inExportMemoryAllocateInfo::handleTypeswhenmemorywas created
- If
handleTypeis defined as an NT handle,getMemoryWin32HandleKHRmust 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 beSTRUCTURE_TYPE_MEMORY_GET_WIN32_HANDLE_INFO_KHR
pNextmust beNULLmemorymust be a validDeviceMemoryhandlehandleTypemust be a validExternalMemoryHandleTypeFlagBitsvalue
See Also
DeviceMemory,
ExternalMemoryHandleTypeFlagBits,
StructureType,
getMemoryWin32HandleKHR
Constructors
| MemoryGetWin32HandleInfoKHR | |
Fields
| |
Instances
pattern KHR_EXTERNAL_MEMORY_WIN32_SPEC_VERSION :: forall a. Integral a => a Source #
type KHR_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME = "VK_KHR_external_memory_win32" Source #
pattern KHR_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a Source #
data SECURITY_ATTRIBUTES Source #