# vkCreateOpticalFlowSessionNV(3) Manual Page

## Name

vkCreateOpticalFlowSessionNV - Creates an optical flow session object

Loading… please wait.

## C Specification

To create an optical flow session object, call:

    // Provided by VK_NV_optical_flow
    VkResult vkCreateOpticalFlowSessionNV(
        VkDevice                                    device,
        const VkOpticalFlowSessionCreateInfoNV*     pCreateInfo,
        const VkAllocationCallbacks*                pAllocator,
        VkOpticalFlowSessionNV*                     pSession);

## Parameters

- `device` is the logical device that creates the optical flow session object.

- `pCreateInfo` is a pointer to a VkOpticalFlowSessionCreateInfoNV structure containing parameters specifying the creation of the optical flow session.

- `pAllocator` controls host memory allocation as described in the Memory Allocation chapter.

- `pSession` is a pointer to a VkOpticalFlowSessionNV handle specifying the optical flow session object which will be created by this function when it returns `VK_SUCCESS`

## Description

Valid Usage (Implicit)

- VUID-vkCreateOpticalFlowSessionNV-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkCreateOpticalFlowSessionNV-pCreateInfo-parameter
  `pCreateInfo` must be a valid pointer to a valid VkOpticalFlowSessionCreateInfoNV structure

- VUID-vkCreateOpticalFlowSessionNV-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkCreateOpticalFlowSessionNV-pSession-parameter
  `pSession` must be a valid pointer to a VkOpticalFlowSessionNV handle

- VUID-vkCreateOpticalFlowSessionNV-device-queuecount
  The device must have been created with at least `1` queue

Return Codes

On success, this command returns

  - `VK_SUCCESS`

On failure, this command returns

  - `VK_ERROR_OUT_OF_HOST_MEMORY`

  - `VK_ERROR_INITIALIZATION_FAILED`

## See Also

VK_NV_optical_flow, VkAllocationCallbacks, VkDevice, VkOpticalFlowSessionCreateInfoNV, VkOpticalFlowSessionNV

## 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

Copyright 2014-2025 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0