{-# language CPP #-}
-- | = Name
--
-- VK_NV_ray_tracing_motion_blur - device extension
--
-- == VK_NV_ray_tracing_motion_blur
--
-- [__Name String__]
--     @VK_NV_ray_tracing_motion_blur@
--
-- [__Extension Type__]
--     Device extension
--
-- [__Registered Extension Number__]
--     328
--
-- [__Revision__]
--     1
--
-- [__Ratification Status__]
--     Not ratified
--
-- [__Extension and Version Dependencies__]
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_KHR_ray_tracing_pipeline VK_KHR_ray_tracing_pipeline>
--
-- [__Contact__]
--
--     -   Eric Werness
--
-- == Other Extension Metadata
--
-- [__Last Modified Date__]
--     2021-06-16
--
-- [__Interactions and External Dependencies__]
--
--     -   This extension requires
--         <https://htmlpreview.github.io/?https://github.com/KhronosGroup/SPIRV-Registry/blob/master/extensions/NV/SPV_NV_ray_tracing_motion_blur.html SPV_NV_ray_tracing_motion_blur>
--
--     -   This extension provides API support for
--         <https://github.com/KhronosGroup/GLSL/blob/master/extensions/nv/GLSL_NV_ray_tracing_motion_blur.txt GL_NV_ray_tracing_motion_blur>
--
-- [__Contributors__]
--
--     -   Eric Werness, NVIDIA
--
--     -   Ashwin Lele, NVIDIA
--
-- == Description
--
-- Ray tracing support in the API provides an efficient mechanism to
-- intersect rays against static geometry, but rendering algorithms often
-- want to support motion, which is more efficiently supported with
-- motion-specific algorithms. This extension adds a set of mechanisms to
-- support fast tracing of moving geometry:
--
-- -   A ray pipeline trace call which takes a time parameter
--
-- -   Flags to enable motion support in an acceleration structure
--
-- -   Support for time-varying vertex positions in a geometry
--
-- -   Motion instances to move existing instances over time
--
-- The motion represented here is parameterized across a normalized
-- timestep between 0.0 and 1.0. A motion trace using @OpTraceRayMotionNV@
-- provides a time within that normalized range to be used when
-- intersecting that ray with geometry. The geometry can be provided with
-- motion by a combination of adding a second vertex position for time of
-- 1.0 using 'AccelerationStructureGeometryMotionTrianglesDataNV' and
-- providing multiple transforms in the instance using
-- 'AccelerationStructureMotionInstanceNV'.
--
-- == New Structures
--
-- -   'AccelerationStructureMatrixMotionInstanceNV'
--
-- -   'AccelerationStructureMotionInstanceNV'
--
-- -   'AccelerationStructureSRTMotionInstanceNV'
--
-- -   'SRTDataNV'
--
-- -   Extending
--     'Vulkan.Extensions.VK_KHR_acceleration_structure.AccelerationStructureCreateInfoKHR':
--
--     -   'AccelerationStructureMotionInfoNV'
--
-- -   Extending
--     'Vulkan.Extensions.VK_KHR_acceleration_structure.AccelerationStructureGeometryTrianglesDataKHR':
--
--     -   'AccelerationStructureGeometryMotionTrianglesDataNV'
--
-- -   Extending
--     'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.PhysicalDeviceFeatures2',
--     'Vulkan.Core10.Device.DeviceCreateInfo':
--
--     -   'PhysicalDeviceRayTracingMotionBlurFeaturesNV'
--
-- == New Unions
--
-- -   'AccelerationStructureMotionInstanceDataNV'
--
-- == New Enums
--
-- -   'AccelerationStructureMotionInstanceTypeNV'
--
-- == New Bitmasks
--
-- -   'AccelerationStructureMotionInfoFlagsNV'
--
-- -   'AccelerationStructureMotionInstanceFlagsNV'
--
-- == New Enum Constants
--
-- -   'NV_RAY_TRACING_MOTION_BLUR_EXTENSION_NAME'
--
-- -   'NV_RAY_TRACING_MOTION_BLUR_SPEC_VERSION'
--
-- -   Extending
--     'Vulkan.Extensions.VK_KHR_acceleration_structure.AccelerationStructureCreateFlagBitsKHR':
--
--     -   'Vulkan.Extensions.VK_KHR_acceleration_structure.ACCELERATION_STRUCTURE_CREATE_MOTION_BIT_NV'
--
-- -   Extending
--     'Vulkan.Extensions.VK_KHR_acceleration_structure.BuildAccelerationStructureFlagBitsKHR':
--
--     -   'Vulkan.Extensions.VK_KHR_acceleration_structure.BUILD_ACCELERATION_STRUCTURE_MOTION_BIT_NV'
--
-- -   Extending
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PipelineCreateFlagBits':
--
--     -   'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_RAY_TRACING_ALLOW_MOTION_BIT_NV'
--
-- -   Extending 'Vulkan.Core10.Enums.StructureType.StructureType':
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_MOTION_TRIANGLES_DATA_NV'
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_ACCELERATION_STRUCTURE_MOTION_INFO_NV'
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_MOTION_BLUR_FEATURES_NV'
--
-- == Issues
--
-- (1) What size is VkAccelerationStructureMotionInstanceNV?
--
-- -   Added a note on the structure size and made the stride explicit in
--     the language.
--
-- (2) Allow arrayOfPointers for motion TLAS?
--
-- -   Yes, with a packed encoding to minimize the amount of data sent for
--     metadata.
--
-- == Version History
--
-- -   Revision 1, 2020-06-16 (Eric Werness, Ashwin Lele)
--
--     -   Initial external release
--
-- == See Also
--
-- 'AccelerationStructureGeometryMotionTrianglesDataNV',
-- 'AccelerationStructureMatrixMotionInstanceNV',
-- 'AccelerationStructureMotionInfoFlagsNV',
-- 'AccelerationStructureMotionInfoNV',
-- 'AccelerationStructureMotionInstanceDataNV',
-- 'AccelerationStructureMotionInstanceFlagsNV',
-- 'AccelerationStructureMotionInstanceNV',
-- 'AccelerationStructureMotionInstanceTypeNV',
-- 'AccelerationStructureSRTMotionInstanceNV',
-- 'PhysicalDeviceRayTracingMotionBlurFeaturesNV', 'SRTDataNV'
--
-- == Document Notes
--
-- For more information, see the
-- <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#VK_NV_ray_tracing_motion_blur 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_ray_tracing_motion_blur  ( PhysicalDeviceRayTracingMotionBlurFeaturesNV(..)
                                                        , AccelerationStructureGeometryMotionTrianglesDataNV(..)
                                                        , AccelerationStructureMotionInfoNV(..)
                                                        , SRTDataNV(..)
                                                        , AccelerationStructureSRTMotionInstanceNV(..)
                                                        , AccelerationStructureMatrixMotionInstanceNV(..)
                                                        , AccelerationStructureMotionInstanceNV(..)
                                                        , AccelerationStructureMotionInstanceDataNV(..)
                                                        , AccelerationStructureMotionInfoFlagsNV(..)
                                                        , AccelerationStructureMotionInstanceFlagsNV(..)
                                                        , AccelerationStructureMotionInstanceTypeNV( ACCELERATION_STRUCTURE_MOTION_INSTANCE_TYPE_STATIC_NV
                                                                                                   , ACCELERATION_STRUCTURE_MOTION_INSTANCE_TYPE_MATRIX_MOTION_NV
                                                                                                   , ACCELERATION_STRUCTURE_MOTION_INSTANCE_TYPE_SRT_MOTION_NV
                                                                                                   , ..
                                                                                                   )
                                                        , NV_RAY_TRACING_MOTION_BLUR_SPEC_VERSION
                                                        , pattern NV_RAY_TRACING_MOTION_BLUR_SPEC_VERSION
                                                        , NV_RAY_TRACING_MOTION_BLUR_EXTENSION_NAME
                                                        , pattern NV_RAY_TRACING_MOTION_BLUR_EXTENSION_NAME
                                                        , TransformMatrixKHR(..)
                                                        , AccelerationStructureInstanceKHR(..)
                                                        , DeviceOrHostAddressConstKHR(..)
                                                        , GeometryInstanceFlagBitsKHR(..)
                                                        , GeometryInstanceFlagsKHR
                                                        , BuildAccelerationStructureFlagBitsKHR(..)
                                                        , BuildAccelerationStructureFlagsKHR
                                                        , AccelerationStructureCreateFlagBitsKHR(..)
                                                        , AccelerationStructureCreateFlagsKHR
                                                        ) where

import Data.Bits (Bits)
import Data.Bits (FiniteBits)
import Data.Bits (shiftL)
import Data.Bits (shiftR)
import Vulkan.Internal.Utils (enumReadPrec)
import Vulkan.Internal.Utils (enumShowsPrec)
import Control.Exception.Base (bracket)
import Data.Bits ((.&.))
import Data.Bits ((.|.))
import Foreign.Marshal.Alloc (allocaBytes)
import Foreign.Marshal.Alloc (callocBytes)
import Foreign.Marshal.Alloc (free)
import GHC.Ptr (castPtr)
import Foreign.Ptr (nullPtr)
import Foreign.Ptr (plusPtr)
import GHC.Show (showString)
import GHC.Show (showsPrec)
import Numeric (showHex)
import Data.Coerce (coerce)
import Control.Monad.Trans.Class (lift)
import Control.Monad.Trans.Cont (evalContT)
import Control.Monad.Trans.Cont (runContT)
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 Data.String (IsString)
import Data.Typeable (Typeable)
import Foreign.C.Types (CFloat)
import Foreign.C.Types (CFloat(..))
import Foreign.C.Types (CFloat(CFloat))
import Foreign.Storable (Storable)
import Foreign.Storable (Storable(peek))
import Foreign.Storable (Storable(poke))
import qualified Foreign.Storable (Storable(..))
import GHC.Generics (Generic)
import Data.Int (Int32)
import Foreign.Ptr (Ptr)
import GHC.Read (Read(readPrec))
import GHC.Show (Show(showsPrec))
import Data.Word (Word32)
import Data.Word (Word64)
import Data.Kind (Type)
import Control.Monad.Trans.Cont (ContT(..))
import Vulkan.Core10.FundamentalTypes (bool32ToBool)
import Vulkan.Core10.FundamentalTypes (boolToBool32)
import Vulkan.Extensions.VK_KHR_acceleration_structure (AccelerationStructureInstanceKHR)
import Vulkan.Core10.FundamentalTypes (Bool32)
import Vulkan.Extensions.VK_KHR_acceleration_structure (DeviceOrHostAddressConstKHR)
import Vulkan.Core10.FundamentalTypes (Flags)
import Vulkan.Extensions.VK_KHR_acceleration_structure (GeometryInstanceFlagsKHR)
import Vulkan.Core10.Enums.StructureType (StructureType)
import Vulkan.Extensions.VK_KHR_acceleration_structure (TransformMatrixKHR)
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_MOTION_TRIANGLES_DATA_NV))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_ACCELERATION_STRUCTURE_MOTION_INFO_NV))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_MOTION_BLUR_FEATURES_NV))
import Vulkan.Extensions.VK_KHR_acceleration_structure (AccelerationStructureCreateFlagBitsKHR(..))
import Vulkan.Extensions.VK_KHR_acceleration_structure (AccelerationStructureCreateFlagsKHR)
import Vulkan.Extensions.VK_KHR_acceleration_structure (AccelerationStructureInstanceKHR(..))
import Vulkan.Extensions.VK_KHR_acceleration_structure (BuildAccelerationStructureFlagBitsKHR(..))
import Vulkan.Extensions.VK_KHR_acceleration_structure (BuildAccelerationStructureFlagsKHR)
import Vulkan.Extensions.VK_KHR_acceleration_structure (DeviceOrHostAddressConstKHR(..))
import Vulkan.Extensions.VK_KHR_acceleration_structure (GeometryInstanceFlagBitsKHR(..))
import Vulkan.Extensions.VK_KHR_acceleration_structure (GeometryInstanceFlagsKHR)
import Vulkan.Extensions.VK_KHR_acceleration_structure (TransformMatrixKHR(..))
-- | VkPhysicalDeviceRayTracingMotionBlurFeaturesNV - Structure describing
-- the ray tracing motion blur features that can be supported by an
-- implementation
--
-- = Members
--
-- This structure describes the following features:
--
-- = Description
--
-- If the 'PhysicalDeviceRayTracingMotionBlurFeaturesNV' 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. 'PhysicalDeviceRayTracingMotionBlurFeaturesNV' /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_ray_tracing_motion_blur VK_NV_ray_tracing_motion_blur>,
-- 'Vulkan.Core10.FundamentalTypes.Bool32',
-- 'Vulkan.Core10.Enums.StructureType.StructureType'
data PhysicalDeviceRayTracingMotionBlurFeaturesNV = PhysicalDeviceRayTracingMotionBlurFeaturesNV
  { -- | #features-rayTracingMotionBlur# @rayTracingMotionBlur@ indicates whether
    -- the implementation supports the motion blur feature.
    PhysicalDeviceRayTracingMotionBlurFeaturesNV -> Bool
rayTracingMotionBlur :: Bool
  , -- | #features-rayTracingMotionBlurPipelineTraceRaysIndirect#
    -- @rayTracingMotionBlurPipelineTraceRaysIndirect@ indicates whether the
    -- implementation supports indirect ray tracing commands with the motion
    -- blur feature enabled.
    PhysicalDeviceRayTracingMotionBlurFeaturesNV -> Bool
rayTracingMotionBlurPipelineTraceRaysIndirect :: Bool
  }
  deriving (Typeable, PhysicalDeviceRayTracingMotionBlurFeaturesNV
-> PhysicalDeviceRayTracingMotionBlurFeaturesNV -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PhysicalDeviceRayTracingMotionBlurFeaturesNV
-> PhysicalDeviceRayTracingMotionBlurFeaturesNV -> Bool
$c/= :: PhysicalDeviceRayTracingMotionBlurFeaturesNV
-> PhysicalDeviceRayTracingMotionBlurFeaturesNV -> Bool
== :: PhysicalDeviceRayTracingMotionBlurFeaturesNV
-> PhysicalDeviceRayTracingMotionBlurFeaturesNV -> Bool
$c== :: PhysicalDeviceRayTracingMotionBlurFeaturesNV
-> PhysicalDeviceRayTracingMotionBlurFeaturesNV -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceRayTracingMotionBlurFeaturesNV)
#endif
deriving instance Show PhysicalDeviceRayTracingMotionBlurFeaturesNV

instance ToCStruct PhysicalDeviceRayTracingMotionBlurFeaturesNV where
  withCStruct :: forall b.
PhysicalDeviceRayTracingMotionBlurFeaturesNV
-> (Ptr PhysicalDeviceRayTracingMotionBlurFeaturesNV -> IO b)
-> IO b
withCStruct PhysicalDeviceRayTracingMotionBlurFeaturesNV
x Ptr PhysicalDeviceRayTracingMotionBlurFeaturesNV -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 forall a b. (a -> b) -> a -> b
$ \Ptr PhysicalDeviceRayTracingMotionBlurFeaturesNV
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceRayTracingMotionBlurFeaturesNV
p PhysicalDeviceRayTracingMotionBlurFeaturesNV
x (Ptr PhysicalDeviceRayTracingMotionBlurFeaturesNV -> IO b
f Ptr PhysicalDeviceRayTracingMotionBlurFeaturesNV
p)
  pokeCStruct :: forall b.
Ptr PhysicalDeviceRayTracingMotionBlurFeaturesNV
-> PhysicalDeviceRayTracingMotionBlurFeaturesNV -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceRayTracingMotionBlurFeaturesNV
p PhysicalDeviceRayTracingMotionBlurFeaturesNV{Bool
rayTracingMotionBlurPipelineTraceRaysIndirect :: Bool
rayTracingMotionBlur :: Bool
$sel:rayTracingMotionBlurPipelineTraceRaysIndirect:PhysicalDeviceRayTracingMotionBlurFeaturesNV :: PhysicalDeviceRayTracingMotionBlurFeaturesNV -> Bool
$sel:rayTracingMotionBlur:PhysicalDeviceRayTracingMotionBlurFeaturesNV :: PhysicalDeviceRayTracingMotionBlurFeaturesNV -> Bool
..} IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingMotionBlurFeaturesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_MOTION_BLUR_FEATURES_NV)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingMotionBlurFeaturesNV
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 PhysicalDeviceRayTracingMotionBlurFeaturesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
rayTracingMotionBlur))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingMotionBlurFeaturesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
rayTracingMotionBlurPipelineTraceRaysIndirect))
    IO b
f
  cStructSize :: Int
cStructSize = Int
24
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b.
Ptr PhysicalDeviceRayTracingMotionBlurFeaturesNV -> IO b -> IO b
pokeZeroCStruct Ptr PhysicalDeviceRayTracingMotionBlurFeaturesNV
p IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingMotionBlurFeaturesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_MOTION_BLUR_FEATURES_NV)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingMotionBlurFeaturesNV
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 PhysicalDeviceRayTracingMotionBlurFeaturesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (forall a. Zero a => a
zero))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingMotionBlurFeaturesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (forall a. Zero a => a
zero))
    IO b
f

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

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

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


-- | VkAccelerationStructureGeometryMotionTrianglesDataNV - Structure
-- specifying vertex motion in a bottom-level acceleration structure
--
-- = Description
--
-- If 'AccelerationStructureGeometryMotionTrianglesDataNV' is included in
-- the @pNext@ chain of a
-- 'Vulkan.Extensions.VK_KHR_acceleration_structure.AccelerationStructureGeometryTrianglesDataKHR'
-- structure, the basic vertex positions are used for the position of the
-- triangles in the geometry at time 0.0 and the @vertexData@ in
-- 'AccelerationStructureGeometryMotionTrianglesDataNV' is used for the
-- vertex positions at time 1.0, with positions linearly interpolated at
-- intermediate times.
--
-- Indexing for 'AccelerationStructureGeometryMotionTrianglesDataNV'
-- @vertexData@ is equivalent to the basic vertex position data.
--
-- == Valid Usage (Implicit)
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_NV_ray_tracing_motion_blur VK_NV_ray_tracing_motion_blur>,
-- 'Vulkan.Extensions.VK_KHR_acceleration_structure.DeviceOrHostAddressConstKHR',
-- 'Vulkan.Core10.Enums.StructureType.StructureType'
data AccelerationStructureGeometryMotionTrianglesDataNV = AccelerationStructureGeometryMotionTrianglesDataNV
  { -- | @vertexData@ is a pointer to vertex data for this geometry at time 1.0
    AccelerationStructureGeometryMotionTrianglesDataNV
-> DeviceOrHostAddressConstKHR
vertexData :: DeviceOrHostAddressConstKHR }
  deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (AccelerationStructureGeometryMotionTrianglesDataNV)
#endif
deriving instance Show AccelerationStructureGeometryMotionTrianglesDataNV

instance ToCStruct AccelerationStructureGeometryMotionTrianglesDataNV where
  withCStruct :: forall b.
AccelerationStructureGeometryMotionTrianglesDataNV
-> (Ptr AccelerationStructureGeometryMotionTrianglesDataNV -> IO b)
-> IO b
withCStruct AccelerationStructureGeometryMotionTrianglesDataNV
x Ptr AccelerationStructureGeometryMotionTrianglesDataNV -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 forall a b. (a -> b) -> a -> b
$ \Ptr AccelerationStructureGeometryMotionTrianglesDataNV
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr AccelerationStructureGeometryMotionTrianglesDataNV
p AccelerationStructureGeometryMotionTrianglesDataNV
x (Ptr AccelerationStructureGeometryMotionTrianglesDataNV -> IO b
f Ptr AccelerationStructureGeometryMotionTrianglesDataNV
p)
  pokeCStruct :: forall b.
Ptr AccelerationStructureGeometryMotionTrianglesDataNV
-> AccelerationStructureGeometryMotionTrianglesDataNV
-> IO b
-> IO b
pokeCStruct Ptr AccelerationStructureGeometryMotionTrianglesDataNV
p AccelerationStructureGeometryMotionTrianglesDataNV{DeviceOrHostAddressConstKHR
vertexData :: DeviceOrHostAddressConstKHR
$sel:vertexData:AccelerationStructureGeometryMotionTrianglesDataNV :: AccelerationStructureGeometryMotionTrianglesDataNV
-> DeviceOrHostAddressConstKHR
..} 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 AccelerationStructureGeometryMotionTrianglesDataNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_MOTION_TRIANGLES_DATA_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 ((Ptr AccelerationStructureGeometryMotionTrianglesDataNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
    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 -> a -> IO b -> IO b
pokeCStruct ((Ptr AccelerationStructureGeometryMotionTrianglesDataNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr DeviceOrHostAddressConstKHR)) (DeviceOrHostAddressConstKHR
vertexData) forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. (a -> b) -> a -> b
$ ())
    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
24
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b.
Ptr AccelerationStructureGeometryMotionTrianglesDataNV
-> IO b -> IO b
pokeZeroCStruct Ptr AccelerationStructureGeometryMotionTrianglesDataNV
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 AccelerationStructureGeometryMotionTrianglesDataNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_MOTION_TRIANGLES_DATA_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 ((Ptr AccelerationStructureGeometryMotionTrianglesDataNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
    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 -> a -> IO b -> IO b
pokeCStruct ((Ptr AccelerationStructureGeometryMotionTrianglesDataNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr DeviceOrHostAddressConstKHR)) (forall a. Zero a => a
zero) forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. (a -> b) -> a -> b
$ ())
    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 Zero AccelerationStructureGeometryMotionTrianglesDataNV where
  zero :: AccelerationStructureGeometryMotionTrianglesDataNV
zero = DeviceOrHostAddressConstKHR
-> AccelerationStructureGeometryMotionTrianglesDataNV
AccelerationStructureGeometryMotionTrianglesDataNV
           forall a. Zero a => a
zero


-- | VkAccelerationStructureMotionInfoNV - Structure specifying the
-- parameters of a newly created acceleration structure object
--
-- == Valid Usage (Implicit)
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_NV_ray_tracing_motion_blur VK_NV_ray_tracing_motion_blur>,
-- 'AccelerationStructureMotionInfoFlagsNV',
-- 'Vulkan.Core10.Enums.StructureType.StructureType'
data AccelerationStructureMotionInfoNV = AccelerationStructureMotionInfoNV
  { -- | @maxInstances@ is the maximum number of instances that /may/ be used in
    -- the motion top-level acceleration structure.
    AccelerationStructureMotionInfoNV -> Word32
maxInstances :: Word32
  , -- | @flags@ is 0 and reserved for future use.
    --
    -- #VUID-VkAccelerationStructureMotionInfoNV-flags-zerobitmask# @flags@
    -- /must/ be @0@
    AccelerationStructureMotionInfoNV
-> AccelerationStructureMotionInfoFlagsNV
flags :: AccelerationStructureMotionInfoFlagsNV
  }
  deriving (Typeable, AccelerationStructureMotionInfoNV
-> AccelerationStructureMotionInfoNV -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AccelerationStructureMotionInfoNV
-> AccelerationStructureMotionInfoNV -> Bool
$c/= :: AccelerationStructureMotionInfoNV
-> AccelerationStructureMotionInfoNV -> Bool
== :: AccelerationStructureMotionInfoNV
-> AccelerationStructureMotionInfoNV -> Bool
$c== :: AccelerationStructureMotionInfoNV
-> AccelerationStructureMotionInfoNV -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (AccelerationStructureMotionInfoNV)
#endif
deriving instance Show AccelerationStructureMotionInfoNV

instance ToCStruct AccelerationStructureMotionInfoNV where
  withCStruct :: forall b.
AccelerationStructureMotionInfoNV
-> (Ptr AccelerationStructureMotionInfoNV -> IO b) -> IO b
withCStruct AccelerationStructureMotionInfoNV
x Ptr AccelerationStructureMotionInfoNV -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 forall a b. (a -> b) -> a -> b
$ \Ptr AccelerationStructureMotionInfoNV
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr AccelerationStructureMotionInfoNV
p AccelerationStructureMotionInfoNV
x (Ptr AccelerationStructureMotionInfoNV -> IO b
f Ptr AccelerationStructureMotionInfoNV
p)
  pokeCStruct :: forall b.
Ptr AccelerationStructureMotionInfoNV
-> AccelerationStructureMotionInfoNV -> IO b -> IO b
pokeCStruct Ptr AccelerationStructureMotionInfoNV
p AccelerationStructureMotionInfoNV{Word32
AccelerationStructureMotionInfoFlagsNV
flags :: AccelerationStructureMotionInfoFlagsNV
maxInstances :: Word32
$sel:flags:AccelerationStructureMotionInfoNV :: AccelerationStructureMotionInfoNV
-> AccelerationStructureMotionInfoFlagsNV
$sel:maxInstances:AccelerationStructureMotionInfoNV :: AccelerationStructureMotionInfoNV -> Word32
..} IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureMotionInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_ACCELERATION_STRUCTURE_MOTION_INFO_NV)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureMotionInfoNV
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 AccelerationStructureMotionInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32)) (Word32
maxInstances)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureMotionInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr AccelerationStructureMotionInfoFlagsNV)) (AccelerationStructureMotionInfoFlagsNV
flags)
    IO b
f
  cStructSize :: Int
cStructSize = Int
24
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b. Ptr AccelerationStructureMotionInfoNV -> IO b -> IO b
pokeZeroCStruct Ptr AccelerationStructureMotionInfoNV
p IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureMotionInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_ACCELERATION_STRUCTURE_MOTION_INFO_NV)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureMotionInfoNV
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 AccelerationStructureMotionInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32)) (forall a. Zero a => a
zero)
    IO b
f

instance FromCStruct AccelerationStructureMotionInfoNV where
  peekCStruct :: Ptr AccelerationStructureMotionInfoNV
-> IO AccelerationStructureMotionInfoNV
peekCStruct Ptr AccelerationStructureMotionInfoNV
p = do
    Word32
maxInstances <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr AccelerationStructureMotionInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32))
    AccelerationStructureMotionInfoFlagsNV
flags <- forall a. Storable a => Ptr a -> IO a
peek @AccelerationStructureMotionInfoFlagsNV ((Ptr AccelerationStructureMotionInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr AccelerationStructureMotionInfoFlagsNV))
    forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ Word32
-> AccelerationStructureMotionInfoFlagsNV
-> AccelerationStructureMotionInfoNV
AccelerationStructureMotionInfoNV
             Word32
maxInstances AccelerationStructureMotionInfoFlagsNV
flags

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

instance Zero AccelerationStructureMotionInfoNV where
  zero :: AccelerationStructureMotionInfoNV
zero = Word32
-> AccelerationStructureMotionInfoFlagsNV
-> AccelerationStructureMotionInfoNV
AccelerationStructureMotionInfoNV
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero


-- | VkSRTDataNV - Structure specifying a transform in SRT decomposition
--
-- = Description
--
-- This transform decomposition consists of three elements. The first is a
-- matrix S, consisting of a scale, shear, and translation, usually used to
-- define the pivot point of the following rotation. This matrix is
-- constructed from the parameters above by:
--
-- \[S =
-- \left(
--     \begin{matrix}
--         sx & a  & b  & pvx \\
--         0  & sy & c  & pvy \\
--         0  & 0  & sz & pvz
--     \end{matrix}
-- \right)\]
--
-- The rotation quaternion is defined as:
--
-- -   @R@ = [ @qx@, @qy@, @qz@, @qw@ ]
--
-- This is a rotation around a conceptual normalized axis [ ax, ay, az ] of
-- amount @theta@ such that:
--
-- -   [ @qx@, @qy@, @qz@ ] = sin(@theta@\/2) × [ @ax@, @ay@, @az@ ]
--
-- and
--
-- -   @qw@ = cos(@theta@\/2)
--
-- Finally, the transform has a translation T constructed from the
-- parameters above by:
--
-- \[T =
-- \left(
--     \begin{matrix}
--         1 & 0 & 0 & tx \\
--         0 & 1 & 0 & ty \\
--         0 & 0 & 1 & tz
--     \end{matrix}
-- \right)\]
--
-- The effective derived transform is then given by
--
-- -   @T@ × @R@ × @S@
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_NV_ray_tracing_motion_blur VK_NV_ray_tracing_motion_blur>,
-- 'AccelerationStructureSRTMotionInstanceNV'
data SRTDataNV = SRTDataNV
  { -- | @sx@ is the x component of the scale of the transform
    SRTDataNV -> Float
sx :: Float
  , -- | @a@ is one component of the shear for the transform
    SRTDataNV -> Float
a :: Float
  , -- | @b@ is one component of the shear for the transform
    SRTDataNV -> Float
b :: Float
  , -- | @pvx@ is the x component of the pivot point of the transform
    SRTDataNV -> Float
pvx :: Float
  , -- | @sy@ is the y component of the scale of the transform
    SRTDataNV -> Float
sy :: Float
  , -- | @c@ is one component of the shear for the transform
    SRTDataNV -> Float
c :: Float
  , -- | @pvy@ is the y component of the pivot point of the transform
    SRTDataNV -> Float
pvy :: Float
  , -- | @sz@ is the z component of the scale of the transform
    SRTDataNV -> Float
sz :: Float
  , -- | @pvz@ is the z component of the pivot point of the transform
    SRTDataNV -> Float
pvz :: Float
  , -- | @qx@ is the x component of the rotation quaternion
    SRTDataNV -> Float
qx :: Float
  , -- | @qy@ is the y component of the rotation quaternion
    SRTDataNV -> Float
qy :: Float
  , -- | @qz@ is the z component of the rotation quaternion
    SRTDataNV -> Float
qz :: Float
  , -- | @qw@ is the w component of the rotation quaternion
    SRTDataNV -> Float
qw :: Float
  , -- | @tx@ is the x component of the post-rotation translation
    SRTDataNV -> Float
tx :: Float
  , -- | @ty@ is the y component of the post-rotation translation
    SRTDataNV -> Float
ty :: Float
  , -- | @tz@ is the z component of the post-rotation translation
    SRTDataNV -> Float
tz :: Float
  }
  deriving (Typeable, SRTDataNV -> SRTDataNV -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SRTDataNV -> SRTDataNV -> Bool
$c/= :: SRTDataNV -> SRTDataNV -> Bool
== :: SRTDataNV -> SRTDataNV -> Bool
$c== :: SRTDataNV -> SRTDataNV -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (SRTDataNV)
#endif
deriving instance Show SRTDataNV

instance ToCStruct SRTDataNV where
  withCStruct :: forall b. SRTDataNV -> (Ptr SRTDataNV -> IO b) -> IO b
withCStruct SRTDataNV
x Ptr SRTDataNV -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
64 forall a b. (a -> b) -> a -> b
$ \Ptr SRTDataNV
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr SRTDataNV
p SRTDataNV
x (Ptr SRTDataNV -> IO b
f Ptr SRTDataNV
p)
  pokeCStruct :: forall b. Ptr SRTDataNV -> SRTDataNV -> IO b -> IO b
pokeCStruct Ptr SRTDataNV
p SRTDataNV{Float
tz :: Float
ty :: Float
tx :: Float
qw :: Float
qz :: Float
qy :: Float
qx :: Float
pvz :: Float
sz :: Float
pvy :: Float
c :: Float
sy :: Float
pvx :: Float
b :: Float
a :: Float
sx :: Float
$sel:tz:SRTDataNV :: SRTDataNV -> Float
$sel:ty:SRTDataNV :: SRTDataNV -> Float
$sel:tx:SRTDataNV :: SRTDataNV -> Float
$sel:qw:SRTDataNV :: SRTDataNV -> Float
$sel:qz:SRTDataNV :: SRTDataNV -> Float
$sel:qy:SRTDataNV :: SRTDataNV -> Float
$sel:qx:SRTDataNV :: SRTDataNV -> Float
$sel:pvz:SRTDataNV :: SRTDataNV -> Float
$sel:sz:SRTDataNV :: SRTDataNV -> Float
$sel:pvy:SRTDataNV :: SRTDataNV -> Float
$sel:c:SRTDataNV :: SRTDataNV -> Float
$sel:sy:SRTDataNV :: SRTDataNV -> Float
$sel:pvx:SRTDataNV :: SRTDataNV -> Float
$sel:b:SRTDataNV :: SRTDataNV -> Float
$sel:a:SRTDataNV :: SRTDataNV -> Float
$sel:sx:SRTDataNV :: SRTDataNV -> Float
..} IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SRTDataNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr CFloat)) (Float -> CFloat
CFloat (Float
sx))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SRTDataNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4 :: Ptr CFloat)) (Float -> CFloat
CFloat (Float
a))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SRTDataNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr CFloat)) (Float -> CFloat
CFloat (Float
b))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SRTDataNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
12 :: Ptr CFloat)) (Float -> CFloat
CFloat (Float
pvx))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SRTDataNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr CFloat)) (Float -> CFloat
CFloat (Float
sy))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SRTDataNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr CFloat)) (Float -> CFloat
CFloat (Float
c))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SRTDataNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr CFloat)) (Float -> CFloat
CFloat (Float
pvy))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SRTDataNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr CFloat)) (Float -> CFloat
CFloat (Float
sz))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SRTDataNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr CFloat)) (Float -> CFloat
CFloat (Float
pvz))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SRTDataNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
36 :: Ptr CFloat)) (Float -> CFloat
CFloat (Float
qx))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SRTDataNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr CFloat)) (Float -> CFloat
CFloat (Float
qy))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SRTDataNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
44 :: Ptr CFloat)) (Float -> CFloat
CFloat (Float
qz))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SRTDataNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr CFloat)) (Float -> CFloat
CFloat (Float
qw))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SRTDataNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
52 :: Ptr CFloat)) (Float -> CFloat
CFloat (Float
tx))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SRTDataNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56 :: Ptr CFloat)) (Float -> CFloat
CFloat (Float
ty))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SRTDataNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
60 :: Ptr CFloat)) (Float -> CFloat
CFloat (Float
tz))
    IO b
f
  cStructSize :: Int
cStructSize = Int
64
  cStructAlignment :: Int
cStructAlignment = Int
4
  pokeZeroCStruct :: forall b. Ptr SRTDataNV -> IO b -> IO b
pokeZeroCStruct Ptr SRTDataNV
p IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SRTDataNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr CFloat)) (Float -> CFloat
CFloat (forall a. Zero a => a
zero))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SRTDataNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4 :: Ptr CFloat)) (Float -> CFloat
CFloat (forall a. Zero a => a
zero))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SRTDataNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr CFloat)) (Float -> CFloat
CFloat (forall a. Zero a => a
zero))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SRTDataNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
12 :: Ptr CFloat)) (Float -> CFloat
CFloat (forall a. Zero a => a
zero))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SRTDataNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr CFloat)) (Float -> CFloat
CFloat (forall a. Zero a => a
zero))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SRTDataNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr CFloat)) (Float -> CFloat
CFloat (forall a. Zero a => a
zero))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SRTDataNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr CFloat)) (Float -> CFloat
CFloat (forall a. Zero a => a
zero))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SRTDataNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr CFloat)) (Float -> CFloat
CFloat (forall a. Zero a => a
zero))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SRTDataNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr CFloat)) (Float -> CFloat
CFloat (forall a. Zero a => a
zero))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SRTDataNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
36 :: Ptr CFloat)) (Float -> CFloat
CFloat (forall a. Zero a => a
zero))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SRTDataNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr CFloat)) (Float -> CFloat
CFloat (forall a. Zero a => a
zero))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SRTDataNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
44 :: Ptr CFloat)) (Float -> CFloat
CFloat (forall a. Zero a => a
zero))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SRTDataNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr CFloat)) (Float -> CFloat
CFloat (forall a. Zero a => a
zero))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SRTDataNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
52 :: Ptr CFloat)) (Float -> CFloat
CFloat (forall a. Zero a => a
zero))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SRTDataNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56 :: Ptr CFloat)) (Float -> CFloat
CFloat (forall a. Zero a => a
zero))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr SRTDataNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
60 :: Ptr CFloat)) (Float -> CFloat
CFloat (forall a. Zero a => a
zero))
    IO b
f

instance FromCStruct SRTDataNV where
  peekCStruct :: Ptr SRTDataNV -> IO SRTDataNV
peekCStruct Ptr SRTDataNV
p = do
    CFloat
sx <- forall a. Storable a => Ptr a -> IO a
peek @CFloat ((Ptr SRTDataNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr CFloat))
    CFloat
a <- forall a. Storable a => Ptr a -> IO a
peek @CFloat ((Ptr SRTDataNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4 :: Ptr CFloat))
    CFloat
b <- forall a. Storable a => Ptr a -> IO a
peek @CFloat ((Ptr SRTDataNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr CFloat))
    CFloat
pvx <- forall a. Storable a => Ptr a -> IO a
peek @CFloat ((Ptr SRTDataNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
12 :: Ptr CFloat))
    CFloat
sy <- forall a. Storable a => Ptr a -> IO a
peek @CFloat ((Ptr SRTDataNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr CFloat))
    CFloat
c <- forall a. Storable a => Ptr a -> IO a
peek @CFloat ((Ptr SRTDataNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr CFloat))
    CFloat
pvy <- forall a. Storable a => Ptr a -> IO a
peek @CFloat ((Ptr SRTDataNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr CFloat))
    CFloat
sz <- forall a. Storable a => Ptr a -> IO a
peek @CFloat ((Ptr SRTDataNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr CFloat))
    CFloat
pvz <- forall a. Storable a => Ptr a -> IO a
peek @CFloat ((Ptr SRTDataNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr CFloat))
    CFloat
qx <- forall a. Storable a => Ptr a -> IO a
peek @CFloat ((Ptr SRTDataNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
36 :: Ptr CFloat))
    CFloat
qy <- forall a. Storable a => Ptr a -> IO a
peek @CFloat ((Ptr SRTDataNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr CFloat))
    CFloat
qz <- forall a. Storable a => Ptr a -> IO a
peek @CFloat ((Ptr SRTDataNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
44 :: Ptr CFloat))
    CFloat
qw <- forall a. Storable a => Ptr a -> IO a
peek @CFloat ((Ptr SRTDataNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr CFloat))
    CFloat
tx <- forall a. Storable a => Ptr a -> IO a
peek @CFloat ((Ptr SRTDataNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
52 :: Ptr CFloat))
    CFloat
ty <- forall a. Storable a => Ptr a -> IO a
peek @CFloat ((Ptr SRTDataNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56 :: Ptr CFloat))
    CFloat
tz <- forall a. Storable a => Ptr a -> IO a
peek @CFloat ((Ptr SRTDataNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
60 :: Ptr CFloat))
    forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ Float
-> Float
-> Float
-> Float
-> Float
-> Float
-> Float
-> Float
-> Float
-> Float
-> Float
-> Float
-> Float
-> Float
-> Float
-> Float
-> SRTDataNV
SRTDataNV
             (coerce :: forall a b. Coercible a b => a -> b
coerce @CFloat @Float CFloat
sx)
             (coerce :: forall a b. Coercible a b => a -> b
coerce @CFloat @Float CFloat
a)
             (coerce :: forall a b. Coercible a b => a -> b
coerce @CFloat @Float CFloat
b)
             (coerce :: forall a b. Coercible a b => a -> b
coerce @CFloat @Float CFloat
pvx)
             (coerce :: forall a b. Coercible a b => a -> b
coerce @CFloat @Float CFloat
sy)
             (coerce :: forall a b. Coercible a b => a -> b
coerce @CFloat @Float CFloat
c)
             (coerce :: forall a b. Coercible a b => a -> b
coerce @CFloat @Float CFloat
pvy)
             (coerce :: forall a b. Coercible a b => a -> b
coerce @CFloat @Float CFloat
sz)
             (coerce :: forall a b. Coercible a b => a -> b
coerce @CFloat @Float CFloat
pvz)
             (coerce :: forall a b. Coercible a b => a -> b
coerce @CFloat @Float CFloat
qx)
             (coerce :: forall a b. Coercible a b => a -> b
coerce @CFloat @Float CFloat
qy)
             (coerce :: forall a b. Coercible a b => a -> b
coerce @CFloat @Float CFloat
qz)
             (coerce :: forall a b. Coercible a b => a -> b
coerce @CFloat @Float CFloat
qw)
             (coerce :: forall a b. Coercible a b => a -> b
coerce @CFloat @Float CFloat
tx)
             (coerce :: forall a b. Coercible a b => a -> b
coerce @CFloat @Float CFloat
ty)
             (coerce :: forall a b. Coercible a b => a -> b
coerce @CFloat @Float CFloat
tz)

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

instance Zero SRTDataNV where
  zero :: SRTDataNV
zero = Float
-> Float
-> Float
-> Float
-> Float
-> Float
-> Float
-> Float
-> Float
-> Float
-> Float
-> Float
-> Float
-> Float
-> Float
-> Float
-> SRTDataNV
SRTDataNV
           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
           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


-- | VkAccelerationStructureSRTMotionInstanceNV - Structure specifying a
-- single acceleration structure SRT motion instance for building into an
-- acceleration structure geometry
--
-- = Description
--
-- The C language specification does not define the ordering of bit-fields,
-- but in practice, this struct produces the correct layout with existing
-- compilers. The intended bit pattern is for the following:
--
-- If a compiler produces code that diverges from that pattern,
-- applications /must/ employ another method to set values according to the
-- correct bit pattern.
--
-- The transform for a SRT motion instance at a point in time is derived
-- from component-wise linear interpolation of the two SRT transforms. That
-- is, for a @time@ in [0,1] the resulting transform is
--
-- -   @transformT0@ × (1 - @time@) + @transformT1@ × @time@
--
-- == Valid Usage (Implicit)
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_NV_ray_tracing_motion_blur VK_NV_ray_tracing_motion_blur>,
-- 'AccelerationStructureMotionInstanceDataNV',
-- 'Vulkan.Extensions.VK_KHR_acceleration_structure.GeometryInstanceFlagsKHR',
-- 'SRTDataNV'
data AccelerationStructureSRTMotionInstanceNV = AccelerationStructureSRTMotionInstanceNV
  { -- | @transformT0@ is a 'SRTDataNV' structure describing a transformation to
    -- be applied to the acceleration structure at time 0.
    AccelerationStructureSRTMotionInstanceNV -> SRTDataNV
transformT0 :: SRTDataNV
  , -- | @transformT1@ is a 'SRTDataNV' structure describing a transformation to
    -- be applied to the acceleration structure at time 1.
    AccelerationStructureSRTMotionInstanceNV -> SRTDataNV
transformT1 :: SRTDataNV
  , -- | @instanceCustomIndex@ is a 24-bit user-specified index value accessible
    -- to ray shaders in the @InstanceCustomIndexKHR@ built-in.
    --
    -- @instanceCustomIndex@ and @mask@ occupy the same memory as if a single
    -- @uint32_t@ was specified in their place
    --
    -- -   @instanceCustomIndex@ occupies the 24 least significant bits of that
    --     memory
    --
    -- -   @mask@ occupies the 8 most significant bits of that memory
    AccelerationStructureSRTMotionInstanceNV -> Word32
instanceCustomIndex :: Word32
  , -- | @mask@ is an 8-bit visibility mask for the geometry. The instance /may/
    -- only be hit if @Cull Mask & instance.mask != 0@
    AccelerationStructureSRTMotionInstanceNV -> Word32
mask :: Word32
  , -- | @instanceShaderBindingTableRecordOffset@ is a 24-bit offset used in
    -- calculating the hit shader binding table index.
    --
    -- @instanceShaderBindingTableRecordOffset@ and @flags@ occupy the same
    -- memory as if a single @uint32_t@ was specified in their place
    --
    -- -   @instanceShaderBindingTableRecordOffset@ occupies the 24 least
    --     significant bits of that memory
    --
    -- -   @flags@ occupies the 8 most significant bits of that memory
    AccelerationStructureSRTMotionInstanceNV -> Word32
instanceShaderBindingTableRecordOffset :: Word32
  , -- | @flags@ is an 8-bit mask of
    -- 'Vulkan.Extensions.VK_KHR_acceleration_structure.GeometryInstanceFlagBitsKHR'
    -- values to apply to this instance.
    --
    -- #VUID-VkAccelerationStructureSRTMotionInstanceNV-flags-parameter#
    -- @flags@ /must/ be a valid combination of
    -- 'Vulkan.Extensions.VK_KHR_acceleration_structure.GeometryInstanceFlagBitsKHR'
    -- values
    AccelerationStructureSRTMotionInstanceNV
-> GeometryInstanceFlagsKHR
flags :: GeometryInstanceFlagsKHR
  , -- | @accelerationStructureReference@ is either:
    --
    -- -   a device address containing the value obtained from
    --     'Vulkan.Extensions.VK_KHR_acceleration_structure.getAccelerationStructureDeviceAddressKHR'
    --     or
    --     'Vulkan.Extensions.VK_NV_ray_tracing.getAccelerationStructureHandleNV'
    --     (used by device operations which reference acceleration structures)
    --     or,
    --
    -- -   a 'Vulkan.Extensions.Handles.AccelerationStructureKHR' object (used
    --     by host operations which reference acceleration structures).
    AccelerationStructureSRTMotionInstanceNV -> Word64
accelerationStructureReference :: Word64
  }
  deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (AccelerationStructureSRTMotionInstanceNV)
#endif
deriving instance Show AccelerationStructureSRTMotionInstanceNV

instance ToCStruct AccelerationStructureSRTMotionInstanceNV where
  withCStruct :: forall b.
AccelerationStructureSRTMotionInstanceNV
-> (Ptr AccelerationStructureSRTMotionInstanceNV -> IO b) -> IO b
withCStruct AccelerationStructureSRTMotionInstanceNV
x Ptr AccelerationStructureSRTMotionInstanceNV -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
144 forall a b. (a -> b) -> a -> b
$ \Ptr AccelerationStructureSRTMotionInstanceNV
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr AccelerationStructureSRTMotionInstanceNV
p AccelerationStructureSRTMotionInstanceNV
x (Ptr AccelerationStructureSRTMotionInstanceNV -> IO b
f Ptr AccelerationStructureSRTMotionInstanceNV
p)
  pokeCStruct :: forall b.
Ptr AccelerationStructureSRTMotionInstanceNV
-> AccelerationStructureSRTMotionInstanceNV -> IO b -> IO b
pokeCStruct Ptr AccelerationStructureSRTMotionInstanceNV
p AccelerationStructureSRTMotionInstanceNV{Word32
Word64
GeometryInstanceFlagsKHR
SRTDataNV
accelerationStructureReference :: Word64
flags :: GeometryInstanceFlagsKHR
instanceShaderBindingTableRecordOffset :: Word32
mask :: Word32
instanceCustomIndex :: Word32
transformT1 :: SRTDataNV
transformT0 :: SRTDataNV
$sel:accelerationStructureReference:AccelerationStructureSRTMotionInstanceNV :: AccelerationStructureSRTMotionInstanceNV -> Word64
$sel:flags:AccelerationStructureSRTMotionInstanceNV :: AccelerationStructureSRTMotionInstanceNV
-> GeometryInstanceFlagsKHR
$sel:instanceShaderBindingTableRecordOffset:AccelerationStructureSRTMotionInstanceNV :: AccelerationStructureSRTMotionInstanceNV -> Word32
$sel:mask:AccelerationStructureSRTMotionInstanceNV :: AccelerationStructureSRTMotionInstanceNV -> Word32
$sel:instanceCustomIndex:AccelerationStructureSRTMotionInstanceNV :: AccelerationStructureSRTMotionInstanceNV -> Word32
$sel:transformT1:AccelerationStructureSRTMotionInstanceNV :: AccelerationStructureSRTMotionInstanceNV -> SRTDataNV
$sel:transformT0:AccelerationStructureSRTMotionInstanceNV :: AccelerationStructureSRTMotionInstanceNV -> SRTDataNV
..} IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureSRTMotionInstanceNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr SRTDataNV)) (SRTDataNV
transformT0)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureSRTMotionInstanceNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
64 :: Ptr SRTDataNV)) (SRTDataNV
transformT1)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureSRTMotionInstanceNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
128 :: Ptr Word32)) (((coerce :: forall a b. Coercible a b => a -> b
coerce @_ @Word32 (Word32
mask)) forall a. Bits a => a -> Int -> a
`shiftL` Int
24) forall a. Bits a => a -> a -> a
.|. (Word32
instanceCustomIndex))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureSRTMotionInstanceNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
132 :: Ptr Word32)) (((coerce :: forall a b. Coercible a b => a -> b
coerce @_ @Word32 (GeometryInstanceFlagsKHR
flags)) forall a. Bits a => a -> Int -> a
`shiftL` Int
24) forall a. Bits a => a -> a -> a
.|. (Word32
instanceShaderBindingTableRecordOffset))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureSRTMotionInstanceNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
136 :: Ptr Word64)) (Word64
accelerationStructureReference)
    IO b
f
  cStructSize :: Int
cStructSize = Int
144
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b.
Ptr AccelerationStructureSRTMotionInstanceNV -> IO b -> IO b
pokeZeroCStruct Ptr AccelerationStructureSRTMotionInstanceNV
p IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureSRTMotionInstanceNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr SRTDataNV)) (forall a. Zero a => a
zero)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureSRTMotionInstanceNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
64 :: Ptr SRTDataNV)) (forall a. Zero a => a
zero)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureSRTMotionInstanceNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
136 :: Ptr Word64)) (forall a. Zero a => a
zero)
    IO b
f

instance FromCStruct AccelerationStructureSRTMotionInstanceNV where
  peekCStruct :: Ptr AccelerationStructureSRTMotionInstanceNV
-> IO AccelerationStructureSRTMotionInstanceNV
peekCStruct Ptr AccelerationStructureSRTMotionInstanceNV
p = do
    SRTDataNV
transformT0 <- forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @SRTDataNV ((Ptr AccelerationStructureSRTMotionInstanceNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr SRTDataNV))
    SRTDataNV
transformT1 <- forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @SRTDataNV ((Ptr AccelerationStructureSRTMotionInstanceNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
64 :: Ptr SRTDataNV))
    Word32
instanceCustomIndex <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr AccelerationStructureSRTMotionInstanceNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
128 :: Ptr Word32))
    let instanceCustomIndex' :: Word32
instanceCustomIndex' = ((Word32
instanceCustomIndex forall a. Bits a => a -> a -> a
.&. coerce :: forall a b. Coercible a b => a -> b
coerce @Word32 Word32
0xffffff))
    Word32
mask <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr AccelerationStructureSRTMotionInstanceNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
128 :: Ptr Word32))
    let mask' :: Word32
mask' = ((((Word32
mask forall a. Bits a => a -> Int -> a
`shiftR` Int
24)) forall a. Bits a => a -> a -> a
.&. coerce :: forall a b. Coercible a b => a -> b
coerce @Word32 Word32
0xff))
    Word32
instanceShaderBindingTableRecordOffset <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr AccelerationStructureSRTMotionInstanceNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
132 :: Ptr Word32))
    let instanceShaderBindingTableRecordOffset' :: Word32
instanceShaderBindingTableRecordOffset' = ((Word32
instanceShaderBindingTableRecordOffset forall a. Bits a => a -> a -> a
.&. coerce :: forall a b. Coercible a b => a -> b
coerce @Word32 Word32
0xffffff))
    GeometryInstanceFlagsKHR
flags <- forall a. Storable a => Ptr a -> IO a
peek @GeometryInstanceFlagsKHR ((Ptr AccelerationStructureSRTMotionInstanceNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
132 :: Ptr GeometryInstanceFlagsKHR))
    let flags' :: GeometryInstanceFlagsKHR
flags' = ((((GeometryInstanceFlagsKHR
flags forall a. Bits a => a -> Int -> a
`shiftR` Int
24)) forall a. Bits a => a -> a -> a
.&. coerce :: forall a b. Coercible a b => a -> b
coerce @Word32 Word32
0xff))
    Word64
accelerationStructureReference <- forall a. Storable a => Ptr a -> IO a
peek @Word64 ((Ptr AccelerationStructureSRTMotionInstanceNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
136 :: Ptr Word64))
    forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ SRTDataNV
-> SRTDataNV
-> Word32
-> Word32
-> Word32
-> GeometryInstanceFlagsKHR
-> Word64
-> AccelerationStructureSRTMotionInstanceNV
AccelerationStructureSRTMotionInstanceNV
             SRTDataNV
transformT0
             SRTDataNV
transformT1
             Word32
instanceCustomIndex'
             Word32
mask'
             Word32
instanceShaderBindingTableRecordOffset'
             GeometryInstanceFlagsKHR
flags'
             Word64
accelerationStructureReference

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

instance Zero AccelerationStructureSRTMotionInstanceNV where
  zero :: AccelerationStructureSRTMotionInstanceNV
zero = SRTDataNV
-> SRTDataNV
-> Word32
-> Word32
-> Word32
-> GeometryInstanceFlagsKHR
-> Word64
-> AccelerationStructureSRTMotionInstanceNV
AccelerationStructureSRTMotionInstanceNV
           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


-- | VkAccelerationStructureMatrixMotionInstanceNV - Structure specifying a
-- single acceleration structure matrix motion instance for building into
-- an acceleration structure geometry
--
-- = Description
--
-- The C language specification does not define the ordering of bit-fields,
-- but in practice, this struct produces the correct layout with existing
-- compilers. The intended bit pattern is for the following:
--
-- If a compiler produces code that diverges from that pattern,
-- applications /must/ employ another method to set values according to the
-- correct bit pattern.
--
-- The transform for a matrix motion instance at a point in time is derived
-- by component-wise linear interpolation of the two transforms. That is,
-- for a @time@ in [0,1] the resulting transform is
--
-- -   @transformT0@ × (1 - @time@) + @transformT1@ × @time@
--
-- == Valid Usage (Implicit)
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_NV_ray_tracing_motion_blur VK_NV_ray_tracing_motion_blur>,
-- 'AccelerationStructureMotionInstanceDataNV',
-- 'Vulkan.Extensions.VK_KHR_acceleration_structure.GeometryInstanceFlagsKHR',
-- 'Vulkan.Extensions.VK_KHR_acceleration_structure.TransformMatrixKHR'
data AccelerationStructureMatrixMotionInstanceNV = AccelerationStructureMatrixMotionInstanceNV
  { -- | @transformT0@ is a
    -- 'Vulkan.Extensions.VK_KHR_acceleration_structure.TransformMatrixKHR'
    -- structure describing a transformation to be applied to the acceleration
    -- structure at time 0.
    AccelerationStructureMatrixMotionInstanceNV -> TransformMatrixKHR
transformT0 :: TransformMatrixKHR
  , -- | @transformT1@ is a
    -- 'Vulkan.Extensions.VK_KHR_acceleration_structure.TransformMatrixKHR'
    -- structure describing a transformation to be applied to the acceleration
    -- structure at time 1.
    AccelerationStructureMatrixMotionInstanceNV -> TransformMatrixKHR
transformT1 :: TransformMatrixKHR
  , -- | @instanceCustomIndex@ is a 24-bit user-specified index value accessible
    -- to ray shaders in the @InstanceCustomIndexKHR@ built-in.
    --
    -- @instanceCustomIndex@ and @mask@ occupy the same memory as if a single
    -- @uint32_t@ was specified in their place
    --
    -- -   @instanceCustomIndex@ occupies the 24 least significant bits of that
    --     memory
    --
    -- -   @mask@ occupies the 8 most significant bits of that memory
    AccelerationStructureMatrixMotionInstanceNV -> Word32
instanceCustomIndex :: Word32
  , -- | @mask@ is an 8-bit visibility mask for the geometry. The instance /may/
    -- only be hit if @Cull Mask & instance.mask != 0@
    AccelerationStructureMatrixMotionInstanceNV -> Word32
mask :: Word32
  , -- | @instanceShaderBindingTableRecordOffset@ is a 24-bit offset used in
    -- calculating the hit shader binding table index.
    --
    -- @instanceShaderBindingTableRecordOffset@ and @flags@ occupy the same
    -- memory as if a single @uint32_t@ was specified in their place
    --
    -- -   @instanceShaderBindingTableRecordOffset@ occupies the 24 least
    --     significant bits of that memory
    --
    -- -   @flags@ occupies the 8 most significant bits of that memory
    AccelerationStructureMatrixMotionInstanceNV -> Word32
instanceShaderBindingTableRecordOffset :: Word32
  , -- | @flags@ is an 8-bit mask of
    -- 'Vulkan.Extensions.VK_KHR_acceleration_structure.GeometryInstanceFlagBitsKHR'
    -- values to apply to this instance.
    --
    -- #VUID-VkAccelerationStructureMatrixMotionInstanceNV-flags-parameter#
    -- @flags@ /must/ be a valid combination of
    -- 'Vulkan.Extensions.VK_KHR_acceleration_structure.GeometryInstanceFlagBitsKHR'
    -- values
    AccelerationStructureMatrixMotionInstanceNV
-> GeometryInstanceFlagsKHR
flags :: GeometryInstanceFlagsKHR
  , -- | @accelerationStructureReference@ is either:
    --
    -- -   a device address containing the value obtained from
    --     'Vulkan.Extensions.VK_KHR_acceleration_structure.getAccelerationStructureDeviceAddressKHR'
    --     or
    --     'Vulkan.Extensions.VK_NV_ray_tracing.getAccelerationStructureHandleNV'
    --     (used by device operations which reference acceleration structures)
    --     or,
    --
    -- -   a 'Vulkan.Extensions.Handles.AccelerationStructureKHR' object (used
    --     by host operations which reference acceleration structures).
    AccelerationStructureMatrixMotionInstanceNV -> Word64
accelerationStructureReference :: Word64
  }
  deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (AccelerationStructureMatrixMotionInstanceNV)
#endif
deriving instance Show AccelerationStructureMatrixMotionInstanceNV

instance ToCStruct AccelerationStructureMatrixMotionInstanceNV where
  withCStruct :: forall b.
AccelerationStructureMatrixMotionInstanceNV
-> (Ptr AccelerationStructureMatrixMotionInstanceNV -> IO b)
-> IO b
withCStruct AccelerationStructureMatrixMotionInstanceNV
x Ptr AccelerationStructureMatrixMotionInstanceNV -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
112 forall a b. (a -> b) -> a -> b
$ \Ptr AccelerationStructureMatrixMotionInstanceNV
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr AccelerationStructureMatrixMotionInstanceNV
p AccelerationStructureMatrixMotionInstanceNV
x (Ptr AccelerationStructureMatrixMotionInstanceNV -> IO b
f Ptr AccelerationStructureMatrixMotionInstanceNV
p)
  pokeCStruct :: forall b.
Ptr AccelerationStructureMatrixMotionInstanceNV
-> AccelerationStructureMatrixMotionInstanceNV -> IO b -> IO b
pokeCStruct Ptr AccelerationStructureMatrixMotionInstanceNV
p AccelerationStructureMatrixMotionInstanceNV{Word32
Word64
GeometryInstanceFlagsKHR
TransformMatrixKHR
accelerationStructureReference :: Word64
flags :: GeometryInstanceFlagsKHR
instanceShaderBindingTableRecordOffset :: Word32
mask :: Word32
instanceCustomIndex :: Word32
transformT1 :: TransformMatrixKHR
transformT0 :: TransformMatrixKHR
$sel:accelerationStructureReference:AccelerationStructureMatrixMotionInstanceNV :: AccelerationStructureMatrixMotionInstanceNV -> Word64
$sel:flags:AccelerationStructureMatrixMotionInstanceNV :: AccelerationStructureMatrixMotionInstanceNV
-> GeometryInstanceFlagsKHR
$sel:instanceShaderBindingTableRecordOffset:AccelerationStructureMatrixMotionInstanceNV :: AccelerationStructureMatrixMotionInstanceNV -> Word32
$sel:mask:AccelerationStructureMatrixMotionInstanceNV :: AccelerationStructureMatrixMotionInstanceNV -> Word32
$sel:instanceCustomIndex:AccelerationStructureMatrixMotionInstanceNV :: AccelerationStructureMatrixMotionInstanceNV -> Word32
$sel:transformT1:AccelerationStructureMatrixMotionInstanceNV :: AccelerationStructureMatrixMotionInstanceNV -> TransformMatrixKHR
$sel:transformT0:AccelerationStructureMatrixMotionInstanceNV :: AccelerationStructureMatrixMotionInstanceNV -> TransformMatrixKHR
..} IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureMatrixMotionInstanceNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr TransformMatrixKHR)) (TransformMatrixKHR
transformT0)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureMatrixMotionInstanceNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr TransformMatrixKHR)) (TransformMatrixKHR
transformT1)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureMatrixMotionInstanceNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
96 :: Ptr Word32)) (((coerce :: forall a b. Coercible a b => a -> b
coerce @_ @Word32 (Word32
mask)) forall a. Bits a => a -> Int -> a
`shiftL` Int
24) forall a. Bits a => a -> a -> a
.|. (Word32
instanceCustomIndex))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureMatrixMotionInstanceNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
100 :: Ptr Word32)) (((coerce :: forall a b. Coercible a b => a -> b
coerce @_ @Word32 (GeometryInstanceFlagsKHR
flags)) forall a. Bits a => a -> Int -> a
`shiftL` Int
24) forall a. Bits a => a -> a -> a
.|. (Word32
instanceShaderBindingTableRecordOffset))
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureMatrixMotionInstanceNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
104 :: Ptr Word64)) (Word64
accelerationStructureReference)
    IO b
f
  cStructSize :: Int
cStructSize = Int
112
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b.
Ptr AccelerationStructureMatrixMotionInstanceNV -> IO b -> IO b
pokeZeroCStruct Ptr AccelerationStructureMatrixMotionInstanceNV
p IO b
f = do
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureMatrixMotionInstanceNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr TransformMatrixKHR)) (forall a. Zero a => a
zero)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureMatrixMotionInstanceNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr TransformMatrixKHR)) (forall a. Zero a => a
zero)
    forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureMatrixMotionInstanceNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
104 :: Ptr Word64)) (forall a. Zero a => a
zero)
    IO b
f

instance FromCStruct AccelerationStructureMatrixMotionInstanceNV where
  peekCStruct :: Ptr AccelerationStructureMatrixMotionInstanceNV
-> IO AccelerationStructureMatrixMotionInstanceNV
peekCStruct Ptr AccelerationStructureMatrixMotionInstanceNV
p = do
    TransformMatrixKHR
transformT0 <- forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @TransformMatrixKHR ((Ptr AccelerationStructureMatrixMotionInstanceNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr TransformMatrixKHR))
    TransformMatrixKHR
transformT1 <- forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @TransformMatrixKHR ((Ptr AccelerationStructureMatrixMotionInstanceNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr TransformMatrixKHR))
    Word32
instanceCustomIndex <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr AccelerationStructureMatrixMotionInstanceNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
96 :: Ptr Word32))
    let instanceCustomIndex' :: Word32
instanceCustomIndex' = ((Word32
instanceCustomIndex forall a. Bits a => a -> a -> a
.&. coerce :: forall a b. Coercible a b => a -> b
coerce @Word32 Word32
0xffffff))
    Word32
mask <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr AccelerationStructureMatrixMotionInstanceNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
96 :: Ptr Word32))
    let mask' :: Word32
mask' = ((((Word32
mask forall a. Bits a => a -> Int -> a
`shiftR` Int
24)) forall a. Bits a => a -> a -> a
.&. coerce :: forall a b. Coercible a b => a -> b
coerce @Word32 Word32
0xff))
    Word32
instanceShaderBindingTableRecordOffset <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr AccelerationStructureMatrixMotionInstanceNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
100 :: Ptr Word32))
    let instanceShaderBindingTableRecordOffset' :: Word32
instanceShaderBindingTableRecordOffset' = ((Word32
instanceShaderBindingTableRecordOffset forall a. Bits a => a -> a -> a
.&. coerce :: forall a b. Coercible a b => a -> b
coerce @Word32 Word32
0xffffff))
    GeometryInstanceFlagsKHR
flags <- forall a. Storable a => Ptr a -> IO a
peek @GeometryInstanceFlagsKHR ((Ptr AccelerationStructureMatrixMotionInstanceNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
100 :: Ptr GeometryInstanceFlagsKHR))
    let flags' :: GeometryInstanceFlagsKHR
flags' = ((((GeometryInstanceFlagsKHR
flags forall a. Bits a => a -> Int -> a
`shiftR` Int
24)) forall a. Bits a => a -> a -> a
.&. coerce :: forall a b. Coercible a b => a -> b
coerce @Word32 Word32
0xff))
    Word64
accelerationStructureReference <- forall a. Storable a => Ptr a -> IO a
peek @Word64 ((Ptr AccelerationStructureMatrixMotionInstanceNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
104 :: Ptr Word64))
    forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ TransformMatrixKHR
-> TransformMatrixKHR
-> Word32
-> Word32
-> Word32
-> GeometryInstanceFlagsKHR
-> Word64
-> AccelerationStructureMatrixMotionInstanceNV
AccelerationStructureMatrixMotionInstanceNV
             TransformMatrixKHR
transformT0
             TransformMatrixKHR
transformT1
             Word32
instanceCustomIndex'
             Word32
mask'
             Word32
instanceShaderBindingTableRecordOffset'
             GeometryInstanceFlagsKHR
flags'
             Word64
accelerationStructureReference

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

instance Zero AccelerationStructureMatrixMotionInstanceNV where
  zero :: AccelerationStructureMatrixMotionInstanceNV
zero = TransformMatrixKHR
-> TransformMatrixKHR
-> Word32
-> Word32
-> Word32
-> GeometryInstanceFlagsKHR
-> Word64
-> AccelerationStructureMatrixMotionInstanceNV
AccelerationStructureMatrixMotionInstanceNV
           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


-- | VkAccelerationStructureMotionInstanceNV - Structure specifying a single
-- acceleration structure motion instance for building into an acceleration
-- structure geometry
--
-- = Description
--
-- Note
--
-- If writing this other than with a standard C compiler, note that the
-- final structure should be 152 bytes in size.
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-VkAccelerationStructureMotionInstanceNV-type-parameter# @type@
--     /must/ be a valid 'AccelerationStructureMotionInstanceTypeNV' value
--
-- -   #VUID-VkAccelerationStructureMotionInstanceNV-flags-zerobitmask#
--     @flags@ /must/ be @0@
--
-- -   #VUID-VkAccelerationStructureMotionInstanceNV-staticInstance-parameter#
--     If @type@ is
--     'ACCELERATION_STRUCTURE_MOTION_INSTANCE_TYPE_STATIC_NV', the
--     @staticInstance@ member of @data@ /must/ be a valid
--     'Vulkan.Extensions.VK_KHR_acceleration_structure.AccelerationStructureInstanceKHR'
--     structure
--
-- -   #VUID-VkAccelerationStructureMotionInstanceNV-matrixMotionInstance-parameter#
--     If @type@ is
--     'ACCELERATION_STRUCTURE_MOTION_INSTANCE_TYPE_MATRIX_MOTION_NV', the
--     @matrixMotionInstance@ member of @data@ /must/ be a valid
--     'AccelerationStructureMatrixMotionInstanceNV' structure
--
-- -   #VUID-VkAccelerationStructureMotionInstanceNV-srtMotionInstance-parameter#
--     If @type@ is
--     'ACCELERATION_STRUCTURE_MOTION_INSTANCE_TYPE_SRT_MOTION_NV', the
--     @srtMotionInstance@ member of @data@ /must/ be a valid
--     'AccelerationStructureSRTMotionInstanceNV' structure
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_NV_ray_tracing_motion_blur VK_NV_ray_tracing_motion_blur>,
-- 'AccelerationStructureMotionInstanceDataNV',
-- 'AccelerationStructureMotionInstanceFlagsNV',
-- 'AccelerationStructureMotionInstanceTypeNV'
data AccelerationStructureMotionInstanceNV = AccelerationStructureMotionInstanceNV
  { -- | @type@ is a 'AccelerationStructureMotionInstanceTypeNV' enumerant
    -- identifying which type of motion instance this is and which type of the
    -- union is valid.
    AccelerationStructureMotionInstanceNV
-> AccelerationStructureMotionInstanceTypeNV
type' :: AccelerationStructureMotionInstanceTypeNV
  , -- | @flags@ is currently unused, but is required to keep natural alignment
    -- of @data@.
    AccelerationStructureMotionInstanceNV
-> AccelerationStructureMotionInstanceFlagsNV
flags :: AccelerationStructureMotionInstanceFlagsNV
  , -- | @data@ is a 'AccelerationStructureMotionInstanceDataNV' containing
    -- motion instance data for this instance.
    AccelerationStructureMotionInstanceNV
-> AccelerationStructureMotionInstanceDataNV
data' :: AccelerationStructureMotionInstanceDataNV
  }
  deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (AccelerationStructureMotionInstanceNV)
#endif
deriving instance Show AccelerationStructureMotionInstanceNV

instance ToCStruct AccelerationStructureMotionInstanceNV where
  withCStruct :: forall b.
AccelerationStructureMotionInstanceNV
-> (Ptr AccelerationStructureMotionInstanceNV -> IO b) -> IO b
withCStruct AccelerationStructureMotionInstanceNV
x Ptr AccelerationStructureMotionInstanceNV -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
152 forall a b. (a -> b) -> a -> b
$ \Ptr AccelerationStructureMotionInstanceNV
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr AccelerationStructureMotionInstanceNV
p AccelerationStructureMotionInstanceNV
x (Ptr AccelerationStructureMotionInstanceNV -> IO b
f Ptr AccelerationStructureMotionInstanceNV
p)
  pokeCStruct :: forall b.
Ptr AccelerationStructureMotionInstanceNV
-> AccelerationStructureMotionInstanceNV -> IO b -> IO b
pokeCStruct Ptr AccelerationStructureMotionInstanceNV
p AccelerationStructureMotionInstanceNV{AccelerationStructureMotionInstanceTypeNV
AccelerationStructureMotionInstanceFlagsNV
AccelerationStructureMotionInstanceDataNV
data' :: AccelerationStructureMotionInstanceDataNV
flags :: AccelerationStructureMotionInstanceFlagsNV
type' :: AccelerationStructureMotionInstanceTypeNV
$sel:data':AccelerationStructureMotionInstanceNV :: AccelerationStructureMotionInstanceNV
-> AccelerationStructureMotionInstanceDataNV
$sel:flags:AccelerationStructureMotionInstanceNV :: AccelerationStructureMotionInstanceNV
-> AccelerationStructureMotionInstanceFlagsNV
$sel:type':AccelerationStructureMotionInstanceNV :: AccelerationStructureMotionInstanceNV
-> AccelerationStructureMotionInstanceTypeNV
..} 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 AccelerationStructureMotionInstanceNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr AccelerationStructureMotionInstanceTypeNV)) (AccelerationStructureMotionInstanceTypeNV
type')
    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 AccelerationStructureMotionInstanceNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4 :: Ptr AccelerationStructureMotionInstanceFlagsNV)) (AccelerationStructureMotionInstanceFlagsNV
flags)
    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 -> a -> IO b -> IO b
pokeCStruct ((Ptr AccelerationStructureMotionInstanceNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr AccelerationStructureMotionInstanceDataNV)) (AccelerationStructureMotionInstanceDataNV
data') forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. (a -> b) -> a -> b
$ ())
    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
152
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b. Ptr AccelerationStructureMotionInstanceNV -> IO b -> IO b
pokeZeroCStruct Ptr AccelerationStructureMotionInstanceNV
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 AccelerationStructureMotionInstanceNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr AccelerationStructureMotionInstanceTypeNV)) (forall a. Zero a => a
zero)
    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 -> a -> IO b -> IO b
pokeCStruct ((Ptr AccelerationStructureMotionInstanceNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr AccelerationStructureMotionInstanceDataNV)) (forall a. Zero a => a
zero) forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. (a -> b) -> a -> b
$ ())
    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 Zero AccelerationStructureMotionInstanceNV where
  zero :: AccelerationStructureMotionInstanceNV
zero = AccelerationStructureMotionInstanceTypeNV
-> AccelerationStructureMotionInstanceFlagsNV
-> AccelerationStructureMotionInstanceDataNV
-> AccelerationStructureMotionInstanceNV
AccelerationStructureMotionInstanceNV
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero
           forall a. Zero a => a
zero


data AccelerationStructureMotionInstanceDataNV
  = StaticInstance AccelerationStructureInstanceKHR
  | MatrixMotionInstance AccelerationStructureMatrixMotionInstanceNV
  | SrtMotionInstance AccelerationStructureSRTMotionInstanceNV
  deriving (Int -> AccelerationStructureMotionInstanceDataNV -> ShowS
[AccelerationStructureMotionInstanceDataNV] -> ShowS
AccelerationStructureMotionInstanceDataNV -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AccelerationStructureMotionInstanceDataNV] -> ShowS
$cshowList :: [AccelerationStructureMotionInstanceDataNV] -> ShowS
show :: AccelerationStructureMotionInstanceDataNV -> String
$cshow :: AccelerationStructureMotionInstanceDataNV -> String
showsPrec :: Int -> AccelerationStructureMotionInstanceDataNV -> ShowS
$cshowsPrec :: Int -> AccelerationStructureMotionInstanceDataNV -> ShowS
Show)

instance ToCStruct AccelerationStructureMotionInstanceDataNV where
  withCStruct :: forall b.
AccelerationStructureMotionInstanceDataNV
-> (Ptr AccelerationStructureMotionInstanceDataNV -> IO b) -> IO b
withCStruct AccelerationStructureMotionInstanceDataNV
x Ptr AccelerationStructureMotionInstanceDataNV -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
144 forall a b. (a -> b) -> a -> b
$ \Ptr AccelerationStructureMotionInstanceDataNV
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr AccelerationStructureMotionInstanceDataNV
p AccelerationStructureMotionInstanceDataNV
x (Ptr AccelerationStructureMotionInstanceDataNV -> IO b
f Ptr AccelerationStructureMotionInstanceDataNV
p)
  pokeCStruct :: Ptr AccelerationStructureMotionInstanceDataNV -> AccelerationStructureMotionInstanceDataNV -> IO a -> IO a
  pokeCStruct :: forall b.
Ptr AccelerationStructureMotionInstanceDataNV
-> AccelerationStructureMotionInstanceDataNV -> IO b -> IO b
pokeCStruct Ptr AccelerationStructureMotionInstanceDataNV
p = (forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a b. a -> b -> a
const) forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall {k} (r :: k) (m :: k -> *) a.
ContT r m a -> (a -> m r) -> m r
runContT forall b c a. (b -> c) -> (a -> b) -> a -> c
.  \case
    StaticInstance AccelerationStructureInstanceKHR
v -> 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 (forall a b. Ptr a -> Ptr b
castPtr @_ @AccelerationStructureInstanceKHR Ptr AccelerationStructureMotionInstanceDataNV
p) (AccelerationStructureInstanceKHR
v)
    MatrixMotionInstance AccelerationStructureMatrixMotionInstanceNV
v -> 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 (forall a b. Ptr a -> Ptr b
castPtr @_ @AccelerationStructureMatrixMotionInstanceNV Ptr AccelerationStructureMotionInstanceDataNV
p) (AccelerationStructureMatrixMotionInstanceNV
v)
    SrtMotionInstance AccelerationStructureSRTMotionInstanceNV
v -> 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 (forall a b. Ptr a -> Ptr b
castPtr @_ @AccelerationStructureSRTMotionInstanceNV Ptr AccelerationStructureMotionInstanceDataNV
p) (AccelerationStructureSRTMotionInstanceNV
v)
  pokeZeroCStruct :: Ptr AccelerationStructureMotionInstanceDataNV -> IO b -> IO b
  pokeZeroCStruct :: forall b.
Ptr AccelerationStructureMotionInstanceDataNV -> IO b -> IO b
pokeZeroCStruct Ptr AccelerationStructureMotionInstanceDataNV
_ IO b
f = IO b
f
  cStructSize :: Int
cStructSize = Int
144
  cStructAlignment :: Int
cStructAlignment = Int
8

instance Zero AccelerationStructureMotionInstanceDataNV where
  zero :: AccelerationStructureMotionInstanceDataNV
zero = AccelerationStructureSRTMotionInstanceNV
-> AccelerationStructureMotionInstanceDataNV
SrtMotionInstance forall a. Zero a => a
zero


-- | VkAccelerationStructureMotionInfoFlagsNV - Reserved for future use
--
-- = Description
--
-- 'AccelerationStructureMotionInfoFlagsNV' is a bitmask type for setting a
-- mask, but is currently reserved for future use.
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_NV_ray_tracing_motion_blur VK_NV_ray_tracing_motion_blur>,
-- 'AccelerationStructureMotionInfoNV'
newtype AccelerationStructureMotionInfoFlagsNV = AccelerationStructureMotionInfoFlagsNV Flags
  deriving newtype (AccelerationStructureMotionInfoFlagsNV
-> AccelerationStructureMotionInfoFlagsNV -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AccelerationStructureMotionInfoFlagsNV
-> AccelerationStructureMotionInfoFlagsNV -> Bool
$c/= :: AccelerationStructureMotionInfoFlagsNV
-> AccelerationStructureMotionInfoFlagsNV -> Bool
== :: AccelerationStructureMotionInfoFlagsNV
-> AccelerationStructureMotionInfoFlagsNV -> Bool
$c== :: AccelerationStructureMotionInfoFlagsNV
-> AccelerationStructureMotionInfoFlagsNV -> Bool
Eq, Eq AccelerationStructureMotionInfoFlagsNV
AccelerationStructureMotionInfoFlagsNV
-> AccelerationStructureMotionInfoFlagsNV -> Bool
AccelerationStructureMotionInfoFlagsNV
-> AccelerationStructureMotionInfoFlagsNV -> Ordering
AccelerationStructureMotionInfoFlagsNV
-> AccelerationStructureMotionInfoFlagsNV
-> AccelerationStructureMotionInfoFlagsNV
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 :: AccelerationStructureMotionInfoFlagsNV
-> AccelerationStructureMotionInfoFlagsNV
-> AccelerationStructureMotionInfoFlagsNV
$cmin :: AccelerationStructureMotionInfoFlagsNV
-> AccelerationStructureMotionInfoFlagsNV
-> AccelerationStructureMotionInfoFlagsNV
max :: AccelerationStructureMotionInfoFlagsNV
-> AccelerationStructureMotionInfoFlagsNV
-> AccelerationStructureMotionInfoFlagsNV
$cmax :: AccelerationStructureMotionInfoFlagsNV
-> AccelerationStructureMotionInfoFlagsNV
-> AccelerationStructureMotionInfoFlagsNV
>= :: AccelerationStructureMotionInfoFlagsNV
-> AccelerationStructureMotionInfoFlagsNV -> Bool
$c>= :: AccelerationStructureMotionInfoFlagsNV
-> AccelerationStructureMotionInfoFlagsNV -> Bool
> :: AccelerationStructureMotionInfoFlagsNV
-> AccelerationStructureMotionInfoFlagsNV -> Bool
$c> :: AccelerationStructureMotionInfoFlagsNV
-> AccelerationStructureMotionInfoFlagsNV -> Bool
<= :: AccelerationStructureMotionInfoFlagsNV
-> AccelerationStructureMotionInfoFlagsNV -> Bool
$c<= :: AccelerationStructureMotionInfoFlagsNV
-> AccelerationStructureMotionInfoFlagsNV -> Bool
< :: AccelerationStructureMotionInfoFlagsNV
-> AccelerationStructureMotionInfoFlagsNV -> Bool
$c< :: AccelerationStructureMotionInfoFlagsNV
-> AccelerationStructureMotionInfoFlagsNV -> Bool
compare :: AccelerationStructureMotionInfoFlagsNV
-> AccelerationStructureMotionInfoFlagsNV -> Ordering
$ccompare :: AccelerationStructureMotionInfoFlagsNV
-> AccelerationStructureMotionInfoFlagsNV -> Ordering
Ord, Ptr AccelerationStructureMotionInfoFlagsNV
-> IO AccelerationStructureMotionInfoFlagsNV
Ptr AccelerationStructureMotionInfoFlagsNV
-> Int -> IO AccelerationStructureMotionInfoFlagsNV
Ptr AccelerationStructureMotionInfoFlagsNV
-> Int -> AccelerationStructureMotionInfoFlagsNV -> IO ()
Ptr AccelerationStructureMotionInfoFlagsNV
-> AccelerationStructureMotionInfoFlagsNV -> IO ()
AccelerationStructureMotionInfoFlagsNV -> Int
forall b. Ptr b -> Int -> IO AccelerationStructureMotionInfoFlagsNV
forall b.
Ptr b -> Int -> AccelerationStructureMotionInfoFlagsNV -> 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 AccelerationStructureMotionInfoFlagsNV
-> AccelerationStructureMotionInfoFlagsNV -> IO ()
$cpoke :: Ptr AccelerationStructureMotionInfoFlagsNV
-> AccelerationStructureMotionInfoFlagsNV -> IO ()
peek :: Ptr AccelerationStructureMotionInfoFlagsNV
-> IO AccelerationStructureMotionInfoFlagsNV
$cpeek :: Ptr AccelerationStructureMotionInfoFlagsNV
-> IO AccelerationStructureMotionInfoFlagsNV
pokeByteOff :: forall b.
Ptr b -> Int -> AccelerationStructureMotionInfoFlagsNV -> IO ()
$cpokeByteOff :: forall b.
Ptr b -> Int -> AccelerationStructureMotionInfoFlagsNV -> IO ()
peekByteOff :: forall b. Ptr b -> Int -> IO AccelerationStructureMotionInfoFlagsNV
$cpeekByteOff :: forall b. Ptr b -> Int -> IO AccelerationStructureMotionInfoFlagsNV
pokeElemOff :: Ptr AccelerationStructureMotionInfoFlagsNV
-> Int -> AccelerationStructureMotionInfoFlagsNV -> IO ()
$cpokeElemOff :: Ptr AccelerationStructureMotionInfoFlagsNV
-> Int -> AccelerationStructureMotionInfoFlagsNV -> IO ()
peekElemOff :: Ptr AccelerationStructureMotionInfoFlagsNV
-> Int -> IO AccelerationStructureMotionInfoFlagsNV
$cpeekElemOff :: Ptr AccelerationStructureMotionInfoFlagsNV
-> Int -> IO AccelerationStructureMotionInfoFlagsNV
alignment :: AccelerationStructureMotionInfoFlagsNV -> Int
$calignment :: AccelerationStructureMotionInfoFlagsNV -> Int
sizeOf :: AccelerationStructureMotionInfoFlagsNV -> Int
$csizeOf :: AccelerationStructureMotionInfoFlagsNV -> Int
Storable, AccelerationStructureMotionInfoFlagsNV
forall a. a -> Zero a
zero :: AccelerationStructureMotionInfoFlagsNV
$czero :: AccelerationStructureMotionInfoFlagsNV
Zero, Eq AccelerationStructureMotionInfoFlagsNV
AccelerationStructureMotionInfoFlagsNV
Int -> AccelerationStructureMotionInfoFlagsNV
AccelerationStructureMotionInfoFlagsNV -> Bool
AccelerationStructureMotionInfoFlagsNV -> Int
AccelerationStructureMotionInfoFlagsNV -> Maybe Int
AccelerationStructureMotionInfoFlagsNV
-> AccelerationStructureMotionInfoFlagsNV
AccelerationStructureMotionInfoFlagsNV -> Int -> Bool
AccelerationStructureMotionInfoFlagsNV
-> Int -> AccelerationStructureMotionInfoFlagsNV
AccelerationStructureMotionInfoFlagsNV
-> AccelerationStructureMotionInfoFlagsNV
-> AccelerationStructureMotionInfoFlagsNV
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 :: AccelerationStructureMotionInfoFlagsNV -> Int
$cpopCount :: AccelerationStructureMotionInfoFlagsNV -> Int
rotateR :: AccelerationStructureMotionInfoFlagsNV
-> Int -> AccelerationStructureMotionInfoFlagsNV
$crotateR :: AccelerationStructureMotionInfoFlagsNV
-> Int -> AccelerationStructureMotionInfoFlagsNV
rotateL :: AccelerationStructureMotionInfoFlagsNV
-> Int -> AccelerationStructureMotionInfoFlagsNV
$crotateL :: AccelerationStructureMotionInfoFlagsNV
-> Int -> AccelerationStructureMotionInfoFlagsNV
unsafeShiftR :: AccelerationStructureMotionInfoFlagsNV
-> Int -> AccelerationStructureMotionInfoFlagsNV
$cunsafeShiftR :: AccelerationStructureMotionInfoFlagsNV
-> Int -> AccelerationStructureMotionInfoFlagsNV
shiftR :: AccelerationStructureMotionInfoFlagsNV
-> Int -> AccelerationStructureMotionInfoFlagsNV
$cshiftR :: AccelerationStructureMotionInfoFlagsNV
-> Int -> AccelerationStructureMotionInfoFlagsNV
unsafeShiftL :: AccelerationStructureMotionInfoFlagsNV
-> Int -> AccelerationStructureMotionInfoFlagsNV
$cunsafeShiftL :: AccelerationStructureMotionInfoFlagsNV
-> Int -> AccelerationStructureMotionInfoFlagsNV
shiftL :: AccelerationStructureMotionInfoFlagsNV
-> Int -> AccelerationStructureMotionInfoFlagsNV
$cshiftL :: AccelerationStructureMotionInfoFlagsNV
-> Int -> AccelerationStructureMotionInfoFlagsNV
isSigned :: AccelerationStructureMotionInfoFlagsNV -> Bool
$cisSigned :: AccelerationStructureMotionInfoFlagsNV -> Bool
bitSize :: AccelerationStructureMotionInfoFlagsNV -> Int
$cbitSize :: AccelerationStructureMotionInfoFlagsNV -> Int
bitSizeMaybe :: AccelerationStructureMotionInfoFlagsNV -> Maybe Int
$cbitSizeMaybe :: AccelerationStructureMotionInfoFlagsNV -> Maybe Int
testBit :: AccelerationStructureMotionInfoFlagsNV -> Int -> Bool
$ctestBit :: AccelerationStructureMotionInfoFlagsNV -> Int -> Bool
complementBit :: AccelerationStructureMotionInfoFlagsNV
-> Int -> AccelerationStructureMotionInfoFlagsNV
$ccomplementBit :: AccelerationStructureMotionInfoFlagsNV
-> Int -> AccelerationStructureMotionInfoFlagsNV
clearBit :: AccelerationStructureMotionInfoFlagsNV
-> Int -> AccelerationStructureMotionInfoFlagsNV
$cclearBit :: AccelerationStructureMotionInfoFlagsNV
-> Int -> AccelerationStructureMotionInfoFlagsNV
setBit :: AccelerationStructureMotionInfoFlagsNV
-> Int -> AccelerationStructureMotionInfoFlagsNV
$csetBit :: AccelerationStructureMotionInfoFlagsNV
-> Int -> AccelerationStructureMotionInfoFlagsNV
bit :: Int -> AccelerationStructureMotionInfoFlagsNV
$cbit :: Int -> AccelerationStructureMotionInfoFlagsNV
zeroBits :: AccelerationStructureMotionInfoFlagsNV
$czeroBits :: AccelerationStructureMotionInfoFlagsNV
rotate :: AccelerationStructureMotionInfoFlagsNV
-> Int -> AccelerationStructureMotionInfoFlagsNV
$crotate :: AccelerationStructureMotionInfoFlagsNV
-> Int -> AccelerationStructureMotionInfoFlagsNV
shift :: AccelerationStructureMotionInfoFlagsNV
-> Int -> AccelerationStructureMotionInfoFlagsNV
$cshift :: AccelerationStructureMotionInfoFlagsNV
-> Int -> AccelerationStructureMotionInfoFlagsNV
complement :: AccelerationStructureMotionInfoFlagsNV
-> AccelerationStructureMotionInfoFlagsNV
$ccomplement :: AccelerationStructureMotionInfoFlagsNV
-> AccelerationStructureMotionInfoFlagsNV
xor :: AccelerationStructureMotionInfoFlagsNV
-> AccelerationStructureMotionInfoFlagsNV
-> AccelerationStructureMotionInfoFlagsNV
$cxor :: AccelerationStructureMotionInfoFlagsNV
-> AccelerationStructureMotionInfoFlagsNV
-> AccelerationStructureMotionInfoFlagsNV
.|. :: AccelerationStructureMotionInfoFlagsNV
-> AccelerationStructureMotionInfoFlagsNV
-> AccelerationStructureMotionInfoFlagsNV
$c.|. :: AccelerationStructureMotionInfoFlagsNV
-> AccelerationStructureMotionInfoFlagsNV
-> AccelerationStructureMotionInfoFlagsNV
.&. :: AccelerationStructureMotionInfoFlagsNV
-> AccelerationStructureMotionInfoFlagsNV
-> AccelerationStructureMotionInfoFlagsNV
$c.&. :: AccelerationStructureMotionInfoFlagsNV
-> AccelerationStructureMotionInfoFlagsNV
-> AccelerationStructureMotionInfoFlagsNV
Bits, Bits AccelerationStructureMotionInfoFlagsNV
AccelerationStructureMotionInfoFlagsNV -> Int
forall b.
Bits b -> (b -> Int) -> (b -> Int) -> (b -> Int) -> FiniteBits b
countTrailingZeros :: AccelerationStructureMotionInfoFlagsNV -> Int
$ccountTrailingZeros :: AccelerationStructureMotionInfoFlagsNV -> Int
countLeadingZeros :: AccelerationStructureMotionInfoFlagsNV -> Int
$ccountLeadingZeros :: AccelerationStructureMotionInfoFlagsNV -> Int
finiteBitSize :: AccelerationStructureMotionInfoFlagsNV -> Int
$cfiniteBitSize :: AccelerationStructureMotionInfoFlagsNV -> Int
FiniteBits)

conNameAccelerationStructureMotionInfoFlagsNV :: String
conNameAccelerationStructureMotionInfoFlagsNV :: String
conNameAccelerationStructureMotionInfoFlagsNV = String
"AccelerationStructureMotionInfoFlagsNV"

enumPrefixAccelerationStructureMotionInfoFlagsNV :: String
enumPrefixAccelerationStructureMotionInfoFlagsNV :: String
enumPrefixAccelerationStructureMotionInfoFlagsNV = String
""

showTableAccelerationStructureMotionInfoFlagsNV :: [(AccelerationStructureMotionInfoFlagsNV, String)]
showTableAccelerationStructureMotionInfoFlagsNV :: [(AccelerationStructureMotionInfoFlagsNV, String)]
showTableAccelerationStructureMotionInfoFlagsNV = []

instance Show AccelerationStructureMotionInfoFlagsNV where
  showsPrec :: Int -> AccelerationStructureMotionInfoFlagsNV -> ShowS
showsPrec =
    forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec
      String
enumPrefixAccelerationStructureMotionInfoFlagsNV
      [(AccelerationStructureMotionInfoFlagsNV, String)]
showTableAccelerationStructureMotionInfoFlagsNV
      String
conNameAccelerationStructureMotionInfoFlagsNV
      (\(AccelerationStructureMotionInfoFlagsNV Word32
x) -> Word32
x)
      (\Word32
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 Word32
x)

instance Read AccelerationStructureMotionInfoFlagsNV where
  readPrec :: ReadPrec AccelerationStructureMotionInfoFlagsNV
readPrec =
    forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec
      String
enumPrefixAccelerationStructureMotionInfoFlagsNV
      [(AccelerationStructureMotionInfoFlagsNV, String)]
showTableAccelerationStructureMotionInfoFlagsNV
      String
conNameAccelerationStructureMotionInfoFlagsNV
      Word32 -> AccelerationStructureMotionInfoFlagsNV
AccelerationStructureMotionInfoFlagsNV

-- | VkAccelerationStructureMotionInstanceFlagsNV - Reserved for future use
--
-- = Description
--
-- 'AccelerationStructureMotionInstanceFlagsNV' is a bitmask type for
-- setting a mask, but is currently reserved for future use.
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_NV_ray_tracing_motion_blur VK_NV_ray_tracing_motion_blur>,
-- 'AccelerationStructureMotionInstanceNV'
newtype AccelerationStructureMotionInstanceFlagsNV = AccelerationStructureMotionInstanceFlagsNV Flags
  deriving newtype (AccelerationStructureMotionInstanceFlagsNV
-> AccelerationStructureMotionInstanceFlagsNV -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AccelerationStructureMotionInstanceFlagsNV
-> AccelerationStructureMotionInstanceFlagsNV -> Bool
$c/= :: AccelerationStructureMotionInstanceFlagsNV
-> AccelerationStructureMotionInstanceFlagsNV -> Bool
== :: AccelerationStructureMotionInstanceFlagsNV
-> AccelerationStructureMotionInstanceFlagsNV -> Bool
$c== :: AccelerationStructureMotionInstanceFlagsNV
-> AccelerationStructureMotionInstanceFlagsNV -> Bool
Eq, Eq AccelerationStructureMotionInstanceFlagsNV
AccelerationStructureMotionInstanceFlagsNV
-> AccelerationStructureMotionInstanceFlagsNV -> Bool
AccelerationStructureMotionInstanceFlagsNV
-> AccelerationStructureMotionInstanceFlagsNV -> Ordering
AccelerationStructureMotionInstanceFlagsNV
-> AccelerationStructureMotionInstanceFlagsNV
-> AccelerationStructureMotionInstanceFlagsNV
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 :: AccelerationStructureMotionInstanceFlagsNV
-> AccelerationStructureMotionInstanceFlagsNV
-> AccelerationStructureMotionInstanceFlagsNV
$cmin :: AccelerationStructureMotionInstanceFlagsNV
-> AccelerationStructureMotionInstanceFlagsNV
-> AccelerationStructureMotionInstanceFlagsNV
max :: AccelerationStructureMotionInstanceFlagsNV
-> AccelerationStructureMotionInstanceFlagsNV
-> AccelerationStructureMotionInstanceFlagsNV
$cmax :: AccelerationStructureMotionInstanceFlagsNV
-> AccelerationStructureMotionInstanceFlagsNV
-> AccelerationStructureMotionInstanceFlagsNV
>= :: AccelerationStructureMotionInstanceFlagsNV
-> AccelerationStructureMotionInstanceFlagsNV -> Bool
$c>= :: AccelerationStructureMotionInstanceFlagsNV
-> AccelerationStructureMotionInstanceFlagsNV -> Bool
> :: AccelerationStructureMotionInstanceFlagsNV
-> AccelerationStructureMotionInstanceFlagsNV -> Bool
$c> :: AccelerationStructureMotionInstanceFlagsNV
-> AccelerationStructureMotionInstanceFlagsNV -> Bool
<= :: AccelerationStructureMotionInstanceFlagsNV
-> AccelerationStructureMotionInstanceFlagsNV -> Bool
$c<= :: AccelerationStructureMotionInstanceFlagsNV
-> AccelerationStructureMotionInstanceFlagsNV -> Bool
< :: AccelerationStructureMotionInstanceFlagsNV
-> AccelerationStructureMotionInstanceFlagsNV -> Bool
$c< :: AccelerationStructureMotionInstanceFlagsNV
-> AccelerationStructureMotionInstanceFlagsNV -> Bool
compare :: AccelerationStructureMotionInstanceFlagsNV
-> AccelerationStructureMotionInstanceFlagsNV -> Ordering
$ccompare :: AccelerationStructureMotionInstanceFlagsNV
-> AccelerationStructureMotionInstanceFlagsNV -> Ordering
Ord, Ptr AccelerationStructureMotionInstanceFlagsNV
-> IO AccelerationStructureMotionInstanceFlagsNV
Ptr AccelerationStructureMotionInstanceFlagsNV
-> Int -> IO AccelerationStructureMotionInstanceFlagsNV
Ptr AccelerationStructureMotionInstanceFlagsNV
-> Int -> AccelerationStructureMotionInstanceFlagsNV -> IO ()
Ptr AccelerationStructureMotionInstanceFlagsNV
-> AccelerationStructureMotionInstanceFlagsNV -> IO ()
AccelerationStructureMotionInstanceFlagsNV -> Int
forall b.
Ptr b -> Int -> IO AccelerationStructureMotionInstanceFlagsNV
forall b.
Ptr b -> Int -> AccelerationStructureMotionInstanceFlagsNV -> 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 AccelerationStructureMotionInstanceFlagsNV
-> AccelerationStructureMotionInstanceFlagsNV -> IO ()
$cpoke :: Ptr AccelerationStructureMotionInstanceFlagsNV
-> AccelerationStructureMotionInstanceFlagsNV -> IO ()
peek :: Ptr AccelerationStructureMotionInstanceFlagsNV
-> IO AccelerationStructureMotionInstanceFlagsNV
$cpeek :: Ptr AccelerationStructureMotionInstanceFlagsNV
-> IO AccelerationStructureMotionInstanceFlagsNV
pokeByteOff :: forall b.
Ptr b -> Int -> AccelerationStructureMotionInstanceFlagsNV -> IO ()
$cpokeByteOff :: forall b.
Ptr b -> Int -> AccelerationStructureMotionInstanceFlagsNV -> IO ()
peekByteOff :: forall b.
Ptr b -> Int -> IO AccelerationStructureMotionInstanceFlagsNV
$cpeekByteOff :: forall b.
Ptr b -> Int -> IO AccelerationStructureMotionInstanceFlagsNV
pokeElemOff :: Ptr AccelerationStructureMotionInstanceFlagsNV
-> Int -> AccelerationStructureMotionInstanceFlagsNV -> IO ()
$cpokeElemOff :: Ptr AccelerationStructureMotionInstanceFlagsNV
-> Int -> AccelerationStructureMotionInstanceFlagsNV -> IO ()
peekElemOff :: Ptr AccelerationStructureMotionInstanceFlagsNV
-> Int -> IO AccelerationStructureMotionInstanceFlagsNV
$cpeekElemOff :: Ptr AccelerationStructureMotionInstanceFlagsNV
-> Int -> IO AccelerationStructureMotionInstanceFlagsNV
alignment :: AccelerationStructureMotionInstanceFlagsNV -> Int
$calignment :: AccelerationStructureMotionInstanceFlagsNV -> Int
sizeOf :: AccelerationStructureMotionInstanceFlagsNV -> Int
$csizeOf :: AccelerationStructureMotionInstanceFlagsNV -> Int
Storable, AccelerationStructureMotionInstanceFlagsNV
forall a. a -> Zero a
zero :: AccelerationStructureMotionInstanceFlagsNV
$czero :: AccelerationStructureMotionInstanceFlagsNV
Zero, Eq AccelerationStructureMotionInstanceFlagsNV
AccelerationStructureMotionInstanceFlagsNV
Int -> AccelerationStructureMotionInstanceFlagsNV
AccelerationStructureMotionInstanceFlagsNV -> Bool
AccelerationStructureMotionInstanceFlagsNV -> Int
AccelerationStructureMotionInstanceFlagsNV -> Maybe Int
AccelerationStructureMotionInstanceFlagsNV
-> AccelerationStructureMotionInstanceFlagsNV
AccelerationStructureMotionInstanceFlagsNV -> Int -> Bool
AccelerationStructureMotionInstanceFlagsNV
-> Int -> AccelerationStructureMotionInstanceFlagsNV
AccelerationStructureMotionInstanceFlagsNV
-> AccelerationStructureMotionInstanceFlagsNV
-> AccelerationStructureMotionInstanceFlagsNV
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 :: AccelerationStructureMotionInstanceFlagsNV -> Int
$cpopCount :: AccelerationStructureMotionInstanceFlagsNV -> Int
rotateR :: AccelerationStructureMotionInstanceFlagsNV
-> Int -> AccelerationStructureMotionInstanceFlagsNV
$crotateR :: AccelerationStructureMotionInstanceFlagsNV
-> Int -> AccelerationStructureMotionInstanceFlagsNV
rotateL :: AccelerationStructureMotionInstanceFlagsNV
-> Int -> AccelerationStructureMotionInstanceFlagsNV
$crotateL :: AccelerationStructureMotionInstanceFlagsNV
-> Int -> AccelerationStructureMotionInstanceFlagsNV
unsafeShiftR :: AccelerationStructureMotionInstanceFlagsNV
-> Int -> AccelerationStructureMotionInstanceFlagsNV
$cunsafeShiftR :: AccelerationStructureMotionInstanceFlagsNV
-> Int -> AccelerationStructureMotionInstanceFlagsNV
shiftR :: AccelerationStructureMotionInstanceFlagsNV
-> Int -> AccelerationStructureMotionInstanceFlagsNV
$cshiftR :: AccelerationStructureMotionInstanceFlagsNV
-> Int -> AccelerationStructureMotionInstanceFlagsNV
unsafeShiftL :: AccelerationStructureMotionInstanceFlagsNV
-> Int -> AccelerationStructureMotionInstanceFlagsNV
$cunsafeShiftL :: AccelerationStructureMotionInstanceFlagsNV
-> Int -> AccelerationStructureMotionInstanceFlagsNV
shiftL :: AccelerationStructureMotionInstanceFlagsNV
-> Int -> AccelerationStructureMotionInstanceFlagsNV
$cshiftL :: AccelerationStructureMotionInstanceFlagsNV
-> Int -> AccelerationStructureMotionInstanceFlagsNV
isSigned :: AccelerationStructureMotionInstanceFlagsNV -> Bool
$cisSigned :: AccelerationStructureMotionInstanceFlagsNV -> Bool
bitSize :: AccelerationStructureMotionInstanceFlagsNV -> Int
$cbitSize :: AccelerationStructureMotionInstanceFlagsNV -> Int
bitSizeMaybe :: AccelerationStructureMotionInstanceFlagsNV -> Maybe Int
$cbitSizeMaybe :: AccelerationStructureMotionInstanceFlagsNV -> Maybe Int
testBit :: AccelerationStructureMotionInstanceFlagsNV -> Int -> Bool
$ctestBit :: AccelerationStructureMotionInstanceFlagsNV -> Int -> Bool
complementBit :: AccelerationStructureMotionInstanceFlagsNV
-> Int -> AccelerationStructureMotionInstanceFlagsNV
$ccomplementBit :: AccelerationStructureMotionInstanceFlagsNV
-> Int -> AccelerationStructureMotionInstanceFlagsNV
clearBit :: AccelerationStructureMotionInstanceFlagsNV
-> Int -> AccelerationStructureMotionInstanceFlagsNV
$cclearBit :: AccelerationStructureMotionInstanceFlagsNV
-> Int -> AccelerationStructureMotionInstanceFlagsNV
setBit :: AccelerationStructureMotionInstanceFlagsNV
-> Int -> AccelerationStructureMotionInstanceFlagsNV
$csetBit :: AccelerationStructureMotionInstanceFlagsNV
-> Int -> AccelerationStructureMotionInstanceFlagsNV
bit :: Int -> AccelerationStructureMotionInstanceFlagsNV
$cbit :: Int -> AccelerationStructureMotionInstanceFlagsNV
zeroBits :: AccelerationStructureMotionInstanceFlagsNV
$czeroBits :: AccelerationStructureMotionInstanceFlagsNV
rotate :: AccelerationStructureMotionInstanceFlagsNV
-> Int -> AccelerationStructureMotionInstanceFlagsNV
$crotate :: AccelerationStructureMotionInstanceFlagsNV
-> Int -> AccelerationStructureMotionInstanceFlagsNV
shift :: AccelerationStructureMotionInstanceFlagsNV
-> Int -> AccelerationStructureMotionInstanceFlagsNV
$cshift :: AccelerationStructureMotionInstanceFlagsNV
-> Int -> AccelerationStructureMotionInstanceFlagsNV
complement :: AccelerationStructureMotionInstanceFlagsNV
-> AccelerationStructureMotionInstanceFlagsNV
$ccomplement :: AccelerationStructureMotionInstanceFlagsNV
-> AccelerationStructureMotionInstanceFlagsNV
xor :: AccelerationStructureMotionInstanceFlagsNV
-> AccelerationStructureMotionInstanceFlagsNV
-> AccelerationStructureMotionInstanceFlagsNV
$cxor :: AccelerationStructureMotionInstanceFlagsNV
-> AccelerationStructureMotionInstanceFlagsNV
-> AccelerationStructureMotionInstanceFlagsNV
.|. :: AccelerationStructureMotionInstanceFlagsNV
-> AccelerationStructureMotionInstanceFlagsNV
-> AccelerationStructureMotionInstanceFlagsNV
$c.|. :: AccelerationStructureMotionInstanceFlagsNV
-> AccelerationStructureMotionInstanceFlagsNV
-> AccelerationStructureMotionInstanceFlagsNV
.&. :: AccelerationStructureMotionInstanceFlagsNV
-> AccelerationStructureMotionInstanceFlagsNV
-> AccelerationStructureMotionInstanceFlagsNV
$c.&. :: AccelerationStructureMotionInstanceFlagsNV
-> AccelerationStructureMotionInstanceFlagsNV
-> AccelerationStructureMotionInstanceFlagsNV
Bits, Bits AccelerationStructureMotionInstanceFlagsNV
AccelerationStructureMotionInstanceFlagsNV -> Int
forall b.
Bits b -> (b -> Int) -> (b -> Int) -> (b -> Int) -> FiniteBits b
countTrailingZeros :: AccelerationStructureMotionInstanceFlagsNV -> Int
$ccountTrailingZeros :: AccelerationStructureMotionInstanceFlagsNV -> Int
countLeadingZeros :: AccelerationStructureMotionInstanceFlagsNV -> Int
$ccountLeadingZeros :: AccelerationStructureMotionInstanceFlagsNV -> Int
finiteBitSize :: AccelerationStructureMotionInstanceFlagsNV -> Int
$cfiniteBitSize :: AccelerationStructureMotionInstanceFlagsNV -> Int
FiniteBits)

conNameAccelerationStructureMotionInstanceFlagsNV :: String
conNameAccelerationStructureMotionInstanceFlagsNV :: String
conNameAccelerationStructureMotionInstanceFlagsNV = String
"AccelerationStructureMotionInstanceFlagsNV"

enumPrefixAccelerationStructureMotionInstanceFlagsNV :: String
enumPrefixAccelerationStructureMotionInstanceFlagsNV :: String
enumPrefixAccelerationStructureMotionInstanceFlagsNV = String
""

showTableAccelerationStructureMotionInstanceFlagsNV :: [(AccelerationStructureMotionInstanceFlagsNV, String)]
showTableAccelerationStructureMotionInstanceFlagsNV :: [(AccelerationStructureMotionInstanceFlagsNV, String)]
showTableAccelerationStructureMotionInstanceFlagsNV = []

instance Show AccelerationStructureMotionInstanceFlagsNV where
  showsPrec :: Int -> AccelerationStructureMotionInstanceFlagsNV -> ShowS
showsPrec =
    forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec
      String
enumPrefixAccelerationStructureMotionInstanceFlagsNV
      [(AccelerationStructureMotionInstanceFlagsNV, String)]
showTableAccelerationStructureMotionInstanceFlagsNV
      String
conNameAccelerationStructureMotionInstanceFlagsNV
      (\(AccelerationStructureMotionInstanceFlagsNV Word32
x) -> Word32
x)
      (\Word32
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 Word32
x)

instance Read AccelerationStructureMotionInstanceFlagsNV where
  readPrec :: ReadPrec AccelerationStructureMotionInstanceFlagsNV
readPrec =
    forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec
      String
enumPrefixAccelerationStructureMotionInstanceFlagsNV
      [(AccelerationStructureMotionInstanceFlagsNV, String)]
showTableAccelerationStructureMotionInstanceFlagsNV
      String
conNameAccelerationStructureMotionInstanceFlagsNV
      Word32 -> AccelerationStructureMotionInstanceFlagsNV
AccelerationStructureMotionInstanceFlagsNV

-- | VkAccelerationStructureMotionInstanceTypeNV - Enum specifying a type of
-- acceleration structure motion instance data for building into an
-- acceleration structure geometry
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_NV_ray_tracing_motion_blur VK_NV_ray_tracing_motion_blur>,
-- 'AccelerationStructureMotionInstanceNV'
newtype AccelerationStructureMotionInstanceTypeNV = AccelerationStructureMotionInstanceTypeNV Int32
  deriving newtype (AccelerationStructureMotionInstanceTypeNV
-> AccelerationStructureMotionInstanceTypeNV -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AccelerationStructureMotionInstanceTypeNV
-> AccelerationStructureMotionInstanceTypeNV -> Bool
$c/= :: AccelerationStructureMotionInstanceTypeNV
-> AccelerationStructureMotionInstanceTypeNV -> Bool
== :: AccelerationStructureMotionInstanceTypeNV
-> AccelerationStructureMotionInstanceTypeNV -> Bool
$c== :: AccelerationStructureMotionInstanceTypeNV
-> AccelerationStructureMotionInstanceTypeNV -> Bool
Eq, Eq AccelerationStructureMotionInstanceTypeNV
AccelerationStructureMotionInstanceTypeNV
-> AccelerationStructureMotionInstanceTypeNV -> Bool
AccelerationStructureMotionInstanceTypeNV
-> AccelerationStructureMotionInstanceTypeNV -> Ordering
AccelerationStructureMotionInstanceTypeNV
-> AccelerationStructureMotionInstanceTypeNV
-> AccelerationStructureMotionInstanceTypeNV
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 :: AccelerationStructureMotionInstanceTypeNV
-> AccelerationStructureMotionInstanceTypeNV
-> AccelerationStructureMotionInstanceTypeNV
$cmin :: AccelerationStructureMotionInstanceTypeNV
-> AccelerationStructureMotionInstanceTypeNV
-> AccelerationStructureMotionInstanceTypeNV
max :: AccelerationStructureMotionInstanceTypeNV
-> AccelerationStructureMotionInstanceTypeNV
-> AccelerationStructureMotionInstanceTypeNV
$cmax :: AccelerationStructureMotionInstanceTypeNV
-> AccelerationStructureMotionInstanceTypeNV
-> AccelerationStructureMotionInstanceTypeNV
>= :: AccelerationStructureMotionInstanceTypeNV
-> AccelerationStructureMotionInstanceTypeNV -> Bool
$c>= :: AccelerationStructureMotionInstanceTypeNV
-> AccelerationStructureMotionInstanceTypeNV -> Bool
> :: AccelerationStructureMotionInstanceTypeNV
-> AccelerationStructureMotionInstanceTypeNV -> Bool
$c> :: AccelerationStructureMotionInstanceTypeNV
-> AccelerationStructureMotionInstanceTypeNV -> Bool
<= :: AccelerationStructureMotionInstanceTypeNV
-> AccelerationStructureMotionInstanceTypeNV -> Bool
$c<= :: AccelerationStructureMotionInstanceTypeNV
-> AccelerationStructureMotionInstanceTypeNV -> Bool
< :: AccelerationStructureMotionInstanceTypeNV
-> AccelerationStructureMotionInstanceTypeNV -> Bool
$c< :: AccelerationStructureMotionInstanceTypeNV
-> AccelerationStructureMotionInstanceTypeNV -> Bool
compare :: AccelerationStructureMotionInstanceTypeNV
-> AccelerationStructureMotionInstanceTypeNV -> Ordering
$ccompare :: AccelerationStructureMotionInstanceTypeNV
-> AccelerationStructureMotionInstanceTypeNV -> Ordering
Ord, Ptr AccelerationStructureMotionInstanceTypeNV
-> IO AccelerationStructureMotionInstanceTypeNV
Ptr AccelerationStructureMotionInstanceTypeNV
-> Int -> IO AccelerationStructureMotionInstanceTypeNV
Ptr AccelerationStructureMotionInstanceTypeNV
-> Int -> AccelerationStructureMotionInstanceTypeNV -> IO ()
Ptr AccelerationStructureMotionInstanceTypeNV
-> AccelerationStructureMotionInstanceTypeNV -> IO ()
AccelerationStructureMotionInstanceTypeNV -> Int
forall b.
Ptr b -> Int -> IO AccelerationStructureMotionInstanceTypeNV
forall b.
Ptr b -> Int -> AccelerationStructureMotionInstanceTypeNV -> 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 AccelerationStructureMotionInstanceTypeNV
-> AccelerationStructureMotionInstanceTypeNV -> IO ()
$cpoke :: Ptr AccelerationStructureMotionInstanceTypeNV
-> AccelerationStructureMotionInstanceTypeNV -> IO ()
peek :: Ptr AccelerationStructureMotionInstanceTypeNV
-> IO AccelerationStructureMotionInstanceTypeNV
$cpeek :: Ptr AccelerationStructureMotionInstanceTypeNV
-> IO AccelerationStructureMotionInstanceTypeNV
pokeByteOff :: forall b.
Ptr b -> Int -> AccelerationStructureMotionInstanceTypeNV -> IO ()
$cpokeByteOff :: forall b.
Ptr b -> Int -> AccelerationStructureMotionInstanceTypeNV -> IO ()
peekByteOff :: forall b.
Ptr b -> Int -> IO AccelerationStructureMotionInstanceTypeNV
$cpeekByteOff :: forall b.
Ptr b -> Int -> IO AccelerationStructureMotionInstanceTypeNV
pokeElemOff :: Ptr AccelerationStructureMotionInstanceTypeNV
-> Int -> AccelerationStructureMotionInstanceTypeNV -> IO ()
$cpokeElemOff :: Ptr AccelerationStructureMotionInstanceTypeNV
-> Int -> AccelerationStructureMotionInstanceTypeNV -> IO ()
peekElemOff :: Ptr AccelerationStructureMotionInstanceTypeNV
-> Int -> IO AccelerationStructureMotionInstanceTypeNV
$cpeekElemOff :: Ptr AccelerationStructureMotionInstanceTypeNV
-> Int -> IO AccelerationStructureMotionInstanceTypeNV
alignment :: AccelerationStructureMotionInstanceTypeNV -> Int
$calignment :: AccelerationStructureMotionInstanceTypeNV -> Int
sizeOf :: AccelerationStructureMotionInstanceTypeNV -> Int
$csizeOf :: AccelerationStructureMotionInstanceTypeNV -> Int
Storable, AccelerationStructureMotionInstanceTypeNV
forall a. a -> Zero a
zero :: AccelerationStructureMotionInstanceTypeNV
$czero :: AccelerationStructureMotionInstanceTypeNV
Zero)

-- | 'ACCELERATION_STRUCTURE_MOTION_INSTANCE_TYPE_STATIC_NV' specifies that
-- the instance is a static instance with no instance motion.
pattern $bACCELERATION_STRUCTURE_MOTION_INSTANCE_TYPE_STATIC_NV :: AccelerationStructureMotionInstanceTypeNV
$mACCELERATION_STRUCTURE_MOTION_INSTANCE_TYPE_STATIC_NV :: forall {r}.
AccelerationStructureMotionInstanceTypeNV
-> ((# #) -> r) -> ((# #) -> r) -> r
ACCELERATION_STRUCTURE_MOTION_INSTANCE_TYPE_STATIC_NV = AccelerationStructureMotionInstanceTypeNV 0

-- | 'ACCELERATION_STRUCTURE_MOTION_INSTANCE_TYPE_MATRIX_MOTION_NV' specifies
-- that the instance is a motion instance with motion specified by
-- interpolation between two matrices.
pattern $bACCELERATION_STRUCTURE_MOTION_INSTANCE_TYPE_MATRIX_MOTION_NV :: AccelerationStructureMotionInstanceTypeNV
$mACCELERATION_STRUCTURE_MOTION_INSTANCE_TYPE_MATRIX_MOTION_NV :: forall {r}.
AccelerationStructureMotionInstanceTypeNV
-> ((# #) -> r) -> ((# #) -> r) -> r
ACCELERATION_STRUCTURE_MOTION_INSTANCE_TYPE_MATRIX_MOTION_NV = AccelerationStructureMotionInstanceTypeNV 1

-- | 'ACCELERATION_STRUCTURE_MOTION_INSTANCE_TYPE_SRT_MOTION_NV' specifies
-- that the instance is a motion instance with motion specified by
-- interpolation in the SRT decomposition.
pattern $bACCELERATION_STRUCTURE_MOTION_INSTANCE_TYPE_SRT_MOTION_NV :: AccelerationStructureMotionInstanceTypeNV
$mACCELERATION_STRUCTURE_MOTION_INSTANCE_TYPE_SRT_MOTION_NV :: forall {r}.
AccelerationStructureMotionInstanceTypeNV
-> ((# #) -> r) -> ((# #) -> r) -> r
ACCELERATION_STRUCTURE_MOTION_INSTANCE_TYPE_SRT_MOTION_NV = AccelerationStructureMotionInstanceTypeNV 2

{-# COMPLETE
  ACCELERATION_STRUCTURE_MOTION_INSTANCE_TYPE_STATIC_NV
  , ACCELERATION_STRUCTURE_MOTION_INSTANCE_TYPE_MATRIX_MOTION_NV
  , ACCELERATION_STRUCTURE_MOTION_INSTANCE_TYPE_SRT_MOTION_NV ::
    AccelerationStructureMotionInstanceTypeNV
  #-}

conNameAccelerationStructureMotionInstanceTypeNV :: String
conNameAccelerationStructureMotionInstanceTypeNV :: String
conNameAccelerationStructureMotionInstanceTypeNV = String
"AccelerationStructureMotionInstanceTypeNV"

enumPrefixAccelerationStructureMotionInstanceTypeNV :: String
enumPrefixAccelerationStructureMotionInstanceTypeNV :: String
enumPrefixAccelerationStructureMotionInstanceTypeNV = String
"ACCELERATION_STRUCTURE_MOTION_INSTANCE_TYPE_"

showTableAccelerationStructureMotionInstanceTypeNV :: [(AccelerationStructureMotionInstanceTypeNV, String)]
showTableAccelerationStructureMotionInstanceTypeNV :: [(AccelerationStructureMotionInstanceTypeNV, String)]
showTableAccelerationStructureMotionInstanceTypeNV =
  [
    ( AccelerationStructureMotionInstanceTypeNV
ACCELERATION_STRUCTURE_MOTION_INSTANCE_TYPE_STATIC_NV
    , String
"STATIC_NV"
    )
  ,
    ( AccelerationStructureMotionInstanceTypeNV
ACCELERATION_STRUCTURE_MOTION_INSTANCE_TYPE_MATRIX_MOTION_NV
    , String
"MATRIX_MOTION_NV"
    )
  ,
    ( AccelerationStructureMotionInstanceTypeNV
ACCELERATION_STRUCTURE_MOTION_INSTANCE_TYPE_SRT_MOTION_NV
    , String
"SRT_MOTION_NV"
    )
  ]

instance Show AccelerationStructureMotionInstanceTypeNV where
  showsPrec :: Int -> AccelerationStructureMotionInstanceTypeNV -> ShowS
showsPrec =
    forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec
      String
enumPrefixAccelerationStructureMotionInstanceTypeNV
      [(AccelerationStructureMotionInstanceTypeNV, String)]
showTableAccelerationStructureMotionInstanceTypeNV
      String
conNameAccelerationStructureMotionInstanceTypeNV
      (\(AccelerationStructureMotionInstanceTypeNV Int32
x) -> Int32
x)
      (forall a. Show a => Int -> a -> ShowS
showsPrec Int
11)

instance Read AccelerationStructureMotionInstanceTypeNV where
  readPrec :: ReadPrec AccelerationStructureMotionInstanceTypeNV
readPrec =
    forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec
      String
enumPrefixAccelerationStructureMotionInstanceTypeNV
      [(AccelerationStructureMotionInstanceTypeNV, String)]
showTableAccelerationStructureMotionInstanceTypeNV
      String
conNameAccelerationStructureMotionInstanceTypeNV
      Int32 -> AccelerationStructureMotionInstanceTypeNV
AccelerationStructureMotionInstanceTypeNV

type NV_RAY_TRACING_MOTION_BLUR_SPEC_VERSION = 1

-- No documentation found for TopLevel "VK_NV_RAY_TRACING_MOTION_BLUR_SPEC_VERSION"
pattern NV_RAY_TRACING_MOTION_BLUR_SPEC_VERSION :: forall a . Integral a => a
pattern $bNV_RAY_TRACING_MOTION_BLUR_SPEC_VERSION :: forall a. Integral a => a
$mNV_RAY_TRACING_MOTION_BLUR_SPEC_VERSION :: forall {r} {a}.
Integral a =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
NV_RAY_TRACING_MOTION_BLUR_SPEC_VERSION = 1


type NV_RAY_TRACING_MOTION_BLUR_EXTENSION_NAME = "VK_NV_ray_tracing_motion_blur"

-- No documentation found for TopLevel "VK_NV_RAY_TRACING_MOTION_BLUR_EXTENSION_NAME"
pattern NV_RAY_TRACING_MOTION_BLUR_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $bNV_RAY_TRACING_MOTION_BLUR_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
$mNV_RAY_TRACING_MOTION_BLUR_EXTENSION_NAME :: forall {r} {a}.
(Eq a, IsString a) =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
NV_RAY_TRACING_MOTION_BLUR_EXTENSION_NAME = "VK_NV_ray_tracing_motion_blur"