Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data AHardwareBuffer
- pattern VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_USAGE_ANDROID :: VkStructureType
- pattern VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_PROPERTIES_ANDROID :: VkStructureType
- pattern VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_FORMAT_PROPERTIES_ANDROID :: VkStructureType
- pattern VK_STRUCTURE_TYPE_IMPORT_ANDROID_HARDWARE_BUFFER_INFO_ANDROID :: VkStructureType
- pattern VK_STRUCTURE_TYPE_MEMORY_GET_ANDROID_HARDWARE_BUFFER_INFO_ANDROID :: VkStructureType
- pattern VK_STRUCTURE_TYPE_EXTERNAL_FORMAT_ANDROID :: VkStructureType
- pattern VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID :: VkExternalMemoryHandleTypeFlagBits
- pattern VK_ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_SPEC_VERSION :: Integral a => a
- pattern VK_ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_EXTENSION_NAME :: (Eq a, IsString a) => a
- vkGetAndroidHardwareBufferPropertiesANDROID :: ("device" ::: VkDevice) -> ("buffer" ::: Ptr AHardwareBuffer) -> ("pProperties" ::: Ptr VkAndroidHardwareBufferPropertiesANDROID) -> IO VkResult
- vkGetMemoryAndroidHardwareBufferANDROID :: ("device" ::: VkDevice) -> ("pInfo" ::: Ptr VkMemoryGetAndroidHardwareBufferInfoANDROID) -> ("pBuffer" ::: Ptr (Ptr AHardwareBuffer)) -> IO VkResult
- data VkImportAndroidHardwareBufferInfoANDROID = VkImportAndroidHardwareBufferInfoANDROID {
- vkSType :: VkStructureType
- vkPNext :: Ptr ()
- vkBuffer :: Ptr AHardwareBuffer
- data VkAndroidHardwareBufferUsageANDROID = VkAndroidHardwareBufferUsageANDROID {}
- data VkAndroidHardwareBufferPropertiesANDROID = VkAndroidHardwareBufferPropertiesANDROID {}
- data VkMemoryGetAndroidHardwareBufferInfoANDROID = VkMemoryGetAndroidHardwareBufferInfoANDROID {
- vkSType :: VkStructureType
- vkPNext :: Ptr ()
- vkMemory :: VkDeviceMemory
- data VkAndroidHardwareBufferFormatPropertiesANDROID = VkAndroidHardwareBufferFormatPropertiesANDROID {
- vkSType :: VkStructureType
- vkPNext :: Ptr ()
- vkFormat :: VkFormat
- vkExternalFormat :: Word64
- vkFormatFeatures :: VkFormatFeatureFlags
- vkSamplerYcbcrConversionComponents :: VkComponentMapping
- vkSuggestedYcbcrModel :: VkSamplerYcbcrModelConversion
- vkSuggestedYcbcrRange :: VkSamplerYcbcrRange
- vkSuggestedXChromaOffset :: VkChromaLocation
- vkSuggestedYChromaOffset :: VkChromaLocation
- data VkExternalFormatANDROID = VkExternalFormatANDROID {
- vkSType :: VkStructureType
- vkPNext :: Ptr ()
- vkExternalFormat :: Word64
Documentation
data AHardwareBuffer Source #
Opaque data
pattern VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_FORMAT_PROPERTIES_ANDROID :: VkStructureType Source #
pattern VK_STRUCTURE_TYPE_MEMORY_GET_ANDROID_HARDWARE_BUFFER_INFO_ANDROID :: VkStructureType Source #
pattern VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID :: VkExternalMemoryHandleTypeFlagBits Source #
pattern VK_ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_SPEC_VERSION :: Integral a => a Source #
pattern VK_ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_EXTENSION_NAME :: (Eq a, IsString a) => a Source #
vkGetAndroidHardwareBufferPropertiesANDROID :: ("device" ::: VkDevice) -> ("buffer" ::: Ptr AHardwareBuffer) -> ("pProperties" ::: Ptr VkAndroidHardwareBufferPropertiesANDROID) -> IO VkResult Source #
vkGetAndroidHardwareBufferPropertiesANDROID - Get Properties of External Memory Android Hardware Buffers
Parameters
device
is the logical device that will be importingbuffer
.
buffer
is the Android hardware buffer which will be imported.pProperties
will return properties ofbuffer
.
Valid Usage
buffer
must be a valid Android hardware buffer object with at least one of theAHARDWAREBUFFER_USAGE_GPU_
* usage flags.
Valid Usage (Implicit)
device
must be a validVkDevice
handle
buffer
must be a valid pointer to a validAHardwareBuffer
valuepProperties
must be a valid pointer to aVkAndroidHardwareBufferPropertiesANDROID
structure
Return Codes
[Success]
- VK_SUCCESS
[Failure]
- VK_ERROR_INVALID_EXTERNAL_HANDLE_KHR
See Also
vkGetMemoryAndroidHardwareBufferANDROID :: ("device" ::: VkDevice) -> ("pInfo" ::: Ptr VkMemoryGetAndroidHardwareBufferInfoANDROID) -> ("pBuffer" ::: Ptr (Ptr AHardwareBuffer)) -> IO VkResult Source #
vkGetMemoryAndroidHardwareBufferANDROID - Get an Android hardware buffer for a memory object
Parameters
device
is the logical device that created the device memory being exported.
pInfo
is a pointer to an instance of theVkMemoryGetAndroidHardwareBufferInfoANDROID
structure containing parameters of the export operation.pBuffer
will return an Android hardware buffer representing the underlying resources of the device memory object.
Description
Each call to vkGetMemoryAndroidHardwareBufferANDROID
must return an
Android hardware buffer with a new reference acquired in addition to the
reference held by the VkDeviceMemory
. To avoid leaking resources, the
application must release the reference by calling
AHardwareBuffer_release when it is no longer needed. When called with
the same handle in
VkMemoryGetAndroidHardwareBufferInfoANDROID
::memory
,
vkGetMemoryAndroidHardwareBufferANDROID
must return the same Android
hardware buffer object. If the device memory was created by importing an
Android hardware buffer, vkGetMemoryAndroidHardwareBufferANDROID
must return that same Android hardware buffer object.
Valid Usage (Implicit)
device
must be a validVkDevice
handle
pInfo
must be a valid pointer to a validVkMemoryGetAndroidHardwareBufferInfoANDROID
structurepBuffer
must be a valid pointer to a valid pointer to aAHardwareBuffer
value
Return Codes
[Success]
- VK_SUCCESS
[Failure]
- VK_ERROR_TOO_MANY_OBJECTS
VK_ERROR_OUT_OF_HOST_MEMORY
See Also
data VkImportAndroidHardwareBufferInfoANDROID Source #
VkImportAndroidHardwareBufferInfoANDROID - Import memory from an Android hardware buffer
Description
If the vkAllocateMemory
command succeeds, the implementation must
acquire a reference to the imported hardware buffer, which it must
release when the device memory object is freed. If the command fails,
the implementation must not retain a reference.
Valid Usage
- If
buffer
is notNULL
, Android hardware buffers must be supported for import, as reported byVkExternalImageFormatProperties
orVkExternalBufferProperties
.
- If
buffer
is notNULL
, it must be a valid Android hardware buffer object with format and usage compatible with Vulkan as described byVkExternalMemoryHandleTypeFlagBits
.
Valid Usage (Implicit)
sType
must beVK_STRUCTURE_TYPE_IMPORT_ANDROID_HARDWARE_BUFFER_INFO_ANDROID
buffer
must be a valid pointer to aAHardwareBuffer
value
See Also
VkImportAndroidHardwareBufferInfoANDROID | |
|
Instances
data VkAndroidHardwareBufferUsageANDROID Source #
VkAndroidHardwareBufferUsageANDROID - Struct containing Android hardware buffer usage flags
Description
The androidHardwareBufferUsage
field must include Android hardware
buffer usage flags listed in the AHardwareBuffer Usage
Equivalence
table when the corresponding Vulkan image usage or image creation flags
are included in the usage
or flags
fields of
VkPhysicalDeviceImageFormatInfo2
.
It must include at least one GPU usage flag
(AHARDWAREBUFFER_USAGE_GPU_
*), even if none of the corresponding
Vulkan usages or flags are requested.
Note
Requiring at least one GPU usage flag ensures that Android hardware
buffer memory will be allocated in a memory pool accessible to the
Vulkan implementation, and that specializing the memory layout based on
usage flags doesn’t prevent it from being compatible with Vulkan.
Implementations may avoid unnecessary restrictions caused by this
requirement by using vendor usage flags to indicate that only the Vulkan
uses indicated in
VkImageFormatProperties2
are required.
Valid Usage (Implicit)
sType
must beVK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_USAGE_ANDROID
See Also
VkAndroidHardwareBufferUsageANDROID | |
|
Instances
data VkAndroidHardwareBufferPropertiesANDROID Source #
VkAndroidHardwareBufferPropertiesANDROID - Properties of External Memory Android Hardware Buffers
See Also
VkDeviceSize
, VkStructureType
,
vkGetAndroidHardwareBufferPropertiesANDROID
VkAndroidHardwareBufferPropertiesANDROID | |
|
Instances
data VkMemoryGetAndroidHardwareBufferInfoANDROID Source #
VkMemoryGetAndroidHardwareBufferInfoANDROID - Structure describing an Android hardware buffer memory export operation
Valid Usage
VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID
must have been included inVkExportMemoryAllocateInfoKHR
::handleTypes
whenmemory
was created.
- If the
pNext
chain of theVkMemoryAllocateInfo
used to allocatememory
included aVkMemoryDedicatedAllocateInfo
with non-NULLimage
member, then thatimage
must already be bound tomemory
.
See Also
VkDeviceMemory
,
VkStructureType
,
vkGetMemoryAndroidHardwareBufferANDROID
VkMemoryGetAndroidHardwareBufferInfoANDROID | |
|
Instances
data VkAndroidHardwareBufferFormatPropertiesANDROID Source #
VkAndroidHardwareBufferFormatPropertiesANDROID - Structure describing the image format properties of an Android hardware buffer
Description
If the Android hardware buffer has one of the formats listed in the
Format Equivalence
table,
then format
must have the equivalent Vulkan format listed in the
table. Otherwise, format
may be VK_FORMAT_UNDEFINED
, indicating
the Android hardware buffer can only be used with an external format.
The formatFeatures
member must include
VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT
and at least one of
VK_FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT
or
VK_FORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT
, and should include
VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT
and
VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT
.
Android hardware buffers with the same external format must have the
same support for VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT
,
VK_FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT
,
VK_FORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT
,
VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT
,
VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT
,
and
VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT
.
Other format features may differ between Android hardware buffers that
have the same external format. This allows applications to use the same
VkSamplerYcbcrConversion
object (and samplers and pipelines created from them) for any Android
hardware buffers that have the same external format.
If format
is not VK_FORMAT_UNDEFINED
, then the value of
samplerYcbcrConversionComponents
must be valid when used as the
components
member of
VkSamplerYcbcrConversionCreateInfo
with that format. If format
is VK_FORMAT_UNDEFINED
, all members of
samplerYcbcrConversionComponents
must be
VK_COMPONENT_SWIZZLE_IDENTITY
.
Implementations may not always be able to determine the color model,
numerical range, or chroma offsets of the image contents, so the values
in VkAndroidHardwareBufferFormatPropertiesANDROID
are only
suggestions. Applications should treat these values as sensible
defaults to use in the absence of more reliable information obtained
through some other means. If the underlying physical device is also
usable via OpenGL ES with the GL_OES_EGL_image_external extension, the
implementation should suggest values that will produce similar sampled
values as would be obtained by sampling the same external image via
samplerExternalOES
in OpenGL ES using equivalent sampler parameters.
Note
Since GL_OES_EGL_image_external does not require the same sampling and conversion calculations as Vulkan does, achieving identical results between APIs may not be possible on some implementations.
Valid Usage (Implicit)
sType
must beVK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_FORMAT_PROPERTIES_ANDROID
See Also
VkChromaLocation
,
VkComponentMapping
,
VkFormat
,
VkFormatFeatureFlags
,
VkSamplerYcbcrModelConversion
,
VkSamplerYcbcrRange
,
VkStructureType
VkAndroidHardwareBufferFormatPropertiesANDROID | |
|
Instances
data VkExternalFormatANDROID Source #
VkExternalFormatANDROID - Structure containing an Android hardware buffer external format
Description
If externalFormat
is zero, the effect is as if the
VkExternalFormatANDROID
structure was not present. Otherwise, the
image will have the specified external format, and
VkImageCreateInfo
::format
must be VK_FORMAT_UNDEFINED
.
Valid Usage
externalFormat
must be0
or a value returned in theexternalFormat
member ofVkAndroidHardwareBufferFormatPropertiesANDROID
by an earlier call tovkGetAndroidHardwareBufferPropertiesANDROID
Valid Usage (Implicit)
sType
must beVK_STRUCTURE_TYPE_EXTERNAL_FORMAT_ANDROID
See Also
VkExternalFormatANDROID | |
|
Instances
Eq VkExternalFormatANDROID Source # | |
Show VkExternalFormatANDROID Source # | |
showsPrec :: Int -> VkExternalFormatANDROID -> ShowS # show :: VkExternalFormatANDROID -> String # showList :: [VkExternalFormatANDROID] -> ShowS # | |
Storable VkExternalFormatANDROID Source # | |
sizeOf :: VkExternalFormatANDROID -> Int # alignment :: VkExternalFormatANDROID -> Int # peekElemOff :: Ptr VkExternalFormatANDROID -> Int -> IO VkExternalFormatANDROID # pokeElemOff :: Ptr VkExternalFormatANDROID -> Int -> VkExternalFormatANDROID -> IO () # peekByteOff :: Ptr b -> Int -> IO VkExternalFormatANDROID # pokeByteOff :: Ptr b -> Int -> VkExternalFormatANDROID -> IO () # peek :: Ptr VkExternalFormatANDROID -> IO VkExternalFormatANDROID # poke :: Ptr VkExternalFormatANDROID -> VkExternalFormatANDROID -> IO () # |