vkGetAndroidHardwareBufferPropertiesANDROID(3)

# vkGetAndroidHardwareBufferPropertiesANDROID(3) Manual Page

## Name

vkGetAndroidHardwareBufferPropertiesANDROID - Get Properties of External Memory Android Hardware Buffers

Loading… please wait.

## C Specification

To determine the memory parameters to use when importing an Android hardware buffer, call:

    // Provided by VK_ANDROID_external_memory_android_hardware_buffer
    VkResult vkGetAndroidHardwareBufferPropertiesANDROID(
        VkDevice                                    device,
        const struct AHardwareBuffer*               buffer,
        VkAndroidHardwareBufferPropertiesANDROID*   pProperties);

## Parameters

- `device` is the logical device that will be importing `buffer`.

- `buffer` is the Android hardware buffer which will be imported.

- `pProperties` is a pointer to a VkAndroidHardwareBufferPropertiesANDROID structure in which the properties of `buffer` are returned.

## Description

Valid Usage

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

Valid Usage (Implicit)

- VUID-vkGetAndroidHardwareBufferPropertiesANDROID-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetAndroidHardwareBufferPropertiesANDROID-buffer-parameter
  `buffer` must be a valid pointer to a valid AHardwareBuffer value

- VUID-vkGetAndroidHardwareBufferPropertiesANDROID-pProperties-parameter
  `pProperties` must be a valid pointer to a VkAndroidHardwareBufferPropertiesANDROID structure

Return Codes

On success, this command returns

  - `VK_SUCCESS`

On failure, this command returns

  - `VK_ERROR_OUT_OF_HOST_MEMORY`

  - `VK_ERROR_INVALID_EXTERNAL_HANDLE_KHR`

## See Also

VK_ANDROID_external_memory_android_hardware_buffer, VkAndroidHardwareBufferPropertiesANDROID, VkDevice

## Document Notes

For more information, see the Vulkan Specification

This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification, not directly.

## Copyright

Copyright 2014-2024 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0