getPhysicalDeviceOpticalFlowImageFormatsNV :: MonadIO io=> PhysicalDevicephysicalDeviceis the physical device being queried.-> OpticalFlowImageFormatInfoNVpOpticalFlowImageFormatInfois a pointer to a OpticalFlowImageFormatInfoNV structure specifying the optical flow usage for which information is returned.-> io (Result,"imageFormatProperties"
::: Vector OpticalFlowImageFormatPropertiesNV)
vkGetPhysicalDeviceOpticalFlowImageFormatsNV - Query image formats for optical flow
Description
If pImageFormatProperties is NULL, then the number of optical flow
properties supported for the given physicalDevice is returned in
pFormatCount. Otherwise, pFormatCount must point to a variable set
by the application to the number of elements in the
pImageFormatProperties array, and on return the variable is
overwritten with the number of values actually written to
pImageFormatProperties. If the value of pFormatCount is less than
the number of optical flow properties supported, at most pFormatCount
values will be written to pImageFormatProperties, and
INCOMPLETE will be returned instead of
SUCCESS, to indicate that not all the
available values were returned.
Before creating an image to be used as an optical flow frame, obtain the
supported image creation parameters by querying with
getPhysicalDeviceFormatProperties2
and
getPhysicalDeviceImageFormatProperties2
using one of the reported formats and adding
OpticalFlowImageFormatInfoNV to the pNext chain of
PhysicalDeviceImageFormatInfo2.
When querying the parameters with
getPhysicalDeviceImageFormatProperties2
for images used for optical flow operations, the
OpticalFlowImageFormatInfoNV::usage field must contain one or more
of the bits defined in OpticalFlowUsageFlagBitsNV.
Valid Usage (Implicit)
physicalDevicemust be a valid PhysicalDevice handle
pOpticalFlowImageFormatInfomust be a valid pointer to a valid OpticalFlowImageFormatInfoNV structurepFormatCountmust be a valid pointer to auint32_tvalueIf the value referenced by
pFormatCountis not0, andpImageFormatPropertiesis notNULL,pImageFormatPropertiesmust be a valid pointer to an array ofpFormatCountOpticalFlowImageFormatPropertiesNV structures
Return Codes
FORMAT_B8G8R8A8_UNORM, FORMAT_R8_UNORM and FORMAT_G8_B8R8_2PLANE_420_UNORM are initially supported for images with optical usage OPTICAL_FLOW_USAGE_INPUT_BIT_NV.
FORMAT_R16G16_SFIXED5_NV is initially supported for images with optical flow usage OPTICAL_FLOW_USAGE_OUTPUT_BIT_NV, OPTICAL_FLOW_USAGE_HINT_BIT_NV and OPTICAL_FLOW_USAGE_GLOBAL_FLOW_BIT_NV.
FORMAT_R8_UINT and FORMAT_R32_UINT are initially supported for images with optical flow usage OPTICAL_FLOW_USAGE_COST_BIT_NV. It is recommended to use FORMAT_R8_UINT because of the lower bandwidth.
See Also
VK_NV_optical_flow, OpticalFlowImageFormatInfoNV, OpticalFlowImageFormatPropertiesNV, PhysicalDevice