Function Prototype
vkGetNativeBufferPropertiesOHOS
Obtain the properties of an OH_NativeBuffer Object
To determine the memory parameters to use when importing an Open Harmony OS native buffer:
VkResult vkGetNativeBufferPropertiesOHOS(
VkDevice device,
const struct OH_NativeBuffer* buffer,
VkNativeBufferPropertiesOHOS* pProperties);
pub fn get_native_buffer_properties_ohos(
device: vk::Device,
buffer: *const OH_NativeBuffer,
p_properties: *mut vk::NativeBufferPropertiesOHOS,
) -> vk::Result;
deviceis the logical device that will be importingbuffer.bufferis the OH_NativeBuffer object specifies the buffer for which its properties are to be queried.pPropertiesis a pointer to a VkNativeBufferPropertiesOHOS structure in which the properties ofbufferare returned.
Valid Usage (Implicit)
VUID-vkGetNativeBufferPropertiesOHOS-device-parameter
device must be a valid VkDevice handle
VUID-vkGetNativeBufferPropertiesOHOS-buffer-parameter
buffer must be a valid pointer to a valid OH_NativeBuffer value
VUID-vkGetNativeBufferPropertiesOHOS-pProperties-parameter
pProperties must be a valid pointer to a VkNativeBufferPropertiesOHOS structure
Parent
VK_OHOS_external_memoryType
Function Prototype
Return Values
VK_SUCCESS
VK_ERROR_OUT_OF_DEVICE_MEMORY
VK_ERROR_INVALID_EXTERNAL_HANDLE_KHR
VK_ERROR_UNKNOWN
VK_ERROR_VALIDATION_FAILED