Function Prototype
vkGetAndroidHardwareBufferPropertiesANDROID
Get Properties of External Memory Android Hardware Buffers
To determine the memory parameters to use when importing an Android hardware buffer, call:
VkResult vkGetAndroidHardwareBufferPropertiesANDROID(
VkDevice device,
const struct AHardwareBuffer* buffer,
VkAndroidHardwareBufferPropertiesANDROID* pProperties);
pub fn get_android_hardware_buffer_properties_android(
device: vk::Device,
buffer: *const AHardwareBuffer,
p_properties: *mut vk::AndroidHardwareBufferPropertiesANDROID,
) -> vk::Result;
deviceis the logical device that will be importingbuffer.bufferis the Android hardware buffer which will be imported.pPropertiesis a pointer to a VkAndroidHardwareBufferPropertiesANDROID structure in which the properties ofbufferare returned.
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
Type
Function Prototype
Return Values
VK_SUCCESS
VK_ERROR_OUT_OF_HOST_MEMORY
VK_ERROR_INVALID_EXTERNAL_HANDLE_KHR
VK_ERROR_UNKNOWN
VK_ERROR_VALIDATION_FAILED