C Specification

To obtain an OH_NativeBuffer object, call:

// Provided by VK_OHOS_external_memory
VkResult vkGetMemoryNativeBufferOHOS(
    VkDevice                                    device,
    const VkMemoryGetNativeBufferInfoOHOS*      pInfo,
    struct OH_NativeBuffer**                    pBuffer);

Parameters

  • device is a valid Vulkan device object.

  • pInfo is a pointer pointing to a VkMemoryGetNativeBufferInfoOHOS structure.

  • pBuffer is a pointer to an OH_NativeBuffer object.

Description

Valid Usage (Implicit)
  • VUID-vkGetMemoryNativeBufferOHOS-device-parameter
    device must be a valid VkDevice handle

  • VUID-vkGetMemoryNativeBufferOHOS-pInfo-parameter
    pInfo must be a valid pointer to a valid VkMemoryGetNativeBufferInfoOHOS structure

  • VUID-vkGetMemoryNativeBufferOHOS-pBuffer-parameter
    pBuffer must be a valid pointer to a valid pointer to an OH_NativeBuffer value

Return Codes
On success, this command returns
  • VK_SUCCESS

On failure, this command returns
  • VK_ERROR_OUT_OF_HOST_MEMORY

  • VK_ERROR_UNKNOWN

  • VK_ERROR_VALIDATION_FAILED

See Also

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 2014-2025 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0