Structures
VkImportNativeBufferInfoOHOS
Import memory from an Open Harmony OS hardware buffer
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:
typedef struct VkImportNativeBufferInfoOHOS {
VkStructureType sType;
const void* pNext;
struct OH_NativeBuffer* buffer;
} VkImportNativeBufferInfoOHOS;
pub struct ImportNativeBufferInfoOHOS {
s_type: vk::StructureType,
p_next: *const c_void,
buffer: *mut OH_NativeBuffer,
}
sTypeis a VkStructureType value identifying this structure.pNextisNULLor a pointer to a structure extending this structure.bufferis a pointer to an OH_NativeBuffer structure.
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