Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- pattern VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHR :: VkStructureType
- pattern VK_STRUCTURE_TYPE_MEMORY_FD_PROPERTIES_KHR :: VkStructureType
- pattern VK_STRUCTURE_TYPE_MEMORY_GET_FD_INFO_KHR :: VkStructureType
- pattern VK_KHR_EXTERNAL_MEMORY_FD_SPEC_VERSION :: Integral a => a
- pattern VK_KHR_EXTERNAL_MEMORY_FD_EXTENSION_NAME :: (Eq a, IsString a) => a
- vkGetMemoryFdKHR :: ("device" ::: VkDevice) -> ("pGetFdInfo" ::: Ptr VkMemoryGetFdInfoKHR) -> ("pFd" ::: Ptr CInt) -> IO VkResult
- vkGetMemoryFdPropertiesKHR :: ("device" ::: VkDevice) -> ("handleType" ::: VkExternalMemoryHandleTypeFlagBits) -> ("fd" ::: CInt) -> ("pMemoryFdProperties" ::: Ptr VkMemoryFdPropertiesKHR) -> IO VkResult
- data VkImportMemoryFdInfoKHR = VkImportMemoryFdInfoKHR {}
- data VkMemoryFdPropertiesKHR = VkMemoryFdPropertiesKHR {
- vkSType :: VkStructureType
- vkPNext :: Ptr ()
- vkMemoryTypeBits :: Word32
- data VkMemoryGetFdInfoKHR = VkMemoryGetFdInfoKHR {}
Documentation
pattern VK_KHR_EXTERNAL_MEMORY_FD_SPEC_VERSION :: Integral a => a Source #
pattern VK_KHR_EXTERNAL_MEMORY_FD_EXTENSION_NAME :: (Eq a, IsString a) => a Source #
vkGetMemoryFdKHR :: ("device" ::: VkDevice) -> ("pGetFdInfo" ::: Ptr VkMemoryGetFdInfoKHR) -> ("pFd" ::: Ptr CInt) -> IO VkResult Source #
vkGetMemoryFdKHR - Get a POSIX file descriptor for a memory object
Parameters
device
is the logical device that created the device memory being exported.
pGetFdInfo
is a pointer to an instance of theVkMemoryGetFdInfoKHR
structure containing parameters of the export operation.pFd
will return a file descriptor representing the underlying resources of the device memory object.
Description
Each call to vkGetMemoryFdKHR
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.
Valid Usage (Implicit)
device
must be a validVkDevice
handle
pGetFdInfo
must be a valid pointer to a validVkMemoryGetFdInfoKHR
structurepFd
must be a valid pointer to aint
value
Return Codes
[Success]
- VK_SUCCESS
[Failure]
- VK_ERROR_TOO_MANY_OBJECTS
VK_ERROR_OUT_OF_HOST_MEMORY
See Also
vkGetMemoryFdPropertiesKHR :: ("device" ::: VkDevice) -> ("handleType" ::: VkExternalMemoryHandleTypeFlagBits) -> ("fd" ::: CInt) -> ("pMemoryFdProperties" ::: Ptr VkMemoryFdPropertiesKHR) -> IO VkResult Source #
vkGetMemoryFdPropertiesKHR - Get Properties of External Memory File Descriptors
Parameters
device
is the logical device that will be importingfd
.
handleType
is the type of the handlefd
.fd
is the handle which will be imported.pMemoryFdProperties
will return properties of the handlefd
.
Valid Usage
fd
must be an external memory handle created outside of the Vulkan API.
handleType
must not beVK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT_KHR
.
Valid Usage (Implicit)
device
must be a validVkDevice
handle
handleType
must be a validVkExternalMemoryHandleTypeFlagBits
valuepMemoryFdProperties
must be a valid pointer to aVkMemoryFdPropertiesKHR
structure
Return Codes
[Success]
- VK_SUCCESS
[Failure]
- VK_ERROR_INVALID_EXTERNAL_HANDLE
See Also
VkDevice
,
VkExternalMemoryHandleTypeFlagBits
,
VkMemoryFdPropertiesKHR
data VkImportMemoryFdInfoKHR 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 VkDeviceMemory
object.
Valid Usage
- If
handleType
is not0
, it must be supported for import, as reported byVkExternalImageFormatProperties
orVkExternalBufferProperties
.
- The memory from which
fd
was exported must have been created on the same underlying physical device asdevice
. - If
handleType
is not0
, it must be defined as a POSIX file descriptor handle. - If
handleType
is not0
,fd
must be a valid handle of the type specified byhandleType
. - The memory represented by
fd
must have been created from a physical device and driver that is compatible withdevice
andhandleType
, as described in {html_spec_relative}#external-memory-handle-types-compatibility. fd
must obey any requirements listed forhandleType
in external memory handle types compatibility.
Valid Usage (Implicit)
sType
must beVK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHR
- If
handleType
is not0
,handleType
must be a validVkExternalMemoryHandleTypeFlagBits
value
See Also
VkImportMemoryFdInfoKHR | |
|
Instances
Eq VkImportMemoryFdInfoKHR Source # | |
Show VkImportMemoryFdInfoKHR Source # | |
showsPrec :: Int -> VkImportMemoryFdInfoKHR -> ShowS # show :: VkImportMemoryFdInfoKHR -> String # showList :: [VkImportMemoryFdInfoKHR] -> ShowS # | |
Storable VkImportMemoryFdInfoKHR Source # | |
sizeOf :: VkImportMemoryFdInfoKHR -> Int # alignment :: VkImportMemoryFdInfoKHR -> Int # peekElemOff :: Ptr VkImportMemoryFdInfoKHR -> Int -> IO VkImportMemoryFdInfoKHR # pokeElemOff :: Ptr VkImportMemoryFdInfoKHR -> Int -> VkImportMemoryFdInfoKHR -> IO () # peekByteOff :: Ptr b -> Int -> IO VkImportMemoryFdInfoKHR # pokeByteOff :: Ptr b -> Int -> VkImportMemoryFdInfoKHR -> IO () # peek :: Ptr VkImportMemoryFdInfoKHR -> IO VkImportMemoryFdInfoKHR # poke :: Ptr VkImportMemoryFdInfoKHR -> VkImportMemoryFdInfoKHR -> IO () # |
data VkMemoryFdPropertiesKHR Source #
VkMemoryFdPropertiesKHR - Properties of External Memory File Descriptors
See Also
VkMemoryFdPropertiesKHR | |
|
Instances
Eq VkMemoryFdPropertiesKHR Source # | |
Show VkMemoryFdPropertiesKHR Source # | |
showsPrec :: Int -> VkMemoryFdPropertiesKHR -> ShowS # show :: VkMemoryFdPropertiesKHR -> String # showList :: [VkMemoryFdPropertiesKHR] -> ShowS # | |
Storable VkMemoryFdPropertiesKHR Source # | |
sizeOf :: VkMemoryFdPropertiesKHR -> Int # alignment :: VkMemoryFdPropertiesKHR -> Int # peekElemOff :: Ptr VkMemoryFdPropertiesKHR -> Int -> IO VkMemoryFdPropertiesKHR # pokeElemOff :: Ptr VkMemoryFdPropertiesKHR -> Int -> VkMemoryFdPropertiesKHR -> IO () # peekByteOff :: Ptr b -> Int -> IO VkMemoryFdPropertiesKHR # pokeByteOff :: Ptr b -> Int -> VkMemoryFdPropertiesKHR -> IO () # peek :: Ptr VkMemoryFdPropertiesKHR -> IO VkMemoryFdPropertiesKHR # poke :: Ptr VkMemoryFdPropertiesKHR -> VkMemoryFdPropertiesKHR -> IO () # |
data VkMemoryGetFdInfoKHR 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
VkExternalMemoryHandleTypeFlagBits
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
VkMemoryAllocateInfo
::allocationSize. If
handleType
is VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT
, then
the application can query the file’s actual size with
lseek(2)).
Valid Usage
handleType
must have been included inVkExportMemoryAllocateInfo
::handleTypes
whenmemory
was created.
handleType
must be defined as a POSIX file descriptor handle.
Valid Usage (Implicit)
sType
must beVK_STRUCTURE_TYPE_MEMORY_GET_FD_INFO_KHR
pNext
must beNULL
memory
must be a validVkDeviceMemory
handlehandleType
must be a validVkExternalMemoryHandleTypeFlagBits
value
See Also
VkDeviceMemory
,
VkExternalMemoryHandleTypeFlagBits
,
VkStructureType
, vkGetMemoryFdKHR
VkMemoryGetFdInfoKHR | |
|
Instances
Eq VkMemoryGetFdInfoKHR Source # | |
(==) :: VkMemoryGetFdInfoKHR -> VkMemoryGetFdInfoKHR -> Bool # (/=) :: VkMemoryGetFdInfoKHR -> VkMemoryGetFdInfoKHR -> Bool # | |
Show VkMemoryGetFdInfoKHR Source # | |
showsPrec :: Int -> VkMemoryGetFdInfoKHR -> ShowS # show :: VkMemoryGetFdInfoKHR -> String # showList :: [VkMemoryGetFdInfoKHR] -> ShowS # | |
Storable VkMemoryGetFdInfoKHR Source # | |
sizeOf :: VkMemoryGetFdInfoKHR -> Int # alignment :: VkMemoryGetFdInfoKHR -> Int # peekElemOff :: Ptr VkMemoryGetFdInfoKHR -> Int -> IO VkMemoryGetFdInfoKHR # pokeElemOff :: Ptr VkMemoryGetFdInfoKHR -> Int -> VkMemoryGetFdInfoKHR -> IO () # peekByteOff :: Ptr b -> Int -> IO VkMemoryGetFdInfoKHR # pokeByteOff :: Ptr b -> Int -> VkMemoryGetFdInfoKHR -> IO () # peek :: Ptr VkMemoryGetFdInfoKHR -> IO VkMemoryGetFdInfoKHR # poke :: Ptr VkMemoryGetFdInfoKHR -> VkMemoryGetFdInfoKHR -> IO () # |