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

Vulkan.Extensions.VK_KHR_external_memory_fd

Synopsis

Documentation

getMemoryFdKHR 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

-> MemoryGetFdInfoKHR

pGetFdInfo is a pointer to a MemoryGetFdInfoKHR structure containing parameters of the export operation.

pGetFdInfo must be a valid pointer to a valid MemoryGetFdInfoKHR structure

-> io ("fd" ::: Int32) 

vkGetMemoryFdKHR - Get a POSIX file descriptor for a memory object

Description

Each call to getMemoryFdKHR must create a new file descriptor and transfer ownership of it to the application. To avoid leaking resources, the application must release ownership of the file descriptor using the close system call when it is no longer needed, or by importing a Vulkan memory object from it. Where supported by the operating system, the implementation must set the file descriptor to be closed automatically when an execve system call is made.

Return Codes

Success
Failure

See Also

Device, MemoryGetFdInfoKHR

getMemoryFdPropertiesKHR Source #

Arguments

:: forall io. MonadIO io 
=> Device

device is the logical device that will be importing fd.

device must be a valid Device handle

-> ExternalMemoryHandleTypeFlagBits

handleType is the type of the handle fd.

handleType must not be EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT_KHR

handleType must be a valid ExternalMemoryHandleTypeFlagBits value

-> ("fd" ::: Int32)

fd is the handle which will be imported.

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

-> io MemoryFdPropertiesKHR 

vkGetMemoryFdPropertiesKHR - Get Properties of External Memory File Descriptors

Return Codes

Success
Failure

See Also

Device, ExternalMemoryHandleTypeFlagBits, MemoryFdPropertiesKHR

data ImportMemoryFdInfoKHR Source #

VkImportMemoryFdInfoKHR - import memory created on the same physical device from a file descriptor

Description

Importing memory from a file descriptor transfers ownership of the file descriptor from the application to the Vulkan implementation. The application must not perform any operations on the file descriptor after a successful import.

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

ImportMemoryFdInfoKHR 

Fields

Instances

Instances details
Eq ImportMemoryFdInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_memory_fd

Show ImportMemoryFdInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_memory_fd

Generic ImportMemoryFdInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_memory_fd

Associated Types

type Rep ImportMemoryFdInfoKHR :: Type -> Type #

Storable ImportMemoryFdInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_memory_fd

FromCStruct ImportMemoryFdInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_memory_fd

ToCStruct ImportMemoryFdInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_memory_fd

Zero ImportMemoryFdInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_memory_fd

type Rep ImportMemoryFdInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_memory_fd

type Rep ImportMemoryFdInfoKHR = D1 ('MetaData "ImportMemoryFdInfoKHR" "Vulkan.Extensions.VK_KHR_external_memory_fd" "vulkan-3.3.1-inplace" 'False) (C1 ('MetaCons "ImportMemoryFdInfoKHR" 'PrefixI 'True) (S1 ('MetaSel ('Just "handleType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 ExternalMemoryHandleTypeFlagBits) :*: S1 ('MetaSel ('Just "fd") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int32)))

data MemoryFdPropertiesKHR Source #

VkMemoryFdPropertiesKHR - Properties of External Memory File Descriptors

Valid Usage (Implicit)

See Also

StructureType, getMemoryFdPropertiesKHR

Constructors

MemoryFdPropertiesKHR 

Fields

  • memoryTypeBits :: Word32

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

Instances

Instances details
Eq MemoryFdPropertiesKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_memory_fd

Show MemoryFdPropertiesKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_memory_fd

Generic MemoryFdPropertiesKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_memory_fd

Associated Types

type Rep MemoryFdPropertiesKHR :: Type -> Type #

Storable MemoryFdPropertiesKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_memory_fd

FromCStruct MemoryFdPropertiesKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_memory_fd

ToCStruct MemoryFdPropertiesKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_memory_fd

Zero MemoryFdPropertiesKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_memory_fd

type Rep MemoryFdPropertiesKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_memory_fd

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

data MemoryGetFdInfoKHR Source #

VkMemoryGetFdInfoKHR - Structure describing a POSIX FD semaphore export operation

Description

The properties of the file descriptor exported depend on the value of handleType. See ExternalMemoryHandleTypeFlagBits for a description of the properties of the defined external memory handle types.

Note

The size of the exported file may be larger than the size requested by MemoryAllocateInfo::allocationSize. If handleType is EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT, then the application can query the file’s actual size with lseek(2).

Valid Usage (Implicit)

See Also

DeviceMemory, ExternalMemoryHandleTypeFlagBits, StructureType, getMemoryFdKHR

Constructors

MemoryGetFdInfoKHR 

Fields

Instances

Instances details
Eq MemoryGetFdInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_memory_fd

Show MemoryGetFdInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_memory_fd

Generic MemoryGetFdInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_memory_fd

Associated Types

type Rep MemoryGetFdInfoKHR :: Type -> Type #

Storable MemoryGetFdInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_memory_fd

FromCStruct MemoryGetFdInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_memory_fd

ToCStruct MemoryGetFdInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_memory_fd

Zero MemoryGetFdInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_memory_fd

type Rep MemoryGetFdInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_memory_fd

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

type KHR_EXTERNAL_MEMORY_FD_EXTENSION_NAME = "VK_KHR_external_memory_fd" Source #

pattern KHR_EXTERNAL_MEMORY_FD_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a Source #