{-# language CPP #-}
-- | = Name
--
-- VK_NV_optical_flow - device extension
--
-- == VK_NV_optical_flow
--
-- [__Name String__]
--     @VK_NV_optical_flow@
--
-- [__Extension Type__]
--     Device extension
--
-- [__Registered Extension Number__]
--     465
--
-- [__Revision__]
--     1
--
-- [__Extension and Version Dependencies__]
--
--     -   Requires support for Vulkan 1.0
--
--     -   Requires @VK_KHR_get_physical_device_properties2@ to be enabled
--         for any device-level functionality
--
--     -   Requires @VK_KHR_format_feature_flags2@ to be enabled for any
--         device-level functionality
--
--     -   Requires @VK_KHR_synchronization2@ to be enabled for any
--         device-level functionality
--
-- [__Contact__]
--
--     -   Carsten Rohde
--         <https://github.com/KhronosGroup/Vulkan-Docs/issues/new?body=[VK_NV_optical_flow] @crohde%0A*Here describe the issue or question you have about the VK_NV_optical_flow extension* >
--
-- == Other Extension Metadata
--
-- [__Last Modified Date__]
--     2022-09-26
--
-- [__Contributors__]
--
--     -   Carsten Rohde, NVIDIA
--
--     -   Vipul Parashar, NVIDIA
--
--     -   Jeff Bolz, NVIDIA
--
--     -   Eric Werness, NVIDIA
--
-- == Description
--
-- Optical flow are fundamental algorithms in computer vision (CV) area.
-- This extension allows applications to estimate 2D displacement of pixels
-- between two frames.
--
-- Note
--
-- This extension is designed to be used with upcoming NVIDIA Optical Flow
-- SDK Version 5 which will be available on NVIDIA Developer webpage.
--
-- == New Object Types
--
-- -   'Vulkan.Extensions.Handles.OpticalFlowSessionNV'
--
-- == New Commands
--
-- -   'bindOpticalFlowSessionImageNV'
--
-- -   'cmdOpticalFlowExecuteNV'
--
-- -   'createOpticalFlowSessionNV'
--
-- -   'destroyOpticalFlowSessionNV'
--
-- -   'getPhysicalDeviceOpticalFlowImageFormatsNV'
--
-- == New Structures
--
-- -   'OpticalFlowExecuteInfoNV'
--
-- -   'OpticalFlowImageFormatPropertiesNV'
--
-- -   'OpticalFlowSessionCreateInfoNV'
--
-- -   Extending 'OpticalFlowSessionCreateInfoNV':
--
--     -   'OpticalFlowSessionCreatePrivateDataInfoNV'
--
-- -   Extending
--     'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.PhysicalDeviceFeatures2',
--     'Vulkan.Core10.Device.DeviceCreateInfo':
--
--     -   'PhysicalDeviceOpticalFlowFeaturesNV'
--
-- -   Extending
--     'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.PhysicalDeviceImageFormatInfo2',
--     'Vulkan.Core10.Image.ImageCreateInfo':
--
--     -   'OpticalFlowImageFormatInfoNV'
--
-- -   Extending
--     'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.PhysicalDeviceProperties2':
--
--     -   'PhysicalDeviceOpticalFlowPropertiesNV'
--
-- == New Enums
--
-- -   'OpticalFlowExecuteFlagBitsNV'
--
-- -   'OpticalFlowGridSizeFlagBitsNV'
--
-- -   'OpticalFlowPerformanceLevelNV'
--
-- -   'OpticalFlowSessionBindingPointNV'
--
-- -   'OpticalFlowSessionCreateFlagBitsNV'
--
-- -   'OpticalFlowUsageFlagBitsNV'
--
-- == New Bitmasks
--
-- -   'OpticalFlowExecuteFlagsNV'
--
-- -   'OpticalFlowGridSizeFlagsNV'
--
-- -   'OpticalFlowSessionCreateFlagsNV'
--
-- -   'OpticalFlowUsageFlagsNV'
--
-- == New Enum Constants
--
-- -   'NV_OPTICAL_FLOW_EXTENSION_NAME'
--
-- -   'NV_OPTICAL_FLOW_SPEC_VERSION'
--
-- -   Extending 'Vulkan.Core13.Enums.AccessFlags2.AccessFlagBits2':
--
--     -   'Vulkan.Core13.Enums.AccessFlags2.ACCESS_2_OPTICAL_FLOW_READ_BIT_NV'
--
--     -   'Vulkan.Core13.Enums.AccessFlags2.ACCESS_2_OPTICAL_FLOW_WRITE_BIT_NV'
--
-- -   Extending 'Vulkan.Core10.Enums.Format.Format':
--
--     -   'Vulkan.Core10.Enums.Format.FORMAT_R16G16_S10_5_NV'
--
-- -   Extending
--     'Vulkan.Core13.Enums.FormatFeatureFlags2.FormatFeatureFlagBits2':
--
--     -   'Vulkan.Core13.Enums.FormatFeatureFlags2.FORMAT_FEATURE_2_OPTICAL_FLOW_COST_BIT_NV'
--
--     -   'Vulkan.Core13.Enums.FormatFeatureFlags2.FORMAT_FEATURE_2_OPTICAL_FLOW_IMAGE_BIT_NV'
--
--     -   'Vulkan.Core13.Enums.FormatFeatureFlags2.FORMAT_FEATURE_2_OPTICAL_FLOW_VECTOR_BIT_NV'
--
-- -   Extending 'Vulkan.Core10.Enums.ObjectType.ObjectType':
--
--     -   'Vulkan.Core10.Enums.ObjectType.OBJECT_TYPE_OPTICAL_FLOW_SESSION_NV'
--
-- -   Extending
--     'Vulkan.Core13.Enums.PipelineStageFlags2.PipelineStageFlagBits2':
--
--     -   'Vulkan.Core13.Enums.PipelineStageFlags2.PIPELINE_STAGE_2_OPTICAL_FLOW_BIT_NV'
--
-- -   Extending 'Vulkan.Core10.Enums.QueueFlagBits.QueueFlagBits':
--
--     -   'Vulkan.Core10.Enums.QueueFlagBits.QUEUE_OPTICAL_FLOW_BIT_NV'
--
-- -   Extending 'Vulkan.Core10.Enums.StructureType.StructureType':
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_OPTICAL_FLOW_EXECUTE_INFO_NV'
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_OPTICAL_FLOW_IMAGE_FORMAT_INFO_NV'
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_OPTICAL_FLOW_IMAGE_FORMAT_PROPERTIES_NV'
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_OPTICAL_FLOW_SESSION_CREATE_INFO_NV'
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_OPTICAL_FLOW_SESSION_CREATE_PRIVATE_DATA_INFO_NV'
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_PHYSICAL_DEVICE_OPTICAL_FLOW_FEATURES_NV'
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_PHYSICAL_DEVICE_OPTICAL_FLOW_PROPERTIES_NV'
--
-- == Examples
--
-- > // Example querying available input formats
-- > VkOpticalFlowImageFormatInfoNV ofFormatInfo = { VK_STRUCTURE_TYPE_OPTICAL_FLOW_IMAGE_FORMAT_INFO_NV };
-- > ofFormatInfo.usage = VK_OPTICAL_FLOW_USAGE_INPUT_BIT_NV;
-- >
-- > uint32_t count = 0;
-- > vkGetPhysicalDeviceOpticalFlowImageFormatsNV(physicalDevice, &ofFormatInfo, &count, NULL);
-- > VkOpticalFlowImageFormatPropertiesNV* fmt = new VkOpticalFlowImageFormatPropertiesNV[count];
-- > memset(fmt, 0, count  * sizeof(VkOpticalFlowImageFormatPropertiesNV));
-- > for (uint32_t i = 0; i < count; i++) {
-- >     fmt[i].sType = VK_STRUCTURE_TYPE_OPTICAL_FLOW_IMAGE_FORMAT_PROPERTIES_NV;
-- > }
-- > vkGetPhysicalDeviceOpticalFlowImageFormatsNV(physicalDevice, &ofFormatInfo, &count, fmt);
-- >
-- > // Pick one of the available formats
-- > VkFormat inputFormat = fmt[0].format;
-- >
-- > // Check feature support for optimal tiling
-- > VkFormatProperties3 formatProperties3 = { VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_3 };
-- > VkFormatProperties2 formatProperties2 = { VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2, &formatProperties3 };
-- > vkGetPhysicalDeviceFormatProperties2(physicalDevice, inputFormat, &formatProperties2);
-- > if (!(formatProperties3.optimalTilingFeatures & VK_FORMAT_FEATURE_2_OPTICAL_FLOW_IMAGE_BIT_NV)) {
-- >     return false;
-- > }
-- >
-- > // Check support for image creation parameters
-- > VkPhysicalDeviceImageFormatInfo2 imageFormatInfo2 = { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2, &ofFormatInfo };
-- > imageFormatInfo2.format = inputFormat;
-- > imageFormatInfo2.type = VK_IMAGE_TYPE_2D;
-- > imageFormatInfo2.tiling = VK_IMAGE_TILING_OPTIMAL;
-- > imageFormatInfo2.usage = VK_IMAGE_USAGE_SAMPLED_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT;
-- >
-- > VkImageFormatProperties2 imageFormatProperties2 = { VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2 };
-- > if (vkGetPhysicalDeviceImageFormatProperties2(physicalDevice, &imageFormatInfo2, &imageFormatProperties2) != VK_SUCCESS) {
-- >     return false;
-- > }
-- >
-- > VkImageCreateInfo imageCreateInfo = { VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO, &ofFormatInfo };
-- > imageCreateInfo.imageType = VK_IMAGE_TYPE_2D;
-- > imageCreateInfo.format = inputFormat;
-- > imageCreateInfo.extent = { width, height, (uint32_t)1};
-- > imageCreateInfo.mipLevels = 1;
-- > imageCreateInfo.arrayLayers = 1;
-- > imageCreateInfo.samples = VK_SAMPLE_COUNT_1_BIT;
-- > imageCreateInfo.usage = VK_IMAGE_USAGE_SAMPLED_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT;;
-- > imageCreateInfo.tiling = VK_IMAGE_TILING_OPTIMAL;
-- >
-- > vkCreateImage(device, &imageCreateInfo, NULL, &input);
-- > "allocate memory, bind image, create view"
-- >
-- > "do the same for reference and output"
-- >
-- > // Create optical flow session
-- > VkOpticalFlowSessionCreateInfoNV sessionCreateInfo = { VK_STRUCTURE_TYPE_OPTICAL_FLOW_SESSION_CREATE_INFO_NV };
-- > sessionCreateInfo.width = width;
-- > sessionCreateInfo.height = height;
-- > sessionCreateInfo.imageFormat = inputFormat;
-- > sessionCreateInfo.flowVectorFormat = outputFormat;
-- > sessionCreateInfo.outputGridSize = VK_OPTICAL_FLOW_GRID_SIZE_4X4_BIT_NV;
-- > sessionCreateInfo.performanceLevel = VK_OPTICAL_FLOW_PERFORMANCE_LEVEL_SLOW_NV;
-- > VkOpticalFlowSessionNV session;
-- > vkCreateOpticalFlowSessionNV(device, &sessionCreateInfo, NULL, &session);
-- >
-- > "allocate command buffer"
-- >
-- > "transfer images to VK_PIPELINE_STAGE_2_OPTICAL_FLOW_BIT_NV"
-- > "transfer input images to VK_ACCESS_2_OPTICAL_FLOW_READ_BIT_NV and output image to VK_ACCESS_2_OPTICAL_FLOW_WRITE_BIT_NV"
-- >
-- > vkBindOpticalFlowSessionImageNV(device, session, VK_OPTICAL_FLOW_SESSION_BINDING_POINT_INPUT_NV, inputView, VK_IMAGE_LAYOUT_GENERAL);
-- > vkBindOpticalFlowSessionImageNV(device, session, VK_OPTICAL_FLOW_SESSION_BINDING_POINT_REFERENCE_NV, refView, VK_IMAGE_LAYOUT_GENERAL);
-- > vkBindOpticalFlowSessionImageNV(device, session, VK_OPTICAL_FLOW_SESSION_BINDING_POINT_FLOW_VECTOR_NV, outputView, VK_IMAGE_LAYOUT_GENERAL);
-- >
-- > VkOpticalFlowExecuteInfoNV opticalFlowExecuteInfo = { VK_STRUCTURE_TYPE_OPTICAL_FLOW_EXECUTE_INFO_NV };
-- > vkCmdOpticalFlowExecuteNV(cmd, session, &opticalFlowExecuteInfo);
-- >
-- > "submit command buffer"
--
-- == Version History
--
-- -   Revision 1, 2022-09-26 (Carsten Rohde)
--
--     -   Internal revisions
--
-- == See Also
--
-- 'OpticalFlowExecuteFlagBitsNV', 'OpticalFlowExecuteFlagsNV',
-- 'OpticalFlowExecuteInfoNV', 'OpticalFlowGridSizeFlagBitsNV',
-- 'OpticalFlowGridSizeFlagsNV', 'OpticalFlowImageFormatInfoNV',
-- 'OpticalFlowImageFormatPropertiesNV', 'OpticalFlowPerformanceLevelNV',
-- 'OpticalFlowSessionBindingPointNV',
-- 'OpticalFlowSessionCreateFlagBitsNV', 'OpticalFlowSessionCreateFlagsNV',
-- 'OpticalFlowSessionCreateInfoNV',
-- 'OpticalFlowSessionCreatePrivateDataInfoNV',
-- 'Vulkan.Extensions.Handles.OpticalFlowSessionNV',
-- 'OpticalFlowUsageFlagBitsNV', 'OpticalFlowUsageFlagsNV',
-- 'PhysicalDeviceOpticalFlowFeaturesNV',
-- 'PhysicalDeviceOpticalFlowPropertiesNV',
-- 'bindOpticalFlowSessionImageNV', 'cmdOpticalFlowExecuteNV',
-- 'createOpticalFlowSessionNV', 'destroyOpticalFlowSessionNV',
-- 'getPhysicalDeviceOpticalFlowImageFormatsNV'
--
-- == Document Notes
--
-- For more information, see the
-- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#VK_NV_optical_flow Vulkan Specification>
--
-- This page is a generated document. Fixes and changes should be made to
-- the generator scripts, not directly.
module Vulkan.Extensions.VK_NV_optical_flow  ( getPhysicalDeviceOpticalFlowImageFormatsNV
                                             , createOpticalFlowSessionNV
                                             , withOpticalFlowSessionNV
                                             , destroyOpticalFlowSessionNV
                                             , bindOpticalFlowSessionImageNV
                                             , cmdOpticalFlowExecuteNV
                                             , PhysicalDeviceOpticalFlowFeaturesNV(..)
                                             , PhysicalDeviceOpticalFlowPropertiesNV(..)
                                             , OpticalFlowImageFormatInfoNV(..)
                                             , OpticalFlowImageFormatPropertiesNV(..)
                                             , OpticalFlowSessionCreateInfoNV(..)
                                             , OpticalFlowSessionCreatePrivateDataInfoNV(..)
                                             , OpticalFlowExecuteInfoNV(..)
                                             , OpticalFlowGridSizeFlagsNV
                                             , OpticalFlowGridSizeFlagBitsNV( OPTICAL_FLOW_GRID_SIZE_UNKNOWN_NV
                                                                            , OPTICAL_FLOW_GRID_SIZE_1X1_BIT_NV
                                                                            , OPTICAL_FLOW_GRID_SIZE_2X2_BIT_NV
                                                                            , OPTICAL_FLOW_GRID_SIZE_4X4_BIT_NV
                                                                            , OPTICAL_FLOW_GRID_SIZE_8X8_BIT_NV
                                                                            , ..
                                                                            )
                                             , OpticalFlowUsageFlagsNV
                                             , OpticalFlowUsageFlagBitsNV( OPTICAL_FLOW_USAGE_UNKNOWN_NV
                                                                         , OPTICAL_FLOW_USAGE_INPUT_BIT_NV
                                                                         , OPTICAL_FLOW_USAGE_OUTPUT_BIT_NV
                                                                         , OPTICAL_FLOW_USAGE_HINT_BIT_NV
                                                                         , OPTICAL_FLOW_USAGE_COST_BIT_NV
                                                                         , OPTICAL_FLOW_USAGE_GLOBAL_FLOW_BIT_NV
                                                                         , ..
                                                                         )
                                             , OpticalFlowPerformanceLevelNV( OPTICAL_FLOW_PERFORMANCE_LEVEL_UNKNOWN_NV
                                                                            , OPTICAL_FLOW_PERFORMANCE_LEVEL_SLOW_NV
                                                                            , OPTICAL_FLOW_PERFORMANCE_LEVEL_MEDIUM_NV
                                                                            , OPTICAL_FLOW_PERFORMANCE_LEVEL_FAST_NV
                                                                            , ..
                                                                            )
                                             , OpticalFlowSessionBindingPointNV( OPTICAL_FLOW_SESSION_BINDING_POINT_UNKNOWN_NV
                                                                               , OPTICAL_FLOW_SESSION_BINDING_POINT_INPUT_NV
                                                                               , OPTICAL_FLOW_SESSION_BINDING_POINT_REFERENCE_NV
                                                                               , OPTICAL_FLOW_SESSION_BINDING_POINT_HINT_NV
                                                                               , OPTICAL_FLOW_SESSION_BINDING_POINT_FLOW_VECTOR_NV
                                                                               , OPTICAL_FLOW_SESSION_BINDING_POINT_BACKWARD_FLOW_VECTOR_NV
                                                                               , OPTICAL_FLOW_SESSION_BINDING_POINT_COST_NV
                                                                               , OPTICAL_FLOW_SESSION_BINDING_POINT_BACKWARD_COST_NV
                                                                               , OPTICAL_FLOW_SESSION_BINDING_POINT_GLOBAL_FLOW_NV
                                                                               , ..
                                                                               )
                                             , OpticalFlowSessionCreateFlagsNV
                                             , OpticalFlowSessionCreateFlagBitsNV( OPTICAL_FLOW_SESSION_CREATE_ENABLE_HINT_BIT_NV
                                                                                 , OPTICAL_FLOW_SESSION_CREATE_ENABLE_COST_BIT_NV
                                                                                 , OPTICAL_FLOW_SESSION_CREATE_ENABLE_GLOBAL_FLOW_BIT_NV
                                                                                 , OPTICAL_FLOW_SESSION_CREATE_ALLOW_REGIONS_BIT_NV
                                                                                 , OPTICAL_FLOW_SESSION_CREATE_BOTH_DIRECTIONS_BIT_NV
                                                                                 , ..
                                                                                 )
                                             , OpticalFlowExecuteFlagsNV
                                             , OpticalFlowExecuteFlagBitsNV( OPTICAL_FLOW_EXECUTE_DISABLE_TEMPORAL_HINTS_BIT_NV
                                                                           , ..
                                                                           )
                                             , NV_OPTICAL_FLOW_SPEC_VERSION
                                             , pattern NV_OPTICAL_FLOW_SPEC_VERSION
                                             , NV_OPTICAL_FLOW_EXTENSION_NAME
                                             , pattern NV_OPTICAL_FLOW_EXTENSION_NAME
                                             , OpticalFlowSessionNV(..)
                                             ) where

import Data.Bits (Bits)
import Data.Bits (FiniteBits)
import Vulkan.Internal.Utils (enumReadPrec)
import Vulkan.Internal.Utils (enumShowsPrec)
import Vulkan.Internal.Utils (traceAroundEvent)
import Control.Exception.Base (bracket)
import Control.Monad (unless)
import Control.Monad.IO.Class (liftIO)
import Data.Typeable (eqT)
import Foreign.Marshal.Alloc (allocaBytes)
import Foreign.Marshal.Alloc (callocBytes)
import Foreign.Marshal.Alloc (free)
import GHC.Base (when)
import GHC.IO (throwIO)
import GHC.Ptr (castPtr)
import GHC.Ptr (nullFunPtr)
import Foreign.Ptr (nullPtr)
import Foreign.Ptr (plusPtr)
import GHC.Show (showString)
import GHC.Show (showsPrec)
import Numeric (showHex)
import Control.Monad.Trans.Class (lift)
import Control.Monad.Trans.Cont (evalContT)
import Data.Vector (generateM)
import qualified Data.Vector (imapM_)
import qualified Data.Vector (length)
import Vulkan.CStruct (FromCStruct)
import Vulkan.CStruct (FromCStruct(..))
import Vulkan.CStruct (ToCStruct)
import Vulkan.CStruct (ToCStruct(..))
import Vulkan.Zero (Zero)
import Vulkan.Zero (Zero(..))
import Control.Monad.IO.Class (MonadIO)
import Data.String (IsString)
import Data.Type.Equality ((:~:)(Refl))
import Data.Typeable (Typeable)
import Foreign.Storable (Storable)
import Foreign.Storable (Storable(peek))
import Foreign.Storable (Storable(poke))
import qualified Foreign.Storable (Storable(..))
import GHC.Generics (Generic)
import GHC.IO.Exception (IOErrorType(..))
import GHC.IO.Exception (IOException(..))
import Data.Int (Int32)
import Foreign.Ptr (FunPtr)
import Foreign.Ptr (Ptr)
import GHC.Read (Read(readPrec))
import GHC.Show (Show(showsPrec))
import Data.Word (Word32)
import Data.Kind (Type)
import Control.Monad.Trans.Cont (ContT(..))
import Data.Vector (Vector)
import Vulkan.CStruct.Utils (advancePtrBytes)
import Vulkan.Core10.FundamentalTypes (bool32ToBool)
import Vulkan.Core10.FundamentalTypes (boolToBool32)
import Vulkan.CStruct.Extends (forgetExtensions)
import Vulkan.NamedType ((:::))
import Vulkan.Core10.AllocationCallbacks (AllocationCallbacks)
import Vulkan.Core10.FundamentalTypes (Bool32)
import Vulkan.CStruct.Extends (Chain)
import Vulkan.Core10.Handles (CommandBuffer)
import Vulkan.Core10.Handles (CommandBuffer(..))
import Vulkan.Core10.Handles (CommandBuffer(CommandBuffer))
import Vulkan.Core10.Handles (CommandBuffer_T)
import Vulkan.Core10.Handles (Device)
import Vulkan.Core10.Handles (Device(..))
import Vulkan.Core10.Handles (Device(Device))
import Vulkan.Dynamic (DeviceCmds(pVkBindOpticalFlowSessionImageNV))
import Vulkan.Dynamic (DeviceCmds(pVkCmdOpticalFlowExecuteNV))
import Vulkan.Dynamic (DeviceCmds(pVkCreateOpticalFlowSessionNV))
import Vulkan.Dynamic (DeviceCmds(pVkDestroyOpticalFlowSessionNV))
import Vulkan.Core10.Handles (Device_T)
import Vulkan.CStruct.Extends (Extends)
import Vulkan.CStruct.Extends (Extendss)
import Vulkan.CStruct.Extends (Extensible(..))
import Vulkan.Core10.FundamentalTypes (Flags)
import Vulkan.Core10.Enums.Format (Format)
import Vulkan.Core10.Enums.ImageLayout (ImageLayout)
import Vulkan.Core10.Enums.ImageLayout (ImageLayout(..))
import Vulkan.Core10.Handles (ImageView)
import Vulkan.Core10.Handles (ImageView(..))
import Vulkan.Dynamic (InstanceCmds(pVkGetPhysicalDeviceOpticalFlowImageFormatsNV))
import Vulkan.Extensions.Handles (OpticalFlowSessionNV)
import Vulkan.Extensions.Handles (OpticalFlowSessionNV(..))
import Vulkan.CStruct.Extends (PeekChain)
import Vulkan.CStruct.Extends (PeekChain(..))
import Vulkan.Core10.Handles (PhysicalDevice)
import Vulkan.Core10.Handles (PhysicalDevice(..))
import Vulkan.Core10.Handles (PhysicalDevice(PhysicalDevice))
import Vulkan.Core10.Handles (PhysicalDevice_T)
import Vulkan.CStruct.Extends (PokeChain)
import Vulkan.CStruct.Extends (PokeChain(..))
import Vulkan.Core10.FundamentalTypes (Rect2D)
import Vulkan.Core10.Enums.Result (Result)
import Vulkan.Core10.Enums.Result (Result(..))
import Vulkan.CStruct.Extends (SomeStruct)
import Vulkan.Core10.Enums.StructureType (StructureType)
import Vulkan.Exception (VulkanException(..))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_OPTICAL_FLOW_EXECUTE_INFO_NV))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_OPTICAL_FLOW_IMAGE_FORMAT_INFO_NV))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_OPTICAL_FLOW_IMAGE_FORMAT_PROPERTIES_NV))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_OPTICAL_FLOW_SESSION_CREATE_INFO_NV))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_OPTICAL_FLOW_SESSION_CREATE_PRIVATE_DATA_INFO_NV))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_OPTICAL_FLOW_FEATURES_NV))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_OPTICAL_FLOW_PROPERTIES_NV))
import Vulkan.Core10.Enums.Result (Result(SUCCESS))
import Vulkan.Extensions.Handles (OpticalFlowSessionNV(..))
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
  unsafe
#endif
  "dynamic" mkVkGetPhysicalDeviceOpticalFlowImageFormatsNV
  :: FunPtr (Ptr PhysicalDevice_T -> Ptr OpticalFlowImageFormatInfoNV -> Ptr Word32 -> Ptr OpticalFlowImageFormatPropertiesNV -> IO Result) -> Ptr PhysicalDevice_T -> Ptr OpticalFlowImageFormatInfoNV -> Ptr Word32 -> Ptr OpticalFlowImageFormatPropertiesNV -> IO Result

-- | 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 user 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 'Vulkan.Core10.Enums.Result.INCOMPLETE'
-- will be returned instead of 'Vulkan.Core10.Enums.Result.SUCCESS', to
-- indicate that not all the available values were returned. Before
-- creating an image to be used as a optical flow frame, obtain the
-- supported image creation parameters by querying with
-- 'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.getPhysicalDeviceFormatProperties2'
-- and
-- 'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.getPhysicalDeviceImageFormatProperties2'
-- using one of the reported formats and adding
-- 'OpticalFlowImageFormatInfoNV' to the @pNext@ chain of
-- 'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.PhysicalDeviceImageFormatInfo2'.
-- When querying the parameters with
-- 'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.getPhysicalDeviceImageFormatProperties2'
-- for images used for optical flow operations, the
-- 'OpticalFlowImageFormatInfoNV'::@usage@ field should contain one or more
-- of the bits defined in 'OpticalFlowUsageFlagBitsNV'.
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-vkGetPhysicalDeviceOpticalFlowImageFormatsNV-physicalDevice-parameter#
--     @physicalDevice@ /must/ be a valid
--     'Vulkan.Core10.Handles.PhysicalDevice' handle
--
-- -   #VUID-vkGetPhysicalDeviceOpticalFlowImageFormatsNV-pOpticalFlowImageFormatInfo-parameter#
--     @pOpticalFlowImageFormatInfo@ /must/ be a valid pointer to a valid
--     'OpticalFlowImageFormatInfoNV' structure
--
-- -   #VUID-vkGetPhysicalDeviceOpticalFlowImageFormatsNV-pFormatCount-parameter#
--     @pFormatCount@ /must/ be a valid pointer to a @uint32_t@ value
--
-- -   #VUID-vkGetPhysicalDeviceOpticalFlowImageFormatsNV-pImageFormatProperties-parameter#
--     If the value referenced by @pFormatCount@ is not @0@, and
--     @pImageFormatProperties@ is not @NULL@, @pImageFormatProperties@
--     /must/ be a valid pointer to an array of @pFormatCount@
--     'OpticalFlowImageFormatPropertiesNV' structures
--
-- == Return Codes
--
-- [<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fundamentals-successcodes Success>]
--
--     -   'Vulkan.Core10.Enums.Result.SUCCESS'
--
--     -   'Vulkan.Core10.Enums.Result.INCOMPLETE'
--
-- [<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fundamentals-errorcodes Failure>]
--
--     -   'Vulkan.Core10.Enums.Result.ERROR_EXTENSION_NOT_PRESENT'
--
--     -   'Vulkan.Core10.Enums.Result.ERROR_INITIALIZATION_FAILED'
--
--     -   'Vulkan.Core10.Enums.Result.ERROR_FORMAT_NOT_SUPPORTED'
--
-- Note
--
-- 'Vulkan.Core10.Enums.Format.FORMAT_B8G8R8A8_UNORM',
-- 'Vulkan.Core10.Enums.Format.FORMAT_R8_UNORM' and
-- 'Vulkan.Core10.Enums.Format.FORMAT_G8_B8R8_2PLANE_420_UNORM' are
-- initially supported for images with
-- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#opticalflow-usage optical usage>
-- 'OPTICAL_FLOW_USAGE_INPUT_BIT_NV'.
--
-- 'Vulkan.Core10.Enums.Format.FORMAT_R16G16_S10_5_NV' is initially
-- supported for images with
-- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#opticalflow-usage optical flow usage>
-- 'OPTICAL_FLOW_USAGE_OUTPUT_BIT_NV', 'OPTICAL_FLOW_USAGE_HINT_BIT_NV' and
-- 'OPTICAL_FLOW_USAGE_GLOBAL_FLOW_BIT_NV'.
--
-- 'Vulkan.Core10.Enums.Format.FORMAT_R8_UINT' and
-- 'Vulkan.Core10.Enums.Format.FORMAT_R32_UINT' are initially supported for
-- images with
-- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#opticalflow-usage optical flow usage>
-- 'OPTICAL_FLOW_USAGE_COST_BIT_NV'. It is recommended to use
-- 'Vulkan.Core10.Enums.Format.FORMAT_R8_UINT' because of the lower
-- bandwidth.
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_NV_optical_flow VK_NV_optical_flow>,
-- 'OpticalFlowImageFormatInfoNV', 'OpticalFlowImageFormatPropertiesNV',
-- 'Vulkan.Core10.Handles.PhysicalDevice'
getPhysicalDeviceOpticalFlowImageFormatsNV :: forall io
                                            . (MonadIO io)
                                           => -- | @physicalDevice@ is the physical device being queried.
                                              PhysicalDevice
                                           -> -- | #opticalflow-getimageformat-pOpticalFlowImageFormatInfo#
                                              -- @pOpticalFlowImageFormatInfo@ is a pointer to a
                                              -- 'OpticalFlowImageFormatInfoNV' structure specifying the optical flow
                                              -- usage for which information is returned.
                                              OpticalFlowImageFormatInfoNV
                                           -> io (Result, ("imageFormatProperties" ::: Vector OpticalFlowImageFormatPropertiesNV))
getPhysicalDeviceOpticalFlowImageFormatsNV :: forall (io :: * -> *).
MonadIO io =>
PhysicalDevice
-> OpticalFlowImageFormatInfoNV
-> io
     (Result,
      "imageFormatProperties"
      ::: Vector OpticalFlowImageFormatPropertiesNV)
getPhysicalDeviceOpticalFlowImageFormatsNV PhysicalDevice
physicalDevice
                                             OpticalFlowImageFormatInfoNV
opticalFlowImageFormatInfo = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT forall a b. (a -> b) -> a -> b
$ do
  let vkGetPhysicalDeviceOpticalFlowImageFormatsNVPtr :: FunPtr
  (Ptr PhysicalDevice_T
   -> ("pOpticalFlowImageFormatInfo"
       ::: Ptr OpticalFlowImageFormatInfoNV)
   -> ("pFormatCount" ::: Ptr Flags)
   -> ("pImageFormatProperties"
       ::: Ptr OpticalFlowImageFormatPropertiesNV)
   -> IO Result)
vkGetPhysicalDeviceOpticalFlowImageFormatsNVPtr = InstanceCmds
-> FunPtr
     (Ptr PhysicalDevice_T
      -> ("pOpticalFlowImageFormatInfo"
          ::: Ptr OpticalFlowImageFormatInfoNV)
      -> ("pFormatCount" ::: Ptr Flags)
      -> ("pImageFormatProperties"
          ::: Ptr OpticalFlowImageFormatPropertiesNV)
      -> IO Result)
pVkGetPhysicalDeviceOpticalFlowImageFormatsNV (case PhysicalDevice
physicalDevice of PhysicalDevice{InstanceCmds
$sel:instanceCmds:PhysicalDevice :: PhysicalDevice -> InstanceCmds
instanceCmds :: InstanceCmds
instanceCmds} -> InstanceCmds
instanceCmds)
  forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
  (Ptr PhysicalDevice_T
   -> ("pOpticalFlowImageFormatInfo"
       ::: Ptr OpticalFlowImageFormatInfoNV)
   -> ("pFormatCount" ::: Ptr Flags)
   -> ("pImageFormatProperties"
       ::: Ptr OpticalFlowImageFormatPropertiesNV)
   -> IO Result)
vkGetPhysicalDeviceOpticalFlowImageFormatsNVPtr forall a. Eq a => a -> a -> Bool
/= forall a. FunPtr a
nullFunPtr) forall a b. (a -> b) -> a -> b
$
    forall e a. Exception e => e -> IO a
throwIO forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkGetPhysicalDeviceOpticalFlowImageFormatsNV is null" forall a. Maybe a
Nothing forall a. Maybe a
Nothing
  let vkGetPhysicalDeviceOpticalFlowImageFormatsNV' :: Ptr PhysicalDevice_T
-> ("pOpticalFlowImageFormatInfo"
    ::: Ptr OpticalFlowImageFormatInfoNV)
-> ("pFormatCount" ::: Ptr Flags)
-> ("pImageFormatProperties"
    ::: Ptr OpticalFlowImageFormatPropertiesNV)
-> IO Result
vkGetPhysicalDeviceOpticalFlowImageFormatsNV' = FunPtr
  (Ptr PhysicalDevice_T
   -> ("pOpticalFlowImageFormatInfo"
       ::: Ptr OpticalFlowImageFormatInfoNV)
   -> ("pFormatCount" ::: Ptr Flags)
   -> ("pImageFormatProperties"
       ::: Ptr OpticalFlowImageFormatPropertiesNV)
   -> IO Result)
-> Ptr PhysicalDevice_T
-> ("pOpticalFlowImageFormatInfo"
    ::: Ptr OpticalFlowImageFormatInfoNV)
-> ("pFormatCount" ::: Ptr Flags)
-> ("pImageFormatProperties"
    ::: Ptr OpticalFlowImageFormatPropertiesNV)
-> IO Result
mkVkGetPhysicalDeviceOpticalFlowImageFormatsNV FunPtr
  (Ptr PhysicalDevice_T
   -> ("pOpticalFlowImageFormatInfo"
       ::: Ptr OpticalFlowImageFormatInfoNV)
   -> ("pFormatCount" ::: Ptr Flags)
   -> ("pImageFormatProperties"
       ::: Ptr OpticalFlowImageFormatPropertiesNV)
   -> IO Result)
vkGetPhysicalDeviceOpticalFlowImageFormatsNVPtr
  let physicalDevice' :: Ptr PhysicalDevice_T
physicalDevice' = PhysicalDevice -> Ptr PhysicalDevice_T
physicalDeviceHandle (PhysicalDevice
physicalDevice)
  "pOpticalFlowImageFormatInfo" ::: Ptr OpticalFlowImageFormatInfoNV
pOpticalFlowImageFormatInfo <- forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (OpticalFlowImageFormatInfoNV
opticalFlowImageFormatInfo)
  "pFormatCount" ::: Ptr Flags
pPFormatCount <- forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b c. IO a -> (a -> IO b) -> (a -> IO c) -> IO c
bracket (forall a. Int -> IO (Ptr a)
callocBytes @Word32 Int
4) forall a. Ptr a -> IO ()
free
  Result
r <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. String -> IO a -> IO a
traceAroundEvent String
"vkGetPhysicalDeviceOpticalFlowImageFormatsNV" (Ptr PhysicalDevice_T
-> ("pOpticalFlowImageFormatInfo"
    ::: Ptr OpticalFlowImageFormatInfoNV)
-> ("pFormatCount" ::: Ptr Flags)
-> ("pImageFormatProperties"
    ::: Ptr OpticalFlowImageFormatPropertiesNV)
-> IO Result
vkGetPhysicalDeviceOpticalFlowImageFormatsNV'
                                                                                 Ptr PhysicalDevice_T
physicalDevice'
                                                                                 "pOpticalFlowImageFormatInfo" ::: Ptr OpticalFlowImageFormatInfoNV
pOpticalFlowImageFormatInfo
                                                                                 ("pFormatCount" ::: Ptr Flags
pPFormatCount)
                                                                                 (forall a. Ptr a
nullPtr))
  forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Result
r forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (forall e a. Exception e => e -> IO a
throwIO (Result -> VulkanException
VulkanException Result
r))
  Flags
pFormatCount <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> IO a
peek @Word32 "pFormatCount" ::: Ptr Flags
pPFormatCount
  "pImageFormatProperties" ::: Ptr OpticalFlowImageFormatPropertiesNV
pPImageFormatProperties <- forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b c. IO a -> (a -> IO b) -> (a -> IO c) -> IO c
bracket (forall a. Int -> IO (Ptr a)
callocBytes @OpticalFlowImageFormatPropertiesNV ((forall a b. (Integral a, Num b) => a -> b
fromIntegral (Flags
pFormatCount)) forall a. Num a => a -> a -> a
* Int
24)) forall a. Ptr a -> IO ()
free
  [()]
_ <- forall (t :: * -> *) (f :: * -> *) a b.
(Traversable t, Applicative f) =>
(a -> f b) -> t a -> f (t b)
traverse (\Int
i -> forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b. ToCStruct a => Ptr a -> IO b -> IO b
pokeZeroCStruct ("pImageFormatProperties" ::: Ptr OpticalFlowImageFormatPropertiesNV
pPImageFormatProperties forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
i forall a. Num a => a -> a -> a
* Int
24) :: Ptr OpticalFlowImageFormatPropertiesNV) forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. (a -> b) -> a -> b
$ ())) [Int
0..(forall a b. (Integral a, Num b) => a -> b
fromIntegral (Flags
pFormatCount)) forall a. Num a => a -> a -> a
- Int
1]
  Result
r' <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. String -> IO a -> IO a
traceAroundEvent String
"vkGetPhysicalDeviceOpticalFlowImageFormatsNV" (Ptr PhysicalDevice_T
-> ("pOpticalFlowImageFormatInfo"
    ::: Ptr OpticalFlowImageFormatInfoNV)
-> ("pFormatCount" ::: Ptr Flags)
-> ("pImageFormatProperties"
    ::: Ptr OpticalFlowImageFormatPropertiesNV)
-> IO Result
vkGetPhysicalDeviceOpticalFlowImageFormatsNV'
                                                                                  Ptr PhysicalDevice_T
physicalDevice'
                                                                                  "pOpticalFlowImageFormatInfo" ::: Ptr OpticalFlowImageFormatInfoNV
pOpticalFlowImageFormatInfo
                                                                                  ("pFormatCount" ::: Ptr Flags
pPFormatCount)
                                                                                  (("pImageFormatProperties" ::: Ptr OpticalFlowImageFormatPropertiesNV
pPImageFormatProperties)))
  forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Result
r' forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (forall e a. Exception e => e -> IO a
throwIO (Result -> VulkanException
VulkanException Result
r'))
  Flags
pFormatCount' <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> IO a
peek @Word32 "pFormatCount" ::: Ptr Flags
pPFormatCount
  "imageFormatProperties"
::: Vector OpticalFlowImageFormatPropertiesNV
pImageFormatProperties' <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
generateM (forall a b. (Integral a, Num b) => a -> b
fromIntegral (Flags
pFormatCount')) (\Int
i -> forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @OpticalFlowImageFormatPropertiesNV ((("pImageFormatProperties" ::: Ptr OpticalFlowImageFormatPropertiesNV
pPImageFormatProperties) forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
24 forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr OpticalFlowImageFormatPropertiesNV)))
  forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ ((Result
r'), "imageFormatProperties"
::: Vector OpticalFlowImageFormatPropertiesNV
pImageFormatProperties')


foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
  unsafe
#endif
  "dynamic" mkVkCreateOpticalFlowSessionNV
  :: FunPtr (Ptr Device_T -> Ptr (SomeStruct OpticalFlowSessionCreateInfoNV) -> Ptr AllocationCallbacks -> Ptr OpticalFlowSessionNV -> IO Result) -> Ptr Device_T -> Ptr (SomeStruct OpticalFlowSessionCreateInfoNV) -> Ptr AllocationCallbacks -> Ptr OpticalFlowSessionNV -> IO Result

-- | vkCreateOpticalFlowSessionNV - Creates an optical flow session object
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-vkCreateOpticalFlowSessionNV-device-parameter# @device@ /must/
--     be a valid 'Vulkan.Core10.Handles.Device' handle
--
-- -   #VUID-vkCreateOpticalFlowSessionNV-pCreateInfo-parameter#
--     @pCreateInfo@ /must/ be a valid pointer to a valid
--     'OpticalFlowSessionCreateInfoNV' structure
--
-- -   #VUID-vkCreateOpticalFlowSessionNV-pAllocator-parameter# If
--     @pAllocator@ is not @NULL@, @pAllocator@ /must/ be a valid pointer
--     to a valid 'Vulkan.Core10.AllocationCallbacks.AllocationCallbacks'
--     structure
--
-- -   #VUID-vkCreateOpticalFlowSessionNV-pSession-parameter# @pSession@
--     /must/ be a valid pointer to a
--     'Vulkan.Extensions.Handles.OpticalFlowSessionNV' handle
--
-- == Return Codes
--
-- [<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fundamentals-successcodes Success>]
--
--     -   'Vulkan.Core10.Enums.Result.SUCCESS'
--
-- [<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fundamentals-errorcodes Failure>]
--
--     -   'Vulkan.Core10.Enums.Result.ERROR_OUT_OF_HOST_MEMORY'
--
--     -   'Vulkan.Core10.Enums.Result.ERROR_INITIALIZATION_FAILED'
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_NV_optical_flow VK_NV_optical_flow>,
-- 'Vulkan.Core10.AllocationCallbacks.AllocationCallbacks',
-- 'Vulkan.Core10.Handles.Device', 'OpticalFlowSessionCreateInfoNV',
-- 'Vulkan.Extensions.Handles.OpticalFlowSessionNV'
createOpticalFlowSessionNV :: forall a io
                            . ( Extendss OpticalFlowSessionCreateInfoNV a
                              , PokeChain a
                              , MonadIO io )
                           => -- | @device@ is the logical device that creates the optical flow session
                              -- object.
                              Device
                           -> -- | @pCreateInfo@ is a pointer to a 'OpticalFlowSessionCreateInfoNV'
                              -- structure containing parameters specifying the creation of the optical
                              -- flow session.
                              (OpticalFlowSessionCreateInfoNV a)
                           -> -- | @pAllocator@ controls host memory allocation as described in the
                              -- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#memory-allocation Memory Allocation>
                              -- chapter.
                              ("allocator" ::: Maybe AllocationCallbacks)
                           -> io (OpticalFlowSessionNV)
createOpticalFlowSessionNV :: forall (a :: [*]) (io :: * -> *).
(Extendss OpticalFlowSessionCreateInfoNV a, PokeChain a,
 MonadIO io) =>
Device
-> OpticalFlowSessionCreateInfoNV a
-> ("allocator" ::: Maybe AllocationCallbacks)
-> io OpticalFlowSessionNV
createOpticalFlowSessionNV Device
device OpticalFlowSessionCreateInfoNV a
createInfo "allocator" ::: Maybe AllocationCallbacks
allocator = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT forall a b. (a -> b) -> a -> b
$ do
  let vkCreateOpticalFlowSessionNVPtr :: FunPtr
  (Ptr Device_T
   -> ("pCreateInfo"
       ::: Ptr (SomeStruct OpticalFlowSessionCreateInfoNV))
   -> ("pAllocator" ::: Ptr AllocationCallbacks)
   -> ("pSession" ::: Ptr OpticalFlowSessionNV)
   -> IO Result)
vkCreateOpticalFlowSessionNVPtr = DeviceCmds
-> FunPtr
     (Ptr Device_T
      -> ("pCreateInfo"
          ::: Ptr (SomeStruct OpticalFlowSessionCreateInfoNV))
      -> ("pAllocator" ::: Ptr AllocationCallbacks)
      -> ("pSession" ::: Ptr OpticalFlowSessionNV)
      -> IO Result)
pVkCreateOpticalFlowSessionNV (case Device
device of Device{DeviceCmds
$sel:deviceCmds:Device :: Device -> DeviceCmds
deviceCmds :: DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
  forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
  (Ptr Device_T
   -> ("pCreateInfo"
       ::: Ptr (SomeStruct OpticalFlowSessionCreateInfoNV))
   -> ("pAllocator" ::: Ptr AllocationCallbacks)
   -> ("pSession" ::: Ptr OpticalFlowSessionNV)
   -> IO Result)
vkCreateOpticalFlowSessionNVPtr forall a. Eq a => a -> a -> Bool
/= forall a. FunPtr a
nullFunPtr) forall a b. (a -> b) -> a -> b
$
    forall e a. Exception e => e -> IO a
throwIO forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkCreateOpticalFlowSessionNV is null" forall a. Maybe a
Nothing forall a. Maybe a
Nothing
  let vkCreateOpticalFlowSessionNV' :: Ptr Device_T
-> ("pCreateInfo"
    ::: Ptr (SomeStruct OpticalFlowSessionCreateInfoNV))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pSession" ::: Ptr OpticalFlowSessionNV)
-> IO Result
vkCreateOpticalFlowSessionNV' = FunPtr
  (Ptr Device_T
   -> ("pCreateInfo"
       ::: Ptr (SomeStruct OpticalFlowSessionCreateInfoNV))
   -> ("pAllocator" ::: Ptr AllocationCallbacks)
   -> ("pSession" ::: Ptr OpticalFlowSessionNV)
   -> IO Result)
-> Ptr Device_T
-> ("pCreateInfo"
    ::: Ptr (SomeStruct OpticalFlowSessionCreateInfoNV))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pSession" ::: Ptr OpticalFlowSessionNV)
-> IO Result
mkVkCreateOpticalFlowSessionNV FunPtr
  (Ptr Device_T
   -> ("pCreateInfo"
       ::: Ptr (SomeStruct OpticalFlowSessionCreateInfoNV))
   -> ("pAllocator" ::: Ptr AllocationCallbacks)
   -> ("pSession" ::: Ptr OpticalFlowSessionNV)
   -> IO Result)
vkCreateOpticalFlowSessionNVPtr
  Ptr (OpticalFlowSessionCreateInfoNV a)
pCreateInfo <- forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (OpticalFlowSessionCreateInfoNV a
createInfo)
  "pAllocator" ::: Ptr AllocationCallbacks
pAllocator <- case ("allocator" ::: Maybe AllocationCallbacks
allocator) of
    "allocator" ::: Maybe AllocationCallbacks
Nothing -> forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a. Ptr a
nullPtr
    Just AllocationCallbacks
j -> forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (AllocationCallbacks
j)
  "pSession" ::: Ptr OpticalFlowSessionNV
pPSession <- forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b c. IO a -> (a -> IO b) -> (a -> IO c) -> IO c
bracket (forall a. Int -> IO (Ptr a)
callocBytes @OpticalFlowSessionNV Int
8) forall a. Ptr a -> IO ()
free
  Result
r <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. String -> IO a -> IO a
traceAroundEvent String
"vkCreateOpticalFlowSessionNV" (Ptr Device_T
-> ("pCreateInfo"
    ::: Ptr (SomeStruct OpticalFlowSessionCreateInfoNV))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pSession" ::: Ptr OpticalFlowSessionNV)
-> IO Result
vkCreateOpticalFlowSessionNV'
                                                                 (Device -> Ptr Device_T
deviceHandle (Device
device))
                                                                 (forall (a :: [*] -> *) (es :: [*]).
Ptr (a es) -> Ptr (SomeStruct a)
forgetExtensions Ptr (OpticalFlowSessionCreateInfoNV a)
pCreateInfo)
                                                                 "pAllocator" ::: Ptr AllocationCallbacks
pAllocator
                                                                 ("pSession" ::: Ptr OpticalFlowSessionNV
pPSession))
  forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Result
r forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (forall e a. Exception e => e -> IO a
throwIO (Result -> VulkanException
VulkanException Result
r))
  OpticalFlowSessionNV
pSession <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> IO a
peek @OpticalFlowSessionNV "pSession" ::: Ptr OpticalFlowSessionNV
pPSession
  forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ (OpticalFlowSessionNV
pSession)

-- | A convenience wrapper to make a compatible pair of calls to
-- 'createOpticalFlowSessionNV' and 'destroyOpticalFlowSessionNV'
--
-- To ensure that 'destroyOpticalFlowSessionNV' is always called: pass
-- 'Control.Exception.bracket' (or the allocate function from your
-- favourite resource management library) as the last argument.
-- To just extract the pair pass '(,)' as the last argument.
--
withOpticalFlowSessionNV :: forall a io r . (Extendss OpticalFlowSessionCreateInfoNV a, PokeChain a, MonadIO io) => Device -> OpticalFlowSessionCreateInfoNV a -> Maybe AllocationCallbacks -> (io OpticalFlowSessionNV -> (OpticalFlowSessionNV -> io ()) -> r) -> r
withOpticalFlowSessionNV :: forall (a :: [*]) (io :: * -> *) r.
(Extendss OpticalFlowSessionCreateInfoNV a, PokeChain a,
 MonadIO io) =>
Device
-> OpticalFlowSessionCreateInfoNV a
-> ("allocator" ::: Maybe AllocationCallbacks)
-> (io OpticalFlowSessionNV
    -> (OpticalFlowSessionNV -> io ()) -> r)
-> r
withOpticalFlowSessionNV Device
device OpticalFlowSessionCreateInfoNV a
pCreateInfo "allocator" ::: Maybe AllocationCallbacks
pAllocator io OpticalFlowSessionNV -> (OpticalFlowSessionNV -> io ()) -> r
b =
  io OpticalFlowSessionNV -> (OpticalFlowSessionNV -> io ()) -> r
b (forall (a :: [*]) (io :: * -> *).
(Extendss OpticalFlowSessionCreateInfoNV a, PokeChain a,
 MonadIO io) =>
Device
-> OpticalFlowSessionCreateInfoNV a
-> ("allocator" ::: Maybe AllocationCallbacks)
-> io OpticalFlowSessionNV
createOpticalFlowSessionNV Device
device OpticalFlowSessionCreateInfoNV a
pCreateInfo "allocator" ::: Maybe AllocationCallbacks
pAllocator)
    (\(OpticalFlowSessionNV
o0) -> forall (io :: * -> *).
MonadIO io =>
Device
-> OpticalFlowSessionNV
-> ("allocator" ::: Maybe AllocationCallbacks)
-> io ()
destroyOpticalFlowSessionNV Device
device OpticalFlowSessionNV
o0 "allocator" ::: Maybe AllocationCallbacks
pAllocator)


foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
  unsafe
#endif
  "dynamic" mkVkDestroyOpticalFlowSessionNV
  :: FunPtr (Ptr Device_T -> OpticalFlowSessionNV -> Ptr AllocationCallbacks -> IO ()) -> Ptr Device_T -> OpticalFlowSessionNV -> Ptr AllocationCallbacks -> IO ()

-- | vkDestroyOpticalFlowSessionNV - Destroy optical flow session object
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-vkDestroyOpticalFlowSessionNV-device-parameter# @device@
--     /must/ be a valid 'Vulkan.Core10.Handles.Device' handle
--
-- -   #VUID-vkDestroyOpticalFlowSessionNV-session-parameter# @session@
--     /must/ be a valid 'Vulkan.Extensions.Handles.OpticalFlowSessionNV'
--     handle
--
-- -   #VUID-vkDestroyOpticalFlowSessionNV-pAllocator-parameter# If
--     @pAllocator@ is not @NULL@, @pAllocator@ /must/ be a valid pointer
--     to a valid 'Vulkan.Core10.AllocationCallbacks.AllocationCallbacks'
--     structure
--
-- -   #VUID-vkDestroyOpticalFlowSessionNV-session-parent# @session@ /must/
--     have been created, allocated, or retrieved from @device@
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_NV_optical_flow VK_NV_optical_flow>,
-- 'Vulkan.Core10.AllocationCallbacks.AllocationCallbacks',
-- 'Vulkan.Core10.Handles.Device',
-- 'Vulkan.Extensions.Handles.OpticalFlowSessionNV'
destroyOpticalFlowSessionNV :: forall io
                             . (MonadIO io)
                            => -- | @device@ is the device that was used for the creation of the optical
                               -- flow session.
                               Device
                            -> -- | @session@ is the optical flow session to be destroyed.
                               OpticalFlowSessionNV
                            -> -- | @pAllocator@ controls host memory allocation as described in the
                               -- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#memory-allocation Memory Allocation>
                               -- chapter.
                               ("allocator" ::: Maybe AllocationCallbacks)
                            -> io ()
destroyOpticalFlowSessionNV :: forall (io :: * -> *).
MonadIO io =>
Device
-> OpticalFlowSessionNV
-> ("allocator" ::: Maybe AllocationCallbacks)
-> io ()
destroyOpticalFlowSessionNV Device
device OpticalFlowSessionNV
session "allocator" ::: Maybe AllocationCallbacks
allocator = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT forall a b. (a -> b) -> a -> b
$ do
  let vkDestroyOpticalFlowSessionNVPtr :: FunPtr
  (Ptr Device_T
   -> OpticalFlowSessionNV
   -> ("pAllocator" ::: Ptr AllocationCallbacks)
   -> IO ())
vkDestroyOpticalFlowSessionNVPtr = DeviceCmds
-> FunPtr
     (Ptr Device_T
      -> OpticalFlowSessionNV
      -> ("pAllocator" ::: Ptr AllocationCallbacks)
      -> IO ())
pVkDestroyOpticalFlowSessionNV (case Device
device of Device{DeviceCmds
deviceCmds :: DeviceCmds
$sel:deviceCmds:Device :: Device -> DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
  forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
  (Ptr Device_T
   -> OpticalFlowSessionNV
   -> ("pAllocator" ::: Ptr AllocationCallbacks)
   -> IO ())
vkDestroyOpticalFlowSessionNVPtr forall a. Eq a => a -> a -> Bool
/= forall a. FunPtr a
nullFunPtr) forall a b. (a -> b) -> a -> b
$
    forall e a. Exception e => e -> IO a
throwIO forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkDestroyOpticalFlowSessionNV is null" forall a. Maybe a
Nothing forall a. Maybe a
Nothing
  let vkDestroyOpticalFlowSessionNV' :: Ptr Device_T
-> OpticalFlowSessionNV
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> IO ()
vkDestroyOpticalFlowSessionNV' = FunPtr
  (Ptr Device_T
   -> OpticalFlowSessionNV
   -> ("pAllocator" ::: Ptr AllocationCallbacks)
   -> IO ())
-> Ptr Device_T
-> OpticalFlowSessionNV
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> IO ()
mkVkDestroyOpticalFlowSessionNV FunPtr
  (Ptr Device_T
   -> OpticalFlowSessionNV
   -> ("pAllocator" ::: Ptr AllocationCallbacks)
   -> IO ())
vkDestroyOpticalFlowSessionNVPtr
  "pAllocator" ::: Ptr AllocationCallbacks
pAllocator <- case ("allocator" ::: Maybe AllocationCallbacks
allocator) of
    "allocator" ::: Maybe AllocationCallbacks
Nothing -> forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a. Ptr a
nullPtr
    Just AllocationCallbacks
j -> forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (AllocationCallbacks
j)
  forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. String -> IO a -> IO a
traceAroundEvent String
"vkDestroyOpticalFlowSessionNV" (Ptr Device_T
-> OpticalFlowSessionNV
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> IO ()
vkDestroyOpticalFlowSessionNV'
                                                             (Device -> Ptr Device_T
deviceHandle (Device
device))
                                                             (OpticalFlowSessionNV
session)
                                                             "pAllocator" ::: Ptr AllocationCallbacks
pAllocator)
  forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ ()


foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
  unsafe
#endif
  "dynamic" mkVkBindOpticalFlowSessionImageNV
  :: FunPtr (Ptr Device_T -> OpticalFlowSessionNV -> OpticalFlowSessionBindingPointNV -> ImageView -> ImageLayout -> IO Result) -> Ptr Device_T -> OpticalFlowSessionNV -> OpticalFlowSessionBindingPointNV -> ImageView -> ImageLayout -> IO Result

-- | vkBindOpticalFlowSessionImageNV - Bind image to an optical flow session
--
-- = Parameters
--
-- -   @device@ is the device which owns the optical flow session object
--     @session@.
--
-- -   @session@ is the optical flow session object to which the image view
--     is to be bound.
--
-- -   @bindingPoint@ specifies the binding point
--     'OpticalFlowSessionBindingPointNV' to which the image view is bound.
--
-- -   @view@ is a 'Vulkan.Core10.Handles.ImageView' to be bound.
--
-- -   layout /must/ specify the layout that the image subresources
--     accessible from @view@ will be in at the time the optical flow
--     vectors are calculated with 'cmdOpticalFlowExecuteNV' on a
--     'Vulkan.Core10.Handles.Device'.
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-vkBindOpticalFlowSessionImageNV-device-parameter# @device@
--     /must/ be a valid 'Vulkan.Core10.Handles.Device' handle
--
-- -   #VUID-vkBindOpticalFlowSessionImageNV-session-parameter# @session@
--     /must/ be a valid 'Vulkan.Extensions.Handles.OpticalFlowSessionNV'
--     handle
--
-- -   #VUID-vkBindOpticalFlowSessionImageNV-bindingPoint-parameter#
--     @bindingPoint@ /must/ be a valid 'OpticalFlowSessionBindingPointNV'
--     value
--
-- -   #VUID-vkBindOpticalFlowSessionImageNV-view-parameter# If @view@ is
--     not 'Vulkan.Core10.APIConstants.NULL_HANDLE', @view@ /must/ be a
--     valid 'Vulkan.Core10.Handles.ImageView' handle
--
-- -   #VUID-vkBindOpticalFlowSessionImageNV-layout-parameter# @layout@
--     /must/ be a valid 'Vulkan.Core10.Enums.ImageLayout.ImageLayout'
--     value
--
-- -   #VUID-vkBindOpticalFlowSessionImageNV-session-parent# @session@
--     /must/ have been created, allocated, or retrieved from @device@
--
-- -   #VUID-vkBindOpticalFlowSessionImageNV-view-parent# If @view@ is a
--     valid handle, it /must/ have been created, allocated, or retrieved
--     from @device@
--
-- == Return Codes
--
-- [<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fundamentals-successcodes Success>]
--
--     -   'Vulkan.Core10.Enums.Result.SUCCESS'
--
-- [<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fundamentals-errorcodes Failure>]
--
--     -   'Vulkan.Core10.Enums.Result.ERROR_OUT_OF_HOST_MEMORY'
--
--     -   'Vulkan.Core10.Enums.Result.ERROR_INITIALIZATION_FAILED'
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_NV_optical_flow VK_NV_optical_flow>,
-- 'Vulkan.Core10.Handles.Device',
-- 'Vulkan.Core10.Enums.ImageLayout.ImageLayout',
-- 'Vulkan.Core10.Handles.ImageView', 'OpticalFlowSessionBindingPointNV',
-- 'Vulkan.Extensions.Handles.OpticalFlowSessionNV'
bindOpticalFlowSessionImageNV :: forall io
                               . (MonadIO io)
                              => -- No documentation found for Nested "vkBindOpticalFlowSessionImageNV" "device"
                                 Device
                              -> -- No documentation found for Nested "vkBindOpticalFlowSessionImageNV" "session"
                                 OpticalFlowSessionNV
                              -> -- No documentation found for Nested "vkBindOpticalFlowSessionImageNV" "bindingPoint"
                                 OpticalFlowSessionBindingPointNV
                              -> -- No documentation found for Nested "vkBindOpticalFlowSessionImageNV" "view"
                                 ImageView
                              -> -- No documentation found for Nested "vkBindOpticalFlowSessionImageNV" "layout"
                                 ImageLayout
                              -> io ()
bindOpticalFlowSessionImageNV :: forall (io :: * -> *).
MonadIO io =>
Device
-> OpticalFlowSessionNV
-> OpticalFlowSessionBindingPointNV
-> ImageView
-> ImageLayout
-> io ()
bindOpticalFlowSessionImageNV Device
device
                                OpticalFlowSessionNV
session
                                OpticalFlowSessionBindingPointNV
bindingPoint
                                ImageView
view
                                ImageLayout
layout = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
  let vkBindOpticalFlowSessionImageNVPtr :: FunPtr
  (Ptr Device_T
   -> OpticalFlowSessionNV
   -> OpticalFlowSessionBindingPointNV
   -> ImageView
   -> ImageLayout
   -> IO Result)
vkBindOpticalFlowSessionImageNVPtr = DeviceCmds
-> FunPtr
     (Ptr Device_T
      -> OpticalFlowSessionNV
      -> OpticalFlowSessionBindingPointNV
      -> ImageView
      -> ImageLayout
      -> IO Result)
pVkBindOpticalFlowSessionImageNV (case Device
device of Device{DeviceCmds
deviceCmds :: DeviceCmds
$sel:deviceCmds:Device :: Device -> DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
  forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
  (Ptr Device_T
   -> OpticalFlowSessionNV
   -> OpticalFlowSessionBindingPointNV
   -> ImageView
   -> ImageLayout
   -> IO Result)
vkBindOpticalFlowSessionImageNVPtr forall a. Eq a => a -> a -> Bool
/= forall a. FunPtr a
nullFunPtr) forall a b. (a -> b) -> a -> b
$
    forall e a. Exception e => e -> IO a
throwIO forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkBindOpticalFlowSessionImageNV is null" forall a. Maybe a
Nothing forall a. Maybe a
Nothing
  let vkBindOpticalFlowSessionImageNV' :: Ptr Device_T
-> OpticalFlowSessionNV
-> OpticalFlowSessionBindingPointNV
-> ImageView
-> ImageLayout
-> IO Result
vkBindOpticalFlowSessionImageNV' = FunPtr
  (Ptr Device_T
   -> OpticalFlowSessionNV
   -> OpticalFlowSessionBindingPointNV
   -> ImageView
   -> ImageLayout
   -> IO Result)
-> Ptr Device_T
-> OpticalFlowSessionNV
-> OpticalFlowSessionBindingPointNV
-> ImageView
-> ImageLayout
-> IO Result
mkVkBindOpticalFlowSessionImageNV FunPtr
  (Ptr Device_T
   -> OpticalFlowSessionNV
   -> OpticalFlowSessionBindingPointNV
   -> ImageView
   -> ImageLayout
   -> IO Result)
vkBindOpticalFlowSessionImageNVPtr
  Result
r <- forall a. String -> IO a -> IO a
traceAroundEvent String
"vkBindOpticalFlowSessionImageNV" (Ptr Device_T
-> OpticalFlowSessionNV
-> OpticalFlowSessionBindingPointNV
-> ImageView
-> ImageLayout
-> IO Result
vkBindOpticalFlowSessionImageNV'
                                                             (Device -> Ptr Device_T
deviceHandle (Device
device))
                                                             (OpticalFlowSessionNV
session)
                                                             (OpticalFlowSessionBindingPointNV
bindingPoint)
                                                             (ImageView
view)
                                                             (ImageLayout
layout))
  forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Result
r forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (forall e a. Exception e => e -> IO a
throwIO (Result -> VulkanException
VulkanException Result
r))


foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
  unsafe
#endif
  "dynamic" mkVkCmdOpticalFlowExecuteNV
  :: FunPtr (Ptr CommandBuffer_T -> OpticalFlowSessionNV -> Ptr OpticalFlowExecuteInfoNV -> IO ()) -> Ptr CommandBuffer_T -> OpticalFlowSessionNV -> Ptr OpticalFlowExecuteInfoNV -> IO ()

-- | vkCmdOpticalFlowExecuteNV - Calculate optical flow vectors
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-vkCmdOpticalFlowExecuteNV-commandBuffer-parameter#
--     @commandBuffer@ /must/ be a valid
--     'Vulkan.Core10.Handles.CommandBuffer' handle
--
-- -   #VUID-vkCmdOpticalFlowExecuteNV-session-parameter# @session@ /must/
--     be a valid 'Vulkan.Extensions.Handles.OpticalFlowSessionNV' handle
--
-- -   #VUID-vkCmdOpticalFlowExecuteNV-pExecuteInfo-parameter#
--     @pExecuteInfo@ /must/ be a valid pointer to a valid
--     'OpticalFlowExecuteInfoNV' structure
--
-- -   #VUID-vkCmdOpticalFlowExecuteNV-commandBuffer-recording#
--     @commandBuffer@ /must/ be in the
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>
--
-- -   #VUID-vkCmdOpticalFlowExecuteNV-commandBuffer-cmdpool# The
--     'Vulkan.Core10.Handles.CommandPool' that @commandBuffer@ was
--     allocated from /must/ support opticalflow operations
--
-- -   #VUID-vkCmdOpticalFlowExecuteNV-renderpass# This command /must/ only
--     be called outside of a render pass instance
--
-- -   #VUID-vkCmdOpticalFlowExecuteNV-videocoding# This command /must/
--     only be called outside of a video coding scope
--
-- -   #VUID-vkCmdOpticalFlowExecuteNV-commonparent# Both of
--     @commandBuffer@, and @session@ /must/ have been created, allocated,
--     or retrieved from the same 'Vulkan.Core10.Handles.Device'
--
-- == Host Synchronization
--
-- -   Host access to the 'Vulkan.Core10.Handles.CommandPool' that
--     @commandBuffer@ was allocated from /must/ be externally synchronized
--
-- == Command Properties
--
-- \'
--
-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
-- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginVideoCodingKHR Video Coding Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fundamentals-queueoperation-command-types Command Type> |
-- +============================================================================================================================+========================================================================================================================+=============================================================================================================================+=======================================================================================================================+========================================================================================================================================+
-- | Primary                                                                                                                    | Outside                                                                                                                | Outside                                                                                                                     | Opticalflow                                                                                                           | Action                                                                                                                                 |
-- | Secondary                                                                                                                  |                                                                                                                        |                                                                                                                             |                                                                                                                       |                                                                                                                                        |
-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_NV_optical_flow VK_NV_optical_flow>,
-- 'Vulkan.Core10.Handles.CommandBuffer', 'OpticalFlowExecuteInfoNV',
-- 'Vulkan.Extensions.Handles.OpticalFlowSessionNV'
cmdOpticalFlowExecuteNV :: forall io
                         . (MonadIO io)
                        => -- | @commandBuffer@ is the command buffer into which the command will be
                           -- recorded.
                           CommandBuffer
                        -> -- | @session@ is the optical flow session object on which this command is
                           -- operating.
                           OpticalFlowSessionNV
                        -> -- | @pExecuteInfo@ Info is a pointer to a 'OpticalFlowExecuteInfoNV'.
                           OpticalFlowExecuteInfoNV
                        -> io ()
cmdOpticalFlowExecuteNV :: forall (io :: * -> *).
MonadIO io =>
CommandBuffer
-> OpticalFlowSessionNV -> OpticalFlowExecuteInfoNV -> io ()
cmdOpticalFlowExecuteNV CommandBuffer
commandBuffer
                          OpticalFlowSessionNV
session
                          OpticalFlowExecuteInfoNV
executeInfo = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT forall a b. (a -> b) -> a -> b
$ do
  let vkCmdOpticalFlowExecuteNVPtr :: FunPtr
  (Ptr CommandBuffer_T
   -> OpticalFlowSessionNV
   -> ("pExecuteInfo" ::: Ptr OpticalFlowExecuteInfoNV)
   -> IO ())
vkCmdOpticalFlowExecuteNVPtr = DeviceCmds
-> FunPtr
     (Ptr CommandBuffer_T
      -> OpticalFlowSessionNV
      -> ("pExecuteInfo" ::: Ptr OpticalFlowExecuteInfoNV)
      -> IO ())
pVkCmdOpticalFlowExecuteNV (case CommandBuffer
commandBuffer of CommandBuffer{DeviceCmds
$sel:deviceCmds:CommandBuffer :: CommandBuffer -> DeviceCmds
deviceCmds :: DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
  forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
  (Ptr CommandBuffer_T
   -> OpticalFlowSessionNV
   -> ("pExecuteInfo" ::: Ptr OpticalFlowExecuteInfoNV)
   -> IO ())
vkCmdOpticalFlowExecuteNVPtr forall a. Eq a => a -> a -> Bool
/= forall a. FunPtr a
nullFunPtr) forall a b. (a -> b) -> a -> b
$
    forall e a. Exception e => e -> IO a
throwIO forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkCmdOpticalFlowExecuteNV is null" forall a. Maybe a
Nothing forall a. Maybe a
Nothing
  let vkCmdOpticalFlowExecuteNV' :: Ptr CommandBuffer_T
-> OpticalFlowSessionNV
-> ("pExecuteInfo" ::: Ptr OpticalFlowExecuteInfoNV)
-> IO ()
vkCmdOpticalFlowExecuteNV' = FunPtr
  (Ptr CommandBuffer_T
   -> OpticalFlowSessionNV
   -> ("pExecuteInfo" ::: Ptr OpticalFlowExecuteInfoNV)
   -> IO ())
-> Ptr CommandBuffer_T
-> OpticalFlowSessionNV
-> ("pExecuteInfo" ::: Ptr OpticalFlowExecuteInfoNV)
-> IO ()
mkVkCmdOpticalFlowExecuteNV FunPtr
  (Ptr CommandBuffer_T
   -> OpticalFlowSessionNV
   -> ("pExecuteInfo" ::: Ptr OpticalFlowExecuteInfoNV)
   -> IO ())
vkCmdOpticalFlowExecuteNVPtr
  "pExecuteInfo" ::: Ptr OpticalFlowExecuteInfoNV
pExecuteInfo <- forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (OpticalFlowExecuteInfoNV
executeInfo)
  forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. String -> IO a -> IO a
traceAroundEvent String
"vkCmdOpticalFlowExecuteNV" (Ptr CommandBuffer_T
-> OpticalFlowSessionNV
-> ("pExecuteInfo" ::: Ptr OpticalFlowExecuteInfoNV)
-> IO ()
vkCmdOpticalFlowExecuteNV'
                                                         (CommandBuffer -> Ptr CommandBuffer_T
commandBufferHandle (CommandBuffer
commandBuffer))
                                                         (OpticalFlowSessionNV
session)
                                                         "pExecuteInfo" ::: Ptr OpticalFlowExecuteInfoNV
pExecuteInfo)
  forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ ()


-- | VkPhysicalDeviceOpticalFlowFeaturesNV - Structure describing the optical
-- flow features supported by the implementation
--
-- = Members
--
-- This structure describes the following feature:
--
-- = Description
--
-- If the 'PhysicalDeviceOpticalFlowFeaturesNV' structure is included in
-- the @pNext@ chain of the
-- 'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.PhysicalDeviceFeatures2'
-- structure passed to
-- 'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.getPhysicalDeviceFeatures2',
-- it is filled in to indicate whether each corresponding feature is
-- supported. 'PhysicalDeviceOpticalFlowFeaturesNV' /can/ also be used in
-- the @pNext@ chain of 'Vulkan.Core10.Device.DeviceCreateInfo' to
-- selectively enable these features.
--
-- == Valid Usage (Implicit)
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_NV_optical_flow VK_NV_optical_flow>,
-- 'Vulkan.Core10.FundamentalTypes.Bool32',
-- 'Vulkan.Core10.Enums.StructureType.StructureType'
data PhysicalDeviceOpticalFlowFeaturesNV = PhysicalDeviceOpticalFlowFeaturesNV
  { -- | #features-opticalFlow# @opticalFlow@ indicates whether the
    -- implementation supports optical flow.
    PhysicalDeviceOpticalFlowFeaturesNV -> Bool
opticalFlow :: Bool }
  deriving (Typeable, PhysicalDeviceOpticalFlowFeaturesNV
-> PhysicalDeviceOpticalFlowFeaturesNV -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PhysicalDeviceOpticalFlowFeaturesNV
-> PhysicalDeviceOpticalFlowFeaturesNV -> Bool
$c/= :: PhysicalDeviceOpticalFlowFeaturesNV
-> PhysicalDeviceOpticalFlowFeaturesNV -> Bool
== :: PhysicalDeviceOpticalFlowFeaturesNV
-> PhysicalDeviceOpticalFlowFeaturesNV -> Bool
$c== :: PhysicalDeviceOpticalFlowFeaturesNV
-> PhysicalDeviceOpticalFlowFeaturesNV -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceOpticalFlowFeaturesNV)
#endif
deriving instance Show PhysicalDeviceOpticalFlowFeaturesNV

instance ToCStruct PhysicalDeviceOpticalFlowFeaturesNV where
  withCStruct :: forall b.
PhysicalDeviceOpticalFlowFeaturesNV
-> (Ptr PhysicalDeviceOpticalFlowFeaturesNV -> IO b) -> IO b
withCStruct PhysicalDeviceOpticalFlowFeaturesNV
x Ptr PhysicalDeviceOpticalFlowFeaturesNV -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 forall a b. (a -> b) -> a -> b
$ \Ptr PhysicalDeviceOpticalFlowFeaturesNV
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceOpticalFlowFeaturesNV
p PhysicalDeviceOpticalFlowFeaturesNV
x (Ptr PhysicalDeviceOpticalFlowFeaturesNV -> IO b
f Ptr PhysicalDeviceOpticalFlowFeaturesNV
p)
  pokeCStruct :: forall b.
Ptr PhysicalDeviceOpticalFlowFeaturesNV
-> PhysicalDeviceOpticalFlowFeaturesNV -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceOpticalFlowFeaturesNV
p PhysicalDeviceOpticalFlowFeaturesNV{Bool
opticalFlow :: Bool
$sel:opticalFlow:PhysicalDeviceOpticalFlowFeaturesNV :: PhysicalDeviceOpticalFlowFeaturesNV -> Bool
..} IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceOpticalFlowFeaturesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_OPTICAL_FLOW_FEATURES_NV)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceOpticalFlowFeaturesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceOpticalFlowFeaturesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
opticalFlow))
    IO b
f
  cStructSize :: Int
cStructSize = Int
24
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b. Ptr PhysicalDeviceOpticalFlowFeaturesNV -> IO b -> IO b
pokeZeroCStruct Ptr PhysicalDeviceOpticalFlowFeaturesNV
p IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceOpticalFlowFeaturesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_OPTICAL_FLOW_FEATURES_NV)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceOpticalFlowFeaturesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceOpticalFlowFeaturesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (forall a. Zero a => a
zero))
    IO b
f

instance FromCStruct PhysicalDeviceOpticalFlowFeaturesNV where
  peekCStruct :: Ptr PhysicalDeviceOpticalFlowFeaturesNV
-> IO PhysicalDeviceOpticalFlowFeaturesNV
peekCStruct Ptr PhysicalDeviceOpticalFlowFeaturesNV
p = do
    Bool32
opticalFlow <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceOpticalFlowFeaturesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32))
    forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ Bool -> PhysicalDeviceOpticalFlowFeaturesNV
PhysicalDeviceOpticalFlowFeaturesNV
             (Bool32 -> Bool
bool32ToBool Bool32
opticalFlow)

instance Storable PhysicalDeviceOpticalFlowFeaturesNV where
  sizeOf :: PhysicalDeviceOpticalFlowFeaturesNV -> Int
sizeOf ~PhysicalDeviceOpticalFlowFeaturesNV
_ = Int
24
  alignment :: PhysicalDeviceOpticalFlowFeaturesNV -> Int
alignment ~PhysicalDeviceOpticalFlowFeaturesNV
_ = Int
8
  peek :: Ptr PhysicalDeviceOpticalFlowFeaturesNV
-> IO PhysicalDeviceOpticalFlowFeaturesNV
peek = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
  poke :: Ptr PhysicalDeviceOpticalFlowFeaturesNV
-> PhysicalDeviceOpticalFlowFeaturesNV -> IO ()
poke Ptr PhysicalDeviceOpticalFlowFeaturesNV
ptr PhysicalDeviceOpticalFlowFeaturesNV
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceOpticalFlowFeaturesNV
ptr PhysicalDeviceOpticalFlowFeaturesNV
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())

instance Zero PhysicalDeviceOpticalFlowFeaturesNV where
  zero :: PhysicalDeviceOpticalFlowFeaturesNV
zero = Bool -> PhysicalDeviceOpticalFlowFeaturesNV
PhysicalDeviceOpticalFlowFeaturesNV
           forall a. Zero a => a
zero


-- | VkPhysicalDeviceOpticalFlowPropertiesNV - Structure describing
-- properties supported by VK_NV_optical_flow
--
-- = Description
--
-- If the 'PhysicalDeviceOpticalFlowPropertiesNV' structure is included in
-- the @pNext@ chain of the
-- 'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.PhysicalDeviceProperties2'
-- structure passed to
-- 'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.getPhysicalDeviceProperties2',
-- it is filled in with each corresponding implementation-dependent
-- property.
--
-- == Valid Usage (Implicit)
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_NV_optical_flow VK_NV_optical_flow>,
-- 'Vulkan.Core10.FundamentalTypes.Bool32', 'OpticalFlowGridSizeFlagsNV',
-- 'Vulkan.Core10.Enums.StructureType.StructureType'
data PhysicalDeviceOpticalFlowPropertiesNV = PhysicalDeviceOpticalFlowPropertiesNV
  { -- | #limits-supportedOutputGridSizes# @supportedOutputGridSizes@ are the
    -- supported 'OpticalFlowGridSizeFlagsNV' which can be specified in
    -- 'OpticalFlowSessionCreateInfoNV'::@outputGridSize@.
    PhysicalDeviceOpticalFlowPropertiesNV
-> OpticalFlowGridSizeFlagBitsNV
supportedOutputGridSizes :: OpticalFlowGridSizeFlagsNV
  , -- | #limits-supportedHintGridSizes# @supportedHintGridSizes@ are the
    -- supported 'OpticalFlowGridSizeFlagsNV' which can be specified in
    -- 'OpticalFlowSessionCreateInfoNV'::@hintGridSize@.
    PhysicalDeviceOpticalFlowPropertiesNV
-> OpticalFlowGridSizeFlagBitsNV
supportedHintGridSizes :: OpticalFlowGridSizeFlagsNV
  , -- | #limits-hintSupported# @hintSupported@ is a boolean describing whether
    -- using hint flow vector map is supported in an optical flow session.
    PhysicalDeviceOpticalFlowPropertiesNV -> Bool
hintSupported :: Bool
  , -- | #limits-costSupported# @costSupported@ is a boolean describing whether
    -- cost map generation is supported in an optical flow session.
    PhysicalDeviceOpticalFlowPropertiesNV -> Bool
costSupported :: Bool
  , -- | #limits-bidirectionalFlowSupported# @bidirectionalFlowSupported@ is a
    -- boolean describing whether bi-directional flow generation is supported
    -- in an optical flow session.
    PhysicalDeviceOpticalFlowPropertiesNV -> Bool
bidirectionalFlowSupported :: Bool
  , -- | #limits-globalFlowSupported# @globalFlowSupported@ is a boolean
    -- describing whether global flow vector map generation is supported in an
    -- optical flow session.
    PhysicalDeviceOpticalFlowPropertiesNV -> Bool
globalFlowSupported :: Bool
  , -- | #limits-minWidth# @minWidth@ is the minimum width in pixels for images
    -- used in an optical flow session.
    PhysicalDeviceOpticalFlowPropertiesNV -> Flags
minWidth :: Word32
  , -- | #limits-minHeight# @minHeight@ is the minimum height in pixels for
    -- images used in an optical flow session.
    PhysicalDeviceOpticalFlowPropertiesNV -> Flags
minHeight :: Word32
  , -- | #limits-maxWidth# @maxWidth@ is the maximum width in pixels for images
    -- used in an optical flow session.
    PhysicalDeviceOpticalFlowPropertiesNV -> Flags
maxWidth :: Word32
  , -- | #limits-maxHeight# @maxHeight@ is the maximum height in pixels for
    -- images used in an optical flow session.
    PhysicalDeviceOpticalFlowPropertiesNV -> Flags
maxHeight :: Word32
  , -- | #limits-maxNumRegionsOfInterest# @maxNumRegionsOfInterest@ is the
    -- maximum number of regions of interest which can be used in an optical
    -- flow session. If this @maxNumRegionsOfInterest@ is 0, regions of
    -- interest are not supported in an optical flow session.
    PhysicalDeviceOpticalFlowPropertiesNV -> Flags
maxNumRegionsOfInterest :: Word32
  }
  deriving (Typeable, PhysicalDeviceOpticalFlowPropertiesNV
-> PhysicalDeviceOpticalFlowPropertiesNV -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PhysicalDeviceOpticalFlowPropertiesNV
-> PhysicalDeviceOpticalFlowPropertiesNV -> Bool
$c/= :: PhysicalDeviceOpticalFlowPropertiesNV
-> PhysicalDeviceOpticalFlowPropertiesNV -> Bool
== :: PhysicalDeviceOpticalFlowPropertiesNV
-> PhysicalDeviceOpticalFlowPropertiesNV -> Bool
$c== :: PhysicalDeviceOpticalFlowPropertiesNV
-> PhysicalDeviceOpticalFlowPropertiesNV -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceOpticalFlowPropertiesNV)
#endif
deriving instance Show PhysicalDeviceOpticalFlowPropertiesNV

instance ToCStruct PhysicalDeviceOpticalFlowPropertiesNV where
  withCStruct :: forall b.
PhysicalDeviceOpticalFlowPropertiesNV
-> (Ptr PhysicalDeviceOpticalFlowPropertiesNV -> IO b) -> IO b
withCStruct PhysicalDeviceOpticalFlowPropertiesNV
x Ptr PhysicalDeviceOpticalFlowPropertiesNV -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
64 forall a b. (a -> b) -> a -> b
$ \Ptr PhysicalDeviceOpticalFlowPropertiesNV
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceOpticalFlowPropertiesNV
p PhysicalDeviceOpticalFlowPropertiesNV
x (Ptr PhysicalDeviceOpticalFlowPropertiesNV -> IO b
f Ptr PhysicalDeviceOpticalFlowPropertiesNV
p)
  pokeCStruct :: forall b.
Ptr PhysicalDeviceOpticalFlowPropertiesNV
-> PhysicalDeviceOpticalFlowPropertiesNV -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceOpticalFlowPropertiesNV
p PhysicalDeviceOpticalFlowPropertiesNV{Bool
Flags
OpticalFlowGridSizeFlagBitsNV
maxNumRegionsOfInterest :: Flags
maxHeight :: Flags
maxWidth :: Flags
minHeight :: Flags
minWidth :: Flags
globalFlowSupported :: Bool
bidirectionalFlowSupported :: Bool
costSupported :: Bool
hintSupported :: Bool
supportedHintGridSizes :: OpticalFlowGridSizeFlagBitsNV
supportedOutputGridSizes :: OpticalFlowGridSizeFlagBitsNV
$sel:maxNumRegionsOfInterest:PhysicalDeviceOpticalFlowPropertiesNV :: PhysicalDeviceOpticalFlowPropertiesNV -> Flags
$sel:maxHeight:PhysicalDeviceOpticalFlowPropertiesNV :: PhysicalDeviceOpticalFlowPropertiesNV -> Flags
$sel:maxWidth:PhysicalDeviceOpticalFlowPropertiesNV :: PhysicalDeviceOpticalFlowPropertiesNV -> Flags
$sel:minHeight:PhysicalDeviceOpticalFlowPropertiesNV :: PhysicalDeviceOpticalFlowPropertiesNV -> Flags
$sel:minWidth:PhysicalDeviceOpticalFlowPropertiesNV :: PhysicalDeviceOpticalFlowPropertiesNV -> Flags
$sel:globalFlowSupported:PhysicalDeviceOpticalFlowPropertiesNV :: PhysicalDeviceOpticalFlowPropertiesNV -> Bool
$sel:bidirectionalFlowSupported:PhysicalDeviceOpticalFlowPropertiesNV :: PhysicalDeviceOpticalFlowPropertiesNV -> Bool
$sel:costSupported:PhysicalDeviceOpticalFlowPropertiesNV :: PhysicalDeviceOpticalFlowPropertiesNV -> Bool
$sel:hintSupported:PhysicalDeviceOpticalFlowPropertiesNV :: PhysicalDeviceOpticalFlowPropertiesNV -> Bool
$sel:supportedHintGridSizes:PhysicalDeviceOpticalFlowPropertiesNV :: PhysicalDeviceOpticalFlowPropertiesNV
-> OpticalFlowGridSizeFlagBitsNV
$sel:supportedOutputGridSizes:PhysicalDeviceOpticalFlowPropertiesNV :: PhysicalDeviceOpticalFlowPropertiesNV
-> OpticalFlowGridSizeFlagBitsNV
..} IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceOpticalFlowPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_OPTICAL_FLOW_PROPERTIES_NV)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceOpticalFlowPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceOpticalFlowPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr OpticalFlowGridSizeFlagsNV)) (OpticalFlowGridSizeFlagBitsNV
supportedOutputGridSizes)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceOpticalFlowPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr OpticalFlowGridSizeFlagsNV)) (OpticalFlowGridSizeFlagBitsNV
supportedHintGridSizes)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceOpticalFlowPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
hintSupported))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceOpticalFlowPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
costSupported))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceOpticalFlowPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
bidirectionalFlowSupported))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceOpticalFlowPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
36 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
globalFlowSupported))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceOpticalFlowPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr Word32)) (Flags
minWidth)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceOpticalFlowPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
44 :: Ptr Word32)) (Flags
minHeight)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceOpticalFlowPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr Word32)) (Flags
maxWidth)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceOpticalFlowPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
52 :: Ptr Word32)) (Flags
maxHeight)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceOpticalFlowPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56 :: Ptr Word32)) (Flags
maxNumRegionsOfInterest)
    IO b
f
  cStructSize :: Int
cStructSize = Int
64
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b. Ptr PhysicalDeviceOpticalFlowPropertiesNV -> IO b -> IO b
pokeZeroCStruct Ptr PhysicalDeviceOpticalFlowPropertiesNV
p IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceOpticalFlowPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_OPTICAL_FLOW_PROPERTIES_NV)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceOpticalFlowPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceOpticalFlowPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr OpticalFlowGridSizeFlagsNV)) (forall a. Zero a => a
zero)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceOpticalFlowPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr OpticalFlowGridSizeFlagsNV)) (forall a. Zero a => a
zero)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceOpticalFlowPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (forall a. Zero a => a
zero))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceOpticalFlowPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (forall a. Zero a => a
zero))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceOpticalFlowPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (forall a. Zero a => a
zero))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceOpticalFlowPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
36 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (forall a. Zero a => a
zero))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceOpticalFlowPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr Word32)) (forall a. Zero a => a
zero)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceOpticalFlowPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
44 :: Ptr Word32)) (forall a. Zero a => a
zero)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceOpticalFlowPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr Word32)) (forall a. Zero a => a
zero)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceOpticalFlowPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
52 :: Ptr Word32)) (forall a. Zero a => a
zero)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceOpticalFlowPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56 :: Ptr Word32)) (forall a. Zero a => a
zero)
    IO b
f

instance FromCStruct PhysicalDeviceOpticalFlowPropertiesNV where
  peekCStruct :: Ptr PhysicalDeviceOpticalFlowPropertiesNV
-> IO PhysicalDeviceOpticalFlowPropertiesNV
peekCStruct Ptr PhysicalDeviceOpticalFlowPropertiesNV
p = do
    OpticalFlowGridSizeFlagBitsNV
supportedOutputGridSizes <- forall a. Storable a => Ptr a -> IO a
peek @OpticalFlowGridSizeFlagsNV ((Ptr PhysicalDeviceOpticalFlowPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr OpticalFlowGridSizeFlagsNV))
    OpticalFlowGridSizeFlagBitsNV
supportedHintGridSizes <- forall a. Storable a => Ptr a -> IO a
peek @OpticalFlowGridSizeFlagsNV ((Ptr PhysicalDeviceOpticalFlowPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr OpticalFlowGridSizeFlagsNV))
    Bool32
hintSupported <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceOpticalFlowPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Bool32))
    Bool32
costSupported <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceOpticalFlowPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr Bool32))
    Bool32
bidirectionalFlowSupported <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceOpticalFlowPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Bool32))
    Bool32
globalFlowSupported <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceOpticalFlowPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
36 :: Ptr Bool32))
    Flags
minWidth <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceOpticalFlowPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr Word32))
    Flags
minHeight <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceOpticalFlowPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
44 :: Ptr Word32))
    Flags
maxWidth <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceOpticalFlowPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr Word32))
    Flags
maxHeight <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceOpticalFlowPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
52 :: Ptr Word32))
    Flags
maxNumRegionsOfInterest <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceOpticalFlowPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56 :: Ptr Word32))
    forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ OpticalFlowGridSizeFlagBitsNV
-> OpticalFlowGridSizeFlagBitsNV
-> Bool
-> Bool
-> Bool
-> Bool
-> Flags
-> Flags
-> Flags
-> Flags
-> Flags
-> PhysicalDeviceOpticalFlowPropertiesNV
PhysicalDeviceOpticalFlowPropertiesNV
             OpticalFlowGridSizeFlagBitsNV
supportedOutputGridSizes
             OpticalFlowGridSizeFlagBitsNV
supportedHintGridSizes
             (Bool32 -> Bool
bool32ToBool Bool32
hintSupported)
             (Bool32 -> Bool
bool32ToBool Bool32
costSupported)
             (Bool32 -> Bool
bool32ToBool Bool32
bidirectionalFlowSupported)
             (Bool32 -> Bool
bool32ToBool Bool32
globalFlowSupported)
             Flags
minWidth
             Flags
minHeight
             Flags
maxWidth
             Flags
maxHeight
             Flags
maxNumRegionsOfInterest

instance Storable PhysicalDeviceOpticalFlowPropertiesNV where
  sizeOf :: PhysicalDeviceOpticalFlowPropertiesNV -> Int
sizeOf ~PhysicalDeviceOpticalFlowPropertiesNV
_ = Int
64
  alignment :: PhysicalDeviceOpticalFlowPropertiesNV -> Int
alignment ~PhysicalDeviceOpticalFlowPropertiesNV
_ = Int
8
  peek :: Ptr PhysicalDeviceOpticalFlowPropertiesNV
-> IO PhysicalDeviceOpticalFlowPropertiesNV
peek = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
  poke :: Ptr PhysicalDeviceOpticalFlowPropertiesNV
-> PhysicalDeviceOpticalFlowPropertiesNV -> IO ()
poke Ptr PhysicalDeviceOpticalFlowPropertiesNV
ptr PhysicalDeviceOpticalFlowPropertiesNV
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceOpticalFlowPropertiesNV
ptr PhysicalDeviceOpticalFlowPropertiesNV
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())

instance Zero PhysicalDeviceOpticalFlowPropertiesNV where
  zero :: PhysicalDeviceOpticalFlowPropertiesNV
zero = OpticalFlowGridSizeFlagBitsNV
-> OpticalFlowGridSizeFlagBitsNV
-> Bool
-> Bool
-> Bool
-> Bool
-> Flags
-> Flags
-> Flags
-> Flags
-> Flags
-> PhysicalDeviceOpticalFlowPropertiesNV
PhysicalDeviceOpticalFlowPropertiesNV
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero


-- | VkOpticalFlowImageFormatInfoNV - Structure describing optical flow image
-- format info
--
-- == Valid Usage (Implicit)
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_NV_optical_flow VK_NV_optical_flow>,
-- 'OpticalFlowUsageFlagsNV',
-- 'Vulkan.Core10.Enums.StructureType.StructureType',
-- 'getPhysicalDeviceOpticalFlowImageFormatsNV'
data OpticalFlowImageFormatInfoNV = OpticalFlowImageFormatInfoNV
  { -- | #opticalflow-usage# @usage@ is a bitmask of 'OpticalFlowUsageFlagBitsNV'
    -- describing the intended optical flow usage of the image.
    --
    -- #VUID-VkOpticalFlowImageFormatInfoNV-usage-parameter# @usage@ /must/ be
    -- a valid combination of 'OpticalFlowUsageFlagBitsNV' values
    --
    -- #VUID-VkOpticalFlowImageFormatInfoNV-usage-requiredbitmask# @usage@
    -- /must/ not be @0@
    OpticalFlowImageFormatInfoNV -> OpticalFlowUsageFlagBitsNV
usage :: OpticalFlowUsageFlagsNV }
  deriving (Typeable, OpticalFlowImageFormatInfoNV
-> OpticalFlowImageFormatInfoNV -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: OpticalFlowImageFormatInfoNV
-> OpticalFlowImageFormatInfoNV -> Bool
$c/= :: OpticalFlowImageFormatInfoNV
-> OpticalFlowImageFormatInfoNV -> Bool
== :: OpticalFlowImageFormatInfoNV
-> OpticalFlowImageFormatInfoNV -> Bool
$c== :: OpticalFlowImageFormatInfoNV
-> OpticalFlowImageFormatInfoNV -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (OpticalFlowImageFormatInfoNV)
#endif
deriving instance Show OpticalFlowImageFormatInfoNV

instance ToCStruct OpticalFlowImageFormatInfoNV where
  withCStruct :: forall b.
OpticalFlowImageFormatInfoNV
-> (("pOpticalFlowImageFormatInfo"
     ::: Ptr OpticalFlowImageFormatInfoNV)
    -> IO b)
-> IO b
withCStruct OpticalFlowImageFormatInfoNV
x ("pOpticalFlowImageFormatInfo"
 ::: Ptr OpticalFlowImageFormatInfoNV)
-> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 forall a b. (a -> b) -> a -> b
$ \"pOpticalFlowImageFormatInfo" ::: Ptr OpticalFlowImageFormatInfoNV
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pOpticalFlowImageFormatInfo" ::: Ptr OpticalFlowImageFormatInfoNV
p OpticalFlowImageFormatInfoNV
x (("pOpticalFlowImageFormatInfo"
 ::: Ptr OpticalFlowImageFormatInfoNV)
-> IO b
f "pOpticalFlowImageFormatInfo" ::: Ptr OpticalFlowImageFormatInfoNV
p)
  pokeCStruct :: forall b.
("pOpticalFlowImageFormatInfo"
 ::: Ptr OpticalFlowImageFormatInfoNV)
-> OpticalFlowImageFormatInfoNV -> IO b -> IO b
pokeCStruct "pOpticalFlowImageFormatInfo" ::: Ptr OpticalFlowImageFormatInfoNV
p OpticalFlowImageFormatInfoNV{OpticalFlowUsageFlagBitsNV
usage :: OpticalFlowUsageFlagBitsNV
$sel:usage:OpticalFlowImageFormatInfoNV :: OpticalFlowImageFormatInfoNV -> OpticalFlowUsageFlagBitsNV
..} IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pOpticalFlowImageFormatInfo" ::: Ptr OpticalFlowImageFormatInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_OPTICAL_FLOW_IMAGE_FORMAT_INFO_NV)
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pOpticalFlowImageFormatInfo" ::: Ptr OpticalFlowImageFormatInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pOpticalFlowImageFormatInfo" ::: Ptr OpticalFlowImageFormatInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr OpticalFlowUsageFlagsNV)) (OpticalFlowUsageFlagBitsNV
usage)
    IO b
f
  cStructSize :: Int
cStructSize = Int
24
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b.
("pOpticalFlowImageFormatInfo"
 ::: Ptr OpticalFlowImageFormatInfoNV)
-> IO b -> IO b
pokeZeroCStruct "pOpticalFlowImageFormatInfo" ::: Ptr OpticalFlowImageFormatInfoNV
p IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pOpticalFlowImageFormatInfo" ::: Ptr OpticalFlowImageFormatInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_OPTICAL_FLOW_IMAGE_FORMAT_INFO_NV)
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pOpticalFlowImageFormatInfo" ::: Ptr OpticalFlowImageFormatInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pOpticalFlowImageFormatInfo" ::: Ptr OpticalFlowImageFormatInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr OpticalFlowUsageFlagsNV)) (forall a. Zero a => a
zero)
    IO b
f

instance FromCStruct OpticalFlowImageFormatInfoNV where
  peekCStruct :: ("pOpticalFlowImageFormatInfo"
 ::: Ptr OpticalFlowImageFormatInfoNV)
-> IO OpticalFlowImageFormatInfoNV
peekCStruct "pOpticalFlowImageFormatInfo" ::: Ptr OpticalFlowImageFormatInfoNV
p = do
    OpticalFlowUsageFlagBitsNV
usage <- forall a. Storable a => Ptr a -> IO a
peek @OpticalFlowUsageFlagsNV (("pOpticalFlowImageFormatInfo" ::: Ptr OpticalFlowImageFormatInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr OpticalFlowUsageFlagsNV))
    forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ OpticalFlowUsageFlagBitsNV -> OpticalFlowImageFormatInfoNV
OpticalFlowImageFormatInfoNV
             OpticalFlowUsageFlagBitsNV
usage

instance Storable OpticalFlowImageFormatInfoNV where
  sizeOf :: OpticalFlowImageFormatInfoNV -> Int
sizeOf ~OpticalFlowImageFormatInfoNV
_ = Int
24
  alignment :: OpticalFlowImageFormatInfoNV -> Int
alignment ~OpticalFlowImageFormatInfoNV
_ = Int
8
  peek :: ("pOpticalFlowImageFormatInfo"
 ::: Ptr OpticalFlowImageFormatInfoNV)
-> IO OpticalFlowImageFormatInfoNV
peek = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
  poke :: ("pOpticalFlowImageFormatInfo"
 ::: Ptr OpticalFlowImageFormatInfoNV)
-> OpticalFlowImageFormatInfoNV -> IO ()
poke "pOpticalFlowImageFormatInfo" ::: Ptr OpticalFlowImageFormatInfoNV
ptr OpticalFlowImageFormatInfoNV
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pOpticalFlowImageFormatInfo" ::: Ptr OpticalFlowImageFormatInfoNV
ptr OpticalFlowImageFormatInfoNV
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())

instance Zero OpticalFlowImageFormatInfoNV where
  zero :: OpticalFlowImageFormatInfoNV
zero = OpticalFlowUsageFlagBitsNV -> OpticalFlowImageFormatInfoNV
OpticalFlowImageFormatInfoNV
           forall a. Zero a => a
zero


-- | VkOpticalFlowImageFormatPropertiesNV - Structure describing properties
-- of an optical flow image format
--
-- == Valid Usage (Implicit)
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_NV_optical_flow VK_NV_optical_flow>,
-- 'Vulkan.Core10.Enums.Format.Format',
-- 'Vulkan.Core10.Enums.StructureType.StructureType',
-- 'getPhysicalDeviceOpticalFlowImageFormatsNV'
data OpticalFlowImageFormatPropertiesNV = OpticalFlowImageFormatPropertiesNV
  { -- | #opticalflow-format# @format@ is a 'Vulkan.Core10.Enums.Format.Format'
    -- that specifies the format that can be used with the specified optical
    -- flow image usages.
    OpticalFlowImageFormatPropertiesNV -> Format
format :: Format }
  deriving (Typeable, OpticalFlowImageFormatPropertiesNV
-> OpticalFlowImageFormatPropertiesNV -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: OpticalFlowImageFormatPropertiesNV
-> OpticalFlowImageFormatPropertiesNV -> Bool
$c/= :: OpticalFlowImageFormatPropertiesNV
-> OpticalFlowImageFormatPropertiesNV -> Bool
== :: OpticalFlowImageFormatPropertiesNV
-> OpticalFlowImageFormatPropertiesNV -> Bool
$c== :: OpticalFlowImageFormatPropertiesNV
-> OpticalFlowImageFormatPropertiesNV -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (OpticalFlowImageFormatPropertiesNV)
#endif
deriving instance Show OpticalFlowImageFormatPropertiesNV

instance ToCStruct OpticalFlowImageFormatPropertiesNV where
  withCStruct :: forall b.
OpticalFlowImageFormatPropertiesNV
-> (("pImageFormatProperties"
     ::: Ptr OpticalFlowImageFormatPropertiesNV)
    -> IO b)
-> IO b
withCStruct OpticalFlowImageFormatPropertiesNV
x ("pImageFormatProperties"
 ::: Ptr OpticalFlowImageFormatPropertiesNV)
-> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 forall a b. (a -> b) -> a -> b
$ \"pImageFormatProperties" ::: Ptr OpticalFlowImageFormatPropertiesNV
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pImageFormatProperties" ::: Ptr OpticalFlowImageFormatPropertiesNV
p OpticalFlowImageFormatPropertiesNV
x (("pImageFormatProperties"
 ::: Ptr OpticalFlowImageFormatPropertiesNV)
-> IO b
f "pImageFormatProperties" ::: Ptr OpticalFlowImageFormatPropertiesNV
p)
  pokeCStruct :: forall b.
("pImageFormatProperties"
 ::: Ptr OpticalFlowImageFormatPropertiesNV)
-> OpticalFlowImageFormatPropertiesNV -> IO b -> IO b
pokeCStruct "pImageFormatProperties" ::: Ptr OpticalFlowImageFormatPropertiesNV
p OpticalFlowImageFormatPropertiesNV{Format
format :: Format
$sel:format:OpticalFlowImageFormatPropertiesNV :: OpticalFlowImageFormatPropertiesNV -> Format
..} IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pImageFormatProperties" ::: Ptr OpticalFlowImageFormatPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_OPTICAL_FLOW_IMAGE_FORMAT_PROPERTIES_NV)
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pImageFormatProperties" ::: Ptr OpticalFlowImageFormatPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pImageFormatProperties" ::: Ptr OpticalFlowImageFormatPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Format)) (Format
format)
    IO b
f
  cStructSize :: Int
cStructSize = Int
24
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b.
("pImageFormatProperties"
 ::: Ptr OpticalFlowImageFormatPropertiesNV)
-> IO b -> IO b
pokeZeroCStruct "pImageFormatProperties" ::: Ptr OpticalFlowImageFormatPropertiesNV
p IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pImageFormatProperties" ::: Ptr OpticalFlowImageFormatPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_OPTICAL_FLOW_IMAGE_FORMAT_PROPERTIES_NV)
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pImageFormatProperties" ::: Ptr OpticalFlowImageFormatPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pImageFormatProperties" ::: Ptr OpticalFlowImageFormatPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Format)) (forall a. Zero a => a
zero)
    IO b
f

instance FromCStruct OpticalFlowImageFormatPropertiesNV where
  peekCStruct :: ("pImageFormatProperties"
 ::: Ptr OpticalFlowImageFormatPropertiesNV)
-> IO OpticalFlowImageFormatPropertiesNV
peekCStruct "pImageFormatProperties" ::: Ptr OpticalFlowImageFormatPropertiesNV
p = do
    Format
format <- forall a. Storable a => Ptr a -> IO a
peek @Format (("pImageFormatProperties" ::: Ptr OpticalFlowImageFormatPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Format))
    forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ Format -> OpticalFlowImageFormatPropertiesNV
OpticalFlowImageFormatPropertiesNV
             Format
format

instance Storable OpticalFlowImageFormatPropertiesNV where
  sizeOf :: OpticalFlowImageFormatPropertiesNV -> Int
sizeOf ~OpticalFlowImageFormatPropertiesNV
_ = Int
24
  alignment :: OpticalFlowImageFormatPropertiesNV -> Int
alignment ~OpticalFlowImageFormatPropertiesNV
_ = Int
8
  peek :: ("pImageFormatProperties"
 ::: Ptr OpticalFlowImageFormatPropertiesNV)
-> IO OpticalFlowImageFormatPropertiesNV
peek = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
  poke :: ("pImageFormatProperties"
 ::: Ptr OpticalFlowImageFormatPropertiesNV)
-> OpticalFlowImageFormatPropertiesNV -> IO ()
poke "pImageFormatProperties" ::: Ptr OpticalFlowImageFormatPropertiesNV
ptr OpticalFlowImageFormatPropertiesNV
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pImageFormatProperties" ::: Ptr OpticalFlowImageFormatPropertiesNV
ptr OpticalFlowImageFormatPropertiesNV
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())

instance Zero OpticalFlowImageFormatPropertiesNV where
  zero :: OpticalFlowImageFormatPropertiesNV
zero = Format -> OpticalFlowImageFormatPropertiesNV
OpticalFlowImageFormatPropertiesNV
           forall a. Zero a => a
zero


-- | VkOpticalFlowSessionCreateInfoNV - Structure specifying parameters of a
-- newly created optical flow session
--
-- == Valid Usage
--
-- -   #VUID-VkOpticalFlowSessionCreateInfoNV-width-07581# @width@ /must/
--     be greater than or equal to
--     'PhysicalDeviceOpticalFlowPropertiesNV'::@minWidth@ and less than or
--     equal to 'PhysicalDeviceOpticalFlowPropertiesNV'::@maxWidth@
--
-- -   #VUID-VkOpticalFlowSessionCreateInfoNV-height-07582# @height@ /must/
--     be greater than or equal to
--     'PhysicalDeviceOpticalFlowPropertiesNV'::@minHeight@ and less than
--     or equal to 'PhysicalDeviceOpticalFlowPropertiesNV'::@maxHeight@
--
-- -   #VUID-VkOpticalFlowSessionCreateInfoNV-imageFormat-07583#
--     @imageFormat@ /must/ be one of the formats returned by
--     'getPhysicalDeviceOpticalFlowImageFormatsNV' for
--     'OPTICAL_FLOW_USAGE_INPUT_BIT_NV'
--
-- -   #VUID-VkOpticalFlowSessionCreateInfoNV-flowVectorFormat-07584#
--     @flowVectorFormat@ /must/ be one of the formats returned by
--     'getPhysicalDeviceOpticalFlowImageFormatsNV' for
--     'OPTICAL_FLOW_USAGE_OUTPUT_BIT_NV'
--
-- -   #VUID-VkOpticalFlowSessionCreateInfoNV-costFormat-07585#
--     @costFormat@ /must/ be one of the formats returned by
--     'getPhysicalDeviceOpticalFlowImageFormatsNV' for
--     'OPTICAL_FLOW_USAGE_COST_BIT_NV' if
--     'OPTICAL_FLOW_SESSION_CREATE_ENABLE_COST_BIT_NV' is set in @flags@
--
-- -   #VUID-VkOpticalFlowSessionCreateInfoNV-outputGridSize-07586#
--     @outputGridSize@ /must/ be exactly one of the bits reported in
--     'PhysicalDeviceOpticalFlowPropertiesNV'::@supportedOutputGridSizes@
--
-- -   #VUID-VkOpticalFlowSessionCreateInfoNV-hintGridSize-07587#
--     @hintGridSize@ /must/ be exactly one of the bits reported in
--     'PhysicalDeviceOpticalFlowPropertiesNV'::@supportedHintGridSizes@ if
--     'OPTICAL_FLOW_SESSION_CREATE_ENABLE_HINT_BIT_NV' is set in @flags@
--
-- -   #VUID-VkOpticalFlowSessionCreateInfoNV-flags-07588#
--     'OPTICAL_FLOW_SESSION_CREATE_ENABLE_HINT_BIT_NV' /must/ not be set
--     in @flags@ if
--     'PhysicalDeviceOpticalFlowPropertiesNV'::@hintSupported@ is
--     'Vulkan.Core10.FundamentalTypes.FALSE'
--
-- -   #VUID-VkOpticalFlowSessionCreateInfoNV-flags-07589#
--     'OPTICAL_FLOW_SESSION_CREATE_ENABLE_COST_BIT_NV' /must/ not be set
--     in @flags@ if
--     'PhysicalDeviceOpticalFlowPropertiesNV'::@costSupported@ is
--     'Vulkan.Core10.FundamentalTypes.FALSE'
--
-- -   #VUID-VkOpticalFlowSessionCreateInfoNV-flags-07590#
--     'OPTICAL_FLOW_SESSION_CREATE_ENABLE_GLOBAL_FLOW_BIT_NV' /must/ not
--     be set in @flags@ if
--     'PhysicalDeviceOpticalFlowPropertiesNV'::@globalFlowSupported@ is
--     'Vulkan.Core10.FundamentalTypes.FALSE'
--
-- -   #VUID-VkOpticalFlowSessionCreateInfoNV-flags-07591#
--     'OPTICAL_FLOW_SESSION_CREATE_ALLOW_REGIONS_BIT_NV' /must/ not be set
--     in @flags@ if
--     'PhysicalDeviceOpticalFlowPropertiesNV'::@maxNumRegionsOfInterest@
--     is 0
--
-- -   #VUID-VkOpticalFlowSessionCreateInfoNV-flags-07592#
--     'OPTICAL_FLOW_SESSION_CREATE_BOTH_DIRECTIONS_BIT_NV' /must/ not be
--     set in @flags@ if
--     'PhysicalDeviceOpticalFlowPropertiesNV'::@bidirectionalFlowSupported@
--     is 'Vulkan.Core10.FundamentalTypes.FALSE'
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-VkOpticalFlowSessionCreateInfoNV-sType-sType# @sType@ /must/
--     be
--     'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_OPTICAL_FLOW_SESSION_CREATE_INFO_NV'
--
-- -   #VUID-VkOpticalFlowSessionCreateInfoNV-pNext-pNext# @pNext@ /must/
--     be @NULL@ or a pointer to a valid instance of
--     'OpticalFlowSessionCreatePrivateDataInfoNV'
--
-- -   #VUID-VkOpticalFlowSessionCreateInfoNV-sType-unique# The @sType@
--     value of each struct in the @pNext@ chain /must/ be unique
--
-- -   #VUID-VkOpticalFlowSessionCreateInfoNV-imageFormat-parameter#
--     @imageFormat@ /must/ be a valid 'Vulkan.Core10.Enums.Format.Format'
--     value
--
-- -   #VUID-VkOpticalFlowSessionCreateInfoNV-flowVectorFormat-parameter#
--     @flowVectorFormat@ /must/ be a valid
--     'Vulkan.Core10.Enums.Format.Format' value
--
-- -   #VUID-VkOpticalFlowSessionCreateInfoNV-costFormat-parameter# If
--     @costFormat@ is not @0@, @costFormat@ /must/ be a valid
--     'Vulkan.Core10.Enums.Format.Format' value
--
-- -   #VUID-VkOpticalFlowSessionCreateInfoNV-outputGridSize-parameter#
--     @outputGridSize@ /must/ be a valid combination of
--     'OpticalFlowGridSizeFlagBitsNV' values
--
-- -   #VUID-VkOpticalFlowSessionCreateInfoNV-outputGridSize-requiredbitmask#
--     @outputGridSize@ /must/ not be @0@
--
-- -   #VUID-VkOpticalFlowSessionCreateInfoNV-hintGridSize-parameter#
--     @hintGridSize@ /must/ be a valid combination of
--     'OpticalFlowGridSizeFlagBitsNV' values
--
-- -   #VUID-VkOpticalFlowSessionCreateInfoNV-performanceLevel-parameter#
--     If @performanceLevel@ is not @0@, @performanceLevel@ /must/ be a
--     valid 'OpticalFlowPerformanceLevelNV' value
--
-- -   #VUID-VkOpticalFlowSessionCreateInfoNV-flags-parameter# @flags@
--     /must/ be a valid combination of
--     'OpticalFlowSessionCreateFlagBitsNV' values
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_NV_optical_flow VK_NV_optical_flow>,
-- 'Vulkan.Core10.Enums.Format.Format', 'OpticalFlowGridSizeFlagsNV',
-- 'OpticalFlowPerformanceLevelNV', 'OpticalFlowSessionCreateFlagsNV',
-- 'Vulkan.Core10.Enums.StructureType.StructureType',
-- 'createOpticalFlowSessionNV'
data OpticalFlowSessionCreateInfoNV (es :: [Type]) = OpticalFlowSessionCreateInfoNV
  { -- | @pNext@ is @NULL@ or a pointer to a structure extending this structure.
    forall (es :: [*]). OpticalFlowSessionCreateInfoNV es -> Chain es
next :: Chain es
  , -- | @width@ is the width in pixels of the input or reference frame to be
    -- bound to this optical flow session.
    forall (es :: [*]). OpticalFlowSessionCreateInfoNV es -> Flags
width :: Word32
  , -- | @height@ is the height in pixels of the input or reference frame to be
    -- bound to this optical flow session.
    forall (es :: [*]). OpticalFlowSessionCreateInfoNV es -> Flags
height :: Word32
  , -- | @imageFormat@ is the 'Vulkan.Core10.Enums.Format.Format' of the input
    -- and reference frame to be bound to this optical flow session.
    forall (es :: [*]). OpticalFlowSessionCreateInfoNV es -> Format
imageFormat :: Format
  , -- | @flowVectorFormat@ is the 'Vulkan.Core10.Enums.Format.Format' of the
    -- flow vector maps (output or hint) to be bound to this optical flow
    -- session.
    forall (es :: [*]). OpticalFlowSessionCreateInfoNV es -> Format
flowVectorFormat :: Format
  , -- | @costFormat@ is the 'Vulkan.Core10.Enums.Format.Format' of the cost maps
    -- to be bound to this optical flow session.
    forall (es :: [*]). OpticalFlowSessionCreateInfoNV es -> Format
costFormat :: Format
  , -- | @outputGridSize@ is exactly one bit of 'OpticalFlowGridSizeFlagsNV'
    -- 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 'OpticalFlowSessionCreateInfoNV'::@width@ and
    -- 'OpticalFlowSessionCreateInfoNV'::@height@ divided by
    -- 'OpticalFlowSessionCreateInfoNV'::@outputGridSize@.
    forall (es :: [*]).
OpticalFlowSessionCreateInfoNV es -> OpticalFlowGridSizeFlagBitsNV
outputGridSize :: OpticalFlowGridSizeFlagsNV
  , -- | @hintGridSize@ is one exactly bit of 'OpticalFlowGridSizeFlagsNV'
    -- specifying the grid size of of the hint flow vector maps to be bound to
    -- this optical flow session. The size of the hint maps is determined by
    -- 'OpticalFlowSessionCreateInfoNV'::@width@ and
    -- 'OpticalFlowSessionCreateInfoNV'::@height@ divided by
    -- 'OpticalFlowSessionCreateInfoNV'::@hintGridSize@.
    forall (es :: [*]).
OpticalFlowSessionCreateInfoNV es -> OpticalFlowGridSizeFlagBitsNV
hintGridSize :: OpticalFlowGridSizeFlagsNV
  , -- | @performanceLevel@ is the 'OpticalFlowPerformanceLevelNV' used for this
    -- optical flow session.
    forall (es :: [*]).
OpticalFlowSessionCreateInfoNV es -> OpticalFlowPerformanceLevelNV
performanceLevel :: OpticalFlowPerformanceLevelNV
  , -- | @flags@ are the 'OpticalFlowSessionCreateFlagsNV' used for this optical
    -- flow session.
    forall (es :: [*]).
OpticalFlowSessionCreateInfoNV es
-> OpticalFlowSessionCreateFlagBitsNV
flags :: OpticalFlowSessionCreateFlagsNV
  }
  deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (OpticalFlowSessionCreateInfoNV (es :: [Type]))
#endif
deriving instance Show (Chain es) => Show (OpticalFlowSessionCreateInfoNV es)

instance Extensible OpticalFlowSessionCreateInfoNV where
  extensibleTypeName :: String
extensibleTypeName = String
"OpticalFlowSessionCreateInfoNV"
  setNext :: forall (ds :: [*]) (es :: [*]).
OpticalFlowSessionCreateInfoNV ds
-> Chain es -> OpticalFlowSessionCreateInfoNV es
setNext OpticalFlowSessionCreateInfoNV{Flags
Chain ds
Format
OpticalFlowSessionCreateFlagBitsNV
OpticalFlowPerformanceLevelNV
OpticalFlowGridSizeFlagBitsNV
flags :: OpticalFlowSessionCreateFlagBitsNV
performanceLevel :: OpticalFlowPerformanceLevelNV
hintGridSize :: OpticalFlowGridSizeFlagBitsNV
outputGridSize :: OpticalFlowGridSizeFlagBitsNV
costFormat :: Format
flowVectorFormat :: Format
imageFormat :: Format
height :: Flags
width :: Flags
next :: Chain ds
$sel:flags:OpticalFlowSessionCreateInfoNV :: forall (es :: [*]).
OpticalFlowSessionCreateInfoNV es
-> OpticalFlowSessionCreateFlagBitsNV
$sel:performanceLevel:OpticalFlowSessionCreateInfoNV :: forall (es :: [*]).
OpticalFlowSessionCreateInfoNV es -> OpticalFlowPerformanceLevelNV
$sel:hintGridSize:OpticalFlowSessionCreateInfoNV :: forall (es :: [*]).
OpticalFlowSessionCreateInfoNV es -> OpticalFlowGridSizeFlagBitsNV
$sel:outputGridSize:OpticalFlowSessionCreateInfoNV :: forall (es :: [*]).
OpticalFlowSessionCreateInfoNV es -> OpticalFlowGridSizeFlagBitsNV
$sel:costFormat:OpticalFlowSessionCreateInfoNV :: forall (es :: [*]). OpticalFlowSessionCreateInfoNV es -> Format
$sel:flowVectorFormat:OpticalFlowSessionCreateInfoNV :: forall (es :: [*]). OpticalFlowSessionCreateInfoNV es -> Format
$sel:imageFormat:OpticalFlowSessionCreateInfoNV :: forall (es :: [*]). OpticalFlowSessionCreateInfoNV es -> Format
$sel:height:OpticalFlowSessionCreateInfoNV :: forall (es :: [*]). OpticalFlowSessionCreateInfoNV es -> Flags
$sel:width:OpticalFlowSessionCreateInfoNV :: forall (es :: [*]). OpticalFlowSessionCreateInfoNV es -> Flags
$sel:next:OpticalFlowSessionCreateInfoNV :: forall (es :: [*]). OpticalFlowSessionCreateInfoNV es -> Chain es
..} Chain es
next' = OpticalFlowSessionCreateInfoNV{$sel:next:OpticalFlowSessionCreateInfoNV :: Chain es
next = Chain es
next', Flags
Format
OpticalFlowSessionCreateFlagBitsNV
OpticalFlowPerformanceLevelNV
OpticalFlowGridSizeFlagBitsNV
flags :: OpticalFlowSessionCreateFlagBitsNV
performanceLevel :: OpticalFlowPerformanceLevelNV
hintGridSize :: OpticalFlowGridSizeFlagBitsNV
outputGridSize :: OpticalFlowGridSizeFlagBitsNV
costFormat :: Format
flowVectorFormat :: Format
imageFormat :: Format
height :: Flags
width :: Flags
$sel:flags:OpticalFlowSessionCreateInfoNV :: OpticalFlowSessionCreateFlagBitsNV
$sel:performanceLevel:OpticalFlowSessionCreateInfoNV :: OpticalFlowPerformanceLevelNV
$sel:hintGridSize:OpticalFlowSessionCreateInfoNV :: OpticalFlowGridSizeFlagBitsNV
$sel:outputGridSize:OpticalFlowSessionCreateInfoNV :: OpticalFlowGridSizeFlagBitsNV
$sel:costFormat:OpticalFlowSessionCreateInfoNV :: Format
$sel:flowVectorFormat:OpticalFlowSessionCreateInfoNV :: Format
$sel:imageFormat:OpticalFlowSessionCreateInfoNV :: Format
$sel:height:OpticalFlowSessionCreateInfoNV :: Flags
$sel:width:OpticalFlowSessionCreateInfoNV :: Flags
..}
  getNext :: forall (es :: [*]). OpticalFlowSessionCreateInfoNV es -> Chain es
getNext OpticalFlowSessionCreateInfoNV{Flags
Chain es
Format
OpticalFlowSessionCreateFlagBitsNV
OpticalFlowPerformanceLevelNV
OpticalFlowGridSizeFlagBitsNV
flags :: OpticalFlowSessionCreateFlagBitsNV
performanceLevel :: OpticalFlowPerformanceLevelNV
hintGridSize :: OpticalFlowGridSizeFlagBitsNV
outputGridSize :: OpticalFlowGridSizeFlagBitsNV
costFormat :: Format
flowVectorFormat :: Format
imageFormat :: Format
height :: Flags
width :: Flags
next :: Chain es
$sel:flags:OpticalFlowSessionCreateInfoNV :: forall (es :: [*]).
OpticalFlowSessionCreateInfoNV es
-> OpticalFlowSessionCreateFlagBitsNV
$sel:performanceLevel:OpticalFlowSessionCreateInfoNV :: forall (es :: [*]).
OpticalFlowSessionCreateInfoNV es -> OpticalFlowPerformanceLevelNV
$sel:hintGridSize:OpticalFlowSessionCreateInfoNV :: forall (es :: [*]).
OpticalFlowSessionCreateInfoNV es -> OpticalFlowGridSizeFlagBitsNV
$sel:outputGridSize:OpticalFlowSessionCreateInfoNV :: forall (es :: [*]).
OpticalFlowSessionCreateInfoNV es -> OpticalFlowGridSizeFlagBitsNV
$sel:costFormat:OpticalFlowSessionCreateInfoNV :: forall (es :: [*]). OpticalFlowSessionCreateInfoNV es -> Format
$sel:flowVectorFormat:OpticalFlowSessionCreateInfoNV :: forall (es :: [*]). OpticalFlowSessionCreateInfoNV es -> Format
$sel:imageFormat:OpticalFlowSessionCreateInfoNV :: forall (es :: [*]). OpticalFlowSessionCreateInfoNV es -> Format
$sel:height:OpticalFlowSessionCreateInfoNV :: forall (es :: [*]). OpticalFlowSessionCreateInfoNV es -> Flags
$sel:width:OpticalFlowSessionCreateInfoNV :: forall (es :: [*]). OpticalFlowSessionCreateInfoNV es -> Flags
$sel:next:OpticalFlowSessionCreateInfoNV :: forall (es :: [*]). OpticalFlowSessionCreateInfoNV es -> Chain es
..} = Chain es
next
  extends :: forall e b proxy. Typeable e => proxy e -> (Extends OpticalFlowSessionCreateInfoNV e => b) -> Maybe b
  extends :: forall e b (proxy :: * -> *).
Typeable e =>
proxy e
-> (Extends OpticalFlowSessionCreateInfoNV e => b) -> Maybe b
extends proxy e
_ Extends OpticalFlowSessionCreateInfoNV e => b
f
    | Just e :~: OpticalFlowSessionCreatePrivateDataInfoNV
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @OpticalFlowSessionCreatePrivateDataInfoNV = forall a. a -> Maybe a
Just Extends OpticalFlowSessionCreateInfoNV e => b
f
    | Bool
otherwise = forall a. Maybe a
Nothing

instance ( Extendss OpticalFlowSessionCreateInfoNV es
         , PokeChain es ) => ToCStruct (OpticalFlowSessionCreateInfoNV es) where
  withCStruct :: forall b.
OpticalFlowSessionCreateInfoNV es
-> (Ptr (OpticalFlowSessionCreateInfoNV es) -> IO b) -> IO b
withCStruct OpticalFlowSessionCreateInfoNV es
x Ptr (OpticalFlowSessionCreateInfoNV es) -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
56 forall a b. (a -> b) -> a -> b
$ \Ptr (OpticalFlowSessionCreateInfoNV es)
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr (OpticalFlowSessionCreateInfoNV es)
p OpticalFlowSessionCreateInfoNV es
x (Ptr (OpticalFlowSessionCreateInfoNV es) -> IO b
f Ptr (OpticalFlowSessionCreateInfoNV es)
p)
  pokeCStruct :: forall b.
Ptr (OpticalFlowSessionCreateInfoNV es)
-> OpticalFlowSessionCreateInfoNV es -> IO b -> IO b
pokeCStruct Ptr (OpticalFlowSessionCreateInfoNV es)
p OpticalFlowSessionCreateInfoNV{Flags
Chain es
Format
OpticalFlowSessionCreateFlagBitsNV
OpticalFlowPerformanceLevelNV
OpticalFlowGridSizeFlagBitsNV
flags :: OpticalFlowSessionCreateFlagBitsNV
performanceLevel :: OpticalFlowPerformanceLevelNV
hintGridSize :: OpticalFlowGridSizeFlagBitsNV
outputGridSize :: OpticalFlowGridSizeFlagBitsNV
costFormat :: Format
flowVectorFormat :: Format
imageFormat :: Format
height :: Flags
width :: Flags
next :: Chain es
$sel:flags:OpticalFlowSessionCreateInfoNV :: forall (es :: [*]).
OpticalFlowSessionCreateInfoNV es
-> OpticalFlowSessionCreateFlagBitsNV
$sel:performanceLevel:OpticalFlowSessionCreateInfoNV :: forall (es :: [*]).
OpticalFlowSessionCreateInfoNV es -> OpticalFlowPerformanceLevelNV
$sel:hintGridSize:OpticalFlowSessionCreateInfoNV :: forall (es :: [*]).
OpticalFlowSessionCreateInfoNV es -> OpticalFlowGridSizeFlagBitsNV
$sel:outputGridSize:OpticalFlowSessionCreateInfoNV :: forall (es :: [*]).
OpticalFlowSessionCreateInfoNV es -> OpticalFlowGridSizeFlagBitsNV
$sel:costFormat:OpticalFlowSessionCreateInfoNV :: forall (es :: [*]). OpticalFlowSessionCreateInfoNV es -> Format
$sel:flowVectorFormat:OpticalFlowSessionCreateInfoNV :: forall (es :: [*]). OpticalFlowSessionCreateInfoNV es -> Format
$sel:imageFormat:OpticalFlowSessionCreateInfoNV :: forall (es :: [*]). OpticalFlowSessionCreateInfoNV es -> Format
$sel:height:OpticalFlowSessionCreateInfoNV :: forall (es :: [*]). OpticalFlowSessionCreateInfoNV es -> Flags
$sel:width:OpticalFlowSessionCreateInfoNV :: forall (es :: [*]). OpticalFlowSessionCreateInfoNV es -> Flags
$sel:next:OpticalFlowSessionCreateInfoNV :: forall (es :: [*]). OpticalFlowSessionCreateInfoNV es -> Chain es
..} IO b
f = forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT forall a b. (a -> b) -> a -> b
$ do
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (OpticalFlowSessionCreateInfoNV es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_OPTICAL_FLOW_SESSION_CREATE_INFO_NV)
    Ptr ()
pNext'' <- forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap forall a b. Ptr a -> Ptr b
castPtr forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall (es :: [*]) a.
PokeChain es =>
Chain es -> (Ptr (Chain es) -> IO a) -> IO a
withChain (Chain es
next)
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (OpticalFlowSessionCreateInfoNV es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) Ptr ()
pNext''
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (OpticalFlowSessionCreateInfoNV es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32)) (Flags
width)
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (OpticalFlowSessionCreateInfoNV es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Word32)) (Flags
height)
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (OpticalFlowSessionCreateInfoNV es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Format)) (Format
imageFormat)
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (OpticalFlowSessionCreateInfoNV es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr Format)) (Format
flowVectorFormat)
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (OpticalFlowSessionCreateInfoNV es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Format)) (Format
costFormat)
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (OpticalFlowSessionCreateInfoNV es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
36 :: Ptr OpticalFlowGridSizeFlagsNV)) (OpticalFlowGridSizeFlagBitsNV
outputGridSize)
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (OpticalFlowSessionCreateInfoNV es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr OpticalFlowGridSizeFlagsNV)) (OpticalFlowGridSizeFlagBitsNV
hintGridSize)
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (OpticalFlowSessionCreateInfoNV es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
44 :: Ptr OpticalFlowPerformanceLevelNV)) (OpticalFlowPerformanceLevelNV
performanceLevel)
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (OpticalFlowSessionCreateInfoNV es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr OpticalFlowSessionCreateFlagsNV)) (OpticalFlowSessionCreateFlagBitsNV
flags)
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ IO b
f
  cStructSize :: Int
cStructSize = Int
56
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b. Ptr (OpticalFlowSessionCreateInfoNV es) -> IO b -> IO b
pokeZeroCStruct Ptr (OpticalFlowSessionCreateInfoNV es)
p IO b
f = forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT forall a b. (a -> b) -> a -> b
$ do
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (OpticalFlowSessionCreateInfoNV es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_OPTICAL_FLOW_SESSION_CREATE_INFO_NV)
    Ptr ()
pNext' <- forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap forall a b. Ptr a -> Ptr b
castPtr forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall (es :: [*]) a.
PokeChain es =>
(Ptr (Chain es) -> IO a) -> IO a
withZeroChain @es
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (OpticalFlowSessionCreateInfoNV es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) Ptr ()
pNext'
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (OpticalFlowSessionCreateInfoNV es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32)) (forall a. Zero a => a
zero)
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (OpticalFlowSessionCreateInfoNV es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Word32)) (forall a. Zero a => a
zero)
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (OpticalFlowSessionCreateInfoNV es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Format)) (forall a. Zero a => a
zero)
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (OpticalFlowSessionCreateInfoNV es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr Format)) (forall a. Zero a => a
zero)
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (OpticalFlowSessionCreateInfoNV es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
36 :: Ptr OpticalFlowGridSizeFlagsNV)) (forall a. Zero a => a
zero)
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ IO b
f

instance ( Extendss OpticalFlowSessionCreateInfoNV es
         , PeekChain es ) => FromCStruct (OpticalFlowSessionCreateInfoNV es) where
  peekCStruct :: Ptr (OpticalFlowSessionCreateInfoNV es)
-> IO (OpticalFlowSessionCreateInfoNV es)
peekCStruct Ptr (OpticalFlowSessionCreateInfoNV es)
p = do
    Ptr ()
pNext <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr ()) ((Ptr (OpticalFlowSessionCreateInfoNV es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ())))
    Chain es
next <- forall (es :: [*]). PeekChain es => Ptr (Chain es) -> IO (Chain es)
peekChain (forall a b. Ptr a -> Ptr b
castPtr Ptr ()
pNext)
    Flags
width <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr (OpticalFlowSessionCreateInfoNV es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32))
    Flags
height <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr (OpticalFlowSessionCreateInfoNV es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Word32))
    Format
imageFormat <- forall a. Storable a => Ptr a -> IO a
peek @Format ((Ptr (OpticalFlowSessionCreateInfoNV es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Format))
    Format
flowVectorFormat <- forall a. Storable a => Ptr a -> IO a
peek @Format ((Ptr (OpticalFlowSessionCreateInfoNV es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr Format))
    Format
costFormat <- forall a. Storable a => Ptr a -> IO a
peek @Format ((Ptr (OpticalFlowSessionCreateInfoNV es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Format))
    OpticalFlowGridSizeFlagBitsNV
outputGridSize <- forall a. Storable a => Ptr a -> IO a
peek @OpticalFlowGridSizeFlagsNV ((Ptr (OpticalFlowSessionCreateInfoNV es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
36 :: Ptr OpticalFlowGridSizeFlagsNV))
    OpticalFlowGridSizeFlagBitsNV
hintGridSize <- forall a. Storable a => Ptr a -> IO a
peek @OpticalFlowGridSizeFlagsNV ((Ptr (OpticalFlowSessionCreateInfoNV es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr OpticalFlowGridSizeFlagsNV))
    OpticalFlowPerformanceLevelNV
performanceLevel <- forall a. Storable a => Ptr a -> IO a
peek @OpticalFlowPerformanceLevelNV ((Ptr (OpticalFlowSessionCreateInfoNV es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
44 :: Ptr OpticalFlowPerformanceLevelNV))
    OpticalFlowSessionCreateFlagBitsNV
flags <- forall a. Storable a => Ptr a -> IO a
peek @OpticalFlowSessionCreateFlagsNV ((Ptr (OpticalFlowSessionCreateInfoNV es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr OpticalFlowSessionCreateFlagsNV))
    forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ forall (es :: [*]).
Chain es
-> Flags
-> Flags
-> Format
-> Format
-> Format
-> OpticalFlowGridSizeFlagBitsNV
-> OpticalFlowGridSizeFlagBitsNV
-> OpticalFlowPerformanceLevelNV
-> OpticalFlowSessionCreateFlagBitsNV
-> OpticalFlowSessionCreateInfoNV es
OpticalFlowSessionCreateInfoNV
             Chain es
next
             Flags
width
             Flags
height
             Format
imageFormat
             Format
flowVectorFormat
             Format
costFormat
             OpticalFlowGridSizeFlagBitsNV
outputGridSize
             OpticalFlowGridSizeFlagBitsNV
hintGridSize
             OpticalFlowPerformanceLevelNV
performanceLevel
             OpticalFlowSessionCreateFlagBitsNV
flags

instance es ~ '[] => Zero (OpticalFlowSessionCreateInfoNV es) where
  zero :: OpticalFlowSessionCreateInfoNV es
zero = forall (es :: [*]).
Chain es
-> Flags
-> Flags
-> Format
-> Format
-> Format
-> OpticalFlowGridSizeFlagBitsNV
-> OpticalFlowGridSizeFlagBitsNV
-> OpticalFlowPerformanceLevelNV
-> OpticalFlowSessionCreateFlagBitsNV
-> OpticalFlowSessionCreateInfoNV es
OpticalFlowSessionCreateInfoNV
           ()
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero


-- | VkOpticalFlowSessionCreatePrivateDataInfoNV - Structure for NV internal
-- use only
--
-- == Valid Usage (Implicit)
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_NV_optical_flow VK_NV_optical_flow>,
-- 'Vulkan.Core10.Enums.StructureType.StructureType'
data OpticalFlowSessionCreatePrivateDataInfoNV = OpticalFlowSessionCreatePrivateDataInfoNV
  { -- | @id@ is an identifier for data which is passed at a memory location
    -- specified in
    -- 'OpticalFlowSessionCreatePrivateDataInfoNV'::@pPrivateData@.
    OpticalFlowSessionCreatePrivateDataInfoNV -> Flags
id' :: Word32
  , -- | @size@ is is the size of data in bytes which is passed at a memory
    -- location specified in
    -- 'OpticalFlowSessionCreatePrivateDataInfoNV'::@pPrivateData@.
    OpticalFlowSessionCreatePrivateDataInfoNV -> Flags
size :: Word32
  , -- | @pPrivateData@ is a pointer to NV internal data.
    --
    -- #VUID-VkOpticalFlowSessionCreatePrivateDataInfoNV-pPrivateData-parameter#
    -- @pPrivateData@ /must/ be a pointer value
    OpticalFlowSessionCreatePrivateDataInfoNV -> Ptr ()
privateData :: Ptr ()
  }
  deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (OpticalFlowSessionCreatePrivateDataInfoNV)
#endif
deriving instance Show OpticalFlowSessionCreatePrivateDataInfoNV

instance ToCStruct OpticalFlowSessionCreatePrivateDataInfoNV where
  withCStruct :: forall b.
OpticalFlowSessionCreatePrivateDataInfoNV
-> (Ptr OpticalFlowSessionCreatePrivateDataInfoNV -> IO b) -> IO b
withCStruct OpticalFlowSessionCreatePrivateDataInfoNV
x Ptr OpticalFlowSessionCreatePrivateDataInfoNV -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
32 forall a b. (a -> b) -> a -> b
$ \Ptr OpticalFlowSessionCreatePrivateDataInfoNV
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr OpticalFlowSessionCreatePrivateDataInfoNV
p OpticalFlowSessionCreatePrivateDataInfoNV
x (Ptr OpticalFlowSessionCreatePrivateDataInfoNV -> IO b
f Ptr OpticalFlowSessionCreatePrivateDataInfoNV
p)
  pokeCStruct :: forall b.
Ptr OpticalFlowSessionCreatePrivateDataInfoNV
-> OpticalFlowSessionCreatePrivateDataInfoNV -> IO b -> IO b
pokeCStruct Ptr OpticalFlowSessionCreatePrivateDataInfoNV
p OpticalFlowSessionCreatePrivateDataInfoNV{Flags
Ptr ()
privateData :: Ptr ()
size :: Flags
id' :: Flags
$sel:privateData:OpticalFlowSessionCreatePrivateDataInfoNV :: OpticalFlowSessionCreatePrivateDataInfoNV -> Ptr ()
$sel:size:OpticalFlowSessionCreatePrivateDataInfoNV :: OpticalFlowSessionCreatePrivateDataInfoNV -> Flags
$sel:id':OpticalFlowSessionCreatePrivateDataInfoNV :: OpticalFlowSessionCreatePrivateDataInfoNV -> Flags
..} IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr OpticalFlowSessionCreatePrivateDataInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_OPTICAL_FLOW_SESSION_CREATE_PRIVATE_DATA_INFO_NV)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr OpticalFlowSessionCreatePrivateDataInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr OpticalFlowSessionCreatePrivateDataInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32)) (Flags
id')
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr OpticalFlowSessionCreatePrivateDataInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Word32)) (Flags
size)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr OpticalFlowSessionCreatePrivateDataInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr (Ptr ()))) (Ptr ()
privateData)
    IO b
f
  cStructSize :: Int
cStructSize = Int
32
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b.
Ptr OpticalFlowSessionCreatePrivateDataInfoNV -> IO b -> IO b
pokeZeroCStruct Ptr OpticalFlowSessionCreatePrivateDataInfoNV
p IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr OpticalFlowSessionCreatePrivateDataInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_OPTICAL_FLOW_SESSION_CREATE_PRIVATE_DATA_INFO_NV)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr OpticalFlowSessionCreatePrivateDataInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr OpticalFlowSessionCreatePrivateDataInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32)) (forall a. Zero a => a
zero)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr OpticalFlowSessionCreatePrivateDataInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Word32)) (forall a. Zero a => a
zero)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr OpticalFlowSessionCreatePrivateDataInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr (Ptr ()))) (forall a. Zero a => a
zero)
    IO b
f

instance FromCStruct OpticalFlowSessionCreatePrivateDataInfoNV where
  peekCStruct :: Ptr OpticalFlowSessionCreatePrivateDataInfoNV
-> IO OpticalFlowSessionCreatePrivateDataInfoNV
peekCStruct Ptr OpticalFlowSessionCreatePrivateDataInfoNV
p = do
    Flags
id' <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr OpticalFlowSessionCreatePrivateDataInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32))
    Flags
size <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr OpticalFlowSessionCreatePrivateDataInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Word32))
    Ptr ()
pPrivateData <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr ()) ((Ptr OpticalFlowSessionCreatePrivateDataInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr (Ptr ())))
    forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ Flags
-> Flags -> Ptr () -> OpticalFlowSessionCreatePrivateDataInfoNV
OpticalFlowSessionCreatePrivateDataInfoNV
             Flags
id' Flags
size Ptr ()
pPrivateData

instance Storable OpticalFlowSessionCreatePrivateDataInfoNV where
  sizeOf :: OpticalFlowSessionCreatePrivateDataInfoNV -> Int
sizeOf ~OpticalFlowSessionCreatePrivateDataInfoNV
_ = Int
32
  alignment :: OpticalFlowSessionCreatePrivateDataInfoNV -> Int
alignment ~OpticalFlowSessionCreatePrivateDataInfoNV
_ = Int
8
  peek :: Ptr OpticalFlowSessionCreatePrivateDataInfoNV
-> IO OpticalFlowSessionCreatePrivateDataInfoNV
peek = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
  poke :: Ptr OpticalFlowSessionCreatePrivateDataInfoNV
-> OpticalFlowSessionCreatePrivateDataInfoNV -> IO ()
poke Ptr OpticalFlowSessionCreatePrivateDataInfoNV
ptr OpticalFlowSessionCreatePrivateDataInfoNV
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr OpticalFlowSessionCreatePrivateDataInfoNV
ptr OpticalFlowSessionCreatePrivateDataInfoNV
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())

instance Zero OpticalFlowSessionCreatePrivateDataInfoNV where
  zero :: OpticalFlowSessionCreatePrivateDataInfoNV
zero = Flags
-> Flags -> Ptr () -> OpticalFlowSessionCreatePrivateDataInfoNV
OpticalFlowSessionCreatePrivateDataInfoNV
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero


-- | VkOpticalFlowExecuteInfoNV - Structure specifying parameters of a
-- optical flow vector calculation
--
-- == Valid Usage
--
-- -   #VUID-VkOpticalFlowExecuteInfoNV-regionCount-07593# @regionCount@
--     /must/ be 0 if 'OPTICAL_FLOW_SESSION_CREATE_ALLOW_REGIONS_BIT_NV'
--     was not set for 'Vulkan.Extensions.Handles.OpticalFlowSessionNV' on
--     which this command is operating
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-VkOpticalFlowExecuteInfoNV-sType-sType# @sType@ /must/ be
--     'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_OPTICAL_FLOW_EXECUTE_INFO_NV'
--
-- -   #VUID-VkOpticalFlowExecuteInfoNV-pNext-pNext# @pNext@ /must/ be
--     @NULL@
--
-- -   #VUID-VkOpticalFlowExecuteInfoNV-flags-parameter# @flags@ /must/ be
--     a valid combination of 'OpticalFlowExecuteFlagBitsNV' values
--
-- -   #VUID-VkOpticalFlowExecuteInfoNV-pRegions-parameter# If
--     @regionCount@ is not @0@, @pRegions@ /must/ be a valid pointer to an
--     array of @regionCount@ 'Vulkan.Core10.FundamentalTypes.Rect2D'
--     structures
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_NV_optical_flow VK_NV_optical_flow>,
-- 'OpticalFlowExecuteFlagsNV', 'Vulkan.Core10.FundamentalTypes.Rect2D',
-- 'Vulkan.Core10.Enums.StructureType.StructureType',
-- 'cmdOpticalFlowExecuteNV'
data OpticalFlowExecuteInfoNV = OpticalFlowExecuteInfoNV
  { -- | @flags@ are the 'OpticalFlowExecuteFlagsNV' used for this command.
    OpticalFlowExecuteInfoNV -> OpticalFlowExecuteFlagBitsNV
flags :: OpticalFlowExecuteFlagsNV
  , -- | @pRegions@ is a pointer to @regionCount@
    -- 'Vulkan.Core10.FundamentalTypes.Rect2D' regions of interest.
    OpticalFlowExecuteInfoNV -> Vector Rect2D
regions :: Vector Rect2D
  }
  deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (OpticalFlowExecuteInfoNV)
#endif
deriving instance Show OpticalFlowExecuteInfoNV

instance ToCStruct OpticalFlowExecuteInfoNV where
  withCStruct :: forall b.
OpticalFlowExecuteInfoNV
-> (("pExecuteInfo" ::: Ptr OpticalFlowExecuteInfoNV) -> IO b)
-> IO b
withCStruct OpticalFlowExecuteInfoNV
x ("pExecuteInfo" ::: Ptr OpticalFlowExecuteInfoNV) -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
32 forall a b. (a -> b) -> a -> b
$ \"pExecuteInfo" ::: Ptr OpticalFlowExecuteInfoNV
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pExecuteInfo" ::: Ptr OpticalFlowExecuteInfoNV
p OpticalFlowExecuteInfoNV
x (("pExecuteInfo" ::: Ptr OpticalFlowExecuteInfoNV) -> IO b
f "pExecuteInfo" ::: Ptr OpticalFlowExecuteInfoNV
p)
  pokeCStruct :: forall b.
("pExecuteInfo" ::: Ptr OpticalFlowExecuteInfoNV)
-> OpticalFlowExecuteInfoNV -> IO b -> IO b
pokeCStruct "pExecuteInfo" ::: Ptr OpticalFlowExecuteInfoNV
p OpticalFlowExecuteInfoNV{Vector Rect2D
OpticalFlowExecuteFlagBitsNV
regions :: Vector Rect2D
flags :: OpticalFlowExecuteFlagBitsNV
$sel:regions:OpticalFlowExecuteInfoNV :: OpticalFlowExecuteInfoNV -> Vector Rect2D
$sel:flags:OpticalFlowExecuteInfoNV :: OpticalFlowExecuteInfoNV -> OpticalFlowExecuteFlagBitsNV
..} IO b
f = forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT forall a b. (a -> b) -> a -> b
$ do
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke (("pExecuteInfo" ::: Ptr OpticalFlowExecuteInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_OPTICAL_FLOW_EXECUTE_INFO_NV)
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke (("pExecuteInfo" ::: Ptr OpticalFlowExecuteInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke (("pExecuteInfo" ::: Ptr OpticalFlowExecuteInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr OpticalFlowExecuteFlagsNV)) (OpticalFlowExecuteFlagBitsNV
flags)
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke (("pExecuteInfo" ::: Ptr OpticalFlowExecuteInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Word32)) ((forall a b. (Integral a, Num b) => a -> b
fromIntegral (forall a. Vector a -> Int
Data.Vector.length forall a b. (a -> b) -> a -> b
$ (Vector Rect2D
regions)) :: Word32))
    Ptr Rect2D
pPRegions' <- forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes @Rect2D ((forall a. Vector a -> Int
Data.Vector.length (Vector Rect2D
regions)) forall a. Num a => a -> a -> a
* Int
16)
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\Int
i Rect2D
e -> forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr Rect2D
pPRegions' forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (Int
16 forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr Rect2D) (Rect2D
e)) (Vector Rect2D
regions)
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke (("pExecuteInfo" ::: Ptr OpticalFlowExecuteInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr (Ptr Rect2D))) (Ptr Rect2D
pPRegions')
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ IO b
f
  cStructSize :: Int
cStructSize = Int
32
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b.
("pExecuteInfo" ::: Ptr OpticalFlowExecuteInfoNV) -> IO b -> IO b
pokeZeroCStruct "pExecuteInfo" ::: Ptr OpticalFlowExecuteInfoNV
p IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pExecuteInfo" ::: Ptr OpticalFlowExecuteInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_OPTICAL_FLOW_EXECUTE_INFO_NV)
    forall a. Storable a => Ptr a -> a -> IO ()
poke (("pExecuteInfo" ::: Ptr OpticalFlowExecuteInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
    IO b
f

instance FromCStruct OpticalFlowExecuteInfoNV where
  peekCStruct :: ("pExecuteInfo" ::: Ptr OpticalFlowExecuteInfoNV)
-> IO OpticalFlowExecuteInfoNV
peekCStruct "pExecuteInfo" ::: Ptr OpticalFlowExecuteInfoNV
p = do
    OpticalFlowExecuteFlagBitsNV
flags <- forall a. Storable a => Ptr a -> IO a
peek @OpticalFlowExecuteFlagsNV (("pExecuteInfo" ::: Ptr OpticalFlowExecuteInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr OpticalFlowExecuteFlagsNV))
    Flags
regionCount <- forall a. Storable a => Ptr a -> IO a
peek @Word32 (("pExecuteInfo" ::: Ptr OpticalFlowExecuteInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Word32))
    Ptr Rect2D
pRegions <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr Rect2D) (("pExecuteInfo" ::: Ptr OpticalFlowExecuteInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr (Ptr Rect2D)))
    Vector Rect2D
pRegions' <- forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
generateM (forall a b. (Integral a, Num b) => a -> b
fromIntegral Flags
regionCount) (\Int
i -> forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @Rect2D ((Ptr Rect2D
pRegions forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
16 forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr Rect2D)))
    forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ OpticalFlowExecuteFlagBitsNV
-> Vector Rect2D -> OpticalFlowExecuteInfoNV
OpticalFlowExecuteInfoNV
             OpticalFlowExecuteFlagBitsNV
flags Vector Rect2D
pRegions'

instance Zero OpticalFlowExecuteInfoNV where
  zero :: OpticalFlowExecuteInfoNV
zero = OpticalFlowExecuteFlagBitsNV
-> Vector Rect2D -> OpticalFlowExecuteInfoNV
OpticalFlowExecuteInfoNV
           forall a. Zero a => a
zero
           forall a. Monoid a => a
mempty


type OpticalFlowGridSizeFlagsNV = OpticalFlowGridSizeFlagBitsNV

-- | VkOpticalFlowGridSizeFlagBitsNV - Bits specifying grid sizes for optical
-- flow operations
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_NV_optical_flow VK_NV_optical_flow>,
-- 'OpticalFlowGridSizeFlagsNV'
newtype OpticalFlowGridSizeFlagBitsNV = OpticalFlowGridSizeFlagBitsNV Flags
  deriving newtype (OpticalFlowGridSizeFlagBitsNV
-> OpticalFlowGridSizeFlagBitsNV -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: OpticalFlowGridSizeFlagBitsNV
-> OpticalFlowGridSizeFlagBitsNV -> Bool
$c/= :: OpticalFlowGridSizeFlagBitsNV
-> OpticalFlowGridSizeFlagBitsNV -> Bool
== :: OpticalFlowGridSizeFlagBitsNV
-> OpticalFlowGridSizeFlagBitsNV -> Bool
$c== :: OpticalFlowGridSizeFlagBitsNV
-> OpticalFlowGridSizeFlagBitsNV -> Bool
Eq, Eq OpticalFlowGridSizeFlagBitsNV
OpticalFlowGridSizeFlagBitsNV
-> OpticalFlowGridSizeFlagBitsNV -> Bool
OpticalFlowGridSizeFlagBitsNV
-> OpticalFlowGridSizeFlagBitsNV -> Ordering
OpticalFlowGridSizeFlagBitsNV
-> OpticalFlowGridSizeFlagBitsNV -> OpticalFlowGridSizeFlagBitsNV
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: OpticalFlowGridSizeFlagBitsNV
-> OpticalFlowGridSizeFlagBitsNV -> OpticalFlowGridSizeFlagBitsNV
$cmin :: OpticalFlowGridSizeFlagBitsNV
-> OpticalFlowGridSizeFlagBitsNV -> OpticalFlowGridSizeFlagBitsNV
max :: OpticalFlowGridSizeFlagBitsNV
-> OpticalFlowGridSizeFlagBitsNV -> OpticalFlowGridSizeFlagBitsNV
$cmax :: OpticalFlowGridSizeFlagBitsNV
-> OpticalFlowGridSizeFlagBitsNV -> OpticalFlowGridSizeFlagBitsNV
>= :: OpticalFlowGridSizeFlagBitsNV
-> OpticalFlowGridSizeFlagBitsNV -> Bool
$c>= :: OpticalFlowGridSizeFlagBitsNV
-> OpticalFlowGridSizeFlagBitsNV -> Bool
> :: OpticalFlowGridSizeFlagBitsNV
-> OpticalFlowGridSizeFlagBitsNV -> Bool
$c> :: OpticalFlowGridSizeFlagBitsNV
-> OpticalFlowGridSizeFlagBitsNV -> Bool
<= :: OpticalFlowGridSizeFlagBitsNV
-> OpticalFlowGridSizeFlagBitsNV -> Bool
$c<= :: OpticalFlowGridSizeFlagBitsNV
-> OpticalFlowGridSizeFlagBitsNV -> Bool
< :: OpticalFlowGridSizeFlagBitsNV
-> OpticalFlowGridSizeFlagBitsNV -> Bool
$c< :: OpticalFlowGridSizeFlagBitsNV
-> OpticalFlowGridSizeFlagBitsNV -> Bool
compare :: OpticalFlowGridSizeFlagBitsNV
-> OpticalFlowGridSizeFlagBitsNV -> Ordering
$ccompare :: OpticalFlowGridSizeFlagBitsNV
-> OpticalFlowGridSizeFlagBitsNV -> Ordering
Ord, Ptr OpticalFlowGridSizeFlagBitsNV
-> IO OpticalFlowGridSizeFlagBitsNV
Ptr OpticalFlowGridSizeFlagBitsNV
-> Int -> IO OpticalFlowGridSizeFlagBitsNV
Ptr OpticalFlowGridSizeFlagBitsNV
-> Int -> OpticalFlowGridSizeFlagBitsNV -> IO ()
Ptr OpticalFlowGridSizeFlagBitsNV
-> OpticalFlowGridSizeFlagBitsNV -> IO ()
OpticalFlowGridSizeFlagBitsNV -> Int
forall b. Ptr b -> Int -> IO OpticalFlowGridSizeFlagBitsNV
forall b. Ptr b -> Int -> OpticalFlowGridSizeFlagBitsNV -> IO ()
forall a.
(a -> Int)
-> (a -> Int)
-> (Ptr a -> Int -> IO a)
-> (Ptr a -> Int -> a -> IO ())
-> (forall b. Ptr b -> Int -> IO a)
-> (forall b. Ptr b -> Int -> a -> IO ())
-> (Ptr a -> IO a)
-> (Ptr a -> a -> IO ())
-> Storable a
poke :: Ptr OpticalFlowGridSizeFlagBitsNV
-> OpticalFlowGridSizeFlagBitsNV -> IO ()
$cpoke :: Ptr OpticalFlowGridSizeFlagBitsNV
-> OpticalFlowGridSizeFlagBitsNV -> IO ()
peek :: Ptr OpticalFlowGridSizeFlagBitsNV
-> IO OpticalFlowGridSizeFlagBitsNV
$cpeek :: Ptr OpticalFlowGridSizeFlagBitsNV
-> IO OpticalFlowGridSizeFlagBitsNV
pokeByteOff :: forall b. Ptr b -> Int -> OpticalFlowGridSizeFlagBitsNV -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> OpticalFlowGridSizeFlagBitsNV -> IO ()
peekByteOff :: forall b. Ptr b -> Int -> IO OpticalFlowGridSizeFlagBitsNV
$cpeekByteOff :: forall b. Ptr b -> Int -> IO OpticalFlowGridSizeFlagBitsNV
pokeElemOff :: Ptr OpticalFlowGridSizeFlagBitsNV
-> Int -> OpticalFlowGridSizeFlagBitsNV -> IO ()
$cpokeElemOff :: Ptr OpticalFlowGridSizeFlagBitsNV
-> Int -> OpticalFlowGridSizeFlagBitsNV -> IO ()
peekElemOff :: Ptr OpticalFlowGridSizeFlagBitsNV
-> Int -> IO OpticalFlowGridSizeFlagBitsNV
$cpeekElemOff :: Ptr OpticalFlowGridSizeFlagBitsNV
-> Int -> IO OpticalFlowGridSizeFlagBitsNV
alignment :: OpticalFlowGridSizeFlagBitsNV -> Int
$calignment :: OpticalFlowGridSizeFlagBitsNV -> Int
sizeOf :: OpticalFlowGridSizeFlagBitsNV -> Int
$csizeOf :: OpticalFlowGridSizeFlagBitsNV -> Int
Storable, OpticalFlowGridSizeFlagBitsNV
forall a. a -> Zero a
zero :: OpticalFlowGridSizeFlagBitsNV
$czero :: OpticalFlowGridSizeFlagBitsNV
Zero, Eq OpticalFlowGridSizeFlagBitsNV
OpticalFlowGridSizeFlagBitsNV
Int -> OpticalFlowGridSizeFlagBitsNV
OpticalFlowGridSizeFlagBitsNV -> Bool
OpticalFlowGridSizeFlagBitsNV -> Int
OpticalFlowGridSizeFlagBitsNV -> Maybe Int
OpticalFlowGridSizeFlagBitsNV -> OpticalFlowGridSizeFlagBitsNV
OpticalFlowGridSizeFlagBitsNV -> Int -> Bool
OpticalFlowGridSizeFlagBitsNV
-> Int -> OpticalFlowGridSizeFlagBitsNV
OpticalFlowGridSizeFlagBitsNV
-> OpticalFlowGridSizeFlagBitsNV -> OpticalFlowGridSizeFlagBitsNV
forall a.
Eq a
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> a
-> (Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> Bool)
-> (a -> Maybe Int)
-> (a -> Int)
-> (a -> Bool)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int)
-> Bits a
popCount :: OpticalFlowGridSizeFlagBitsNV -> Int
$cpopCount :: OpticalFlowGridSizeFlagBitsNV -> Int
rotateR :: OpticalFlowGridSizeFlagBitsNV
-> Int -> OpticalFlowGridSizeFlagBitsNV
$crotateR :: OpticalFlowGridSizeFlagBitsNV
-> Int -> OpticalFlowGridSizeFlagBitsNV
rotateL :: OpticalFlowGridSizeFlagBitsNV
-> Int -> OpticalFlowGridSizeFlagBitsNV
$crotateL :: OpticalFlowGridSizeFlagBitsNV
-> Int -> OpticalFlowGridSizeFlagBitsNV
unsafeShiftR :: OpticalFlowGridSizeFlagBitsNV
-> Int -> OpticalFlowGridSizeFlagBitsNV
$cunsafeShiftR :: OpticalFlowGridSizeFlagBitsNV
-> Int -> OpticalFlowGridSizeFlagBitsNV
shiftR :: OpticalFlowGridSizeFlagBitsNV
-> Int -> OpticalFlowGridSizeFlagBitsNV
$cshiftR :: OpticalFlowGridSizeFlagBitsNV
-> Int -> OpticalFlowGridSizeFlagBitsNV
unsafeShiftL :: OpticalFlowGridSizeFlagBitsNV
-> Int -> OpticalFlowGridSizeFlagBitsNV
$cunsafeShiftL :: OpticalFlowGridSizeFlagBitsNV
-> Int -> OpticalFlowGridSizeFlagBitsNV
shiftL :: OpticalFlowGridSizeFlagBitsNV
-> Int -> OpticalFlowGridSizeFlagBitsNV
$cshiftL :: OpticalFlowGridSizeFlagBitsNV
-> Int -> OpticalFlowGridSizeFlagBitsNV
isSigned :: OpticalFlowGridSizeFlagBitsNV -> Bool
$cisSigned :: OpticalFlowGridSizeFlagBitsNV -> Bool
bitSize :: OpticalFlowGridSizeFlagBitsNV -> Int
$cbitSize :: OpticalFlowGridSizeFlagBitsNV -> Int
bitSizeMaybe :: OpticalFlowGridSizeFlagBitsNV -> Maybe Int
$cbitSizeMaybe :: OpticalFlowGridSizeFlagBitsNV -> Maybe Int
testBit :: OpticalFlowGridSizeFlagBitsNV -> Int -> Bool
$ctestBit :: OpticalFlowGridSizeFlagBitsNV -> Int -> Bool
complementBit :: OpticalFlowGridSizeFlagBitsNV
-> Int -> OpticalFlowGridSizeFlagBitsNV
$ccomplementBit :: OpticalFlowGridSizeFlagBitsNV
-> Int -> OpticalFlowGridSizeFlagBitsNV
clearBit :: OpticalFlowGridSizeFlagBitsNV
-> Int -> OpticalFlowGridSizeFlagBitsNV
$cclearBit :: OpticalFlowGridSizeFlagBitsNV
-> Int -> OpticalFlowGridSizeFlagBitsNV
setBit :: OpticalFlowGridSizeFlagBitsNV
-> Int -> OpticalFlowGridSizeFlagBitsNV
$csetBit :: OpticalFlowGridSizeFlagBitsNV
-> Int -> OpticalFlowGridSizeFlagBitsNV
bit :: Int -> OpticalFlowGridSizeFlagBitsNV
$cbit :: Int -> OpticalFlowGridSizeFlagBitsNV
zeroBits :: OpticalFlowGridSizeFlagBitsNV
$czeroBits :: OpticalFlowGridSizeFlagBitsNV
rotate :: OpticalFlowGridSizeFlagBitsNV
-> Int -> OpticalFlowGridSizeFlagBitsNV
$crotate :: OpticalFlowGridSizeFlagBitsNV
-> Int -> OpticalFlowGridSizeFlagBitsNV
shift :: OpticalFlowGridSizeFlagBitsNV
-> Int -> OpticalFlowGridSizeFlagBitsNV
$cshift :: OpticalFlowGridSizeFlagBitsNV
-> Int -> OpticalFlowGridSizeFlagBitsNV
complement :: OpticalFlowGridSizeFlagBitsNV -> OpticalFlowGridSizeFlagBitsNV
$ccomplement :: OpticalFlowGridSizeFlagBitsNV -> OpticalFlowGridSizeFlagBitsNV
xor :: OpticalFlowGridSizeFlagBitsNV
-> OpticalFlowGridSizeFlagBitsNV -> OpticalFlowGridSizeFlagBitsNV
$cxor :: OpticalFlowGridSizeFlagBitsNV
-> OpticalFlowGridSizeFlagBitsNV -> OpticalFlowGridSizeFlagBitsNV
.|. :: OpticalFlowGridSizeFlagBitsNV
-> OpticalFlowGridSizeFlagBitsNV -> OpticalFlowGridSizeFlagBitsNV
$c.|. :: OpticalFlowGridSizeFlagBitsNV
-> OpticalFlowGridSizeFlagBitsNV -> OpticalFlowGridSizeFlagBitsNV
.&. :: OpticalFlowGridSizeFlagBitsNV
-> OpticalFlowGridSizeFlagBitsNV -> OpticalFlowGridSizeFlagBitsNV
$c.&. :: OpticalFlowGridSizeFlagBitsNV
-> OpticalFlowGridSizeFlagBitsNV -> OpticalFlowGridSizeFlagBitsNV
Bits, Bits OpticalFlowGridSizeFlagBitsNV
OpticalFlowGridSizeFlagBitsNV -> Int
forall b.
Bits b -> (b -> Int) -> (b -> Int) -> (b -> Int) -> FiniteBits b
countTrailingZeros :: OpticalFlowGridSizeFlagBitsNV -> Int
$ccountTrailingZeros :: OpticalFlowGridSizeFlagBitsNV -> Int
countLeadingZeros :: OpticalFlowGridSizeFlagBitsNV -> Int
$ccountLeadingZeros :: OpticalFlowGridSizeFlagBitsNV -> Int
finiteBitSize :: OpticalFlowGridSizeFlagBitsNV -> Int
$cfiniteBitSize :: OpticalFlowGridSizeFlagBitsNV -> Int
FiniteBits)

-- No documentation found for Nested "VkOpticalFlowGridSizeFlagBitsNV" "VK_OPTICAL_FLOW_GRID_SIZE_UNKNOWN_NV"
pattern $bOPTICAL_FLOW_GRID_SIZE_UNKNOWN_NV :: OpticalFlowGridSizeFlagBitsNV
$mOPTICAL_FLOW_GRID_SIZE_UNKNOWN_NV :: forall {r}.
OpticalFlowGridSizeFlagBitsNV -> ((# #) -> r) -> ((# #) -> r) -> r
OPTICAL_FLOW_GRID_SIZE_UNKNOWN_NV = OpticalFlowGridSizeFlagBitsNV 0x00000000

-- | 'OPTICAL_FLOW_GRID_SIZE_1X1_BIT_NV' specifies that grid is 1x1 pixel.
pattern $bOPTICAL_FLOW_GRID_SIZE_1X1_BIT_NV :: OpticalFlowGridSizeFlagBitsNV
$mOPTICAL_FLOW_GRID_SIZE_1X1_BIT_NV :: forall {r}.
OpticalFlowGridSizeFlagBitsNV -> ((# #) -> r) -> ((# #) -> r) -> r
OPTICAL_FLOW_GRID_SIZE_1X1_BIT_NV = OpticalFlowGridSizeFlagBitsNV 0x00000001

-- | 'OPTICAL_FLOW_GRID_SIZE_2X2_BIT_NV' specifies that grid is 2x2 pixel.
pattern $bOPTICAL_FLOW_GRID_SIZE_2X2_BIT_NV :: OpticalFlowGridSizeFlagBitsNV
$mOPTICAL_FLOW_GRID_SIZE_2X2_BIT_NV :: forall {r}.
OpticalFlowGridSizeFlagBitsNV -> ((# #) -> r) -> ((# #) -> r) -> r
OPTICAL_FLOW_GRID_SIZE_2X2_BIT_NV = OpticalFlowGridSizeFlagBitsNV 0x00000002

-- | 'OPTICAL_FLOW_GRID_SIZE_4X4_BIT_NV' specifies that grid is 4x4 pixel.
pattern $bOPTICAL_FLOW_GRID_SIZE_4X4_BIT_NV :: OpticalFlowGridSizeFlagBitsNV
$mOPTICAL_FLOW_GRID_SIZE_4X4_BIT_NV :: forall {r}.
OpticalFlowGridSizeFlagBitsNV -> ((# #) -> r) -> ((# #) -> r) -> r
OPTICAL_FLOW_GRID_SIZE_4X4_BIT_NV = OpticalFlowGridSizeFlagBitsNV 0x00000004

-- | 'OPTICAL_FLOW_GRID_SIZE_8X8_BIT_NV' specifies that grid is 8x8 pixel.
pattern $bOPTICAL_FLOW_GRID_SIZE_8X8_BIT_NV :: OpticalFlowGridSizeFlagBitsNV
$mOPTICAL_FLOW_GRID_SIZE_8X8_BIT_NV :: forall {r}.
OpticalFlowGridSizeFlagBitsNV -> ((# #) -> r) -> ((# #) -> r) -> r
OPTICAL_FLOW_GRID_SIZE_8X8_BIT_NV = OpticalFlowGridSizeFlagBitsNV 0x00000008

conNameOpticalFlowGridSizeFlagBitsNV :: String
conNameOpticalFlowGridSizeFlagBitsNV :: String
conNameOpticalFlowGridSizeFlagBitsNV = String
"OpticalFlowGridSizeFlagBitsNV"

enumPrefixOpticalFlowGridSizeFlagBitsNV :: String
enumPrefixOpticalFlowGridSizeFlagBitsNV :: String
enumPrefixOpticalFlowGridSizeFlagBitsNV = String
"OPTICAL_FLOW_GRID_SIZE_"

showTableOpticalFlowGridSizeFlagBitsNV :: [(OpticalFlowGridSizeFlagBitsNV, String)]
showTableOpticalFlowGridSizeFlagBitsNV :: [(OpticalFlowGridSizeFlagBitsNV, String)]
showTableOpticalFlowGridSizeFlagBitsNV =
  [
    ( OpticalFlowGridSizeFlagBitsNV
OPTICAL_FLOW_GRID_SIZE_UNKNOWN_NV
    , String
"UNKNOWN_NV"
    )
  ,
    ( OpticalFlowGridSizeFlagBitsNV
OPTICAL_FLOW_GRID_SIZE_1X1_BIT_NV
    , String
"1X1_BIT_NV"
    )
  ,
    ( OpticalFlowGridSizeFlagBitsNV
OPTICAL_FLOW_GRID_SIZE_2X2_BIT_NV
    , String
"2X2_BIT_NV"
    )
  ,
    ( OpticalFlowGridSizeFlagBitsNV
OPTICAL_FLOW_GRID_SIZE_4X4_BIT_NV
    , String
"4X4_BIT_NV"
    )
  ,
    ( OpticalFlowGridSizeFlagBitsNV
OPTICAL_FLOW_GRID_SIZE_8X8_BIT_NV
    , String
"8X8_BIT_NV"
    )
  ]

instance Show OpticalFlowGridSizeFlagBitsNV where
  showsPrec :: Int -> OpticalFlowGridSizeFlagBitsNV -> ShowS
showsPrec =
    forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec
      String
enumPrefixOpticalFlowGridSizeFlagBitsNV
      [(OpticalFlowGridSizeFlagBitsNV, String)]
showTableOpticalFlowGridSizeFlagBitsNV
      String
conNameOpticalFlowGridSizeFlagBitsNV
      (\(OpticalFlowGridSizeFlagBitsNV Flags
x) -> Flags
x)
      (\Flags
x -> String -> ShowS
showString String
"0x" forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. (Integral a, Show a) => a -> ShowS
showHex Flags
x)

instance Read OpticalFlowGridSizeFlagBitsNV where
  readPrec :: ReadPrec OpticalFlowGridSizeFlagBitsNV
readPrec =
    forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec
      String
enumPrefixOpticalFlowGridSizeFlagBitsNV
      [(OpticalFlowGridSizeFlagBitsNV, String)]
showTableOpticalFlowGridSizeFlagBitsNV
      String
conNameOpticalFlowGridSizeFlagBitsNV
      Flags -> OpticalFlowGridSizeFlagBitsNV
OpticalFlowGridSizeFlagBitsNV

type OpticalFlowUsageFlagsNV = OpticalFlowUsageFlagBitsNV

-- | VkOpticalFlowUsageFlagBitsNV - Bits specifying usage for optical flow
-- operations
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_NV_optical_flow VK_NV_optical_flow>,
-- 'OpticalFlowUsageFlagsNV'
newtype OpticalFlowUsageFlagBitsNV = OpticalFlowUsageFlagBitsNV Flags
  deriving newtype (OpticalFlowUsageFlagBitsNV -> OpticalFlowUsageFlagBitsNV -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: OpticalFlowUsageFlagBitsNV -> OpticalFlowUsageFlagBitsNV -> Bool
$c/= :: OpticalFlowUsageFlagBitsNV -> OpticalFlowUsageFlagBitsNV -> Bool
== :: OpticalFlowUsageFlagBitsNV -> OpticalFlowUsageFlagBitsNV -> Bool
$c== :: OpticalFlowUsageFlagBitsNV -> OpticalFlowUsageFlagBitsNV -> Bool
Eq, Eq OpticalFlowUsageFlagBitsNV
OpticalFlowUsageFlagBitsNV -> OpticalFlowUsageFlagBitsNV -> Bool
OpticalFlowUsageFlagBitsNV
-> OpticalFlowUsageFlagBitsNV -> Ordering
OpticalFlowUsageFlagBitsNV
-> OpticalFlowUsageFlagBitsNV -> OpticalFlowUsageFlagBitsNV
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: OpticalFlowUsageFlagBitsNV
-> OpticalFlowUsageFlagBitsNV -> OpticalFlowUsageFlagBitsNV
$cmin :: OpticalFlowUsageFlagBitsNV
-> OpticalFlowUsageFlagBitsNV -> OpticalFlowUsageFlagBitsNV
max :: OpticalFlowUsageFlagBitsNV
-> OpticalFlowUsageFlagBitsNV -> OpticalFlowUsageFlagBitsNV
$cmax :: OpticalFlowUsageFlagBitsNV
-> OpticalFlowUsageFlagBitsNV -> OpticalFlowUsageFlagBitsNV
>= :: OpticalFlowUsageFlagBitsNV -> OpticalFlowUsageFlagBitsNV -> Bool
$c>= :: OpticalFlowUsageFlagBitsNV -> OpticalFlowUsageFlagBitsNV -> Bool
> :: OpticalFlowUsageFlagBitsNV -> OpticalFlowUsageFlagBitsNV -> Bool
$c> :: OpticalFlowUsageFlagBitsNV -> OpticalFlowUsageFlagBitsNV -> Bool
<= :: OpticalFlowUsageFlagBitsNV -> OpticalFlowUsageFlagBitsNV -> Bool
$c<= :: OpticalFlowUsageFlagBitsNV -> OpticalFlowUsageFlagBitsNV -> Bool
< :: OpticalFlowUsageFlagBitsNV -> OpticalFlowUsageFlagBitsNV -> Bool
$c< :: OpticalFlowUsageFlagBitsNV -> OpticalFlowUsageFlagBitsNV -> Bool
compare :: OpticalFlowUsageFlagBitsNV
-> OpticalFlowUsageFlagBitsNV -> Ordering
$ccompare :: OpticalFlowUsageFlagBitsNV
-> OpticalFlowUsageFlagBitsNV -> Ordering
Ord, Ptr OpticalFlowUsageFlagBitsNV -> IO OpticalFlowUsageFlagBitsNV
Ptr OpticalFlowUsageFlagBitsNV
-> Int -> IO OpticalFlowUsageFlagBitsNV
Ptr OpticalFlowUsageFlagBitsNV
-> Int -> OpticalFlowUsageFlagBitsNV -> IO ()
Ptr OpticalFlowUsageFlagBitsNV
-> OpticalFlowUsageFlagBitsNV -> IO ()
OpticalFlowUsageFlagBitsNV -> Int
forall b. Ptr b -> Int -> IO OpticalFlowUsageFlagBitsNV
forall b. Ptr b -> Int -> OpticalFlowUsageFlagBitsNV -> IO ()
forall a.
(a -> Int)
-> (a -> Int)
-> (Ptr a -> Int -> IO a)
-> (Ptr a -> Int -> a -> IO ())
-> (forall b. Ptr b -> Int -> IO a)
-> (forall b. Ptr b -> Int -> a -> IO ())
-> (Ptr a -> IO a)
-> (Ptr a -> a -> IO ())
-> Storable a
poke :: Ptr OpticalFlowUsageFlagBitsNV
-> OpticalFlowUsageFlagBitsNV -> IO ()
$cpoke :: Ptr OpticalFlowUsageFlagBitsNV
-> OpticalFlowUsageFlagBitsNV -> IO ()
peek :: Ptr OpticalFlowUsageFlagBitsNV -> IO OpticalFlowUsageFlagBitsNV
$cpeek :: Ptr OpticalFlowUsageFlagBitsNV -> IO OpticalFlowUsageFlagBitsNV
pokeByteOff :: forall b. Ptr b -> Int -> OpticalFlowUsageFlagBitsNV -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> OpticalFlowUsageFlagBitsNV -> IO ()
peekByteOff :: forall b. Ptr b -> Int -> IO OpticalFlowUsageFlagBitsNV
$cpeekByteOff :: forall b. Ptr b -> Int -> IO OpticalFlowUsageFlagBitsNV
pokeElemOff :: Ptr OpticalFlowUsageFlagBitsNV
-> Int -> OpticalFlowUsageFlagBitsNV -> IO ()
$cpokeElemOff :: Ptr OpticalFlowUsageFlagBitsNV
-> Int -> OpticalFlowUsageFlagBitsNV -> IO ()
peekElemOff :: Ptr OpticalFlowUsageFlagBitsNV
-> Int -> IO OpticalFlowUsageFlagBitsNV
$cpeekElemOff :: Ptr OpticalFlowUsageFlagBitsNV
-> Int -> IO OpticalFlowUsageFlagBitsNV
alignment :: OpticalFlowUsageFlagBitsNV -> Int
$calignment :: OpticalFlowUsageFlagBitsNV -> Int
sizeOf :: OpticalFlowUsageFlagBitsNV -> Int
$csizeOf :: OpticalFlowUsageFlagBitsNV -> Int
Storable, OpticalFlowUsageFlagBitsNV
forall a. a -> Zero a
zero :: OpticalFlowUsageFlagBitsNV
$czero :: OpticalFlowUsageFlagBitsNV
Zero, Eq OpticalFlowUsageFlagBitsNV
OpticalFlowUsageFlagBitsNV
Int -> OpticalFlowUsageFlagBitsNV
OpticalFlowUsageFlagBitsNV -> Bool
OpticalFlowUsageFlagBitsNV -> Int
OpticalFlowUsageFlagBitsNV -> Maybe Int
OpticalFlowUsageFlagBitsNV -> OpticalFlowUsageFlagBitsNV
OpticalFlowUsageFlagBitsNV -> Int -> Bool
OpticalFlowUsageFlagBitsNV -> Int -> OpticalFlowUsageFlagBitsNV
OpticalFlowUsageFlagBitsNV
-> OpticalFlowUsageFlagBitsNV -> OpticalFlowUsageFlagBitsNV
forall a.
Eq a
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> a
-> (Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> Bool)
-> (a -> Maybe Int)
-> (a -> Int)
-> (a -> Bool)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int)
-> Bits a
popCount :: OpticalFlowUsageFlagBitsNV -> Int
$cpopCount :: OpticalFlowUsageFlagBitsNV -> Int
rotateR :: OpticalFlowUsageFlagBitsNV -> Int -> OpticalFlowUsageFlagBitsNV
$crotateR :: OpticalFlowUsageFlagBitsNV -> Int -> OpticalFlowUsageFlagBitsNV
rotateL :: OpticalFlowUsageFlagBitsNV -> Int -> OpticalFlowUsageFlagBitsNV
$crotateL :: OpticalFlowUsageFlagBitsNV -> Int -> OpticalFlowUsageFlagBitsNV
unsafeShiftR :: OpticalFlowUsageFlagBitsNV -> Int -> OpticalFlowUsageFlagBitsNV
$cunsafeShiftR :: OpticalFlowUsageFlagBitsNV -> Int -> OpticalFlowUsageFlagBitsNV
shiftR :: OpticalFlowUsageFlagBitsNV -> Int -> OpticalFlowUsageFlagBitsNV
$cshiftR :: OpticalFlowUsageFlagBitsNV -> Int -> OpticalFlowUsageFlagBitsNV
unsafeShiftL :: OpticalFlowUsageFlagBitsNV -> Int -> OpticalFlowUsageFlagBitsNV
$cunsafeShiftL :: OpticalFlowUsageFlagBitsNV -> Int -> OpticalFlowUsageFlagBitsNV
shiftL :: OpticalFlowUsageFlagBitsNV -> Int -> OpticalFlowUsageFlagBitsNV
$cshiftL :: OpticalFlowUsageFlagBitsNV -> Int -> OpticalFlowUsageFlagBitsNV
isSigned :: OpticalFlowUsageFlagBitsNV -> Bool
$cisSigned :: OpticalFlowUsageFlagBitsNV -> Bool
bitSize :: OpticalFlowUsageFlagBitsNV -> Int
$cbitSize :: OpticalFlowUsageFlagBitsNV -> Int
bitSizeMaybe :: OpticalFlowUsageFlagBitsNV -> Maybe Int
$cbitSizeMaybe :: OpticalFlowUsageFlagBitsNV -> Maybe Int
testBit :: OpticalFlowUsageFlagBitsNV -> Int -> Bool
$ctestBit :: OpticalFlowUsageFlagBitsNV -> Int -> Bool
complementBit :: OpticalFlowUsageFlagBitsNV -> Int -> OpticalFlowUsageFlagBitsNV
$ccomplementBit :: OpticalFlowUsageFlagBitsNV -> Int -> OpticalFlowUsageFlagBitsNV
clearBit :: OpticalFlowUsageFlagBitsNV -> Int -> OpticalFlowUsageFlagBitsNV
$cclearBit :: OpticalFlowUsageFlagBitsNV -> Int -> OpticalFlowUsageFlagBitsNV
setBit :: OpticalFlowUsageFlagBitsNV -> Int -> OpticalFlowUsageFlagBitsNV
$csetBit :: OpticalFlowUsageFlagBitsNV -> Int -> OpticalFlowUsageFlagBitsNV
bit :: Int -> OpticalFlowUsageFlagBitsNV
$cbit :: Int -> OpticalFlowUsageFlagBitsNV
zeroBits :: OpticalFlowUsageFlagBitsNV
$czeroBits :: OpticalFlowUsageFlagBitsNV
rotate :: OpticalFlowUsageFlagBitsNV -> Int -> OpticalFlowUsageFlagBitsNV
$crotate :: OpticalFlowUsageFlagBitsNV -> Int -> OpticalFlowUsageFlagBitsNV
shift :: OpticalFlowUsageFlagBitsNV -> Int -> OpticalFlowUsageFlagBitsNV
$cshift :: OpticalFlowUsageFlagBitsNV -> Int -> OpticalFlowUsageFlagBitsNV
complement :: OpticalFlowUsageFlagBitsNV -> OpticalFlowUsageFlagBitsNV
$ccomplement :: OpticalFlowUsageFlagBitsNV -> OpticalFlowUsageFlagBitsNV
xor :: OpticalFlowUsageFlagBitsNV
-> OpticalFlowUsageFlagBitsNV -> OpticalFlowUsageFlagBitsNV
$cxor :: OpticalFlowUsageFlagBitsNV
-> OpticalFlowUsageFlagBitsNV -> OpticalFlowUsageFlagBitsNV
.|. :: OpticalFlowUsageFlagBitsNV
-> OpticalFlowUsageFlagBitsNV -> OpticalFlowUsageFlagBitsNV
$c.|. :: OpticalFlowUsageFlagBitsNV
-> OpticalFlowUsageFlagBitsNV -> OpticalFlowUsageFlagBitsNV
.&. :: OpticalFlowUsageFlagBitsNV
-> OpticalFlowUsageFlagBitsNV -> OpticalFlowUsageFlagBitsNV
$c.&. :: OpticalFlowUsageFlagBitsNV
-> OpticalFlowUsageFlagBitsNV -> OpticalFlowUsageFlagBitsNV
Bits, Bits OpticalFlowUsageFlagBitsNV
OpticalFlowUsageFlagBitsNV -> Int
forall b.
Bits b -> (b -> Int) -> (b -> Int) -> (b -> Int) -> FiniteBits b
countTrailingZeros :: OpticalFlowUsageFlagBitsNV -> Int
$ccountTrailingZeros :: OpticalFlowUsageFlagBitsNV -> Int
countLeadingZeros :: OpticalFlowUsageFlagBitsNV -> Int
$ccountLeadingZeros :: OpticalFlowUsageFlagBitsNV -> Int
finiteBitSize :: OpticalFlowUsageFlagBitsNV -> Int
$cfiniteBitSize :: OpticalFlowUsageFlagBitsNV -> Int
FiniteBits)

-- No documentation found for Nested "VkOpticalFlowUsageFlagBitsNV" "VK_OPTICAL_FLOW_USAGE_UNKNOWN_NV"
pattern $bOPTICAL_FLOW_USAGE_UNKNOWN_NV :: OpticalFlowUsageFlagBitsNV
$mOPTICAL_FLOW_USAGE_UNKNOWN_NV :: forall {r}.
OpticalFlowUsageFlagBitsNV -> ((# #) -> r) -> ((# #) -> r) -> r
OPTICAL_FLOW_USAGE_UNKNOWN_NV = OpticalFlowUsageFlagBitsNV 0x00000000

-- | 'OPTICAL_FLOW_USAGE_INPUT_BIT_NV' specifies that the image /can/ be used
-- as input or reference frame for an optical flow operation.
pattern $bOPTICAL_FLOW_USAGE_INPUT_BIT_NV :: OpticalFlowUsageFlagBitsNV
$mOPTICAL_FLOW_USAGE_INPUT_BIT_NV :: forall {r}.
OpticalFlowUsageFlagBitsNV -> ((# #) -> r) -> ((# #) -> r) -> r
OPTICAL_FLOW_USAGE_INPUT_BIT_NV = OpticalFlowUsageFlagBitsNV 0x00000001

-- | 'OPTICAL_FLOW_USAGE_OUTPUT_BIT_NV' specifies that the image /can/ be
-- used as output flow vector map for an optical flow operation.
pattern $bOPTICAL_FLOW_USAGE_OUTPUT_BIT_NV :: OpticalFlowUsageFlagBitsNV
$mOPTICAL_FLOW_USAGE_OUTPUT_BIT_NV :: forall {r}.
OpticalFlowUsageFlagBitsNV -> ((# #) -> r) -> ((# #) -> r) -> r
OPTICAL_FLOW_USAGE_OUTPUT_BIT_NV = OpticalFlowUsageFlagBitsNV 0x00000002

-- | 'OPTICAL_FLOW_USAGE_HINT_BIT_NV' specifies that the image /can/ be used
-- as hint flow vector map for an optical flow operation.
pattern $bOPTICAL_FLOW_USAGE_HINT_BIT_NV :: OpticalFlowUsageFlagBitsNV
$mOPTICAL_FLOW_USAGE_HINT_BIT_NV :: forall {r}.
OpticalFlowUsageFlagBitsNV -> ((# #) -> r) -> ((# #) -> r) -> r
OPTICAL_FLOW_USAGE_HINT_BIT_NV = OpticalFlowUsageFlagBitsNV 0x00000004

-- | 'OPTICAL_FLOW_USAGE_COST_BIT_NV' specifies that the image /can/ be used
-- as output cost map for an optical flow operation.
pattern $bOPTICAL_FLOW_USAGE_COST_BIT_NV :: OpticalFlowUsageFlagBitsNV
$mOPTICAL_FLOW_USAGE_COST_BIT_NV :: forall {r}.
OpticalFlowUsageFlagBitsNV -> ((# #) -> r) -> ((# #) -> r) -> r
OPTICAL_FLOW_USAGE_COST_BIT_NV = OpticalFlowUsageFlagBitsNV 0x00000008

-- | 'OPTICAL_FLOW_USAGE_GLOBAL_FLOW_BIT_NV' specifies that the image /can/
-- be used as global flow vector for an optical flow operation.
pattern $bOPTICAL_FLOW_USAGE_GLOBAL_FLOW_BIT_NV :: OpticalFlowUsageFlagBitsNV
$mOPTICAL_FLOW_USAGE_GLOBAL_FLOW_BIT_NV :: forall {r}.
OpticalFlowUsageFlagBitsNV -> ((# #) -> r) -> ((# #) -> r) -> r
OPTICAL_FLOW_USAGE_GLOBAL_FLOW_BIT_NV = OpticalFlowUsageFlagBitsNV 0x00000010

conNameOpticalFlowUsageFlagBitsNV :: String
conNameOpticalFlowUsageFlagBitsNV :: String
conNameOpticalFlowUsageFlagBitsNV = String
"OpticalFlowUsageFlagBitsNV"

enumPrefixOpticalFlowUsageFlagBitsNV :: String
enumPrefixOpticalFlowUsageFlagBitsNV :: String
enumPrefixOpticalFlowUsageFlagBitsNV = String
"OPTICAL_FLOW_USAGE_"

showTableOpticalFlowUsageFlagBitsNV :: [(OpticalFlowUsageFlagBitsNV, String)]
showTableOpticalFlowUsageFlagBitsNV :: [(OpticalFlowUsageFlagBitsNV, String)]
showTableOpticalFlowUsageFlagBitsNV =
  [
    ( OpticalFlowUsageFlagBitsNV
OPTICAL_FLOW_USAGE_UNKNOWN_NV
    , String
"UNKNOWN_NV"
    )
  ,
    ( OpticalFlowUsageFlagBitsNV
OPTICAL_FLOW_USAGE_INPUT_BIT_NV
    , String
"INPUT_BIT_NV"
    )
  ,
    ( OpticalFlowUsageFlagBitsNV
OPTICAL_FLOW_USAGE_OUTPUT_BIT_NV
    , String
"OUTPUT_BIT_NV"
    )
  ,
    ( OpticalFlowUsageFlagBitsNV
OPTICAL_FLOW_USAGE_HINT_BIT_NV
    , String
"HINT_BIT_NV"
    )
  ,
    ( OpticalFlowUsageFlagBitsNV
OPTICAL_FLOW_USAGE_COST_BIT_NV
    , String
"COST_BIT_NV"
    )
  ,
    ( OpticalFlowUsageFlagBitsNV
OPTICAL_FLOW_USAGE_GLOBAL_FLOW_BIT_NV
    , String
"GLOBAL_FLOW_BIT_NV"
    )
  ]

instance Show OpticalFlowUsageFlagBitsNV where
  showsPrec :: Int -> OpticalFlowUsageFlagBitsNV -> ShowS
showsPrec =
    forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec
      String
enumPrefixOpticalFlowUsageFlagBitsNV
      [(OpticalFlowUsageFlagBitsNV, String)]
showTableOpticalFlowUsageFlagBitsNV
      String
conNameOpticalFlowUsageFlagBitsNV
      (\(OpticalFlowUsageFlagBitsNV Flags
x) -> Flags
x)
      (\Flags
x -> String -> ShowS
showString String
"0x" forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. (Integral a, Show a) => a -> ShowS
showHex Flags
x)

instance Read OpticalFlowUsageFlagBitsNV where
  readPrec :: ReadPrec OpticalFlowUsageFlagBitsNV
readPrec =
    forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec
      String
enumPrefixOpticalFlowUsageFlagBitsNV
      [(OpticalFlowUsageFlagBitsNV, String)]
showTableOpticalFlowUsageFlagBitsNV
      String
conNameOpticalFlowUsageFlagBitsNV
      Flags -> OpticalFlowUsageFlagBitsNV
OpticalFlowUsageFlagBitsNV

-- | VkOpticalFlowPerformanceLevelNV - Optical flow performance level types
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_NV_optical_flow VK_NV_optical_flow>,
-- 'OpticalFlowSessionCreateInfoNV'
newtype OpticalFlowPerformanceLevelNV = OpticalFlowPerformanceLevelNV Int32
  deriving newtype (OpticalFlowPerformanceLevelNV
-> OpticalFlowPerformanceLevelNV -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: OpticalFlowPerformanceLevelNV
-> OpticalFlowPerformanceLevelNV -> Bool
$c/= :: OpticalFlowPerformanceLevelNV
-> OpticalFlowPerformanceLevelNV -> Bool
== :: OpticalFlowPerformanceLevelNV
-> OpticalFlowPerformanceLevelNV -> Bool
$c== :: OpticalFlowPerformanceLevelNV
-> OpticalFlowPerformanceLevelNV -> Bool
Eq, Eq OpticalFlowPerformanceLevelNV
OpticalFlowPerformanceLevelNV
-> OpticalFlowPerformanceLevelNV -> Bool
OpticalFlowPerformanceLevelNV
-> OpticalFlowPerformanceLevelNV -> Ordering
OpticalFlowPerformanceLevelNV
-> OpticalFlowPerformanceLevelNV -> OpticalFlowPerformanceLevelNV
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: OpticalFlowPerformanceLevelNV
-> OpticalFlowPerformanceLevelNV -> OpticalFlowPerformanceLevelNV
$cmin :: OpticalFlowPerformanceLevelNV
-> OpticalFlowPerformanceLevelNV -> OpticalFlowPerformanceLevelNV
max :: OpticalFlowPerformanceLevelNV
-> OpticalFlowPerformanceLevelNV -> OpticalFlowPerformanceLevelNV
$cmax :: OpticalFlowPerformanceLevelNV
-> OpticalFlowPerformanceLevelNV -> OpticalFlowPerformanceLevelNV
>= :: OpticalFlowPerformanceLevelNV
-> OpticalFlowPerformanceLevelNV -> Bool
$c>= :: OpticalFlowPerformanceLevelNV
-> OpticalFlowPerformanceLevelNV -> Bool
> :: OpticalFlowPerformanceLevelNV
-> OpticalFlowPerformanceLevelNV -> Bool
$c> :: OpticalFlowPerformanceLevelNV
-> OpticalFlowPerformanceLevelNV -> Bool
<= :: OpticalFlowPerformanceLevelNV
-> OpticalFlowPerformanceLevelNV -> Bool
$c<= :: OpticalFlowPerformanceLevelNV
-> OpticalFlowPerformanceLevelNV -> Bool
< :: OpticalFlowPerformanceLevelNV
-> OpticalFlowPerformanceLevelNV -> Bool
$c< :: OpticalFlowPerformanceLevelNV
-> OpticalFlowPerformanceLevelNV -> Bool
compare :: OpticalFlowPerformanceLevelNV
-> OpticalFlowPerformanceLevelNV -> Ordering
$ccompare :: OpticalFlowPerformanceLevelNV
-> OpticalFlowPerformanceLevelNV -> Ordering
Ord, Ptr OpticalFlowPerformanceLevelNV
-> IO OpticalFlowPerformanceLevelNV
Ptr OpticalFlowPerformanceLevelNV
-> Int -> IO OpticalFlowPerformanceLevelNV
Ptr OpticalFlowPerformanceLevelNV
-> Int -> OpticalFlowPerformanceLevelNV -> IO ()
Ptr OpticalFlowPerformanceLevelNV
-> OpticalFlowPerformanceLevelNV -> IO ()
OpticalFlowPerformanceLevelNV -> Int
forall b. Ptr b -> Int -> IO OpticalFlowPerformanceLevelNV
forall b. Ptr b -> Int -> OpticalFlowPerformanceLevelNV -> IO ()
forall a.
(a -> Int)
-> (a -> Int)
-> (Ptr a -> Int -> IO a)
-> (Ptr a -> Int -> a -> IO ())
-> (forall b. Ptr b -> Int -> IO a)
-> (forall b. Ptr b -> Int -> a -> IO ())
-> (Ptr a -> IO a)
-> (Ptr a -> a -> IO ())
-> Storable a
poke :: Ptr OpticalFlowPerformanceLevelNV
-> OpticalFlowPerformanceLevelNV -> IO ()
$cpoke :: Ptr OpticalFlowPerformanceLevelNV
-> OpticalFlowPerformanceLevelNV -> IO ()
peek :: Ptr OpticalFlowPerformanceLevelNV
-> IO OpticalFlowPerformanceLevelNV
$cpeek :: Ptr OpticalFlowPerformanceLevelNV
-> IO OpticalFlowPerformanceLevelNV
pokeByteOff :: forall b. Ptr b -> Int -> OpticalFlowPerformanceLevelNV -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> OpticalFlowPerformanceLevelNV -> IO ()
peekByteOff :: forall b. Ptr b -> Int -> IO OpticalFlowPerformanceLevelNV
$cpeekByteOff :: forall b. Ptr b -> Int -> IO OpticalFlowPerformanceLevelNV
pokeElemOff :: Ptr OpticalFlowPerformanceLevelNV
-> Int -> OpticalFlowPerformanceLevelNV -> IO ()
$cpokeElemOff :: Ptr OpticalFlowPerformanceLevelNV
-> Int -> OpticalFlowPerformanceLevelNV -> IO ()
peekElemOff :: Ptr OpticalFlowPerformanceLevelNV
-> Int -> IO OpticalFlowPerformanceLevelNV
$cpeekElemOff :: Ptr OpticalFlowPerformanceLevelNV
-> Int -> IO OpticalFlowPerformanceLevelNV
alignment :: OpticalFlowPerformanceLevelNV -> Int
$calignment :: OpticalFlowPerformanceLevelNV -> Int
sizeOf :: OpticalFlowPerformanceLevelNV -> Int
$csizeOf :: OpticalFlowPerformanceLevelNV -> Int
Storable, OpticalFlowPerformanceLevelNV
forall a. a -> Zero a
zero :: OpticalFlowPerformanceLevelNV
$czero :: OpticalFlowPerformanceLevelNV
Zero)

-- No documentation found for Nested "VkOpticalFlowPerformanceLevelNV" "VK_OPTICAL_FLOW_PERFORMANCE_LEVEL_UNKNOWN_NV"
pattern $bOPTICAL_FLOW_PERFORMANCE_LEVEL_UNKNOWN_NV :: OpticalFlowPerformanceLevelNV
$mOPTICAL_FLOW_PERFORMANCE_LEVEL_UNKNOWN_NV :: forall {r}.
OpticalFlowPerformanceLevelNV -> ((# #) -> r) -> ((# #) -> r) -> r
OPTICAL_FLOW_PERFORMANCE_LEVEL_UNKNOWN_NV = OpticalFlowPerformanceLevelNV 0

-- | 'OPTICAL_FLOW_PERFORMANCE_LEVEL_SLOW_NV' is a level with slower
-- performance but higher quality.
pattern $bOPTICAL_FLOW_PERFORMANCE_LEVEL_SLOW_NV :: OpticalFlowPerformanceLevelNV
$mOPTICAL_FLOW_PERFORMANCE_LEVEL_SLOW_NV :: forall {r}.
OpticalFlowPerformanceLevelNV -> ((# #) -> r) -> ((# #) -> r) -> r
OPTICAL_FLOW_PERFORMANCE_LEVEL_SLOW_NV = OpticalFlowPerformanceLevelNV 1

-- | 'OPTICAL_FLOW_PERFORMANCE_LEVEL_MEDIUM_NV' is a level with medium
-- performance and medium quality.
pattern $bOPTICAL_FLOW_PERFORMANCE_LEVEL_MEDIUM_NV :: OpticalFlowPerformanceLevelNV
$mOPTICAL_FLOW_PERFORMANCE_LEVEL_MEDIUM_NV :: forall {r}.
OpticalFlowPerformanceLevelNV -> ((# #) -> r) -> ((# #) -> r) -> r
OPTICAL_FLOW_PERFORMANCE_LEVEL_MEDIUM_NV = OpticalFlowPerformanceLevelNV 2

-- | 'OPTICAL_FLOW_PERFORMANCE_LEVEL_FAST_NV' is a preset with higher
-- performance but lower quality.
pattern $bOPTICAL_FLOW_PERFORMANCE_LEVEL_FAST_NV :: OpticalFlowPerformanceLevelNV
$mOPTICAL_FLOW_PERFORMANCE_LEVEL_FAST_NV :: forall {r}.
OpticalFlowPerformanceLevelNV -> ((# #) -> r) -> ((# #) -> r) -> r
OPTICAL_FLOW_PERFORMANCE_LEVEL_FAST_NV = OpticalFlowPerformanceLevelNV 3

{-# COMPLETE
  OPTICAL_FLOW_PERFORMANCE_LEVEL_UNKNOWN_NV
  , OPTICAL_FLOW_PERFORMANCE_LEVEL_SLOW_NV
  , OPTICAL_FLOW_PERFORMANCE_LEVEL_MEDIUM_NV
  , OPTICAL_FLOW_PERFORMANCE_LEVEL_FAST_NV ::
    OpticalFlowPerformanceLevelNV
  #-}

conNameOpticalFlowPerformanceLevelNV :: String
conNameOpticalFlowPerformanceLevelNV :: String
conNameOpticalFlowPerformanceLevelNV = String
"OpticalFlowPerformanceLevelNV"

enumPrefixOpticalFlowPerformanceLevelNV :: String
enumPrefixOpticalFlowPerformanceLevelNV :: String
enumPrefixOpticalFlowPerformanceLevelNV = String
"OPTICAL_FLOW_PERFORMANCE_LEVEL_"

showTableOpticalFlowPerformanceLevelNV :: [(OpticalFlowPerformanceLevelNV, String)]
showTableOpticalFlowPerformanceLevelNV :: [(OpticalFlowPerformanceLevelNV, String)]
showTableOpticalFlowPerformanceLevelNV =
  [
    ( OpticalFlowPerformanceLevelNV
OPTICAL_FLOW_PERFORMANCE_LEVEL_UNKNOWN_NV
    , String
"UNKNOWN_NV"
    )
  ,
    ( OpticalFlowPerformanceLevelNV
OPTICAL_FLOW_PERFORMANCE_LEVEL_SLOW_NV
    , String
"SLOW_NV"
    )
  ,
    ( OpticalFlowPerformanceLevelNV
OPTICAL_FLOW_PERFORMANCE_LEVEL_MEDIUM_NV
    , String
"MEDIUM_NV"
    )
  ,
    ( OpticalFlowPerformanceLevelNV
OPTICAL_FLOW_PERFORMANCE_LEVEL_FAST_NV
    , String
"FAST_NV"
    )
  ]

instance Show OpticalFlowPerformanceLevelNV where
  showsPrec :: Int -> OpticalFlowPerformanceLevelNV -> ShowS
showsPrec =
    forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec
      String
enumPrefixOpticalFlowPerformanceLevelNV
      [(OpticalFlowPerformanceLevelNV, String)]
showTableOpticalFlowPerformanceLevelNV
      String
conNameOpticalFlowPerformanceLevelNV
      (\(OpticalFlowPerformanceLevelNV Int32
x) -> Int32
x)
      (forall a. Show a => Int -> a -> ShowS
showsPrec Int
11)

instance Read OpticalFlowPerformanceLevelNV where
  readPrec :: ReadPrec OpticalFlowPerformanceLevelNV
readPrec =
    forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec
      String
enumPrefixOpticalFlowPerformanceLevelNV
      [(OpticalFlowPerformanceLevelNV, String)]
showTableOpticalFlowPerformanceLevelNV
      String
conNameOpticalFlowPerformanceLevelNV
      Int32 -> OpticalFlowPerformanceLevelNV
OpticalFlowPerformanceLevelNV

-- | VkOpticalFlowSessionBindingPointNV - Binding points of an optical flow
-- session
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_NV_optical_flow VK_NV_optical_flow>,
-- 'bindOpticalFlowSessionImageNV'
newtype OpticalFlowSessionBindingPointNV = OpticalFlowSessionBindingPointNV Int32
  deriving newtype (OpticalFlowSessionBindingPointNV
-> OpticalFlowSessionBindingPointNV -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: OpticalFlowSessionBindingPointNV
-> OpticalFlowSessionBindingPointNV -> Bool
$c/= :: OpticalFlowSessionBindingPointNV
-> OpticalFlowSessionBindingPointNV -> Bool
== :: OpticalFlowSessionBindingPointNV
-> OpticalFlowSessionBindingPointNV -> Bool
$c== :: OpticalFlowSessionBindingPointNV
-> OpticalFlowSessionBindingPointNV -> Bool
Eq, Eq OpticalFlowSessionBindingPointNV
OpticalFlowSessionBindingPointNV
-> OpticalFlowSessionBindingPointNV -> Bool
OpticalFlowSessionBindingPointNV
-> OpticalFlowSessionBindingPointNV -> Ordering
OpticalFlowSessionBindingPointNV
-> OpticalFlowSessionBindingPointNV
-> OpticalFlowSessionBindingPointNV
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: OpticalFlowSessionBindingPointNV
-> OpticalFlowSessionBindingPointNV
-> OpticalFlowSessionBindingPointNV
$cmin :: OpticalFlowSessionBindingPointNV
-> OpticalFlowSessionBindingPointNV
-> OpticalFlowSessionBindingPointNV
max :: OpticalFlowSessionBindingPointNV
-> OpticalFlowSessionBindingPointNV
-> OpticalFlowSessionBindingPointNV
$cmax :: OpticalFlowSessionBindingPointNV
-> OpticalFlowSessionBindingPointNV
-> OpticalFlowSessionBindingPointNV
>= :: OpticalFlowSessionBindingPointNV
-> OpticalFlowSessionBindingPointNV -> Bool
$c>= :: OpticalFlowSessionBindingPointNV
-> OpticalFlowSessionBindingPointNV -> Bool
> :: OpticalFlowSessionBindingPointNV
-> OpticalFlowSessionBindingPointNV -> Bool
$c> :: OpticalFlowSessionBindingPointNV
-> OpticalFlowSessionBindingPointNV -> Bool
<= :: OpticalFlowSessionBindingPointNV
-> OpticalFlowSessionBindingPointNV -> Bool
$c<= :: OpticalFlowSessionBindingPointNV
-> OpticalFlowSessionBindingPointNV -> Bool
< :: OpticalFlowSessionBindingPointNV
-> OpticalFlowSessionBindingPointNV -> Bool
$c< :: OpticalFlowSessionBindingPointNV
-> OpticalFlowSessionBindingPointNV -> Bool
compare :: OpticalFlowSessionBindingPointNV
-> OpticalFlowSessionBindingPointNV -> Ordering
$ccompare :: OpticalFlowSessionBindingPointNV
-> OpticalFlowSessionBindingPointNV -> Ordering
Ord, Ptr OpticalFlowSessionBindingPointNV
-> IO OpticalFlowSessionBindingPointNV
Ptr OpticalFlowSessionBindingPointNV
-> Int -> IO OpticalFlowSessionBindingPointNV
Ptr OpticalFlowSessionBindingPointNV
-> Int -> OpticalFlowSessionBindingPointNV -> IO ()
Ptr OpticalFlowSessionBindingPointNV
-> OpticalFlowSessionBindingPointNV -> IO ()
OpticalFlowSessionBindingPointNV -> Int
forall b. Ptr b -> Int -> IO OpticalFlowSessionBindingPointNV
forall b. Ptr b -> Int -> OpticalFlowSessionBindingPointNV -> IO ()
forall a.
(a -> Int)
-> (a -> Int)
-> (Ptr a -> Int -> IO a)
-> (Ptr a -> Int -> a -> IO ())
-> (forall b. Ptr b -> Int -> IO a)
-> (forall b. Ptr b -> Int -> a -> IO ())
-> (Ptr a -> IO a)
-> (Ptr a -> a -> IO ())
-> Storable a
poke :: Ptr OpticalFlowSessionBindingPointNV
-> OpticalFlowSessionBindingPointNV -> IO ()
$cpoke :: Ptr OpticalFlowSessionBindingPointNV
-> OpticalFlowSessionBindingPointNV -> IO ()
peek :: Ptr OpticalFlowSessionBindingPointNV
-> IO OpticalFlowSessionBindingPointNV
$cpeek :: Ptr OpticalFlowSessionBindingPointNV
-> IO OpticalFlowSessionBindingPointNV
pokeByteOff :: forall b. Ptr b -> Int -> OpticalFlowSessionBindingPointNV -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> OpticalFlowSessionBindingPointNV -> IO ()
peekByteOff :: forall b. Ptr b -> Int -> IO OpticalFlowSessionBindingPointNV
$cpeekByteOff :: forall b. Ptr b -> Int -> IO OpticalFlowSessionBindingPointNV
pokeElemOff :: Ptr OpticalFlowSessionBindingPointNV
-> Int -> OpticalFlowSessionBindingPointNV -> IO ()
$cpokeElemOff :: Ptr OpticalFlowSessionBindingPointNV
-> Int -> OpticalFlowSessionBindingPointNV -> IO ()
peekElemOff :: Ptr OpticalFlowSessionBindingPointNV
-> Int -> IO OpticalFlowSessionBindingPointNV
$cpeekElemOff :: Ptr OpticalFlowSessionBindingPointNV
-> Int -> IO OpticalFlowSessionBindingPointNV
alignment :: OpticalFlowSessionBindingPointNV -> Int
$calignment :: OpticalFlowSessionBindingPointNV -> Int
sizeOf :: OpticalFlowSessionBindingPointNV -> Int
$csizeOf :: OpticalFlowSessionBindingPointNV -> Int
Storable, OpticalFlowSessionBindingPointNV
forall a. a -> Zero a
zero :: OpticalFlowSessionBindingPointNV
$czero :: OpticalFlowSessionBindingPointNV
Zero)

-- No documentation found for Nested "VkOpticalFlowSessionBindingPointNV" "VK_OPTICAL_FLOW_SESSION_BINDING_POINT_UNKNOWN_NV"
pattern $bOPTICAL_FLOW_SESSION_BINDING_POINT_UNKNOWN_NV :: OpticalFlowSessionBindingPointNV
$mOPTICAL_FLOW_SESSION_BINDING_POINT_UNKNOWN_NV :: forall {r}.
OpticalFlowSessionBindingPointNV
-> ((# #) -> r) -> ((# #) -> r) -> r
OPTICAL_FLOW_SESSION_BINDING_POINT_UNKNOWN_NV = OpticalFlowSessionBindingPointNV 0

-- | 'OPTICAL_FLOW_SESSION_BINDING_POINT_INPUT_NV' specifies the binding
-- point for the input frame.
pattern $bOPTICAL_FLOW_SESSION_BINDING_POINT_INPUT_NV :: OpticalFlowSessionBindingPointNV
$mOPTICAL_FLOW_SESSION_BINDING_POINT_INPUT_NV :: forall {r}.
OpticalFlowSessionBindingPointNV
-> ((# #) -> r) -> ((# #) -> r) -> r
OPTICAL_FLOW_SESSION_BINDING_POINT_INPUT_NV = OpticalFlowSessionBindingPointNV 1

-- | 'OPTICAL_FLOW_SESSION_BINDING_POINT_REFERENCE_NV' specifies the binding
-- point for the input reference frame.
pattern $bOPTICAL_FLOW_SESSION_BINDING_POINT_REFERENCE_NV :: OpticalFlowSessionBindingPointNV
$mOPTICAL_FLOW_SESSION_BINDING_POINT_REFERENCE_NV :: forall {r}.
OpticalFlowSessionBindingPointNV
-> ((# #) -> r) -> ((# #) -> r) -> r
OPTICAL_FLOW_SESSION_BINDING_POINT_REFERENCE_NV = OpticalFlowSessionBindingPointNV 2

-- | 'OPTICAL_FLOW_SESSION_BINDING_POINT_HINT_NV' specifies the binding point
-- for the optional external hint flow vectors.
pattern $bOPTICAL_FLOW_SESSION_BINDING_POINT_HINT_NV :: OpticalFlowSessionBindingPointNV
$mOPTICAL_FLOW_SESSION_BINDING_POINT_HINT_NV :: forall {r}.
OpticalFlowSessionBindingPointNV
-> ((# #) -> r) -> ((# #) -> r) -> r
OPTICAL_FLOW_SESSION_BINDING_POINT_HINT_NV = OpticalFlowSessionBindingPointNV 3

-- | 'OPTICAL_FLOW_SESSION_BINDING_POINT_FLOW_VECTOR_NV' specifies the
-- binding point for output flow vectors of default forward flow calcution.
pattern $bOPTICAL_FLOW_SESSION_BINDING_POINT_FLOW_VECTOR_NV :: OpticalFlowSessionBindingPointNV
$mOPTICAL_FLOW_SESSION_BINDING_POINT_FLOW_VECTOR_NV :: forall {r}.
OpticalFlowSessionBindingPointNV
-> ((# #) -> r) -> ((# #) -> r) -> r
OPTICAL_FLOW_SESSION_BINDING_POINT_FLOW_VECTOR_NV = OpticalFlowSessionBindingPointNV 4

-- | 'OPTICAL_FLOW_SESSION_BINDING_POINT_BACKWARD_FLOW_VECTOR_NV' specifies
-- the binding point for the optional output flow vector map of optional
-- backward flow calcution.
pattern $bOPTICAL_FLOW_SESSION_BINDING_POINT_BACKWARD_FLOW_VECTOR_NV :: OpticalFlowSessionBindingPointNV
$mOPTICAL_FLOW_SESSION_BINDING_POINT_BACKWARD_FLOW_VECTOR_NV :: forall {r}.
OpticalFlowSessionBindingPointNV
-> ((# #) -> r) -> ((# #) -> r) -> r
OPTICAL_FLOW_SESSION_BINDING_POINT_BACKWARD_FLOW_VECTOR_NV = OpticalFlowSessionBindingPointNV 5

-- | 'OPTICAL_FLOW_SESSION_BINDING_POINT_COST_NV' specifies the binding point
-- for the optional output cost map of default forward flow calcution.
pattern $bOPTICAL_FLOW_SESSION_BINDING_POINT_COST_NV :: OpticalFlowSessionBindingPointNV
$mOPTICAL_FLOW_SESSION_BINDING_POINT_COST_NV :: forall {r}.
OpticalFlowSessionBindingPointNV
-> ((# #) -> r) -> ((# #) -> r) -> r
OPTICAL_FLOW_SESSION_BINDING_POINT_COST_NV = OpticalFlowSessionBindingPointNV 6

-- | 'OPTICAL_FLOW_SESSION_BINDING_POINT_BACKWARD_COST_NV' specifies the
-- binding point for the optional output cost map of optional backward flow
-- calcution.
pattern $bOPTICAL_FLOW_SESSION_BINDING_POINT_BACKWARD_COST_NV :: OpticalFlowSessionBindingPointNV
$mOPTICAL_FLOW_SESSION_BINDING_POINT_BACKWARD_COST_NV :: forall {r}.
OpticalFlowSessionBindingPointNV
-> ((# #) -> r) -> ((# #) -> r) -> r
OPTICAL_FLOW_SESSION_BINDING_POINT_BACKWARD_COST_NV = OpticalFlowSessionBindingPointNV 7

-- | 'OPTICAL_FLOW_SESSION_BINDING_POINT_GLOBAL_FLOW_NV' specifies the
-- binding point for the optional global flow value of default forward flow
-- calcution.
pattern $bOPTICAL_FLOW_SESSION_BINDING_POINT_GLOBAL_FLOW_NV :: OpticalFlowSessionBindingPointNV
$mOPTICAL_FLOW_SESSION_BINDING_POINT_GLOBAL_FLOW_NV :: forall {r}.
OpticalFlowSessionBindingPointNV
-> ((# #) -> r) -> ((# #) -> r) -> r
OPTICAL_FLOW_SESSION_BINDING_POINT_GLOBAL_FLOW_NV = OpticalFlowSessionBindingPointNV 8

{-# COMPLETE
  OPTICAL_FLOW_SESSION_BINDING_POINT_UNKNOWN_NV
  , OPTICAL_FLOW_SESSION_BINDING_POINT_INPUT_NV
  , OPTICAL_FLOW_SESSION_BINDING_POINT_REFERENCE_NV
  , OPTICAL_FLOW_SESSION_BINDING_POINT_HINT_NV
  , OPTICAL_FLOW_SESSION_BINDING_POINT_FLOW_VECTOR_NV
  , OPTICAL_FLOW_SESSION_BINDING_POINT_BACKWARD_FLOW_VECTOR_NV
  , OPTICAL_FLOW_SESSION_BINDING_POINT_COST_NV
  , OPTICAL_FLOW_SESSION_BINDING_POINT_BACKWARD_COST_NV
  , OPTICAL_FLOW_SESSION_BINDING_POINT_GLOBAL_FLOW_NV ::
    OpticalFlowSessionBindingPointNV
  #-}

conNameOpticalFlowSessionBindingPointNV :: String
conNameOpticalFlowSessionBindingPointNV :: String
conNameOpticalFlowSessionBindingPointNV = String
"OpticalFlowSessionBindingPointNV"

enumPrefixOpticalFlowSessionBindingPointNV :: String
enumPrefixOpticalFlowSessionBindingPointNV :: String
enumPrefixOpticalFlowSessionBindingPointNV = String
"OPTICAL_FLOW_SESSION_BINDING_POINT_"

showTableOpticalFlowSessionBindingPointNV :: [(OpticalFlowSessionBindingPointNV, String)]
showTableOpticalFlowSessionBindingPointNV :: [(OpticalFlowSessionBindingPointNV, String)]
showTableOpticalFlowSessionBindingPointNV =
  [
    ( OpticalFlowSessionBindingPointNV
OPTICAL_FLOW_SESSION_BINDING_POINT_UNKNOWN_NV
    , String
"UNKNOWN_NV"
    )
  ,
    ( OpticalFlowSessionBindingPointNV
OPTICAL_FLOW_SESSION_BINDING_POINT_INPUT_NV
    , String
"INPUT_NV"
    )
  ,
    ( OpticalFlowSessionBindingPointNV
OPTICAL_FLOW_SESSION_BINDING_POINT_REFERENCE_NV
    , String
"REFERENCE_NV"
    )
  ,
    ( OpticalFlowSessionBindingPointNV
OPTICAL_FLOW_SESSION_BINDING_POINT_HINT_NV
    , String
"HINT_NV"
    )
  ,
    ( OpticalFlowSessionBindingPointNV
OPTICAL_FLOW_SESSION_BINDING_POINT_FLOW_VECTOR_NV
    , String
"FLOW_VECTOR_NV"
    )
  ,
    ( OpticalFlowSessionBindingPointNV
OPTICAL_FLOW_SESSION_BINDING_POINT_BACKWARD_FLOW_VECTOR_NV
    , String
"BACKWARD_FLOW_VECTOR_NV"
    )
  ,
    ( OpticalFlowSessionBindingPointNV
OPTICAL_FLOW_SESSION_BINDING_POINT_COST_NV
    , String
"COST_NV"
    )
  ,
    ( OpticalFlowSessionBindingPointNV
OPTICAL_FLOW_SESSION_BINDING_POINT_BACKWARD_COST_NV
    , String
"BACKWARD_COST_NV"
    )
  ,
    ( OpticalFlowSessionBindingPointNV
OPTICAL_FLOW_SESSION_BINDING_POINT_GLOBAL_FLOW_NV
    , String
"GLOBAL_FLOW_NV"
    )
  ]

instance Show OpticalFlowSessionBindingPointNV where
  showsPrec :: Int -> OpticalFlowSessionBindingPointNV -> ShowS
showsPrec =
    forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec
      String
enumPrefixOpticalFlowSessionBindingPointNV
      [(OpticalFlowSessionBindingPointNV, String)]
showTableOpticalFlowSessionBindingPointNV
      String
conNameOpticalFlowSessionBindingPointNV
      (\(OpticalFlowSessionBindingPointNV Int32
x) -> Int32
x)
      (forall a. Show a => Int -> a -> ShowS
showsPrec Int
11)

instance Read OpticalFlowSessionBindingPointNV where
  readPrec :: ReadPrec OpticalFlowSessionBindingPointNV
readPrec =
    forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec
      String
enumPrefixOpticalFlowSessionBindingPointNV
      [(OpticalFlowSessionBindingPointNV, String)]
showTableOpticalFlowSessionBindingPointNV
      String
conNameOpticalFlowSessionBindingPointNV
      Int32 -> OpticalFlowSessionBindingPointNV
OpticalFlowSessionBindingPointNV

type OpticalFlowSessionCreateFlagsNV = OpticalFlowSessionCreateFlagBitsNV

-- | VkOpticalFlowSessionCreateFlagBitsNV - Bits specifying flags for optical
-- flow session
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_NV_optical_flow VK_NV_optical_flow>,
-- 'OpticalFlowSessionCreateFlagsNV'
newtype OpticalFlowSessionCreateFlagBitsNV = OpticalFlowSessionCreateFlagBitsNV Flags
  deriving newtype (OpticalFlowSessionCreateFlagBitsNV
-> OpticalFlowSessionCreateFlagBitsNV -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: OpticalFlowSessionCreateFlagBitsNV
-> OpticalFlowSessionCreateFlagBitsNV -> Bool
$c/= :: OpticalFlowSessionCreateFlagBitsNV
-> OpticalFlowSessionCreateFlagBitsNV -> Bool
== :: OpticalFlowSessionCreateFlagBitsNV
-> OpticalFlowSessionCreateFlagBitsNV -> Bool
$c== :: OpticalFlowSessionCreateFlagBitsNV
-> OpticalFlowSessionCreateFlagBitsNV -> Bool
Eq, Eq OpticalFlowSessionCreateFlagBitsNV
OpticalFlowSessionCreateFlagBitsNV
-> OpticalFlowSessionCreateFlagBitsNV -> Bool
OpticalFlowSessionCreateFlagBitsNV
-> OpticalFlowSessionCreateFlagBitsNV -> Ordering
OpticalFlowSessionCreateFlagBitsNV
-> OpticalFlowSessionCreateFlagBitsNV
-> OpticalFlowSessionCreateFlagBitsNV
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: OpticalFlowSessionCreateFlagBitsNV
-> OpticalFlowSessionCreateFlagBitsNV
-> OpticalFlowSessionCreateFlagBitsNV
$cmin :: OpticalFlowSessionCreateFlagBitsNV
-> OpticalFlowSessionCreateFlagBitsNV
-> OpticalFlowSessionCreateFlagBitsNV
max :: OpticalFlowSessionCreateFlagBitsNV
-> OpticalFlowSessionCreateFlagBitsNV
-> OpticalFlowSessionCreateFlagBitsNV
$cmax :: OpticalFlowSessionCreateFlagBitsNV
-> OpticalFlowSessionCreateFlagBitsNV
-> OpticalFlowSessionCreateFlagBitsNV
>= :: OpticalFlowSessionCreateFlagBitsNV
-> OpticalFlowSessionCreateFlagBitsNV -> Bool
$c>= :: OpticalFlowSessionCreateFlagBitsNV
-> OpticalFlowSessionCreateFlagBitsNV -> Bool
> :: OpticalFlowSessionCreateFlagBitsNV
-> OpticalFlowSessionCreateFlagBitsNV -> Bool
$c> :: OpticalFlowSessionCreateFlagBitsNV
-> OpticalFlowSessionCreateFlagBitsNV -> Bool
<= :: OpticalFlowSessionCreateFlagBitsNV
-> OpticalFlowSessionCreateFlagBitsNV -> Bool
$c<= :: OpticalFlowSessionCreateFlagBitsNV
-> OpticalFlowSessionCreateFlagBitsNV -> Bool
< :: OpticalFlowSessionCreateFlagBitsNV
-> OpticalFlowSessionCreateFlagBitsNV -> Bool
$c< :: OpticalFlowSessionCreateFlagBitsNV
-> OpticalFlowSessionCreateFlagBitsNV -> Bool
compare :: OpticalFlowSessionCreateFlagBitsNV
-> OpticalFlowSessionCreateFlagBitsNV -> Ordering
$ccompare :: OpticalFlowSessionCreateFlagBitsNV
-> OpticalFlowSessionCreateFlagBitsNV -> Ordering
Ord, Ptr OpticalFlowSessionCreateFlagBitsNV
-> IO OpticalFlowSessionCreateFlagBitsNV
Ptr OpticalFlowSessionCreateFlagBitsNV
-> Int -> IO OpticalFlowSessionCreateFlagBitsNV
Ptr OpticalFlowSessionCreateFlagBitsNV
-> Int -> OpticalFlowSessionCreateFlagBitsNV -> IO ()
Ptr OpticalFlowSessionCreateFlagBitsNV
-> OpticalFlowSessionCreateFlagBitsNV -> IO ()
OpticalFlowSessionCreateFlagBitsNV -> Int
forall b. Ptr b -> Int -> IO OpticalFlowSessionCreateFlagBitsNV
forall b.
Ptr b -> Int -> OpticalFlowSessionCreateFlagBitsNV -> IO ()
forall a.
(a -> Int)
-> (a -> Int)
-> (Ptr a -> Int -> IO a)
-> (Ptr a -> Int -> a -> IO ())
-> (forall b. Ptr b -> Int -> IO a)
-> (forall b. Ptr b -> Int -> a -> IO ())
-> (Ptr a -> IO a)
-> (Ptr a -> a -> IO ())
-> Storable a
poke :: Ptr OpticalFlowSessionCreateFlagBitsNV
-> OpticalFlowSessionCreateFlagBitsNV -> IO ()
$cpoke :: Ptr OpticalFlowSessionCreateFlagBitsNV
-> OpticalFlowSessionCreateFlagBitsNV -> IO ()
peek :: Ptr OpticalFlowSessionCreateFlagBitsNV
-> IO OpticalFlowSessionCreateFlagBitsNV
$cpeek :: Ptr OpticalFlowSessionCreateFlagBitsNV
-> IO OpticalFlowSessionCreateFlagBitsNV
pokeByteOff :: forall b.
Ptr b -> Int -> OpticalFlowSessionCreateFlagBitsNV -> IO ()
$cpokeByteOff :: forall b.
Ptr b -> Int -> OpticalFlowSessionCreateFlagBitsNV -> IO ()
peekByteOff :: forall b. Ptr b -> Int -> IO OpticalFlowSessionCreateFlagBitsNV
$cpeekByteOff :: forall b. Ptr b -> Int -> IO OpticalFlowSessionCreateFlagBitsNV
pokeElemOff :: Ptr OpticalFlowSessionCreateFlagBitsNV
-> Int -> OpticalFlowSessionCreateFlagBitsNV -> IO ()
$cpokeElemOff :: Ptr OpticalFlowSessionCreateFlagBitsNV
-> Int -> OpticalFlowSessionCreateFlagBitsNV -> IO ()
peekElemOff :: Ptr OpticalFlowSessionCreateFlagBitsNV
-> Int -> IO OpticalFlowSessionCreateFlagBitsNV
$cpeekElemOff :: Ptr OpticalFlowSessionCreateFlagBitsNV
-> Int -> IO OpticalFlowSessionCreateFlagBitsNV
alignment :: OpticalFlowSessionCreateFlagBitsNV -> Int
$calignment :: OpticalFlowSessionCreateFlagBitsNV -> Int
sizeOf :: OpticalFlowSessionCreateFlagBitsNV -> Int
$csizeOf :: OpticalFlowSessionCreateFlagBitsNV -> Int
Storable, OpticalFlowSessionCreateFlagBitsNV
forall a. a -> Zero a
zero :: OpticalFlowSessionCreateFlagBitsNV
$czero :: OpticalFlowSessionCreateFlagBitsNV
Zero, Eq OpticalFlowSessionCreateFlagBitsNV
OpticalFlowSessionCreateFlagBitsNV
Int -> OpticalFlowSessionCreateFlagBitsNV
OpticalFlowSessionCreateFlagBitsNV -> Bool
OpticalFlowSessionCreateFlagBitsNV -> Int
OpticalFlowSessionCreateFlagBitsNV -> Maybe Int
OpticalFlowSessionCreateFlagBitsNV
-> OpticalFlowSessionCreateFlagBitsNV
OpticalFlowSessionCreateFlagBitsNV -> Int -> Bool
OpticalFlowSessionCreateFlagBitsNV
-> Int -> OpticalFlowSessionCreateFlagBitsNV
OpticalFlowSessionCreateFlagBitsNV
-> OpticalFlowSessionCreateFlagBitsNV
-> OpticalFlowSessionCreateFlagBitsNV
forall a.
Eq a
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> a
-> (Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> Bool)
-> (a -> Maybe Int)
-> (a -> Int)
-> (a -> Bool)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int)
-> Bits a
popCount :: OpticalFlowSessionCreateFlagBitsNV -> Int
$cpopCount :: OpticalFlowSessionCreateFlagBitsNV -> Int
rotateR :: OpticalFlowSessionCreateFlagBitsNV
-> Int -> OpticalFlowSessionCreateFlagBitsNV
$crotateR :: OpticalFlowSessionCreateFlagBitsNV
-> Int -> OpticalFlowSessionCreateFlagBitsNV
rotateL :: OpticalFlowSessionCreateFlagBitsNV
-> Int -> OpticalFlowSessionCreateFlagBitsNV
$crotateL :: OpticalFlowSessionCreateFlagBitsNV
-> Int -> OpticalFlowSessionCreateFlagBitsNV
unsafeShiftR :: OpticalFlowSessionCreateFlagBitsNV
-> Int -> OpticalFlowSessionCreateFlagBitsNV
$cunsafeShiftR :: OpticalFlowSessionCreateFlagBitsNV
-> Int -> OpticalFlowSessionCreateFlagBitsNV
shiftR :: OpticalFlowSessionCreateFlagBitsNV
-> Int -> OpticalFlowSessionCreateFlagBitsNV
$cshiftR :: OpticalFlowSessionCreateFlagBitsNV
-> Int -> OpticalFlowSessionCreateFlagBitsNV
unsafeShiftL :: OpticalFlowSessionCreateFlagBitsNV
-> Int -> OpticalFlowSessionCreateFlagBitsNV
$cunsafeShiftL :: OpticalFlowSessionCreateFlagBitsNV
-> Int -> OpticalFlowSessionCreateFlagBitsNV
shiftL :: OpticalFlowSessionCreateFlagBitsNV
-> Int -> OpticalFlowSessionCreateFlagBitsNV
$cshiftL :: OpticalFlowSessionCreateFlagBitsNV
-> Int -> OpticalFlowSessionCreateFlagBitsNV
isSigned :: OpticalFlowSessionCreateFlagBitsNV -> Bool
$cisSigned :: OpticalFlowSessionCreateFlagBitsNV -> Bool
bitSize :: OpticalFlowSessionCreateFlagBitsNV -> Int
$cbitSize :: OpticalFlowSessionCreateFlagBitsNV -> Int
bitSizeMaybe :: OpticalFlowSessionCreateFlagBitsNV -> Maybe Int
$cbitSizeMaybe :: OpticalFlowSessionCreateFlagBitsNV -> Maybe Int
testBit :: OpticalFlowSessionCreateFlagBitsNV -> Int -> Bool
$ctestBit :: OpticalFlowSessionCreateFlagBitsNV -> Int -> Bool
complementBit :: OpticalFlowSessionCreateFlagBitsNV
-> Int -> OpticalFlowSessionCreateFlagBitsNV
$ccomplementBit :: OpticalFlowSessionCreateFlagBitsNV
-> Int -> OpticalFlowSessionCreateFlagBitsNV
clearBit :: OpticalFlowSessionCreateFlagBitsNV
-> Int -> OpticalFlowSessionCreateFlagBitsNV
$cclearBit :: OpticalFlowSessionCreateFlagBitsNV
-> Int -> OpticalFlowSessionCreateFlagBitsNV
setBit :: OpticalFlowSessionCreateFlagBitsNV
-> Int -> OpticalFlowSessionCreateFlagBitsNV
$csetBit :: OpticalFlowSessionCreateFlagBitsNV
-> Int -> OpticalFlowSessionCreateFlagBitsNV
bit :: Int -> OpticalFlowSessionCreateFlagBitsNV
$cbit :: Int -> OpticalFlowSessionCreateFlagBitsNV
zeroBits :: OpticalFlowSessionCreateFlagBitsNV
$czeroBits :: OpticalFlowSessionCreateFlagBitsNV
rotate :: OpticalFlowSessionCreateFlagBitsNV
-> Int -> OpticalFlowSessionCreateFlagBitsNV
$crotate :: OpticalFlowSessionCreateFlagBitsNV
-> Int -> OpticalFlowSessionCreateFlagBitsNV
shift :: OpticalFlowSessionCreateFlagBitsNV
-> Int -> OpticalFlowSessionCreateFlagBitsNV
$cshift :: OpticalFlowSessionCreateFlagBitsNV
-> Int -> OpticalFlowSessionCreateFlagBitsNV
complement :: OpticalFlowSessionCreateFlagBitsNV
-> OpticalFlowSessionCreateFlagBitsNV
$ccomplement :: OpticalFlowSessionCreateFlagBitsNV
-> OpticalFlowSessionCreateFlagBitsNV
xor :: OpticalFlowSessionCreateFlagBitsNV
-> OpticalFlowSessionCreateFlagBitsNV
-> OpticalFlowSessionCreateFlagBitsNV
$cxor :: OpticalFlowSessionCreateFlagBitsNV
-> OpticalFlowSessionCreateFlagBitsNV
-> OpticalFlowSessionCreateFlagBitsNV
.|. :: OpticalFlowSessionCreateFlagBitsNV
-> OpticalFlowSessionCreateFlagBitsNV
-> OpticalFlowSessionCreateFlagBitsNV
$c.|. :: OpticalFlowSessionCreateFlagBitsNV
-> OpticalFlowSessionCreateFlagBitsNV
-> OpticalFlowSessionCreateFlagBitsNV
.&. :: OpticalFlowSessionCreateFlagBitsNV
-> OpticalFlowSessionCreateFlagBitsNV
-> OpticalFlowSessionCreateFlagBitsNV
$c.&. :: OpticalFlowSessionCreateFlagBitsNV
-> OpticalFlowSessionCreateFlagBitsNV
-> OpticalFlowSessionCreateFlagBitsNV
Bits, Bits OpticalFlowSessionCreateFlagBitsNV
OpticalFlowSessionCreateFlagBitsNV -> Int
forall b.
Bits b -> (b -> Int) -> (b -> Int) -> (b -> Int) -> FiniteBits b
countTrailingZeros :: OpticalFlowSessionCreateFlagBitsNV -> Int
$ccountTrailingZeros :: OpticalFlowSessionCreateFlagBitsNV -> Int
countLeadingZeros :: OpticalFlowSessionCreateFlagBitsNV -> Int
$ccountLeadingZeros :: OpticalFlowSessionCreateFlagBitsNV -> Int
finiteBitSize :: OpticalFlowSessionCreateFlagBitsNV -> Int
$cfiniteBitSize :: OpticalFlowSessionCreateFlagBitsNV -> Int
FiniteBits)

-- | 'OPTICAL_FLOW_SESSION_CREATE_ENABLE_HINT_BIT_NV' specifies that a
-- 'Vulkan.Core10.Handles.ImageView' with external flow vectors will be
-- used as hints in performing the motion search and /must/ be bound to
-- 'OPTICAL_FLOW_SESSION_BINDING_POINT_HINT_NV'.
pattern $bOPTICAL_FLOW_SESSION_CREATE_ENABLE_HINT_BIT_NV :: OpticalFlowSessionCreateFlagBitsNV
$mOPTICAL_FLOW_SESSION_CREATE_ENABLE_HINT_BIT_NV :: forall {r}.
OpticalFlowSessionCreateFlagBitsNV
-> ((# #) -> r) -> ((# #) -> r) -> r
OPTICAL_FLOW_SESSION_CREATE_ENABLE_HINT_BIT_NV = OpticalFlowSessionCreateFlagBitsNV 0x00000001

-- | 'OPTICAL_FLOW_SESSION_CREATE_ENABLE_COST_BIT_NV' specifies that the cost
-- for the forward flow is generated in a 'Vulkan.Core10.Handles.ImageView'
-- which /must/ be bound to 'OPTICAL_FLOW_SESSION_BINDING_POINT_COST_NV'.
-- Additionally, if 'OPTICAL_FLOW_SESSION_CREATE_BOTH_DIRECTIONS_BIT_NV' is
-- also set, the cost for backward flow is generated in a
-- 'Vulkan.Core10.Handles.ImageView' which /must/ be bound to
-- 'OPTICAL_FLOW_SESSION_BINDING_POINT_BACKWARD_COST_NV'. The cost is the
-- confidence level of the flow vector for each grid in the frame. The Cost
-- implies how (in)accurate the flow vector is. Higher cost value implies
-- the flow vector to be less accurate and vice-versa.
pattern $bOPTICAL_FLOW_SESSION_CREATE_ENABLE_COST_BIT_NV :: OpticalFlowSessionCreateFlagBitsNV
$mOPTICAL_FLOW_SESSION_CREATE_ENABLE_COST_BIT_NV :: forall {r}.
OpticalFlowSessionCreateFlagBitsNV
-> ((# #) -> r) -> ((# #) -> r) -> r
OPTICAL_FLOW_SESSION_CREATE_ENABLE_COST_BIT_NV = OpticalFlowSessionCreateFlagBitsNV 0x00000002

-- | 'OPTICAL_FLOW_SESSION_CREATE_ENABLE_GLOBAL_FLOW_BIT_NV' specifies that a
-- global flow vector is estimated from forward flow in a single pixel
-- 'Vulkan.Core10.Handles.ImageView' which /must/ be bound to
-- 'OPTICAL_FLOW_SESSION_BINDING_POINT_GLOBAL_FLOW_NV'.
pattern $bOPTICAL_FLOW_SESSION_CREATE_ENABLE_GLOBAL_FLOW_BIT_NV :: OpticalFlowSessionCreateFlagBitsNV
$mOPTICAL_FLOW_SESSION_CREATE_ENABLE_GLOBAL_FLOW_BIT_NV :: forall {r}.
OpticalFlowSessionCreateFlagBitsNV
-> ((# #) -> r) -> ((# #) -> r) -> r
OPTICAL_FLOW_SESSION_CREATE_ENABLE_GLOBAL_FLOW_BIT_NV = OpticalFlowSessionCreateFlagBitsNV 0x00000004

-- | 'OPTICAL_FLOW_SESSION_CREATE_ALLOW_REGIONS_BIT_NV' specifies that
-- regions of interest /can/ be specified in 'OpticalFlowExecuteInfoNV'.
pattern $bOPTICAL_FLOW_SESSION_CREATE_ALLOW_REGIONS_BIT_NV :: OpticalFlowSessionCreateFlagBitsNV
$mOPTICAL_FLOW_SESSION_CREATE_ALLOW_REGIONS_BIT_NV :: forall {r}.
OpticalFlowSessionCreateFlagBitsNV
-> ((# #) -> r) -> ((# #) -> r) -> r
OPTICAL_FLOW_SESSION_CREATE_ALLOW_REGIONS_BIT_NV = OpticalFlowSessionCreateFlagBitsNV 0x00000008

-- | 'OPTICAL_FLOW_SESSION_CREATE_BOTH_DIRECTIONS_BIT_NV' specifies that
-- backward flow is generated in addition to forward flow which is always
-- generated.
pattern $bOPTICAL_FLOW_SESSION_CREATE_BOTH_DIRECTIONS_BIT_NV :: OpticalFlowSessionCreateFlagBitsNV
$mOPTICAL_FLOW_SESSION_CREATE_BOTH_DIRECTIONS_BIT_NV :: forall {r}.
OpticalFlowSessionCreateFlagBitsNV
-> ((# #) -> r) -> ((# #) -> r) -> r
OPTICAL_FLOW_SESSION_CREATE_BOTH_DIRECTIONS_BIT_NV = OpticalFlowSessionCreateFlagBitsNV 0x00000010

conNameOpticalFlowSessionCreateFlagBitsNV :: String
conNameOpticalFlowSessionCreateFlagBitsNV :: String
conNameOpticalFlowSessionCreateFlagBitsNV = String
"OpticalFlowSessionCreateFlagBitsNV"

enumPrefixOpticalFlowSessionCreateFlagBitsNV :: String
enumPrefixOpticalFlowSessionCreateFlagBitsNV :: String
enumPrefixOpticalFlowSessionCreateFlagBitsNV = String
"OPTICAL_FLOW_SESSION_CREATE_"

showTableOpticalFlowSessionCreateFlagBitsNV :: [(OpticalFlowSessionCreateFlagBitsNV, String)]
showTableOpticalFlowSessionCreateFlagBitsNV :: [(OpticalFlowSessionCreateFlagBitsNV, String)]
showTableOpticalFlowSessionCreateFlagBitsNV =
  [
    ( OpticalFlowSessionCreateFlagBitsNV
OPTICAL_FLOW_SESSION_CREATE_ENABLE_HINT_BIT_NV
    , String
"ENABLE_HINT_BIT_NV"
    )
  ,
    ( OpticalFlowSessionCreateFlagBitsNV
OPTICAL_FLOW_SESSION_CREATE_ENABLE_COST_BIT_NV
    , String
"ENABLE_COST_BIT_NV"
    )
  ,
    ( OpticalFlowSessionCreateFlagBitsNV
OPTICAL_FLOW_SESSION_CREATE_ENABLE_GLOBAL_FLOW_BIT_NV
    , String
"ENABLE_GLOBAL_FLOW_BIT_NV"
    )
  ,
    ( OpticalFlowSessionCreateFlagBitsNV
OPTICAL_FLOW_SESSION_CREATE_ALLOW_REGIONS_BIT_NV
    , String
"ALLOW_REGIONS_BIT_NV"
    )
  ,
    ( OpticalFlowSessionCreateFlagBitsNV
OPTICAL_FLOW_SESSION_CREATE_BOTH_DIRECTIONS_BIT_NV
    , String
"BOTH_DIRECTIONS_BIT_NV"
    )
  ]

instance Show OpticalFlowSessionCreateFlagBitsNV where
  showsPrec :: Int -> OpticalFlowSessionCreateFlagBitsNV -> ShowS
showsPrec =
    forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec
      String
enumPrefixOpticalFlowSessionCreateFlagBitsNV
      [(OpticalFlowSessionCreateFlagBitsNV, String)]
showTableOpticalFlowSessionCreateFlagBitsNV
      String
conNameOpticalFlowSessionCreateFlagBitsNV
      (\(OpticalFlowSessionCreateFlagBitsNV Flags
x) -> Flags
x)
      (\Flags
x -> String -> ShowS
showString String
"0x" forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. (Integral a, Show a) => a -> ShowS
showHex Flags
x)

instance Read OpticalFlowSessionCreateFlagBitsNV where
  readPrec :: ReadPrec OpticalFlowSessionCreateFlagBitsNV
readPrec =
    forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec
      String
enumPrefixOpticalFlowSessionCreateFlagBitsNV
      [(OpticalFlowSessionCreateFlagBitsNV, String)]
showTableOpticalFlowSessionCreateFlagBitsNV
      String
conNameOpticalFlowSessionCreateFlagBitsNV
      Flags -> OpticalFlowSessionCreateFlagBitsNV
OpticalFlowSessionCreateFlagBitsNV

type OpticalFlowExecuteFlagsNV = OpticalFlowExecuteFlagBitsNV

-- | VkOpticalFlowExecuteFlagBitsNV - Bits specifying flags for a optical
-- flow vector calculation
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_NV_optical_flow VK_NV_optical_flow>,
-- 'OpticalFlowExecuteFlagsNV'
newtype OpticalFlowExecuteFlagBitsNV = OpticalFlowExecuteFlagBitsNV Flags
  deriving newtype (OpticalFlowExecuteFlagBitsNV
-> OpticalFlowExecuteFlagBitsNV -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: OpticalFlowExecuteFlagBitsNV
-> OpticalFlowExecuteFlagBitsNV -> Bool
$c/= :: OpticalFlowExecuteFlagBitsNV
-> OpticalFlowExecuteFlagBitsNV -> Bool
== :: OpticalFlowExecuteFlagBitsNV
-> OpticalFlowExecuteFlagBitsNV -> Bool
$c== :: OpticalFlowExecuteFlagBitsNV
-> OpticalFlowExecuteFlagBitsNV -> Bool
Eq, Eq OpticalFlowExecuteFlagBitsNV
OpticalFlowExecuteFlagBitsNV
-> OpticalFlowExecuteFlagBitsNV -> Bool
OpticalFlowExecuteFlagBitsNV
-> OpticalFlowExecuteFlagBitsNV -> Ordering
OpticalFlowExecuteFlagBitsNV
-> OpticalFlowExecuteFlagBitsNV -> OpticalFlowExecuteFlagBitsNV
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: OpticalFlowExecuteFlagBitsNV
-> OpticalFlowExecuteFlagBitsNV -> OpticalFlowExecuteFlagBitsNV
$cmin :: OpticalFlowExecuteFlagBitsNV
-> OpticalFlowExecuteFlagBitsNV -> OpticalFlowExecuteFlagBitsNV
max :: OpticalFlowExecuteFlagBitsNV
-> OpticalFlowExecuteFlagBitsNV -> OpticalFlowExecuteFlagBitsNV
$cmax :: OpticalFlowExecuteFlagBitsNV
-> OpticalFlowExecuteFlagBitsNV -> OpticalFlowExecuteFlagBitsNV
>= :: OpticalFlowExecuteFlagBitsNV
-> OpticalFlowExecuteFlagBitsNV -> Bool
$c>= :: OpticalFlowExecuteFlagBitsNV
-> OpticalFlowExecuteFlagBitsNV -> Bool
> :: OpticalFlowExecuteFlagBitsNV
-> OpticalFlowExecuteFlagBitsNV -> Bool
$c> :: OpticalFlowExecuteFlagBitsNV
-> OpticalFlowExecuteFlagBitsNV -> Bool
<= :: OpticalFlowExecuteFlagBitsNV
-> OpticalFlowExecuteFlagBitsNV -> Bool
$c<= :: OpticalFlowExecuteFlagBitsNV
-> OpticalFlowExecuteFlagBitsNV -> Bool
< :: OpticalFlowExecuteFlagBitsNV
-> OpticalFlowExecuteFlagBitsNV -> Bool
$c< :: OpticalFlowExecuteFlagBitsNV
-> OpticalFlowExecuteFlagBitsNV -> Bool
compare :: OpticalFlowExecuteFlagBitsNV
-> OpticalFlowExecuteFlagBitsNV -> Ordering
$ccompare :: OpticalFlowExecuteFlagBitsNV
-> OpticalFlowExecuteFlagBitsNV -> Ordering
Ord, Ptr OpticalFlowExecuteFlagBitsNV -> IO OpticalFlowExecuteFlagBitsNV
Ptr OpticalFlowExecuteFlagBitsNV
-> Int -> IO OpticalFlowExecuteFlagBitsNV
Ptr OpticalFlowExecuteFlagBitsNV
-> Int -> OpticalFlowExecuteFlagBitsNV -> IO ()
Ptr OpticalFlowExecuteFlagBitsNV
-> OpticalFlowExecuteFlagBitsNV -> IO ()
OpticalFlowExecuteFlagBitsNV -> Int
forall b. Ptr b -> Int -> IO OpticalFlowExecuteFlagBitsNV
forall b. Ptr b -> Int -> OpticalFlowExecuteFlagBitsNV -> IO ()
forall a.
(a -> Int)
-> (a -> Int)
-> (Ptr a -> Int -> IO a)
-> (Ptr a -> Int -> a -> IO ())
-> (forall b. Ptr b -> Int -> IO a)
-> (forall b. Ptr b -> Int -> a -> IO ())
-> (Ptr a -> IO a)
-> (Ptr a -> a -> IO ())
-> Storable a
poke :: Ptr OpticalFlowExecuteFlagBitsNV
-> OpticalFlowExecuteFlagBitsNV -> IO ()
$cpoke :: Ptr OpticalFlowExecuteFlagBitsNV
-> OpticalFlowExecuteFlagBitsNV -> IO ()
peek :: Ptr OpticalFlowExecuteFlagBitsNV -> IO OpticalFlowExecuteFlagBitsNV
$cpeek :: Ptr OpticalFlowExecuteFlagBitsNV -> IO OpticalFlowExecuteFlagBitsNV
pokeByteOff :: forall b. Ptr b -> Int -> OpticalFlowExecuteFlagBitsNV -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> OpticalFlowExecuteFlagBitsNV -> IO ()
peekByteOff :: forall b. Ptr b -> Int -> IO OpticalFlowExecuteFlagBitsNV
$cpeekByteOff :: forall b. Ptr b -> Int -> IO OpticalFlowExecuteFlagBitsNV
pokeElemOff :: Ptr OpticalFlowExecuteFlagBitsNV
-> Int -> OpticalFlowExecuteFlagBitsNV -> IO ()
$cpokeElemOff :: Ptr OpticalFlowExecuteFlagBitsNV
-> Int -> OpticalFlowExecuteFlagBitsNV -> IO ()
peekElemOff :: Ptr OpticalFlowExecuteFlagBitsNV
-> Int -> IO OpticalFlowExecuteFlagBitsNV
$cpeekElemOff :: Ptr OpticalFlowExecuteFlagBitsNV
-> Int -> IO OpticalFlowExecuteFlagBitsNV
alignment :: OpticalFlowExecuteFlagBitsNV -> Int
$calignment :: OpticalFlowExecuteFlagBitsNV -> Int
sizeOf :: OpticalFlowExecuteFlagBitsNV -> Int
$csizeOf :: OpticalFlowExecuteFlagBitsNV -> Int
Storable, OpticalFlowExecuteFlagBitsNV
forall a. a -> Zero a
zero :: OpticalFlowExecuteFlagBitsNV
$czero :: OpticalFlowExecuteFlagBitsNV
Zero, Eq OpticalFlowExecuteFlagBitsNV
OpticalFlowExecuteFlagBitsNV
Int -> OpticalFlowExecuteFlagBitsNV
OpticalFlowExecuteFlagBitsNV -> Bool
OpticalFlowExecuteFlagBitsNV -> Int
OpticalFlowExecuteFlagBitsNV -> Maybe Int
OpticalFlowExecuteFlagBitsNV -> OpticalFlowExecuteFlagBitsNV
OpticalFlowExecuteFlagBitsNV -> Int -> Bool
OpticalFlowExecuteFlagBitsNV -> Int -> OpticalFlowExecuteFlagBitsNV
OpticalFlowExecuteFlagBitsNV
-> OpticalFlowExecuteFlagBitsNV -> OpticalFlowExecuteFlagBitsNV
forall a.
Eq a
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> a
-> (Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> Bool)
-> (a -> Maybe Int)
-> (a -> Int)
-> (a -> Bool)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int)
-> Bits a
popCount :: OpticalFlowExecuteFlagBitsNV -> Int
$cpopCount :: OpticalFlowExecuteFlagBitsNV -> Int
rotateR :: OpticalFlowExecuteFlagBitsNV -> Int -> OpticalFlowExecuteFlagBitsNV
$crotateR :: OpticalFlowExecuteFlagBitsNV -> Int -> OpticalFlowExecuteFlagBitsNV
rotateL :: OpticalFlowExecuteFlagBitsNV -> Int -> OpticalFlowExecuteFlagBitsNV
$crotateL :: OpticalFlowExecuteFlagBitsNV -> Int -> OpticalFlowExecuteFlagBitsNV
unsafeShiftR :: OpticalFlowExecuteFlagBitsNV -> Int -> OpticalFlowExecuteFlagBitsNV
$cunsafeShiftR :: OpticalFlowExecuteFlagBitsNV -> Int -> OpticalFlowExecuteFlagBitsNV
shiftR :: OpticalFlowExecuteFlagBitsNV -> Int -> OpticalFlowExecuteFlagBitsNV
$cshiftR :: OpticalFlowExecuteFlagBitsNV -> Int -> OpticalFlowExecuteFlagBitsNV
unsafeShiftL :: OpticalFlowExecuteFlagBitsNV -> Int -> OpticalFlowExecuteFlagBitsNV
$cunsafeShiftL :: OpticalFlowExecuteFlagBitsNV -> Int -> OpticalFlowExecuteFlagBitsNV
shiftL :: OpticalFlowExecuteFlagBitsNV -> Int -> OpticalFlowExecuteFlagBitsNV
$cshiftL :: OpticalFlowExecuteFlagBitsNV -> Int -> OpticalFlowExecuteFlagBitsNV
isSigned :: OpticalFlowExecuteFlagBitsNV -> Bool
$cisSigned :: OpticalFlowExecuteFlagBitsNV -> Bool
bitSize :: OpticalFlowExecuteFlagBitsNV -> Int
$cbitSize :: OpticalFlowExecuteFlagBitsNV -> Int
bitSizeMaybe :: OpticalFlowExecuteFlagBitsNV -> Maybe Int
$cbitSizeMaybe :: OpticalFlowExecuteFlagBitsNV -> Maybe Int
testBit :: OpticalFlowExecuteFlagBitsNV -> Int -> Bool
$ctestBit :: OpticalFlowExecuteFlagBitsNV -> Int -> Bool
complementBit :: OpticalFlowExecuteFlagBitsNV -> Int -> OpticalFlowExecuteFlagBitsNV
$ccomplementBit :: OpticalFlowExecuteFlagBitsNV -> Int -> OpticalFlowExecuteFlagBitsNV
clearBit :: OpticalFlowExecuteFlagBitsNV -> Int -> OpticalFlowExecuteFlagBitsNV
$cclearBit :: OpticalFlowExecuteFlagBitsNV -> Int -> OpticalFlowExecuteFlagBitsNV
setBit :: OpticalFlowExecuteFlagBitsNV -> Int -> OpticalFlowExecuteFlagBitsNV
$csetBit :: OpticalFlowExecuteFlagBitsNV -> Int -> OpticalFlowExecuteFlagBitsNV
bit :: Int -> OpticalFlowExecuteFlagBitsNV
$cbit :: Int -> OpticalFlowExecuteFlagBitsNV
zeroBits :: OpticalFlowExecuteFlagBitsNV
$czeroBits :: OpticalFlowExecuteFlagBitsNV
rotate :: OpticalFlowExecuteFlagBitsNV -> Int -> OpticalFlowExecuteFlagBitsNV
$crotate :: OpticalFlowExecuteFlagBitsNV -> Int -> OpticalFlowExecuteFlagBitsNV
shift :: OpticalFlowExecuteFlagBitsNV -> Int -> OpticalFlowExecuteFlagBitsNV
$cshift :: OpticalFlowExecuteFlagBitsNV -> Int -> OpticalFlowExecuteFlagBitsNV
complement :: OpticalFlowExecuteFlagBitsNV -> OpticalFlowExecuteFlagBitsNV
$ccomplement :: OpticalFlowExecuteFlagBitsNV -> OpticalFlowExecuteFlagBitsNV
xor :: OpticalFlowExecuteFlagBitsNV
-> OpticalFlowExecuteFlagBitsNV -> OpticalFlowExecuteFlagBitsNV
$cxor :: OpticalFlowExecuteFlagBitsNV
-> OpticalFlowExecuteFlagBitsNV -> OpticalFlowExecuteFlagBitsNV
.|. :: OpticalFlowExecuteFlagBitsNV
-> OpticalFlowExecuteFlagBitsNV -> OpticalFlowExecuteFlagBitsNV
$c.|. :: OpticalFlowExecuteFlagBitsNV
-> OpticalFlowExecuteFlagBitsNV -> OpticalFlowExecuteFlagBitsNV
.&. :: OpticalFlowExecuteFlagBitsNV
-> OpticalFlowExecuteFlagBitsNV -> OpticalFlowExecuteFlagBitsNV
$c.&. :: OpticalFlowExecuteFlagBitsNV
-> OpticalFlowExecuteFlagBitsNV -> OpticalFlowExecuteFlagBitsNV
Bits, Bits OpticalFlowExecuteFlagBitsNV
OpticalFlowExecuteFlagBitsNV -> Int
forall b.
Bits b -> (b -> Int) -> (b -> Int) -> (b -> Int) -> FiniteBits b
countTrailingZeros :: OpticalFlowExecuteFlagBitsNV -> Int
$ccountTrailingZeros :: OpticalFlowExecuteFlagBitsNV -> Int
countLeadingZeros :: OpticalFlowExecuteFlagBitsNV -> Int
$ccountLeadingZeros :: OpticalFlowExecuteFlagBitsNV -> Int
finiteBitSize :: OpticalFlowExecuteFlagBitsNV -> Int
$cfiniteBitSize :: OpticalFlowExecuteFlagBitsNV -> Int
FiniteBits)

-- | 'OPTICAL_FLOW_EXECUTE_DISABLE_TEMPORAL_HINTS_BIT_NV' specifies that
-- temporal hints from previously generated flow vectors are not used. If
-- temporal hints are enabled, optical flow vectors from previous
-- 'cmdOpticalFlowExecuteNV' call are automatically used as hints for the
-- current 'cmdOpticalFlowExecuteNV' call, to take advantage of temporal
-- correlation in a video sequence. Temporal hints should be disabled if
-- there is a-priori knowledge of no temporal correlation (e.g. a scene
-- change, independent successive frame pairs).
pattern $bOPTICAL_FLOW_EXECUTE_DISABLE_TEMPORAL_HINTS_BIT_NV :: OpticalFlowExecuteFlagBitsNV
$mOPTICAL_FLOW_EXECUTE_DISABLE_TEMPORAL_HINTS_BIT_NV :: forall {r}.
OpticalFlowExecuteFlagBitsNV -> ((# #) -> r) -> ((# #) -> r) -> r
OPTICAL_FLOW_EXECUTE_DISABLE_TEMPORAL_HINTS_BIT_NV = OpticalFlowExecuteFlagBitsNV 0x00000001

conNameOpticalFlowExecuteFlagBitsNV :: String
conNameOpticalFlowExecuteFlagBitsNV :: String
conNameOpticalFlowExecuteFlagBitsNV = String
"OpticalFlowExecuteFlagBitsNV"

enumPrefixOpticalFlowExecuteFlagBitsNV :: String
enumPrefixOpticalFlowExecuteFlagBitsNV :: String
enumPrefixOpticalFlowExecuteFlagBitsNV = String
"OPTICAL_FLOW_EXECUTE_DISABLE_TEMPORAL_HINTS_BIT_NV"

showTableOpticalFlowExecuteFlagBitsNV :: [(OpticalFlowExecuteFlagBitsNV, String)]
showTableOpticalFlowExecuteFlagBitsNV :: [(OpticalFlowExecuteFlagBitsNV, String)]
showTableOpticalFlowExecuteFlagBitsNV =
  [
    ( OpticalFlowExecuteFlagBitsNV
OPTICAL_FLOW_EXECUTE_DISABLE_TEMPORAL_HINTS_BIT_NV
    , String
""
    )
  ]

instance Show OpticalFlowExecuteFlagBitsNV where
  showsPrec :: Int -> OpticalFlowExecuteFlagBitsNV -> ShowS
showsPrec =
    forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec
      String
enumPrefixOpticalFlowExecuteFlagBitsNV
      [(OpticalFlowExecuteFlagBitsNV, String)]
showTableOpticalFlowExecuteFlagBitsNV
      String
conNameOpticalFlowExecuteFlagBitsNV
      (\(OpticalFlowExecuteFlagBitsNV Flags
x) -> Flags
x)
      (\Flags
x -> String -> ShowS
showString String
"0x" forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. (Integral a, Show a) => a -> ShowS
showHex Flags
x)

instance Read OpticalFlowExecuteFlagBitsNV where
  readPrec :: ReadPrec OpticalFlowExecuteFlagBitsNV
readPrec =
    forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec
      String
enumPrefixOpticalFlowExecuteFlagBitsNV
      [(OpticalFlowExecuteFlagBitsNV, String)]
showTableOpticalFlowExecuteFlagBitsNV
      String
conNameOpticalFlowExecuteFlagBitsNV
      Flags -> OpticalFlowExecuteFlagBitsNV
OpticalFlowExecuteFlagBitsNV

type NV_OPTICAL_FLOW_SPEC_VERSION = 1

-- No documentation found for TopLevel "VK_NV_OPTICAL_FLOW_SPEC_VERSION"
pattern NV_OPTICAL_FLOW_SPEC_VERSION :: forall a . Integral a => a
pattern $bNV_OPTICAL_FLOW_SPEC_VERSION :: forall a. Integral a => a
$mNV_OPTICAL_FLOW_SPEC_VERSION :: forall {r} {a}.
Integral a =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
NV_OPTICAL_FLOW_SPEC_VERSION = 1


type NV_OPTICAL_FLOW_EXTENSION_NAME = "VK_NV_optical_flow"

-- No documentation found for TopLevel "VK_NV_OPTICAL_FLOW_EXTENSION_NAME"
pattern NV_OPTICAL_FLOW_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $bNV_OPTICAL_FLOW_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
$mNV_OPTICAL_FLOW_EXTENSION_NAME :: forall {r} {a}.
(Eq a, IsString a) =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
NV_OPTICAL_FLOW_EXTENSION_NAME = "VK_NV_optical_flow"