C Specification
To obtain the Gralloc usage flag of a swapchain, call:
// Provided by VK_OHOS_native_buffer
VkResult vkGetSwapchainGrallocUsageOHOS(
VkDevice device,
VkFormat format,
VkImageUsageFlags imageUsage,
uint64_t* grallocUsage);
Parameters
-
deviceis a validVkDeviceobject used to create the swapchain image. -
formatis a VkFormat value specifying the format of the given image. -
grallocUsageis a bitmask for setting a mask of zero or moreOH_NativeBuffer_Usage, which is defined in the C APIs references documentation of Open Harmony OS Graphics Module.
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.