Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- getAndroidHardwareBufferPropertiesANDROID :: (PokeChain a, PeekChain a) => Device -> Ptr AHardwareBuffer -> IO (AndroidHardwareBufferPropertiesANDROID a)
- getMemoryAndroidHardwareBufferANDROID :: Device -> MemoryGetAndroidHardwareBufferInfoANDROID -> IO (Ptr AHardwareBuffer)
- data ImportAndroidHardwareBufferInfoANDROID = ImportAndroidHardwareBufferInfoANDROID {}
- data AndroidHardwareBufferUsageANDROID = AndroidHardwareBufferUsageANDROID {}
- data AndroidHardwareBufferPropertiesANDROID (es :: [Type]) = AndroidHardwareBufferPropertiesANDROID {
- next :: Chain es
- allocationSize :: DeviceSize
- memoryTypeBits :: Word32
- data MemoryGetAndroidHardwareBufferInfoANDROID = MemoryGetAndroidHardwareBufferInfoANDROID {}
- data AndroidHardwareBufferFormatPropertiesANDROID = AndroidHardwareBufferFormatPropertiesANDROID {}
- data ExternalFormatANDROID = ExternalFormatANDROID {}
- type ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_SPEC_VERSION = 3
- pattern ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_SPEC_VERSION :: forall a. Integral a => a
- type ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_EXTENSION_NAME = "VK_ANDROID_external_memory_android_hardware_buffer"
- pattern ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
- data AHardwareBuffer
Documentation
getAndroidHardwareBufferPropertiesANDROID :: (PokeChain a, PeekChain a) => Device -> Ptr AHardwareBuffer -> IO (AndroidHardwareBufferPropertiesANDROID a) Source #
vkGetAndroidHardwareBufferPropertiesANDROID - Get Properties of External Memory Android Hardware Buffers
Parameters
Buffer
is the Android hardware buffer which will be imported.pProperties
is a pointer to aAndroidHardwareBufferPropertiesANDROID
structure in which the properties ofBuffer
are returned.
Return Codes
See Also
getMemoryAndroidHardwareBufferANDROID :: Device -> MemoryGetAndroidHardwareBufferInfoANDROID -> IO (Ptr AHardwareBuffer) 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 aMemoryGetAndroidHardwareBufferInfoANDROID
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 getMemoryAndroidHardwareBufferANDROID
must return an
Android hardware buffer with a new reference acquired in addition to the
reference held by the DeviceMemory
. 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
MemoryGetAndroidHardwareBufferInfoANDROID
::memory
,
getMemoryAndroidHardwareBufferANDROID
must return the same Android
hardware buffer object. If the device memory was created by importing an
Android hardware buffer, getMemoryAndroidHardwareBufferANDROID
must
return that same Android hardware buffer object.
Return Codes
See Also
data ImportAndroidHardwareBufferInfoANDROID Source #
VkImportAndroidHardwareBufferInfoANDROID - Import memory from an Android hardware buffer
Description
If the allocateMemory
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 byExternalImageFormatProperties
orExternalBufferProperties
.
- If
Buffer
is notNULL
, it must be a valid Android hardware buffer object withAHardwareBuffer_Desc
::Format
andAHardwareBuffer_Desc
::usage
compatible with Vulkan as described in Android Hardware Buffers.
Valid Usage (Implicit)
Buffer
must be a valid pointer to anAHardwareBuffer
value
See Also
ImportAndroidHardwareBufferInfoANDROID | |
|
Instances
data AndroidHardwareBufferUsageANDROID 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
PhysicalDeviceImageFormatInfo2
.
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 does not 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
ImageFormatProperties2
are required.
Valid Usage (Implicit)
See Also
AndroidHardwareBufferUsageANDROID | |
|
Instances
data AndroidHardwareBufferPropertiesANDROID (es :: [Type]) Source #
VkAndroidHardwareBufferPropertiesANDROID - Properties of External Memory Android Hardware Buffers
Valid Usage (Implicit)
pNext
must beNULL
or a pointer to a valid instance ofAndroidHardwareBufferFormatPropertiesANDROID
- The
sType
value of each struct in thepNext
chain must be unique
See Also
DeviceSize
,
StructureType
,
getAndroidHardwareBufferPropertiesANDROID
AndroidHardwareBufferPropertiesANDROID | |
|
Instances
data MemoryGetAndroidHardwareBufferInfoANDROID Source #
VkMemoryGetAndroidHardwareBufferInfoANDROID - Structure describing an Android hardware buffer memory export operation
Valid Usage
EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID
must have been included inExportMemoryAllocateInfo
::handleTypes
whenmemory
was created.
- If the
pNext
chain of theMemoryAllocateInfo
used to allocatememory
included aMemoryDedicatedAllocateInfo
with non-NULL
Image
member, then thatImage
must already be bound tomemory
.
Valid Usage (Implicit)
pNext
must beNULL
memory
must be a validDeviceMemory
handle
See Also
DeviceMemory
,
StructureType
,
getMemoryAndroidHardwareBufferANDROID
MemoryGetAndroidHardwareBufferInfoANDROID | |
|
Instances
data AndroidHardwareBufferFormatPropertiesANDROID 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
FORMAT_UNDEFINED
, indicating the
Android hardware buffer can only be used with an external format.
The formatFeatures
member must include
FORMAT_FEATURE_SAMPLED_IMAGE_BIT
and at least one of
FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT
or
FORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT
,
and should include
FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT
and
FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT
.
Note
The formatFeatures
member only indicates the features available when
using an
external-format image
created from the Android hardware buffer. Images from Android hardware
buffers with a format other than
FORMAT_UNDEFINED
are subject to
the format capabilities obtained from
getPhysicalDeviceFormatProperties2
,
and
getPhysicalDeviceImageFormatProperties2
with appropriate parameters. These sets of features are independent of
each other, e.g. the external format will support sampler Y′CBCR
conversion even if the non-external format does not, and writing to
non-external format images is possible but writing to external format
images is not.
Android hardware buffers with the same external format must have the
same support for
FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT
,
FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT
,
FORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT
,
FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT
,
FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT
,
and
FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT
.
in formatFeatures
. Other format features may differ between Android
hardware buffers that have the same external format. This allows
applications to use the same
SamplerYcbcrConversion
object (and
samplers and pipelines created from them) for any Android hardware
buffers that have the same external format.
If Format
is not
FORMAT_UNDEFINED
, then the value
of samplerYcbcrConversionComponents
must be valid when used as the
components
member of
SamplerYcbcrConversionCreateInfo
with that format. If Format
is
FORMAT_UNDEFINED
, all members of
samplerYcbcrConversionComponents
must be
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 AndroidHardwareBufferFormatPropertiesANDROID
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)
See Also
ChromaLocation
,
ComponentMapping
,
Format
,
FormatFeatureFlags
,
SamplerYcbcrModelConversion
,
SamplerYcbcrRange
,
StructureType
AndroidHardwareBufferFormatPropertiesANDROID | |
|
Instances
data ExternalFormatANDROID Source #
VkExternalFormatANDROID - Structure containing an Android hardware buffer external format
Description
If externalFormat
is zero, the effect is as if the
ExternalFormatANDROID
structure was not present. Otherwise, the
Image
will have the specified external
format.
Valid Usage (Implicit)
See Also
ExternalFormatANDROID | |
|
Instances
pattern ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_SPEC_VERSION :: forall a. Integral a => a Source #
type ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_EXTENSION_NAME = "VK_ANDROID_external_memory_android_hardware_buffer" Source #
pattern ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a Source #
data AHardwareBuffer Source #