| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Vulkan.Extensions.VK_KHR_external_memory_fd
Synopsis
- getMemoryFdKHR :: forall io. MonadIO io => Device -> MemoryGetFdInfoKHR -> io ("fd" ::: Int32)
- getMemoryFdPropertiesKHR :: forall io. MonadIO io => Device -> ExternalMemoryHandleTypeFlagBits -> ("fd" ::: Int32) -> io MemoryFdPropertiesKHR
- data ImportMemoryFdInfoKHR = ImportMemoryFdInfoKHR {}
- data MemoryFdPropertiesKHR = MemoryFdPropertiesKHR {}
- data MemoryGetFdInfoKHR = MemoryGetFdInfoKHR {}
- type KHR_EXTERNAL_MEMORY_FD_SPEC_VERSION = 1
- pattern KHR_EXTERNAL_MEMORY_FD_SPEC_VERSION :: forall a. Integral a => a
- type KHR_EXTERNAL_MEMORY_FD_EXTENSION_NAME = "VK_KHR_external_memory_fd"
- pattern KHR_EXTERNAL_MEMORY_FD_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
Documentation
Arguments
| :: forall io. MonadIO io | |
| => Device |
|
| -> MemoryGetFdInfoKHR |
|
| -> 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
See Also
getMemoryFdPropertiesKHR Source #
Arguments
| :: forall io. MonadIO io | |
| => Device |
|
| -> ExternalMemoryHandleTypeFlagBits |
|
| -> ("fd" ::: Int32) |
|
| -> io MemoryFdPropertiesKHR |
vkGetMemoryFdPropertiesKHR - Get Properties of External Memory File Descriptors
Return Codes
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
- If
handleTypeis not0, it must be supported for import, as reported byExternalImageFormatPropertiesorExternalBufferProperties
- The memory from which
fdwas exported must have been created on the same underlying physical device asdevice - If
handleTypeis not0, it must be defined as a POSIX file descriptor handle - If
handleTypeis not0,fdmust be a valid handle of the type specified byhandleType - The memory represented by
fdmust have been created from a physical device and driver that is compatible withdeviceandhandleType, as described in https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#external-memory-handle-types-compatibility fdmust obey any requirements listed forhandleTypein external memory handle types compatibility
Valid Usage (Implicit)
sTypemust beSTRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHR
- If
handleTypeis not0,handleTypemust be a validExternalMemoryHandleTypeFlagBitsvalue
See Also
Constructors
| ImportMemoryFdInfoKHR | |
Fields
| |
Instances
data MemoryFdPropertiesKHR Source #
VkMemoryFdPropertiesKHR - Properties of External Memory File Descriptors
Valid Usage (Implicit)
See Also
Constructors
| MemoryFdPropertiesKHR | |
Fields
| |
Instances
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
type KHR_EXTERNAL_MEMORY_FD_SPEC_VERSION = 1 Source #
pattern KHR_EXTERNAL_MEMORY_FD_SPEC_VERSION :: forall a. Integral a => a Source #
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 #