VkImportNativeBufferInfoOHOS(3)

# VkImportNativeBufferInfoOHOS(3) Manual Page

## Name

VkImportNativeBufferInfoOHOS - Import memory from an Open Harmony OS hardware buffer

Loading… please wait.

## C Specification

To import memory created outside of the current Vulkan instance from an Open Harmony OS native buffer, add a `VkImportNativeBufferInfoOHOS` structure to the `pNext` chain of the VkMemoryAllocateInfo structure. The `VkImportNativeBufferInfoOHOS` structure is defined as:

    // Provided by VK_OHOS_external_memory
    typedef struct VkImportNativeBufferInfoOHOS {
        VkStructureType            sType;
        const void*                pNext;
        struct OH_NativeBuffer*    buffer;
    } VkImportNativeBufferInfoOHOS;

## Members

- `sType` is a VkStructureType value identifying this structure.

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

- `buffer` is a pointer to an OH_NativeBuffer structure.

## Description

A reference to the imported native buffer should be acquired by the implementation if the vkAllocateMemory command succeeds. Then the reference must release when the device memory object is freed. If the command fails, the implementation must not retain a reference.

Valid Usage (Implicit)

- VUID-VkImportNativeBufferInfoOHOS-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_IMPORT_NATIVE_BUFFER_INFO_OHOS

- VUID-VkImportNativeBufferInfoOHOS-buffer-parameter
  `buffer` must be a valid pointer to an OH_NativeBuffer value

Structure Chaining

Extends the structure

  - VkMemoryAllocateInfo

## See Also

VK_OHOS_external_memory, VkStructureType

## 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-2026 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0