To enumerate the supported image formats for a specific optical flow usage, call:
// Provided by VK_NV_optical_flow VkResult vkGetPhysicalDeviceOpticalFlowImageFormatsNV( VkPhysicalDevice physicalDevice, const VkOpticalFlowImageFormatInfoNV* pOpticalFlowImageFormatInfo, uint32_t* pFormatCount, VkOpticalFlowImageFormatPropertiesNV* pImageFormatProperties);
physicalDeviceis the physical device being queried.
pOpticalFlowImageFormatInfois a pointer to a VkOpticalFlowImageFormatInfoNV structure specifying the optical flow usage for which information is returned.
pImageFormatPropertiesis a pointer to an array of VkOpticalFlowImageFormatPropertiesNV structures in which supported formats and image parameters are returned.
NULL, then the number of optical flow
properties supported for the given
physicalDevice is returned in
pFormatCount must point to a variable set by the user to
the number of elements in the
pImageFormatProperties array, and on
return the variable is overwritten with the number of values actually
If the value of
pFormatCount is less than the number of optical flow
properties supported, at most
pFormatCount values will be written to
VK_INCOMPLETE will be returned
VK_SUCCESS, to indicate that not all the available values
Before creating an image to be used as a optical flow frame, obtain the
supported image creation parameters by querying with
vkGetPhysicalDeviceImageFormatProperties2 using one of the reported
formats and adding VkOpticalFlowImageFormatInfoNV to the
chain of VkPhysicalDeviceImageFormatInfo2.
When querying the parameters with
vkGetPhysicalDeviceImageFormatProperties2 for images used for optical
flow operations, the VkOpticalFlowImageFormatInfoNV::
should contain one or more of the bits defined in
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.