vulkan-3.6.3: Bindings to the Vulkan graphics API.
Safe HaskellNone
LanguageHaskell2010

Vulkan.Extensions.VK_KHR_external_memory_win32

Synopsis

Documentation

getMemoryWin32HandleKHR Source #

Arguments

:: forall io. MonadIO io 
=> Device

device is the logical device that created the device memory being exported.

device must be a valid Device handle

-> MemoryGetWin32HandleInfoKHR

pGetWin32HandleInfo is a pointer to a MemoryGetWin32HandleInfoKHR structure containing parameters of the export operation.

pGetWin32HandleInfo must be a valid pointer to a valid MemoryGetWin32HandleInfoKHR structure

-> 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. To avoid leaking resources, the application must release ownership of them using the CloseHandle system call when they are no longer needed.

Return Codes

Success
Failure

See Also

Device, MemoryGetWin32HandleInfoKHR

getMemoryWin32HandlePropertiesKHR Source #

Arguments

:: forall io. MonadIO io 
=> Device

device is the logical device that will be importing handle.

device must be a valid Device handle

-> ExternalMemoryHandleTypeFlagBits

handleType is the type of the handle handle.

handleType must not be one of the handle types defined as opaque

handleType must be a valid ExternalMemoryHandleTypeFlagBits value

-> HANDLE

handle is the handle which will be imported.

handle must be an external memory handle created outside of the Vulkan API

-> io MemoryWin32HandlePropertiesKHR 

vkGetMemoryWin32HandlePropertiesKHR - Get Properties of External Memory Win32 Handles

Return Codes

Success
Failure

See Also

Device, ExternalMemoryHandleTypeFlagBits, MemoryWin32HandlePropertiesKHR

data ImportMemoryWin32HandleInfoKHR 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 DeviceMemory object.

Valid Usage

Valid Usage (Implicit)

See Also

ExternalMemoryHandleTypeFlagBits, StructureType

Constructors

ImportMemoryWin32HandleInfoKHR 

Fields

Instances

Instances details
Eq ImportMemoryWin32HandleInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_memory_win32

Show ImportMemoryWin32HandleInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_memory_win32

Generic ImportMemoryWin32HandleInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_memory_win32

Associated Types

type Rep ImportMemoryWin32HandleInfoKHR :: Type -> Type #

Storable ImportMemoryWin32HandleInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_memory_win32

FromCStruct ImportMemoryWin32HandleInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_memory_win32

ToCStruct ImportMemoryWin32HandleInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_memory_win32

Zero ImportMemoryWin32HandleInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_memory_win32

type Rep ImportMemoryWin32HandleInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_memory_win32

type Rep ImportMemoryWin32HandleInfoKHR = D1 ('MetaData "ImportMemoryWin32HandleInfoKHR" "Vulkan.Extensions.VK_KHR_external_memory_win32" "vulkan-3.6.3-inplace" 'False) (C1 ('MetaCons "ImportMemoryWin32HandleInfoKHR" 'PrefixI 'True) (S1 ('MetaSel ('Just "handleType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 ExternalMemoryHandleTypeFlagBits) :*: (S1 ('MetaSel ('Just "handle") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 HANDLE) :*: S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 LPCWSTR))))

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
1
https://docs.microsoft.com/en-us/windows/win32/sync/synchronization-object-security-and-access-rights

Valid Usage

Valid Usage (Implicit)

  • If pAttributes is not NULL, pAttributes must be a valid pointer to a valid SECURITY_ATTRIBUTES value

See Also

StructureType

Constructors

ExportMemoryWin32HandleInfoKHR 

Fields

Instances

Instances details
Eq ExportMemoryWin32HandleInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_memory_win32

Show ExportMemoryWin32HandleInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_memory_win32

Generic ExportMemoryWin32HandleInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_memory_win32

Associated Types

type Rep ExportMemoryWin32HandleInfoKHR :: Type -> Type #

Storable ExportMemoryWin32HandleInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_memory_win32

FromCStruct ExportMemoryWin32HandleInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_memory_win32

ToCStruct ExportMemoryWin32HandleInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_memory_win32

Zero ExportMemoryWin32HandleInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_memory_win32

type Rep ExportMemoryWin32HandleInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_memory_win32

type Rep ExportMemoryWin32HandleInfoKHR = D1 ('MetaData "ExportMemoryWin32HandleInfoKHR" "Vulkan.Extensions.VK_KHR_external_memory_win32" "vulkan-3.6.3-inplace" 'False) (C1 ('MetaCons "ExportMemoryWin32HandleInfoKHR" 'PrefixI 'True) (S1 ('MetaSel ('Just "attributes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Ptr SECURITY_ATTRIBUTES)) :*: (S1 ('MetaSel ('Just "dwAccess") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 DWORD) :*: S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 LPCWSTR))))

data MemoryWin32HandlePropertiesKHR Source #

VkMemoryWin32HandlePropertiesKHR - Properties of External Memory Windows Handles

Valid Usage (Implicit)

See Also

StructureType, getMemoryWin32HandlePropertiesKHR

Constructors

MemoryWin32HandlePropertiesKHR 

Fields

  • memoryTypeBits :: Word32

    memoryTypeBits is a bitmask containing one bit set for every memory type which the specified windows handle can be imported as.

Instances

Instances details
Eq MemoryWin32HandlePropertiesKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_memory_win32

Show MemoryWin32HandlePropertiesKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_memory_win32

Generic MemoryWin32HandlePropertiesKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_memory_win32

Associated Types

type Rep MemoryWin32HandlePropertiesKHR :: Type -> Type #

Storable MemoryWin32HandlePropertiesKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_memory_win32

FromCStruct MemoryWin32HandlePropertiesKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_memory_win32

ToCStruct MemoryWin32HandlePropertiesKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_memory_win32

Zero MemoryWin32HandlePropertiesKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_memory_win32

type Rep MemoryWin32HandlePropertiesKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_memory_win32

type Rep MemoryWin32HandlePropertiesKHR = D1 ('MetaData "MemoryWin32HandlePropertiesKHR" "Vulkan.Extensions.VK_KHR_external_memory_win32" "vulkan-3.6.3-inplace" 'False) (C1 ('MetaCons "MemoryWin32HandlePropertiesKHR" 'PrefixI 'True) (S1 ('MetaSel ('Just "memoryTypeBits") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Word32)))

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

  • If handleType is defined as an NT handle, getMemoryWin32HandleKHR must be called no more than once for each valid unique combination of memory and handleType
  • handleType must be defined as an NT handle or a global share handle

Valid Usage (Implicit)

See Also

DeviceMemory, ExternalMemoryHandleTypeFlagBits, StructureType, getMemoryWin32HandleKHR

Constructors

MemoryGetWin32HandleInfoKHR 

Fields

Instances

Instances details
Eq MemoryGetWin32HandleInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_memory_win32

Show MemoryGetWin32HandleInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_memory_win32

Generic MemoryGetWin32HandleInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_memory_win32

Associated Types

type Rep MemoryGetWin32HandleInfoKHR :: Type -> Type #

Storable MemoryGetWin32HandleInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_memory_win32

FromCStruct MemoryGetWin32HandleInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_memory_win32

ToCStruct MemoryGetWin32HandleInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_memory_win32

Zero MemoryGetWin32HandleInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_memory_win32

type Rep MemoryGetWin32HandleInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_memory_win32

type Rep MemoryGetWin32HandleInfoKHR = D1 ('MetaData "MemoryGetWin32HandleInfoKHR" "Vulkan.Extensions.VK_KHR_external_memory_win32" "vulkan-3.6.3-inplace" 'False) (C1 ('MetaCons "MemoryGetWin32HandleInfoKHR" 'PrefixI 'True) (S1 ('MetaSel ('Just "memory") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 DeviceMemory) :*: S1 ('MetaSel ('Just "handleType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 ExternalMemoryHandleTypeFlagBits)))

type KHR_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME = "VK_KHR_external_memory_win32" Source #

type HANDLE = Ptr () Source #