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
-
sTypeis a VkStructureType value identifying this structure. -
pNextisNULLor a pointer to a structure extending this structure. -
bufferis 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.
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.