vkAcquireImageOHOS(3)

Name

vkAcquireImageOHOS - Obtain the ownership of a swapchain image, and push the external Fence into the VkSemaphore object and the VkFence object

C Specification

To obtain the ownership of a swapchain image, call:

// Provided by VK_OHOS_native_buffer
VkResult vkAcquireImageOHOS(
    VkDevice                                    device,
    VkImage                                     image,
    int32_t                                     nativeFenceFd,
    VkSemaphore                                 semaphore,
    VkFence                                     fence);

Parameters

  • device is a valid VkDevice object used to create the swapchain image.

  • image is the target image.

  • nativeFenceFd is a file descriptor of the native fence.

  • semaphore is VK_NULL_HANDLE or a VkSemaphore that will be signaled when the nativeFenceFd is signaled.

  • fence is VK_NULL_HANDLE or VkFence that will be signaled when the nativeFenceFd is signaled.

Description

Valid Usage (Implicit)
  • VUID-vkAcquireImageOHOS-device-parameter
    device must be a valid VkDevice handle

  • VUID-vkAcquireImageOHOS-image-parameter
    image must be a valid VkImage handle

  • VUID-vkAcquireImageOHOS-semaphore-parameter
    If semaphore is not VK_NULL_HANDLE, semaphore must be a valid VkSemaphore handle

  • VUID-vkAcquireImageOHOS-fence-parameter
    If fence is not VK_NULL_HANDLE, fence must be a valid VkFence handle

  • VUID-vkAcquireImageOHOS-image-parent
    image must have been created, allocated, or retrieved from device

  • VUID-vkAcquireImageOHOS-semaphore-parent
    If semaphore is a valid handle, it must have been created, allocated, or retrieved from device

  • VUID-vkAcquireImageOHOS-fence-parent
    If fence is a valid handle, it must have been created, allocated, or retrieved from device

Return Codes
Success
  • VK_SUCCESS

Failure
  • VK_ERROR_OUT_OF_HOST_MEMORY

  • VK_ERROR_UNKNOWN

  • VK_ERROR_VALIDATION_FAILED

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.