C Specification

The VkOpticalFlowSessionCreateInfoNV structure is defined as:

// Provided by VK_NV_optical_flow
typedef struct VkOpticalFlowSessionCreateInfoNV {
    VkStructureType                      sType;
    void*                                pNext;
    uint32_t                             width;
    uint32_t                             height;
    VkFormat                             imageFormat;
    VkFormat                             flowVectorFormat;
    VkFormat                             costFormat;
    VkOpticalFlowGridSizeFlagsNV         outputGridSize;
    VkOpticalFlowGridSizeFlagsNV         hintGridSize;
    VkOpticalFlowPerformanceLevelNV      performanceLevel;
    VkOpticalFlowSessionCreateFlagsNV    flags;
} VkOpticalFlowSessionCreateInfoNV;

Members

  • sType is a VkStructureType value identifying this structure.

  • pNext is NULL or a pointer to a structure extending this structure.

  • width is the width in pixels of the input or reference frame to be bound to this optical flow session.

  • height is the height in pixels of the input or reference frame to be bound to this optical flow session.

  • imageFormat is the VkFormat of the input and reference frame to be bound to this optical flow session.

  • flowVectorFormat is the VkFormat of the flow vector maps (output or hint) to be bound to this optical flow session.

  • costFormat is the VkFormat of the cost maps to be bound to this optical flow session.

  • outputGridSize is exactly one bit of VkOpticalFlowGridSizeFlagsNV specifying the grid size of the output flow and cost maps to be bound to this optical flow session. The size of the output flow and cost maps is determined by VkOpticalFlowSessionCreateInfoNV::width and VkOpticalFlowSessionCreateInfoNV::height divided by VkOpticalFlowSessionCreateInfoNV::outputGridSize.

  • hintGridSize is one exactly bit of VkOpticalFlowGridSizeFlagsNV specifying the grid size of the hint flow vector maps to be bound to this optical flow session. The size of the hint maps is determined by VkOpticalFlowSessionCreateInfoNV::width and VkOpticalFlowSessionCreateInfoNV::height divided by VkOpticalFlowSessionCreateInfoNV::hintGridSize.

  • performanceLevel is the VkOpticalFlowPerformanceLevelNV used for this optical flow session.

  • flags are the VkOpticalFlowSessionCreateFlagsNV used for this optical flow session.

Description

Valid Usage
Valid Usage (Implicit)
  • VUID-VkOpticalFlowSessionCreateInfoNV-sType-sType
    sType must be VK_STRUCTURE_TYPE_OPTICAL_FLOW_SESSION_CREATE_INFO_NV

  • VUID-VkOpticalFlowSessionCreateInfoNV-pNext-pNext
    pNext must be NULL or a pointer to a valid instance of VkOpticalFlowSessionCreatePrivateDataInfoNV

  • VUID-VkOpticalFlowSessionCreateInfoNV-sType-unique
    The sType value of each structure in the pNext chain must be unique

  • VUID-VkOpticalFlowSessionCreateInfoNV-imageFormat-parameter
    imageFormat must be a valid VkFormat value

  • VUID-VkOpticalFlowSessionCreateInfoNV-flowVectorFormat-parameter
    flowVectorFormat must be a valid VkFormat value

  • VUID-VkOpticalFlowSessionCreateInfoNV-costFormat-parameter
    If costFormat is not 0, costFormat must be a valid VkFormat value

  • VUID-VkOpticalFlowSessionCreateInfoNV-outputGridSize-parameter
    outputGridSize must be a valid combination of VkOpticalFlowGridSizeFlagBitsNV values

  • VUID-VkOpticalFlowSessionCreateInfoNV-outputGridSize-requiredbitmask
    outputGridSize must not be 0

  • VUID-VkOpticalFlowSessionCreateInfoNV-hintGridSize-parameter
    hintGridSize must be a valid combination of VkOpticalFlowGridSizeFlagBitsNV values

  • VUID-VkOpticalFlowSessionCreateInfoNV-performanceLevel-parameter
    If performanceLevel is not 0, performanceLevel must be a valid VkOpticalFlowPerformanceLevelNV value

  • VUID-VkOpticalFlowSessionCreateInfoNV-flags-parameter
    flags must be a valid combination of VkOpticalFlowSessionCreateFlagBitsNV values

See Also

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.

Copyright 2014-2026 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0