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

Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer

Synopsis

Documentation

getAndroidHardwareBufferPropertiesANDROID Source #

Arguments

:: forall a io. (Extendss AndroidHardwareBufferPropertiesANDROID a, PokeChain a, PeekChain a, MonadIO io) 
=> Device

device is the logical device that will be importing buffer.

device must be a valid Device handle

-> Ptr AHardwareBuffer

buffer is the Android hardware buffer which will be imported.

buffer must be a valid Android hardware buffer object with at least one of the AHARDWAREBUFFER_USAGE_GPU_* flags in its AHardwareBuffer_Desc::usage

buffer must be a valid pointer to a valid AHardwareBuffer value

-> io (AndroidHardwareBufferPropertiesANDROID a) 

vkGetAndroidHardwareBufferPropertiesANDROID - Get Properties of External Memory Android Hardware Buffers

Return Codes

Success
Failure

See Also

AndroidHardwareBufferPropertiesANDROID, Device

getMemoryAndroidHardwareBufferANDROID 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

-> MemoryGetAndroidHardwareBufferInfoANDROID

pInfo is a pointer to a MemoryGetAndroidHardwareBufferInfoANDROID structure containing parameters of the export operation.

pInfo must be a valid pointer to a valid MemoryGetAndroidHardwareBufferInfoANDROID structure

-> io (Ptr AHardwareBuffer) 

vkGetMemoryAndroidHardwareBufferANDROID - Get an Android hardware buffer for a 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

Success
Failure

See Also

Device, MemoryGetAndroidHardwareBufferInfoANDROID

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 not NULL, it must be a valid Android hardware buffer object with AHardwareBuffer_Desc::usage compatible with Vulkan as described in Android Hardware Buffers

Valid Usage (Implicit)

See Also

StructureType

Constructors

ImportAndroidHardwareBufferInfoANDROID 

Fields

Instances

Instances details
Eq ImportAndroidHardwareBufferInfoANDROID Source # 
Instance details

Defined in Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer

Show ImportAndroidHardwareBufferInfoANDROID Source # 
Instance details

Defined in Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer

Generic ImportAndroidHardwareBufferInfoANDROID Source # 
Instance details

Defined in Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer

Storable ImportAndroidHardwareBufferInfoANDROID Source # 
Instance details

Defined in Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer

FromCStruct ImportAndroidHardwareBufferInfoANDROID Source # 
Instance details

Defined in Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer

ToCStruct ImportAndroidHardwareBufferInfoANDROID Source # 
Instance details

Defined in Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer

Zero ImportAndroidHardwareBufferInfoANDROID Source # 
Instance details

Defined in Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer

type Rep ImportAndroidHardwareBufferInfoANDROID Source # 
Instance details

Defined in Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer

type Rep ImportAndroidHardwareBufferInfoANDROID = D1 ('MetaData "ImportAndroidHardwareBufferInfoANDROID" "Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer" "vulkan-3.6.1-inplace" 'False) (C1 ('MetaCons "ImportAndroidHardwareBufferInfoANDROID" 'PrefixI 'True) (S1 ('MetaSel ('Just "buffer") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Ptr AHardwareBuffer))))

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

StructureType

Constructors

AndroidHardwareBufferUsageANDROID 

Fields

Instances

Instances details
Eq AndroidHardwareBufferUsageANDROID Source # 
Instance details

Defined in Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer

Show AndroidHardwareBufferUsageANDROID Source # 
Instance details

Defined in Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer

Generic AndroidHardwareBufferUsageANDROID Source # 
Instance details

Defined in Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer

Associated Types

type Rep AndroidHardwareBufferUsageANDROID :: Type -> Type #

Storable AndroidHardwareBufferUsageANDROID Source # 
Instance details

Defined in Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer

FromCStruct AndroidHardwareBufferUsageANDROID Source # 
Instance details

Defined in Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer

ToCStruct AndroidHardwareBufferUsageANDROID Source # 
Instance details

Defined in Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer

Zero AndroidHardwareBufferUsageANDROID Source # 
Instance details

Defined in Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer

type Rep AndroidHardwareBufferUsageANDROID Source # 
Instance details

Defined in Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer

type Rep AndroidHardwareBufferUsageANDROID = D1 ('MetaData "AndroidHardwareBufferUsageANDROID" "Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer" "vulkan-3.6.1-inplace" 'False) (C1 ('MetaCons "AndroidHardwareBufferUsageANDROID" 'PrefixI 'True) (S1 ('MetaSel ('Just "androidHardwareBufferUsage") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Word64)))

data AndroidHardwareBufferPropertiesANDROID (es :: [Type]) Source #

VkAndroidHardwareBufferPropertiesANDROID - Properties of External Memory Android Hardware Buffers

Valid Usage (Implicit)

See Also

DeviceSize, StructureType, getAndroidHardwareBufferPropertiesANDROID

Constructors

AndroidHardwareBufferPropertiesANDROID 

Fields

  • next :: Chain es

    pNext is NULL or a pointer to a structure extending this structure.

  • allocationSize :: DeviceSize

    allocationSize is the size of the external memory

  • memoryTypeBits :: Word32

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

Instances

Instances details
Extensible AndroidHardwareBufferPropertiesANDROID Source # 
Instance details

Defined in Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer

Show (Chain es) => Show (AndroidHardwareBufferPropertiesANDROID es) Source # 
Instance details

Defined in Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer

Generic (AndroidHardwareBufferPropertiesANDROID es) Source # 
Instance details

Defined in Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer

Associated Types

type Rep (AndroidHardwareBufferPropertiesANDROID es) :: Type -> Type #

(Extendss AndroidHardwareBufferPropertiesANDROID es, PeekChain es) => FromCStruct (AndroidHardwareBufferPropertiesANDROID es) Source # 
Instance details

Defined in Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer

(Extendss AndroidHardwareBufferPropertiesANDROID es, PokeChain es) => ToCStruct (AndroidHardwareBufferPropertiesANDROID es) Source # 
Instance details

Defined in Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer

es ~ ('[] :: [Type]) => Zero (AndroidHardwareBufferPropertiesANDROID es) Source # 
Instance details

Defined in Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer

type Rep (AndroidHardwareBufferPropertiesANDROID es) Source # 
Instance details

Defined in Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer

type Rep (AndroidHardwareBufferPropertiesANDROID es) = D1 ('MetaData "AndroidHardwareBufferPropertiesANDROID" "Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer" "vulkan-3.6.1-inplace" 'False) (C1 ('MetaCons "AndroidHardwareBufferPropertiesANDROID" 'PrefixI 'True) (S1 ('MetaSel ('Just "next") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Chain es)) :*: (S1 ('MetaSel ('Just "allocationSize") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 DeviceSize) :*: S1 ('MetaSel ('Just "memoryTypeBits") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Word32))))

data MemoryGetAndroidHardwareBufferInfoANDROID Source #

VkMemoryGetAndroidHardwareBufferInfoANDROID - Structure describing an Android hardware buffer memory export operation

Valid Usage

Valid Usage (Implicit)

  • pNext must be NULL
  • memory must be a valid DeviceMemory handle

See Also

DeviceMemory, StructureType, getMemoryAndroidHardwareBufferANDROID

Constructors

MemoryGetAndroidHardwareBufferInfoANDROID 

Fields

  • memory :: DeviceMemory

    memory is the memory object from which the Android hardware buffer will be exported.

Instances

Instances details
Eq MemoryGetAndroidHardwareBufferInfoANDROID Source # 
Instance details

Defined in Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer

Show MemoryGetAndroidHardwareBufferInfoANDROID Source # 
Instance details

Defined in Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer

Generic MemoryGetAndroidHardwareBufferInfoANDROID Source # 
Instance details

Defined in Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer

Storable MemoryGetAndroidHardwareBufferInfoANDROID Source # 
Instance details

Defined in Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer

FromCStruct MemoryGetAndroidHardwareBufferInfoANDROID Source # 
Instance details

Defined in Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer

ToCStruct MemoryGetAndroidHardwareBufferInfoANDROID Source # 
Instance details

Defined in Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer

Zero MemoryGetAndroidHardwareBufferInfoANDROID Source # 
Instance details

Defined in Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer

type Rep MemoryGetAndroidHardwareBufferInfoANDROID Source # 
Instance details

Defined in Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer

type Rep MemoryGetAndroidHardwareBufferInfoANDROID = D1 ('MetaData "MemoryGetAndroidHardwareBufferInfoANDROID" "Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer" "vulkan-3.6.1-inplace" 'False) (C1 ('MetaCons "MemoryGetAndroidHardwareBufferInfoANDROID" 'PrefixI 'True) (S1 ('MetaSel ('Just "memory") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 DeviceMemory)))

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 the identity swizzle.

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

Constructors

AndroidHardwareBufferFormatPropertiesANDROID 

Fields

Instances

Instances details
Show AndroidHardwareBufferFormatPropertiesANDROID Source # 
Instance details

Defined in Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer

Generic AndroidHardwareBufferFormatPropertiesANDROID Source # 
Instance details

Defined in Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer

FromCStruct AndroidHardwareBufferFormatPropertiesANDROID Source # 
Instance details

Defined in Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer

ToCStruct AndroidHardwareBufferFormatPropertiesANDROID Source # 
Instance details

Defined in Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer

Zero AndroidHardwareBufferFormatPropertiesANDROID Source # 
Instance details

Defined in Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer

type Rep AndroidHardwareBufferFormatPropertiesANDROID Source # 
Instance details

Defined in Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer

type Rep AndroidHardwareBufferFormatPropertiesANDROID = D1 ('MetaData "AndroidHardwareBufferFormatPropertiesANDROID" "Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer" "vulkan-3.6.1-inplace" 'False) (C1 ('MetaCons "AndroidHardwareBufferFormatPropertiesANDROID" 'PrefixI 'True) (((S1 ('MetaSel ('Just "format") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Format) :*: S1 ('MetaSel ('Just "externalFormat") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Word64)) :*: (S1 ('MetaSel ('Just "formatFeatures") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 FormatFeatureFlags) :*: S1 ('MetaSel ('Just "samplerYcbcrConversionComponents") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 ComponentMapping))) :*: ((S1 ('MetaSel ('Just "suggestedYcbcrModel") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 SamplerYcbcrModelConversion) :*: S1 ('MetaSel ('Just "suggestedYcbcrRange") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 SamplerYcbcrRange)) :*: (S1 ('MetaSel ('Just "suggestedXChromaOffset") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 ChromaLocation) :*: S1 ('MetaSel ('Just "suggestedYChromaOffset") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 ChromaLocation)))))

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

StructureType

Constructors

ExternalFormatANDROID 

Fields

Instances

Instances details
Eq ExternalFormatANDROID Source # 
Instance details

Defined in Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer

Show ExternalFormatANDROID Source # 
Instance details

Defined in Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer

Generic ExternalFormatANDROID Source # 
Instance details

Defined in Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer

Associated Types

type Rep ExternalFormatANDROID :: Type -> Type #

Storable ExternalFormatANDROID Source # 
Instance details

Defined in Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer

FromCStruct ExternalFormatANDROID Source # 
Instance details

Defined in Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer

ToCStruct ExternalFormatANDROID Source # 
Instance details

Defined in Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer

Zero ExternalFormatANDROID Source # 
Instance details

Defined in Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer

type Rep ExternalFormatANDROID Source # 
Instance details

Defined in Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer

type Rep ExternalFormatANDROID = D1 ('MetaData "ExternalFormatANDROID" "Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer" "vulkan-3.6.1-inplace" 'False) (C1 ('MetaCons "ExternalFormatANDROID" 'PrefixI 'True) (S1 ('MetaSel ('Just "externalFormat") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Word64)))

type ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_EXTENSION_NAME = "VK_ANDROID_external_memory_android_hardware_buffer" Source #