{-# language CPP #-}
module Vulkan.Extensions.VK_KHR_acceleration_structure ( destroyAccelerationStructureKHR
, cmdCopyAccelerationStructureKHR
, copyAccelerationStructureKHR
, cmdCopyAccelerationStructureToMemoryKHR
, copyAccelerationStructureToMemoryKHR
, cmdCopyMemoryToAccelerationStructureKHR
, copyMemoryToAccelerationStructureKHR
, cmdWriteAccelerationStructuresPropertiesKHR
, writeAccelerationStructuresPropertiesKHR
, getDeviceAccelerationStructureCompatibilityKHR
, createAccelerationStructureKHR
, withAccelerationStructureKHR
, cmdBuildAccelerationStructuresKHR
, cmdBuildAccelerationStructuresIndirectKHR
, buildAccelerationStructuresKHR
, getAccelerationStructureDeviceAddressKHR
, getAccelerationStructureBuildSizesKHR
, pattern GEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_KHR
, WriteDescriptorSetAccelerationStructureKHR(..)
, PhysicalDeviceAccelerationStructureFeaturesKHR(..)
, PhysicalDeviceAccelerationStructurePropertiesKHR(..)
, AccelerationStructureGeometryTrianglesDataKHR(..)
, AccelerationStructureGeometryAabbsDataKHR(..)
, AccelerationStructureGeometryInstancesDataKHR(..)
, AccelerationStructureGeometryKHR(..)
, AccelerationStructureBuildGeometryInfoKHR(..)
, AccelerationStructureBuildRangeInfoKHR(..)
, AccelerationStructureCreateInfoKHR(..)
, AabbPositionsKHR(..)
, TransformMatrixKHR(..)
, AccelerationStructureInstanceKHR(..)
, AccelerationStructureDeviceAddressInfoKHR(..)
, AccelerationStructureVersionInfoKHR(..)
, CopyAccelerationStructureInfoKHR(..)
, CopyAccelerationStructureToMemoryInfoKHR(..)
, CopyMemoryToAccelerationStructureInfoKHR(..)
, AccelerationStructureBuildSizesInfoKHR(..)
, DeviceOrHostAddressKHR(..)
, DeviceOrHostAddressConstKHR(..)
, AccelerationStructureGeometryDataKHR(..)
, GeometryInstanceFlagsKHR
, GeometryInstanceFlagBitsKHR( GEOMETRY_INSTANCE_TRIANGLE_FACING_CULL_DISABLE_BIT_KHR
, GEOMETRY_INSTANCE_TRIANGLE_FLIP_FACING_BIT_KHR
, GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_KHR
, GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_KHR
, GEOMETRY_INSTANCE_DISABLE_OPACITY_MICROMAPS_EXT
, GEOMETRY_INSTANCE_FORCE_OPACITY_MICROMAP_2_STATE_EXT
, ..
)
, GeometryFlagsKHR
, GeometryFlagBitsKHR( GEOMETRY_OPAQUE_BIT_KHR
, GEOMETRY_NO_DUPLICATE_ANY_HIT_INVOCATION_BIT_KHR
, ..
)
, BuildAccelerationStructureFlagsKHR
, BuildAccelerationStructureFlagBitsKHR( BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_KHR
, BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_KHR
, BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_KHR
, BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_KHR
, BUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_KHR
, BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_DATA_UPDATE_EXT
, BUILD_ACCELERATION_STRUCTURE_ALLOW_DISABLE_OPACITY_MICROMAPS_EXT
, BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_UPDATE_EXT
, BUILD_ACCELERATION_STRUCTURE_MOTION_BIT_NV
, ..
)
, AccelerationStructureCreateFlagsKHR
, AccelerationStructureCreateFlagBitsKHR( ACCELERATION_STRUCTURE_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_KHR
, ACCELERATION_STRUCTURE_CREATE_MOTION_BIT_NV
, ..
)
, CopyAccelerationStructureModeKHR( COPY_ACCELERATION_STRUCTURE_MODE_CLONE_KHR
, COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_KHR
, COPY_ACCELERATION_STRUCTURE_MODE_SERIALIZE_KHR
, COPY_ACCELERATION_STRUCTURE_MODE_DESERIALIZE_KHR
, ..
)
, BuildAccelerationStructureModeKHR( BUILD_ACCELERATION_STRUCTURE_MODE_BUILD_KHR
, BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR
, ..
)
, AccelerationStructureTypeKHR( ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_KHR
, ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_KHR
, ACCELERATION_STRUCTURE_TYPE_GENERIC_KHR
, ..
)
, GeometryTypeKHR( GEOMETRY_TYPE_TRIANGLES_KHR
, GEOMETRY_TYPE_AABBS_KHR
, GEOMETRY_TYPE_INSTANCES_KHR
, ..
)
, AccelerationStructureBuildTypeKHR( ACCELERATION_STRUCTURE_BUILD_TYPE_HOST_KHR
, ACCELERATION_STRUCTURE_BUILD_TYPE_DEVICE_KHR
, ACCELERATION_STRUCTURE_BUILD_TYPE_HOST_OR_DEVICE_KHR
, ..
)
, AccelerationStructureCompatibilityKHR( ACCELERATION_STRUCTURE_COMPATIBILITY_COMPATIBLE_KHR
, ACCELERATION_STRUCTURE_COMPATIBILITY_INCOMPATIBLE_KHR
, ..
)
, KHR_ACCELERATION_STRUCTURE_SPEC_VERSION
, pattern KHR_ACCELERATION_STRUCTURE_SPEC_VERSION
, KHR_ACCELERATION_STRUCTURE_EXTENSION_NAME
, pattern KHR_ACCELERATION_STRUCTURE_EXTENSION_NAME
, AccelerationStructureKHR(..)
, DeferredOperationKHR(..)
, DebugReportObjectTypeEXT(..)
) where
import Vulkan.CStruct.Utils (FixedArray)
import Vulkan.Internal.Utils (enumReadPrec)
import Vulkan.Internal.Utils (enumShowsPrec)
import Vulkan.Internal.Utils (traceAroundEvent)
import Control.Exception.Base (bracket)
import Control.Monad (unless)
import Control.Monad.IO.Class (liftIO)
import Data.Bits ((.&.))
import Data.Bits ((.|.))
import Data.Bits (shiftL)
import Data.Bits (shiftR)
import Data.Typeable (eqT)
import Foreign.Marshal.Alloc (allocaBytes)
import Foreign.Marshal.Alloc (callocBytes)
import Foreign.Marshal.Alloc (free)
import GHC.Base (when)
import GHC.IO (throwIO)
import GHC.Ptr (castPtr)
import GHC.Ptr (nullFunPtr)
import Foreign.Ptr (nullPtr)
import Foreign.Ptr (plusPtr)
import GHC.Show (showString)
import GHC.Show (showsPrec)
import Numeric (showHex)
import qualified Data.ByteString (length)
import Data.ByteString (packCStringLen)
import Data.ByteString.Unsafe (unsafeUseAsCString)
import Data.Coerce (coerce)
import Control.Monad.Trans.Class (lift)
import Control.Monad.Trans.Cont (evalContT)
import Control.Monad.Trans.Cont (runContT)
import Data.Vector (generateM)
import qualified Data.Vector (imapM_)
import qualified Data.Vector (length)
import qualified Data.Vector (null)
import Foreign.C.Types (CSize(..))
import Vulkan.CStruct (FromCStruct)
import Vulkan.CStruct (FromCStruct(..))
import Vulkan.CStruct (ToCStruct)
import Vulkan.CStruct (ToCStruct(..))
import Vulkan.Zero (Zero)
import Vulkan.Zero (Zero(..))
import Control.Monad.IO.Class (MonadIO)
import Data.Bits (Bits)
import Data.Bits (FiniteBits)
import Data.String (IsString)
import Data.Type.Equality ((:~:)(Refl))
import Data.Typeable (Typeable)
import Foreign.C.Types (CChar)
import Foreign.C.Types (CFloat)
import Foreign.C.Types (CFloat(..))
import Foreign.C.Types (CFloat(CFloat))
import Foreign.C.Types (CSize)
import Foreign.C.Types (CSize(CSize))
import Foreign.Storable (Storable)
import Foreign.Storable (Storable(peek))
import Foreign.Storable (Storable(poke))
import qualified Foreign.Storable (Storable(..))
import GHC.Generics (Generic)
import GHC.IO.Exception (IOErrorType(..))
import GHC.IO.Exception (IOException(..))
import Data.Int (Int32)
import Foreign.Ptr (FunPtr)
import Foreign.Ptr (Ptr)
import GHC.Read (Read(readPrec))
import GHC.Show (Show(showsPrec))
import Data.Word (Word32)
import Data.Word (Word64)
import Data.Word (Word8)
import Data.ByteString (ByteString)
import Data.Kind (Type)
import Control.Monad.Trans.Cont (ContT(..))
import Data.Vector (Vector)
import Vulkan.CStruct.Utils (advancePtrBytes)
import Vulkan.Core10.FundamentalTypes (bool32ToBool)
import Vulkan.Core10.FundamentalTypes (boolToBool32)
import Vulkan.CStruct.Extends (forgetExtensions)
import Vulkan.CStruct.Utils (lowerArrayPtr)
import Vulkan.CStruct.Extends (pokeSomeCStruct)
import Vulkan.NamedType ((:::))
import {-# SOURCE #-} Vulkan.Extensions.VK_NV_ray_tracing_motion_blur (AccelerationStructureGeometryMotionTrianglesDataNV)
import Vulkan.Extensions.Handles (AccelerationStructureKHR)
import Vulkan.Extensions.Handles (AccelerationStructureKHR(..))
import {-# SOURCE #-} Vulkan.Extensions.VK_NV_ray_tracing_motion_blur (AccelerationStructureMotionInfoNV)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_opacity_micromap (AccelerationStructureTrianglesOpacityMicromapEXT)
import Vulkan.Core10.AllocationCallbacks (AllocationCallbacks)
import Vulkan.Core10.FundamentalTypes (Bool32)
import Vulkan.Core10.Handles (Buffer)
import Vulkan.CStruct.Extends (Chain)
import Vulkan.Core10.Handles (CommandBuffer)
import Vulkan.Core10.Handles (CommandBuffer(..))
import Vulkan.Core10.Handles (CommandBuffer(CommandBuffer))
import Vulkan.Core10.Handles (CommandBuffer_T)
import Vulkan.Extensions.Handles (DeferredOperationKHR)
import Vulkan.Extensions.Handles (DeferredOperationKHR(..))
import Vulkan.Core10.Handles (Device)
import Vulkan.Core10.Handles (Device(..))
import Vulkan.Core10.Handles (Device(Device))
import Vulkan.Core10.FundamentalTypes (DeviceAddress)
import Vulkan.Dynamic (DeviceCmds(pVkBuildAccelerationStructuresKHR))
import Vulkan.Dynamic (DeviceCmds(pVkCmdBuildAccelerationStructuresIndirectKHR))
import Vulkan.Dynamic (DeviceCmds(pVkCmdBuildAccelerationStructuresKHR))
import Vulkan.Dynamic (DeviceCmds(pVkCmdCopyAccelerationStructureKHR))
import Vulkan.Dynamic (DeviceCmds(pVkCmdCopyAccelerationStructureToMemoryKHR))
import Vulkan.Dynamic (DeviceCmds(pVkCmdCopyMemoryToAccelerationStructureKHR))
import Vulkan.Dynamic (DeviceCmds(pVkCmdWriteAccelerationStructuresPropertiesKHR))
import Vulkan.Dynamic (DeviceCmds(pVkCopyAccelerationStructureKHR))
import Vulkan.Dynamic (DeviceCmds(pVkCopyAccelerationStructureToMemoryKHR))
import Vulkan.Dynamic (DeviceCmds(pVkCopyMemoryToAccelerationStructureKHR))
import Vulkan.Dynamic (DeviceCmds(pVkCreateAccelerationStructureKHR))
import Vulkan.Dynamic (DeviceCmds(pVkDestroyAccelerationStructureKHR))
import Vulkan.Dynamic (DeviceCmds(pVkGetAccelerationStructureBuildSizesKHR))
import Vulkan.Dynamic (DeviceCmds(pVkGetAccelerationStructureDeviceAddressKHR))
import Vulkan.Dynamic (DeviceCmds(pVkGetDeviceAccelerationStructureCompatibilityKHR))
import Vulkan.Dynamic (DeviceCmds(pVkWriteAccelerationStructuresPropertiesKHR))
import Vulkan.Core10.FundamentalTypes (DeviceSize)
import Vulkan.Core10.Handles (Device_T)
import Vulkan.CStruct.Extends (Extends)
import Vulkan.CStruct.Extends (Extendss)
import Vulkan.CStruct.Extends (Extensible(..))
import Vulkan.Core10.FundamentalTypes (Flags)
import Vulkan.Core10.Enums.Format (Format)
import Vulkan.Core10.Enums.IndexType (IndexType)
import Vulkan.CStruct.Extends (PeekChain)
import Vulkan.CStruct.Extends (PeekChain(..))
import Vulkan.CStruct.Extends (PokeChain)
import Vulkan.CStruct.Extends (PokeChain(..))
import Vulkan.Core10.Handles (QueryPool)
import Vulkan.Core10.Handles (QueryPool(..))
import Vulkan.Core10.Enums.QueryType (QueryType)
import Vulkan.Core10.Enums.QueryType (QueryType(..))
import Vulkan.Core10.Enums.Result (Result)
import Vulkan.Core10.Enums.Result (Result(..))
import Vulkan.CStruct.Extends (SomeStruct)
import Vulkan.CStruct.Extends (SomeStruct(..))
import Vulkan.Core10.Enums.StructureType (StructureType)
import Vulkan.Exception (VulkanException(..))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_ACCELERATION_STRUCTURE_BUILD_GEOMETRY_INFO_KHR))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_ACCELERATION_STRUCTURE_BUILD_SIZES_INFO_KHR))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_ACCELERATION_STRUCTURE_CREATE_INFO_KHR))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_ACCELERATION_STRUCTURE_DEVICE_ADDRESS_INFO_KHR))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_AABBS_DATA_KHR))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_INSTANCES_DATA_KHR))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_KHR))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_TRIANGLES_DATA_KHR))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_ACCELERATION_STRUCTURE_VERSION_INFO_KHR))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_COPY_ACCELERATION_STRUCTURE_INFO_KHR))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_COPY_ACCELERATION_STRUCTURE_TO_MEMORY_INFO_KHR))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_COPY_MEMORY_TO_ACCELERATION_STRUCTURE_INFO_KHR))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_FEATURES_KHR))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_PROPERTIES_KHR))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_KHR))
import Vulkan.Core10.Enums.Result (Result(SUCCESS))
import Vulkan.Core10.APIConstants (pattern UUID_SIZE)
import Vulkan.Extensions.Handles (AccelerationStructureKHR(..))
import Vulkan.Extensions.VK_EXT_debug_report (DebugReportObjectTypeEXT(..))
import Vulkan.Extensions.Handles (DeferredOperationKHR(..))
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkDestroyAccelerationStructureKHR
:: FunPtr (Ptr Device_T -> AccelerationStructureKHR -> Ptr AllocationCallbacks -> IO ()) -> Ptr Device_T -> AccelerationStructureKHR -> Ptr AllocationCallbacks -> IO ()
destroyAccelerationStructureKHR :: forall io
. (MonadIO io)
=>
Device
->
AccelerationStructureKHR
->
("allocator" ::: Maybe AllocationCallbacks)
-> io ()
destroyAccelerationStructureKHR :: forall (io :: * -> *).
MonadIO io =>
Device
-> AccelerationStructureKHR
-> ("allocator" ::: Maybe AllocationCallbacks)
-> io ()
destroyAccelerationStructureKHR Device
device
AccelerationStructureKHR
accelerationStructure
"allocator" ::: Maybe AllocationCallbacks
allocator = IO () -> io ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> io ())
-> (ContT () IO () -> IO ()) -> ContT () IO () -> io ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT () IO () -> IO ()
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT () IO () -> io ()) -> ContT () IO () -> io ()
forall a b. (a -> b) -> a -> b
$ do
let vkDestroyAccelerationStructureKHRPtr :: FunPtr
(Ptr Device_T
-> AccelerationStructureKHR
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> IO ())
vkDestroyAccelerationStructureKHRPtr = DeviceCmds
-> FunPtr
(Ptr Device_T
-> AccelerationStructureKHR
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> IO ())
pVkDestroyAccelerationStructureKHR (case Device
device of Device{DeviceCmds
$sel:deviceCmds:Device :: Device -> DeviceCmds
deviceCmds :: DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
IO () -> ContT () IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT () IO ()) -> IO () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr Device_T
-> AccelerationStructureKHR
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> IO ())
vkDestroyAccelerationStructureKHRPtr FunPtr
(Ptr Device_T
-> AccelerationStructureKHR
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> IO ())
-> FunPtr
(Ptr Device_T
-> AccelerationStructureKHR
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> IO ())
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr Device_T
-> AccelerationStructureKHR
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> IO ())
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
IOException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkDestroyAccelerationStructureKHR is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let vkDestroyAccelerationStructureKHR' :: Ptr Device_T
-> AccelerationStructureKHR
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> IO ()
vkDestroyAccelerationStructureKHR' = FunPtr
(Ptr Device_T
-> AccelerationStructureKHR
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> IO ())
-> Ptr Device_T
-> AccelerationStructureKHR
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> IO ()
mkVkDestroyAccelerationStructureKHR FunPtr
(Ptr Device_T
-> AccelerationStructureKHR
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> IO ())
vkDestroyAccelerationStructureKHRPtr
"pAllocator" ::: Ptr AllocationCallbacks
pAllocator <- case ("allocator" ::: Maybe AllocationCallbacks
allocator) of
"allocator" ::: Maybe AllocationCallbacks
Nothing -> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ContT () IO ("pAllocator" ::: Ptr AllocationCallbacks)
forall (f :: * -> *) a. Applicative f => a -> f a
pure "pAllocator" ::: Ptr AllocationCallbacks
forall a. Ptr a
nullPtr
Just AllocationCallbacks
j -> ((("pAllocator" ::: Ptr AllocationCallbacks) -> IO ()) -> IO ())
-> ContT () IO ("pAllocator" ::: Ptr AllocationCallbacks)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pAllocator" ::: Ptr AllocationCallbacks) -> IO ()) -> IO ())
-> ContT () IO ("pAllocator" ::: Ptr AllocationCallbacks))
-> ((("pAllocator" ::: Ptr AllocationCallbacks) -> IO ()) -> IO ())
-> ContT () IO ("pAllocator" ::: Ptr AllocationCallbacks)
forall a b. (a -> b) -> a -> b
$ AllocationCallbacks
-> (("pAllocator" ::: Ptr AllocationCallbacks) -> IO ()) -> IO ()
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (AllocationCallbacks
j)
IO () -> ContT () IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT () IO ()) -> IO () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ String -> IO () -> IO ()
forall a. String -> IO a -> IO a
traceAroundEvent String
"vkDestroyAccelerationStructureKHR" (Ptr Device_T
-> AccelerationStructureKHR
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> IO ()
vkDestroyAccelerationStructureKHR'
(Device -> Ptr Device_T
deviceHandle (Device
device))
(AccelerationStructureKHR
accelerationStructure)
"pAllocator" ::: Ptr AllocationCallbacks
pAllocator)
() -> ContT () IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure (() -> ContT () IO ()) -> () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ ()
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkCmdCopyAccelerationStructureKHR
:: FunPtr (Ptr CommandBuffer_T -> Ptr CopyAccelerationStructureInfoKHR -> IO ()) -> Ptr CommandBuffer_T -> Ptr CopyAccelerationStructureInfoKHR -> IO ()
cmdCopyAccelerationStructureKHR :: forall io
. (MonadIO io)
=>
CommandBuffer
->
CopyAccelerationStructureInfoKHR
-> io ()
cmdCopyAccelerationStructureKHR :: forall (io :: * -> *).
MonadIO io =>
CommandBuffer -> CopyAccelerationStructureInfoKHR -> io ()
cmdCopyAccelerationStructureKHR CommandBuffer
commandBuffer CopyAccelerationStructureInfoKHR
info = IO () -> io ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> io ())
-> (ContT () IO () -> IO ()) -> ContT () IO () -> io ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT () IO () -> IO ()
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT () IO () -> io ()) -> ContT () IO () -> io ()
forall a b. (a -> b) -> a -> b
$ do
let vkCmdCopyAccelerationStructureKHRPtr :: FunPtr
(Ptr CommandBuffer_T
-> ("pInfo" ::: Ptr CopyAccelerationStructureInfoKHR) -> IO ())
vkCmdCopyAccelerationStructureKHRPtr = DeviceCmds
-> FunPtr
(Ptr CommandBuffer_T
-> ("pInfo" ::: Ptr CopyAccelerationStructureInfoKHR) -> IO ())
pVkCmdCopyAccelerationStructureKHR (case CommandBuffer
commandBuffer of CommandBuffer{DeviceCmds
$sel:deviceCmds:CommandBuffer :: CommandBuffer -> DeviceCmds
deviceCmds :: DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
IO () -> ContT () IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT () IO ()) -> IO () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr CommandBuffer_T
-> ("pInfo" ::: Ptr CopyAccelerationStructureInfoKHR) -> IO ())
vkCmdCopyAccelerationStructureKHRPtr FunPtr
(Ptr CommandBuffer_T
-> ("pInfo" ::: Ptr CopyAccelerationStructureInfoKHR) -> IO ())
-> FunPtr
(Ptr CommandBuffer_T
-> ("pInfo" ::: Ptr CopyAccelerationStructureInfoKHR) -> IO ())
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr CommandBuffer_T
-> ("pInfo" ::: Ptr CopyAccelerationStructureInfoKHR) -> IO ())
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
IOException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkCmdCopyAccelerationStructureKHR is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let vkCmdCopyAccelerationStructureKHR' :: Ptr CommandBuffer_T
-> ("pInfo" ::: Ptr CopyAccelerationStructureInfoKHR) -> IO ()
vkCmdCopyAccelerationStructureKHR' = FunPtr
(Ptr CommandBuffer_T
-> ("pInfo" ::: Ptr CopyAccelerationStructureInfoKHR) -> IO ())
-> Ptr CommandBuffer_T
-> ("pInfo" ::: Ptr CopyAccelerationStructureInfoKHR)
-> IO ()
mkVkCmdCopyAccelerationStructureKHR FunPtr
(Ptr CommandBuffer_T
-> ("pInfo" ::: Ptr CopyAccelerationStructureInfoKHR) -> IO ())
vkCmdCopyAccelerationStructureKHRPtr
"pInfo" ::: Ptr CopyAccelerationStructureInfoKHR
pInfo <- ((("pInfo" ::: Ptr CopyAccelerationStructureInfoKHR) -> IO ())
-> IO ())
-> ContT () IO ("pInfo" ::: Ptr CopyAccelerationStructureInfoKHR)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pInfo" ::: Ptr CopyAccelerationStructureInfoKHR) -> IO ())
-> IO ())
-> ContT () IO ("pInfo" ::: Ptr CopyAccelerationStructureInfoKHR))
-> ((("pInfo" ::: Ptr CopyAccelerationStructureInfoKHR) -> IO ())
-> IO ())
-> ContT () IO ("pInfo" ::: Ptr CopyAccelerationStructureInfoKHR)
forall a b. (a -> b) -> a -> b
$ CopyAccelerationStructureInfoKHR
-> (("pInfo" ::: Ptr CopyAccelerationStructureInfoKHR) -> IO ())
-> IO ()
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (CopyAccelerationStructureInfoKHR
info)
IO () -> ContT () IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT () IO ()) -> IO () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ String -> IO () -> IO ()
forall a. String -> IO a -> IO a
traceAroundEvent String
"vkCmdCopyAccelerationStructureKHR" (Ptr CommandBuffer_T
-> ("pInfo" ::: Ptr CopyAccelerationStructureInfoKHR) -> IO ()
vkCmdCopyAccelerationStructureKHR'
(CommandBuffer -> Ptr CommandBuffer_T
commandBufferHandle (CommandBuffer
commandBuffer))
"pInfo" ::: Ptr CopyAccelerationStructureInfoKHR
pInfo)
() -> ContT () IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure (() -> ContT () IO ()) -> () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ ()
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkCopyAccelerationStructureKHR
:: FunPtr (Ptr Device_T -> DeferredOperationKHR -> Ptr CopyAccelerationStructureInfoKHR -> IO Result) -> Ptr Device_T -> DeferredOperationKHR -> Ptr CopyAccelerationStructureInfoKHR -> IO Result
copyAccelerationStructureKHR :: forall io
. (MonadIO io)
=>
Device
->
DeferredOperationKHR
->
CopyAccelerationStructureInfoKHR
-> io (Result)
copyAccelerationStructureKHR :: forall (io :: * -> *).
MonadIO io =>
Device
-> DeferredOperationKHR
-> CopyAccelerationStructureInfoKHR
-> io Result
copyAccelerationStructureKHR Device
device
DeferredOperationKHR
deferredOperation
CopyAccelerationStructureInfoKHR
info = IO Result -> io Result
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Result -> io Result)
-> (ContT Result IO Result -> IO Result)
-> ContT Result IO Result
-> io Result
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT Result IO Result -> IO Result
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT Result IO Result -> io Result)
-> ContT Result IO Result -> io Result
forall a b. (a -> b) -> a -> b
$ do
let vkCopyAccelerationStructureKHRPtr :: FunPtr
(Ptr Device_T
-> DeferredOperationKHR
-> ("pInfo" ::: Ptr CopyAccelerationStructureInfoKHR)
-> IO Result)
vkCopyAccelerationStructureKHRPtr = DeviceCmds
-> FunPtr
(Ptr Device_T
-> DeferredOperationKHR
-> ("pInfo" ::: Ptr CopyAccelerationStructureInfoKHR)
-> IO Result)
pVkCopyAccelerationStructureKHR (case Device
device of Device{DeviceCmds
deviceCmds :: DeviceCmds
$sel:deviceCmds:Device :: Device -> DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
IO () -> ContT Result IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT Result IO ()) -> IO () -> ContT Result IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr Device_T
-> DeferredOperationKHR
-> ("pInfo" ::: Ptr CopyAccelerationStructureInfoKHR)
-> IO Result)
vkCopyAccelerationStructureKHRPtr FunPtr
(Ptr Device_T
-> DeferredOperationKHR
-> ("pInfo" ::: Ptr CopyAccelerationStructureInfoKHR)
-> IO Result)
-> FunPtr
(Ptr Device_T
-> DeferredOperationKHR
-> ("pInfo" ::: Ptr CopyAccelerationStructureInfoKHR)
-> IO Result)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr Device_T
-> DeferredOperationKHR
-> ("pInfo" ::: Ptr CopyAccelerationStructureInfoKHR)
-> IO Result)
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
IOException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkCopyAccelerationStructureKHR is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let vkCopyAccelerationStructureKHR' :: Ptr Device_T
-> DeferredOperationKHR
-> ("pInfo" ::: Ptr CopyAccelerationStructureInfoKHR)
-> IO Result
vkCopyAccelerationStructureKHR' = FunPtr
(Ptr Device_T
-> DeferredOperationKHR
-> ("pInfo" ::: Ptr CopyAccelerationStructureInfoKHR)
-> IO Result)
-> Ptr Device_T
-> DeferredOperationKHR
-> ("pInfo" ::: Ptr CopyAccelerationStructureInfoKHR)
-> IO Result
mkVkCopyAccelerationStructureKHR FunPtr
(Ptr Device_T
-> DeferredOperationKHR
-> ("pInfo" ::: Ptr CopyAccelerationStructureInfoKHR)
-> IO Result)
vkCopyAccelerationStructureKHRPtr
"pInfo" ::: Ptr CopyAccelerationStructureInfoKHR
pInfo <- ((("pInfo" ::: Ptr CopyAccelerationStructureInfoKHR) -> IO Result)
-> IO Result)
-> ContT
Result IO ("pInfo" ::: Ptr CopyAccelerationStructureInfoKHR)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pInfo" ::: Ptr CopyAccelerationStructureInfoKHR) -> IO Result)
-> IO Result)
-> ContT
Result IO ("pInfo" ::: Ptr CopyAccelerationStructureInfoKHR))
-> ((("pInfo" ::: Ptr CopyAccelerationStructureInfoKHR)
-> IO Result)
-> IO Result)
-> ContT
Result IO ("pInfo" ::: Ptr CopyAccelerationStructureInfoKHR)
forall a b. (a -> b) -> a -> b
$ CopyAccelerationStructureInfoKHR
-> (("pInfo" ::: Ptr CopyAccelerationStructureInfoKHR)
-> IO Result)
-> IO Result
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (CopyAccelerationStructureInfoKHR
info)
Result
r <- IO Result -> ContT Result IO Result
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO Result -> ContT Result IO Result)
-> IO Result -> ContT Result IO Result
forall a b. (a -> b) -> a -> b
$ String -> IO Result -> IO Result
forall a. String -> IO a -> IO a
traceAroundEvent String
"vkCopyAccelerationStructureKHR" (Ptr Device_T
-> DeferredOperationKHR
-> ("pInfo" ::: Ptr CopyAccelerationStructureInfoKHR)
-> IO Result
vkCopyAccelerationStructureKHR'
(Device -> Ptr Device_T
deviceHandle (Device
device))
(DeferredOperationKHR
deferredOperation)
"pInfo" ::: Ptr CopyAccelerationStructureInfoKHR
pInfo)
IO () -> ContT Result IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT Result IO ()) -> IO () -> ContT Result IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Result
r Result -> Result -> Bool
forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (VulkanException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (Result -> VulkanException
VulkanException Result
r))
Result -> ContT Result IO Result
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Result -> ContT Result IO Result)
-> Result -> ContT Result IO Result
forall a b. (a -> b) -> a -> b
$ (Result
r)
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkCmdCopyAccelerationStructureToMemoryKHR
:: FunPtr (Ptr CommandBuffer_T -> Ptr CopyAccelerationStructureToMemoryInfoKHR -> IO ()) -> Ptr CommandBuffer_T -> Ptr CopyAccelerationStructureToMemoryInfoKHR -> IO ()
cmdCopyAccelerationStructureToMemoryKHR :: forall io
. (MonadIO io)
=>
CommandBuffer
->
CopyAccelerationStructureToMemoryInfoKHR
-> io ()
cmdCopyAccelerationStructureToMemoryKHR :: forall (io :: * -> *).
MonadIO io =>
CommandBuffer -> CopyAccelerationStructureToMemoryInfoKHR -> io ()
cmdCopyAccelerationStructureToMemoryKHR CommandBuffer
commandBuffer
CopyAccelerationStructureToMemoryInfoKHR
info = IO () -> io ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> io ())
-> (ContT () IO () -> IO ()) -> ContT () IO () -> io ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT () IO () -> IO ()
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT () IO () -> io ()) -> ContT () IO () -> io ()
forall a b. (a -> b) -> a -> b
$ do
let vkCmdCopyAccelerationStructureToMemoryKHRPtr :: FunPtr
(Ptr CommandBuffer_T
-> ("pInfo" ::: Ptr CopyAccelerationStructureToMemoryInfoKHR)
-> IO ())
vkCmdCopyAccelerationStructureToMemoryKHRPtr = DeviceCmds
-> FunPtr
(Ptr CommandBuffer_T
-> ("pInfo" ::: Ptr CopyAccelerationStructureToMemoryInfoKHR)
-> IO ())
pVkCmdCopyAccelerationStructureToMemoryKHR (case CommandBuffer
commandBuffer of CommandBuffer{DeviceCmds
deviceCmds :: DeviceCmds
$sel:deviceCmds:CommandBuffer :: CommandBuffer -> DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
IO () -> ContT () IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT () IO ()) -> IO () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr CommandBuffer_T
-> ("pInfo" ::: Ptr CopyAccelerationStructureToMemoryInfoKHR)
-> IO ())
vkCmdCopyAccelerationStructureToMemoryKHRPtr FunPtr
(Ptr CommandBuffer_T
-> ("pInfo" ::: Ptr CopyAccelerationStructureToMemoryInfoKHR)
-> IO ())
-> FunPtr
(Ptr CommandBuffer_T
-> ("pInfo" ::: Ptr CopyAccelerationStructureToMemoryInfoKHR)
-> IO ())
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr CommandBuffer_T
-> ("pInfo" ::: Ptr CopyAccelerationStructureToMemoryInfoKHR)
-> IO ())
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
IOException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkCmdCopyAccelerationStructureToMemoryKHR is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let vkCmdCopyAccelerationStructureToMemoryKHR' :: Ptr CommandBuffer_T
-> ("pInfo" ::: Ptr CopyAccelerationStructureToMemoryInfoKHR)
-> IO ()
vkCmdCopyAccelerationStructureToMemoryKHR' = FunPtr
(Ptr CommandBuffer_T
-> ("pInfo" ::: Ptr CopyAccelerationStructureToMemoryInfoKHR)
-> IO ())
-> Ptr CommandBuffer_T
-> ("pInfo" ::: Ptr CopyAccelerationStructureToMemoryInfoKHR)
-> IO ()
mkVkCmdCopyAccelerationStructureToMemoryKHR FunPtr
(Ptr CommandBuffer_T
-> ("pInfo" ::: Ptr CopyAccelerationStructureToMemoryInfoKHR)
-> IO ())
vkCmdCopyAccelerationStructureToMemoryKHRPtr
"pInfo" ::: Ptr CopyAccelerationStructureToMemoryInfoKHR
pInfo <- ((("pInfo" ::: Ptr CopyAccelerationStructureToMemoryInfoKHR)
-> IO ())
-> IO ())
-> ContT
() IO ("pInfo" ::: Ptr CopyAccelerationStructureToMemoryInfoKHR)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pInfo" ::: Ptr CopyAccelerationStructureToMemoryInfoKHR)
-> IO ())
-> IO ())
-> ContT
() IO ("pInfo" ::: Ptr CopyAccelerationStructureToMemoryInfoKHR))
-> ((("pInfo" ::: Ptr CopyAccelerationStructureToMemoryInfoKHR)
-> IO ())
-> IO ())
-> ContT
() IO ("pInfo" ::: Ptr CopyAccelerationStructureToMemoryInfoKHR)
forall a b. (a -> b) -> a -> b
$ CopyAccelerationStructureToMemoryInfoKHR
-> (("pInfo" ::: Ptr CopyAccelerationStructureToMemoryInfoKHR)
-> IO ())
-> IO ()
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (CopyAccelerationStructureToMemoryInfoKHR
info)
IO () -> ContT () IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT () IO ()) -> IO () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ String -> IO () -> IO ()
forall a. String -> IO a -> IO a
traceAroundEvent String
"vkCmdCopyAccelerationStructureToMemoryKHR" (Ptr CommandBuffer_T
-> ("pInfo" ::: Ptr CopyAccelerationStructureToMemoryInfoKHR)
-> IO ()
vkCmdCopyAccelerationStructureToMemoryKHR'
(CommandBuffer -> Ptr CommandBuffer_T
commandBufferHandle (CommandBuffer
commandBuffer))
"pInfo" ::: Ptr CopyAccelerationStructureToMemoryInfoKHR
pInfo)
() -> ContT () IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure (() -> ContT () IO ()) -> () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ ()
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkCopyAccelerationStructureToMemoryKHR
:: FunPtr (Ptr Device_T -> DeferredOperationKHR -> Ptr CopyAccelerationStructureToMemoryInfoKHR -> IO Result) -> Ptr Device_T -> DeferredOperationKHR -> Ptr CopyAccelerationStructureToMemoryInfoKHR -> IO Result
copyAccelerationStructureToMemoryKHR :: forall io
. (MonadIO io)
=>
Device
->
DeferredOperationKHR
->
CopyAccelerationStructureToMemoryInfoKHR
-> io (Result)
copyAccelerationStructureToMemoryKHR :: forall (io :: * -> *).
MonadIO io =>
Device
-> DeferredOperationKHR
-> CopyAccelerationStructureToMemoryInfoKHR
-> io Result
copyAccelerationStructureToMemoryKHR Device
device
DeferredOperationKHR
deferredOperation
CopyAccelerationStructureToMemoryInfoKHR
info = IO Result -> io Result
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Result -> io Result)
-> (ContT Result IO Result -> IO Result)
-> ContT Result IO Result
-> io Result
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT Result IO Result -> IO Result
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT Result IO Result -> io Result)
-> ContT Result IO Result -> io Result
forall a b. (a -> b) -> a -> b
$ do
let vkCopyAccelerationStructureToMemoryKHRPtr :: FunPtr
(Ptr Device_T
-> DeferredOperationKHR
-> ("pInfo" ::: Ptr CopyAccelerationStructureToMemoryInfoKHR)
-> IO Result)
vkCopyAccelerationStructureToMemoryKHRPtr = DeviceCmds
-> FunPtr
(Ptr Device_T
-> DeferredOperationKHR
-> ("pInfo" ::: Ptr CopyAccelerationStructureToMemoryInfoKHR)
-> IO Result)
pVkCopyAccelerationStructureToMemoryKHR (case Device
device of Device{DeviceCmds
deviceCmds :: DeviceCmds
$sel:deviceCmds:Device :: Device -> DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
IO () -> ContT Result IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT Result IO ()) -> IO () -> ContT Result IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr Device_T
-> DeferredOperationKHR
-> ("pInfo" ::: Ptr CopyAccelerationStructureToMemoryInfoKHR)
-> IO Result)
vkCopyAccelerationStructureToMemoryKHRPtr FunPtr
(Ptr Device_T
-> DeferredOperationKHR
-> ("pInfo" ::: Ptr CopyAccelerationStructureToMemoryInfoKHR)
-> IO Result)
-> FunPtr
(Ptr Device_T
-> DeferredOperationKHR
-> ("pInfo" ::: Ptr CopyAccelerationStructureToMemoryInfoKHR)
-> IO Result)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr Device_T
-> DeferredOperationKHR
-> ("pInfo" ::: Ptr CopyAccelerationStructureToMemoryInfoKHR)
-> IO Result)
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
IOException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkCopyAccelerationStructureToMemoryKHR is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let vkCopyAccelerationStructureToMemoryKHR' :: Ptr Device_T
-> DeferredOperationKHR
-> ("pInfo" ::: Ptr CopyAccelerationStructureToMemoryInfoKHR)
-> IO Result
vkCopyAccelerationStructureToMemoryKHR' = FunPtr
(Ptr Device_T
-> DeferredOperationKHR
-> ("pInfo" ::: Ptr CopyAccelerationStructureToMemoryInfoKHR)
-> IO Result)
-> Ptr Device_T
-> DeferredOperationKHR
-> ("pInfo" ::: Ptr CopyAccelerationStructureToMemoryInfoKHR)
-> IO Result
mkVkCopyAccelerationStructureToMemoryKHR FunPtr
(Ptr Device_T
-> DeferredOperationKHR
-> ("pInfo" ::: Ptr CopyAccelerationStructureToMemoryInfoKHR)
-> IO Result)
vkCopyAccelerationStructureToMemoryKHRPtr
"pInfo" ::: Ptr CopyAccelerationStructureToMemoryInfoKHR
pInfo <- ((("pInfo" ::: Ptr CopyAccelerationStructureToMemoryInfoKHR)
-> IO Result)
-> IO Result)
-> ContT
Result
IO
("pInfo" ::: Ptr CopyAccelerationStructureToMemoryInfoKHR)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pInfo" ::: Ptr CopyAccelerationStructureToMemoryInfoKHR)
-> IO Result)
-> IO Result)
-> ContT
Result
IO
("pInfo" ::: Ptr CopyAccelerationStructureToMemoryInfoKHR))
-> ((("pInfo" ::: Ptr CopyAccelerationStructureToMemoryInfoKHR)
-> IO Result)
-> IO Result)
-> ContT
Result
IO
("pInfo" ::: Ptr CopyAccelerationStructureToMemoryInfoKHR)
forall a b. (a -> b) -> a -> b
$ CopyAccelerationStructureToMemoryInfoKHR
-> (("pInfo" ::: Ptr CopyAccelerationStructureToMemoryInfoKHR)
-> IO Result)
-> IO Result
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (CopyAccelerationStructureToMemoryInfoKHR
info)
Result
r <- IO Result -> ContT Result IO Result
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO Result -> ContT Result IO Result)
-> IO Result -> ContT Result IO Result
forall a b. (a -> b) -> a -> b
$ String -> IO Result -> IO Result
forall a. String -> IO a -> IO a
traceAroundEvent String
"vkCopyAccelerationStructureToMemoryKHR" (Ptr Device_T
-> DeferredOperationKHR
-> ("pInfo" ::: Ptr CopyAccelerationStructureToMemoryInfoKHR)
-> IO Result
vkCopyAccelerationStructureToMemoryKHR'
(Device -> Ptr Device_T
deviceHandle (Device
device))
(DeferredOperationKHR
deferredOperation)
"pInfo" ::: Ptr CopyAccelerationStructureToMemoryInfoKHR
pInfo)
IO () -> ContT Result IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT Result IO ()) -> IO () -> ContT Result IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Result
r Result -> Result -> Bool
forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (VulkanException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (Result -> VulkanException
VulkanException Result
r))
Result -> ContT Result IO Result
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Result -> ContT Result IO Result)
-> Result -> ContT Result IO Result
forall a b. (a -> b) -> a -> b
$ (Result
r)
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkCmdCopyMemoryToAccelerationStructureKHR
:: FunPtr (Ptr CommandBuffer_T -> Ptr CopyMemoryToAccelerationStructureInfoKHR -> IO ()) -> Ptr CommandBuffer_T -> Ptr CopyMemoryToAccelerationStructureInfoKHR -> IO ()
cmdCopyMemoryToAccelerationStructureKHR :: forall io
. (MonadIO io)
=>
CommandBuffer
->
CopyMemoryToAccelerationStructureInfoKHR
-> io ()
cmdCopyMemoryToAccelerationStructureKHR :: forall (io :: * -> *).
MonadIO io =>
CommandBuffer -> CopyMemoryToAccelerationStructureInfoKHR -> io ()
cmdCopyMemoryToAccelerationStructureKHR CommandBuffer
commandBuffer
CopyMemoryToAccelerationStructureInfoKHR
info = IO () -> io ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> io ())
-> (ContT () IO () -> IO ()) -> ContT () IO () -> io ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT () IO () -> IO ()
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT () IO () -> io ()) -> ContT () IO () -> io ()
forall a b. (a -> b) -> a -> b
$ do
let vkCmdCopyMemoryToAccelerationStructureKHRPtr :: FunPtr
(Ptr CommandBuffer_T
-> ("pInfo" ::: Ptr CopyMemoryToAccelerationStructureInfoKHR)
-> IO ())
vkCmdCopyMemoryToAccelerationStructureKHRPtr = DeviceCmds
-> FunPtr
(Ptr CommandBuffer_T
-> ("pInfo" ::: Ptr CopyMemoryToAccelerationStructureInfoKHR)
-> IO ())
pVkCmdCopyMemoryToAccelerationStructureKHR (case CommandBuffer
commandBuffer of CommandBuffer{DeviceCmds
deviceCmds :: DeviceCmds
$sel:deviceCmds:CommandBuffer :: CommandBuffer -> DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
IO () -> ContT () IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT () IO ()) -> IO () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr CommandBuffer_T
-> ("pInfo" ::: Ptr CopyMemoryToAccelerationStructureInfoKHR)
-> IO ())
vkCmdCopyMemoryToAccelerationStructureKHRPtr FunPtr
(Ptr CommandBuffer_T
-> ("pInfo" ::: Ptr CopyMemoryToAccelerationStructureInfoKHR)
-> IO ())
-> FunPtr
(Ptr CommandBuffer_T
-> ("pInfo" ::: Ptr CopyMemoryToAccelerationStructureInfoKHR)
-> IO ())
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr CommandBuffer_T
-> ("pInfo" ::: Ptr CopyMemoryToAccelerationStructureInfoKHR)
-> IO ())
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
IOException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkCmdCopyMemoryToAccelerationStructureKHR is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let vkCmdCopyMemoryToAccelerationStructureKHR' :: Ptr CommandBuffer_T
-> ("pInfo" ::: Ptr CopyMemoryToAccelerationStructureInfoKHR)
-> IO ()
vkCmdCopyMemoryToAccelerationStructureKHR' = FunPtr
(Ptr CommandBuffer_T
-> ("pInfo" ::: Ptr CopyMemoryToAccelerationStructureInfoKHR)
-> IO ())
-> Ptr CommandBuffer_T
-> ("pInfo" ::: Ptr CopyMemoryToAccelerationStructureInfoKHR)
-> IO ()
mkVkCmdCopyMemoryToAccelerationStructureKHR FunPtr
(Ptr CommandBuffer_T
-> ("pInfo" ::: Ptr CopyMemoryToAccelerationStructureInfoKHR)
-> IO ())
vkCmdCopyMemoryToAccelerationStructureKHRPtr
"pInfo" ::: Ptr CopyMemoryToAccelerationStructureInfoKHR
pInfo <- ((("pInfo" ::: Ptr CopyMemoryToAccelerationStructureInfoKHR)
-> IO ())
-> IO ())
-> ContT
() IO ("pInfo" ::: Ptr CopyMemoryToAccelerationStructureInfoKHR)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pInfo" ::: Ptr CopyMemoryToAccelerationStructureInfoKHR)
-> IO ())
-> IO ())
-> ContT
() IO ("pInfo" ::: Ptr CopyMemoryToAccelerationStructureInfoKHR))
-> ((("pInfo" ::: Ptr CopyMemoryToAccelerationStructureInfoKHR)
-> IO ())
-> IO ())
-> ContT
() IO ("pInfo" ::: Ptr CopyMemoryToAccelerationStructureInfoKHR)
forall a b. (a -> b) -> a -> b
$ CopyMemoryToAccelerationStructureInfoKHR
-> (("pInfo" ::: Ptr CopyMemoryToAccelerationStructureInfoKHR)
-> IO ())
-> IO ()
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (CopyMemoryToAccelerationStructureInfoKHR
info)
IO () -> ContT () IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT () IO ()) -> IO () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ String -> IO () -> IO ()
forall a. String -> IO a -> IO a
traceAroundEvent String
"vkCmdCopyMemoryToAccelerationStructureKHR" (Ptr CommandBuffer_T
-> ("pInfo" ::: Ptr CopyMemoryToAccelerationStructureInfoKHR)
-> IO ()
vkCmdCopyMemoryToAccelerationStructureKHR'
(CommandBuffer -> Ptr CommandBuffer_T
commandBufferHandle (CommandBuffer
commandBuffer))
"pInfo" ::: Ptr CopyMemoryToAccelerationStructureInfoKHR
pInfo)
() -> ContT () IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure (() -> ContT () IO ()) -> () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ ()
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkCopyMemoryToAccelerationStructureKHR
:: FunPtr (Ptr Device_T -> DeferredOperationKHR -> Ptr CopyMemoryToAccelerationStructureInfoKHR -> IO Result) -> Ptr Device_T -> DeferredOperationKHR -> Ptr CopyMemoryToAccelerationStructureInfoKHR -> IO Result
copyMemoryToAccelerationStructureKHR :: forall io
. (MonadIO io)
=>
Device
->
DeferredOperationKHR
->
CopyMemoryToAccelerationStructureInfoKHR
-> io (Result)
copyMemoryToAccelerationStructureKHR :: forall (io :: * -> *).
MonadIO io =>
Device
-> DeferredOperationKHR
-> CopyMemoryToAccelerationStructureInfoKHR
-> io Result
copyMemoryToAccelerationStructureKHR Device
device
DeferredOperationKHR
deferredOperation
CopyMemoryToAccelerationStructureInfoKHR
info = IO Result -> io Result
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Result -> io Result)
-> (ContT Result IO Result -> IO Result)
-> ContT Result IO Result
-> io Result
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT Result IO Result -> IO Result
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT Result IO Result -> io Result)
-> ContT Result IO Result -> io Result
forall a b. (a -> b) -> a -> b
$ do
let vkCopyMemoryToAccelerationStructureKHRPtr :: FunPtr
(Ptr Device_T
-> DeferredOperationKHR
-> ("pInfo" ::: Ptr CopyMemoryToAccelerationStructureInfoKHR)
-> IO Result)
vkCopyMemoryToAccelerationStructureKHRPtr = DeviceCmds
-> FunPtr
(Ptr Device_T
-> DeferredOperationKHR
-> ("pInfo" ::: Ptr CopyMemoryToAccelerationStructureInfoKHR)
-> IO Result)
pVkCopyMemoryToAccelerationStructureKHR (case Device
device of Device{DeviceCmds
deviceCmds :: DeviceCmds
$sel:deviceCmds:Device :: Device -> DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
IO () -> ContT Result IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT Result IO ()) -> IO () -> ContT Result IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr Device_T
-> DeferredOperationKHR
-> ("pInfo" ::: Ptr CopyMemoryToAccelerationStructureInfoKHR)
-> IO Result)
vkCopyMemoryToAccelerationStructureKHRPtr FunPtr
(Ptr Device_T
-> DeferredOperationKHR
-> ("pInfo" ::: Ptr CopyMemoryToAccelerationStructureInfoKHR)
-> IO Result)
-> FunPtr
(Ptr Device_T
-> DeferredOperationKHR
-> ("pInfo" ::: Ptr CopyMemoryToAccelerationStructureInfoKHR)
-> IO Result)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr Device_T
-> DeferredOperationKHR
-> ("pInfo" ::: Ptr CopyMemoryToAccelerationStructureInfoKHR)
-> IO Result)
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
IOException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkCopyMemoryToAccelerationStructureKHR is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let vkCopyMemoryToAccelerationStructureKHR' :: Ptr Device_T
-> DeferredOperationKHR
-> ("pInfo" ::: Ptr CopyMemoryToAccelerationStructureInfoKHR)
-> IO Result
vkCopyMemoryToAccelerationStructureKHR' = FunPtr
(Ptr Device_T
-> DeferredOperationKHR
-> ("pInfo" ::: Ptr CopyMemoryToAccelerationStructureInfoKHR)
-> IO Result)
-> Ptr Device_T
-> DeferredOperationKHR
-> ("pInfo" ::: Ptr CopyMemoryToAccelerationStructureInfoKHR)
-> IO Result
mkVkCopyMemoryToAccelerationStructureKHR FunPtr
(Ptr Device_T
-> DeferredOperationKHR
-> ("pInfo" ::: Ptr CopyMemoryToAccelerationStructureInfoKHR)
-> IO Result)
vkCopyMemoryToAccelerationStructureKHRPtr
"pInfo" ::: Ptr CopyMemoryToAccelerationStructureInfoKHR
pInfo <- ((("pInfo" ::: Ptr CopyMemoryToAccelerationStructureInfoKHR)
-> IO Result)
-> IO Result)
-> ContT
Result
IO
("pInfo" ::: Ptr CopyMemoryToAccelerationStructureInfoKHR)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pInfo" ::: Ptr CopyMemoryToAccelerationStructureInfoKHR)
-> IO Result)
-> IO Result)
-> ContT
Result
IO
("pInfo" ::: Ptr CopyMemoryToAccelerationStructureInfoKHR))
-> ((("pInfo" ::: Ptr CopyMemoryToAccelerationStructureInfoKHR)
-> IO Result)
-> IO Result)
-> ContT
Result
IO
("pInfo" ::: Ptr CopyMemoryToAccelerationStructureInfoKHR)
forall a b. (a -> b) -> a -> b
$ CopyMemoryToAccelerationStructureInfoKHR
-> (("pInfo" ::: Ptr CopyMemoryToAccelerationStructureInfoKHR)
-> IO Result)
-> IO Result
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (CopyMemoryToAccelerationStructureInfoKHR
info)
Result
r <- IO Result -> ContT Result IO Result
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO Result -> ContT Result IO Result)
-> IO Result -> ContT Result IO Result
forall a b. (a -> b) -> a -> b
$ String -> IO Result -> IO Result
forall a. String -> IO a -> IO a
traceAroundEvent String
"vkCopyMemoryToAccelerationStructureKHR" (Ptr Device_T
-> DeferredOperationKHR
-> ("pInfo" ::: Ptr CopyMemoryToAccelerationStructureInfoKHR)
-> IO Result
vkCopyMemoryToAccelerationStructureKHR'
(Device -> Ptr Device_T
deviceHandle (Device
device))
(DeferredOperationKHR
deferredOperation)
"pInfo" ::: Ptr CopyMemoryToAccelerationStructureInfoKHR
pInfo)
IO () -> ContT Result IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT Result IO ()) -> IO () -> ContT Result IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Result
r Result -> Result -> Bool
forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (VulkanException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (Result -> VulkanException
VulkanException Result
r))
Result -> ContT Result IO Result
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Result -> ContT Result IO Result)
-> Result -> ContT Result IO Result
forall a b. (a -> b) -> a -> b
$ (Result
r)
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkCmdWriteAccelerationStructuresPropertiesKHR
:: FunPtr (Ptr CommandBuffer_T -> Word32 -> Ptr AccelerationStructureKHR -> QueryType -> QueryPool -> Word32 -> IO ()) -> Ptr CommandBuffer_T -> Word32 -> Ptr AccelerationStructureKHR -> QueryType -> QueryPool -> Word32 -> IO ()
cmdWriteAccelerationStructuresPropertiesKHR :: forall io
. (MonadIO io)
=>
CommandBuffer
->
("accelerationStructures" ::: Vector AccelerationStructureKHR)
->
QueryType
->
QueryPool
->
("firstQuery" ::: Word32)
-> io ()
cmdWriteAccelerationStructuresPropertiesKHR :: forall (io :: * -> *).
MonadIO io =>
CommandBuffer
-> ("accelerationStructures" ::: Vector AccelerationStructureKHR)
-> QueryType
-> QueryPool
-> Flags
-> io ()
cmdWriteAccelerationStructuresPropertiesKHR CommandBuffer
commandBuffer
"accelerationStructures" ::: Vector AccelerationStructureKHR
accelerationStructures
QueryType
queryType
QueryPool
queryPool
Flags
firstQuery = IO () -> io ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> io ())
-> (ContT () IO () -> IO ()) -> ContT () IO () -> io ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT () IO () -> IO ()
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT () IO () -> io ()) -> ContT () IO () -> io ()
forall a b. (a -> b) -> a -> b
$ do
let vkCmdWriteAccelerationStructuresPropertiesKHRPtr :: FunPtr
(Ptr CommandBuffer_T
-> Flags
-> ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> QueryType
-> QueryPool
-> Flags
-> IO ())
vkCmdWriteAccelerationStructuresPropertiesKHRPtr = DeviceCmds
-> FunPtr
(Ptr CommandBuffer_T
-> Flags
-> ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> QueryType
-> QueryPool
-> Flags
-> IO ())
pVkCmdWriteAccelerationStructuresPropertiesKHR (case CommandBuffer
commandBuffer of CommandBuffer{DeviceCmds
deviceCmds :: DeviceCmds
$sel:deviceCmds:CommandBuffer :: CommandBuffer -> DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
IO () -> ContT () IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT () IO ()) -> IO () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr CommandBuffer_T
-> Flags
-> ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> QueryType
-> QueryPool
-> Flags
-> IO ())
vkCmdWriteAccelerationStructuresPropertiesKHRPtr FunPtr
(Ptr CommandBuffer_T
-> Flags
-> ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> QueryType
-> QueryPool
-> Flags
-> IO ())
-> FunPtr
(Ptr CommandBuffer_T
-> Flags
-> ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> QueryType
-> QueryPool
-> Flags
-> IO ())
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr CommandBuffer_T
-> Flags
-> ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> QueryType
-> QueryPool
-> Flags
-> IO ())
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
IOException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkCmdWriteAccelerationStructuresPropertiesKHR is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let vkCmdWriteAccelerationStructuresPropertiesKHR' :: Ptr CommandBuffer_T
-> Flags
-> ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> QueryType
-> QueryPool
-> Flags
-> IO ()
vkCmdWriteAccelerationStructuresPropertiesKHR' = FunPtr
(Ptr CommandBuffer_T
-> Flags
-> ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> QueryType
-> QueryPool
-> Flags
-> IO ())
-> Ptr CommandBuffer_T
-> Flags
-> ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> QueryType
-> QueryPool
-> Flags
-> IO ()
mkVkCmdWriteAccelerationStructuresPropertiesKHR FunPtr
(Ptr CommandBuffer_T
-> Flags
-> ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> QueryType
-> QueryPool
-> Flags
-> IO ())
vkCmdWriteAccelerationStructuresPropertiesKHRPtr
"pAccelerationStructures" ::: Ptr AccelerationStructureKHR
pPAccelerationStructures <- ((("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> IO ())
-> IO ())
-> ContT
() IO ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> IO ())
-> IO ())
-> ContT
() IO ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR))
-> ((("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> IO ())
-> IO ())
-> ContT
() IO ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
forall a b. (a -> b) -> a -> b
$ forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes @AccelerationStructureKHR ((("accelerationStructures" ::: Vector AccelerationStructureKHR)
-> Int
forall a. Vector a -> Int
Data.Vector.length ("accelerationStructures" ::: Vector AccelerationStructureKHR
accelerationStructures)) Int -> Int -> Int
forall a. Num a => a -> a -> a
* Int
8)
IO () -> ContT () IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT () IO ()) -> IO () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ (Int -> AccelerationStructureKHR -> IO ())
-> ("accelerationStructures" ::: Vector AccelerationStructureKHR)
-> IO ()
forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\Int
i AccelerationStructureKHR
e -> ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> AccelerationStructureKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR
pPAccelerationStructures ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> Int
-> "pAccelerationStructures" ::: Ptr AccelerationStructureKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (Int
8 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr AccelerationStructureKHR) (AccelerationStructureKHR
e)) ("accelerationStructures" ::: Vector AccelerationStructureKHR
accelerationStructures)
IO () -> ContT () IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT () IO ()) -> IO () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ String -> IO () -> IO ()
forall a. String -> IO a -> IO a
traceAroundEvent String
"vkCmdWriteAccelerationStructuresPropertiesKHR" (Ptr CommandBuffer_T
-> Flags
-> ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> QueryType
-> QueryPool
-> Flags
-> IO ()
vkCmdWriteAccelerationStructuresPropertiesKHR'
(CommandBuffer -> Ptr CommandBuffer_T
commandBufferHandle (CommandBuffer
commandBuffer))
((Int -> Flags
forall a b. (Integral a, Num b) => a -> b
fromIntegral (("accelerationStructures" ::: Vector AccelerationStructureKHR)
-> Int
forall a. Vector a -> Int
Data.Vector.length (("accelerationStructures" ::: Vector AccelerationStructureKHR)
-> Int)
-> ("accelerationStructures" ::: Vector AccelerationStructureKHR)
-> Int
forall a b. (a -> b) -> a -> b
$ ("accelerationStructures" ::: Vector AccelerationStructureKHR
accelerationStructures)) :: Word32))
("pAccelerationStructures" ::: Ptr AccelerationStructureKHR
pPAccelerationStructures)
(QueryType
queryType)
(QueryPool
queryPool)
(Flags
firstQuery))
() -> ContT () IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure (() -> ContT () IO ()) -> () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ ()
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkWriteAccelerationStructuresPropertiesKHR
:: FunPtr (Ptr Device_T -> Word32 -> Ptr AccelerationStructureKHR -> QueryType -> CSize -> Ptr () -> CSize -> IO Result) -> Ptr Device_T -> Word32 -> Ptr AccelerationStructureKHR -> QueryType -> CSize -> Ptr () -> CSize -> IO Result
writeAccelerationStructuresPropertiesKHR :: forall io
. (MonadIO io)
=>
Device
->
("accelerationStructures" ::: Vector AccelerationStructureKHR)
->
QueryType
->
("dataSize" ::: Word64)
->
("data" ::: Ptr ())
->
("stride" ::: Word64)
-> io ()
writeAccelerationStructuresPropertiesKHR :: forall (io :: * -> *).
MonadIO io =>
Device
-> ("accelerationStructures" ::: Vector AccelerationStructureKHR)
-> QueryType
-> ("dataSize" ::: Word64)
-> ("data" ::: Ptr ())
-> ("dataSize" ::: Word64)
-> io ()
writeAccelerationStructuresPropertiesKHR Device
device
"accelerationStructures" ::: Vector AccelerationStructureKHR
accelerationStructures
QueryType
queryType
"dataSize" ::: Word64
dataSize
"data" ::: Ptr ()
data'
"dataSize" ::: Word64
stride = IO () -> io ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> io ())
-> (ContT () IO () -> IO ()) -> ContT () IO () -> io ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT () IO () -> IO ()
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT () IO () -> io ()) -> ContT () IO () -> io ()
forall a b. (a -> b) -> a -> b
$ do
let vkWriteAccelerationStructuresPropertiesKHRPtr :: FunPtr
(Ptr Device_T
-> Flags
-> ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> QueryType
-> ("dataSize" ::: CSize)
-> ("data" ::: Ptr ())
-> ("dataSize" ::: CSize)
-> IO Result)
vkWriteAccelerationStructuresPropertiesKHRPtr = DeviceCmds
-> FunPtr
(Ptr Device_T
-> Flags
-> ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> QueryType
-> ("dataSize" ::: CSize)
-> ("data" ::: Ptr ())
-> ("dataSize" ::: CSize)
-> IO Result)
pVkWriteAccelerationStructuresPropertiesKHR (case Device
device of Device{DeviceCmds
deviceCmds :: DeviceCmds
$sel:deviceCmds:Device :: Device -> DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
IO () -> ContT () IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT () IO ()) -> IO () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr Device_T
-> Flags
-> ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> QueryType
-> ("dataSize" ::: CSize)
-> ("data" ::: Ptr ())
-> ("dataSize" ::: CSize)
-> IO Result)
vkWriteAccelerationStructuresPropertiesKHRPtr FunPtr
(Ptr Device_T
-> Flags
-> ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> QueryType
-> ("dataSize" ::: CSize)
-> ("data" ::: Ptr ())
-> ("dataSize" ::: CSize)
-> IO Result)
-> FunPtr
(Ptr Device_T
-> Flags
-> ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> QueryType
-> ("dataSize" ::: CSize)
-> ("data" ::: Ptr ())
-> ("dataSize" ::: CSize)
-> IO Result)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr Device_T
-> Flags
-> ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> QueryType
-> ("dataSize" ::: CSize)
-> ("data" ::: Ptr ())
-> ("dataSize" ::: CSize)
-> IO Result)
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
IOException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkWriteAccelerationStructuresPropertiesKHR is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let vkWriteAccelerationStructuresPropertiesKHR' :: Ptr Device_T
-> Flags
-> ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> QueryType
-> ("dataSize" ::: CSize)
-> ("data" ::: Ptr ())
-> ("dataSize" ::: CSize)
-> IO Result
vkWriteAccelerationStructuresPropertiesKHR' = FunPtr
(Ptr Device_T
-> Flags
-> ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> QueryType
-> ("dataSize" ::: CSize)
-> ("data" ::: Ptr ())
-> ("dataSize" ::: CSize)
-> IO Result)
-> Ptr Device_T
-> Flags
-> ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> QueryType
-> ("dataSize" ::: CSize)
-> ("data" ::: Ptr ())
-> ("dataSize" ::: CSize)
-> IO Result
mkVkWriteAccelerationStructuresPropertiesKHR FunPtr
(Ptr Device_T
-> Flags
-> ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> QueryType
-> ("dataSize" ::: CSize)
-> ("data" ::: Ptr ())
-> ("dataSize" ::: CSize)
-> IO Result)
vkWriteAccelerationStructuresPropertiesKHRPtr
"pAccelerationStructures" ::: Ptr AccelerationStructureKHR
pPAccelerationStructures <- ((("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> IO ())
-> IO ())
-> ContT
() IO ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> IO ())
-> IO ())
-> ContT
() IO ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR))
-> ((("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> IO ())
-> IO ())
-> ContT
() IO ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
forall a b. (a -> b) -> a -> b
$ forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes @AccelerationStructureKHR ((("accelerationStructures" ::: Vector AccelerationStructureKHR)
-> Int
forall a. Vector a -> Int
Data.Vector.length ("accelerationStructures" ::: Vector AccelerationStructureKHR
accelerationStructures)) Int -> Int -> Int
forall a. Num a => a -> a -> a
* Int
8)
IO () -> ContT () IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT () IO ()) -> IO () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ (Int -> AccelerationStructureKHR -> IO ())
-> ("accelerationStructures" ::: Vector AccelerationStructureKHR)
-> IO ()
forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\Int
i AccelerationStructureKHR
e -> ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> AccelerationStructureKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR
pPAccelerationStructures ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> Int
-> "pAccelerationStructures" ::: Ptr AccelerationStructureKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (Int
8 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr AccelerationStructureKHR) (AccelerationStructureKHR
e)) ("accelerationStructures" ::: Vector AccelerationStructureKHR
accelerationStructures)
Result
r <- IO Result -> ContT () IO Result
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO Result -> ContT () IO Result)
-> IO Result -> ContT () IO Result
forall a b. (a -> b) -> a -> b
$ String -> IO Result -> IO Result
forall a. String -> IO a -> IO a
traceAroundEvent String
"vkWriteAccelerationStructuresPropertiesKHR" (Ptr Device_T
-> Flags
-> ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> QueryType
-> ("dataSize" ::: CSize)
-> ("data" ::: Ptr ())
-> ("dataSize" ::: CSize)
-> IO Result
vkWriteAccelerationStructuresPropertiesKHR'
(Device -> Ptr Device_T
deviceHandle (Device
device))
((Int -> Flags
forall a b. (Integral a, Num b) => a -> b
fromIntegral (("accelerationStructures" ::: Vector AccelerationStructureKHR)
-> Int
forall a. Vector a -> Int
Data.Vector.length (("accelerationStructures" ::: Vector AccelerationStructureKHR)
-> Int)
-> ("accelerationStructures" ::: Vector AccelerationStructureKHR)
-> Int
forall a b. (a -> b) -> a -> b
$ ("accelerationStructures" ::: Vector AccelerationStructureKHR
accelerationStructures)) :: Word32))
("pAccelerationStructures" ::: Ptr AccelerationStructureKHR
pPAccelerationStructures)
(QueryType
queryType)
(("dataSize" ::: Word64) -> "dataSize" ::: CSize
CSize ("dataSize" ::: Word64
dataSize))
("data" ::: Ptr ()
data')
(("dataSize" ::: Word64) -> "dataSize" ::: CSize
CSize ("dataSize" ::: Word64
stride)))
IO () -> ContT () IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT () IO ()) -> IO () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Result
r Result -> Result -> Bool
forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (VulkanException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (Result -> VulkanException
VulkanException Result
r))
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkGetDeviceAccelerationStructureCompatibilityKHR
:: FunPtr (Ptr Device_T -> Ptr AccelerationStructureVersionInfoKHR -> Ptr AccelerationStructureCompatibilityKHR -> IO ()) -> Ptr Device_T -> Ptr AccelerationStructureVersionInfoKHR -> Ptr AccelerationStructureCompatibilityKHR -> IO ()
getDeviceAccelerationStructureCompatibilityKHR :: forall io
. (MonadIO io)
=>
Device
->
AccelerationStructureVersionInfoKHR
-> io (AccelerationStructureCompatibilityKHR)
getDeviceAccelerationStructureCompatibilityKHR :: forall (io :: * -> *).
MonadIO io =>
Device
-> AccelerationStructureVersionInfoKHR
-> io AccelerationStructureCompatibilityKHR
getDeviceAccelerationStructureCompatibilityKHR Device
device
AccelerationStructureVersionInfoKHR
versionInfo = IO AccelerationStructureCompatibilityKHR
-> io AccelerationStructureCompatibilityKHR
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO AccelerationStructureCompatibilityKHR
-> io AccelerationStructureCompatibilityKHR)
-> (ContT
AccelerationStructureCompatibilityKHR
IO
AccelerationStructureCompatibilityKHR
-> IO AccelerationStructureCompatibilityKHR)
-> ContT
AccelerationStructureCompatibilityKHR
IO
AccelerationStructureCompatibilityKHR
-> io AccelerationStructureCompatibilityKHR
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT
AccelerationStructureCompatibilityKHR
IO
AccelerationStructureCompatibilityKHR
-> IO AccelerationStructureCompatibilityKHR
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT
AccelerationStructureCompatibilityKHR
IO
AccelerationStructureCompatibilityKHR
-> io AccelerationStructureCompatibilityKHR)
-> ContT
AccelerationStructureCompatibilityKHR
IO
AccelerationStructureCompatibilityKHR
-> io AccelerationStructureCompatibilityKHR
forall a b. (a -> b) -> a -> b
$ do
let vkGetDeviceAccelerationStructureCompatibilityKHRPtr :: FunPtr
(Ptr Device_T
-> ("pVersionInfo" ::: Ptr AccelerationStructureVersionInfoKHR)
-> ("pCompatibility" ::: Ptr AccelerationStructureCompatibilityKHR)
-> IO ())
vkGetDeviceAccelerationStructureCompatibilityKHRPtr = DeviceCmds
-> FunPtr
(Ptr Device_T
-> ("pVersionInfo" ::: Ptr AccelerationStructureVersionInfoKHR)
-> ("pCompatibility" ::: Ptr AccelerationStructureCompatibilityKHR)
-> IO ())
pVkGetDeviceAccelerationStructureCompatibilityKHR (case Device
device of Device{DeviceCmds
deviceCmds :: DeviceCmds
$sel:deviceCmds:Device :: Device -> DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
IO () -> ContT AccelerationStructureCompatibilityKHR IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT AccelerationStructureCompatibilityKHR IO ())
-> IO () -> ContT AccelerationStructureCompatibilityKHR IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr Device_T
-> ("pVersionInfo" ::: Ptr AccelerationStructureVersionInfoKHR)
-> ("pCompatibility" ::: Ptr AccelerationStructureCompatibilityKHR)
-> IO ())
vkGetDeviceAccelerationStructureCompatibilityKHRPtr FunPtr
(Ptr Device_T
-> ("pVersionInfo" ::: Ptr AccelerationStructureVersionInfoKHR)
-> ("pCompatibility" ::: Ptr AccelerationStructureCompatibilityKHR)
-> IO ())
-> FunPtr
(Ptr Device_T
-> ("pVersionInfo" ::: Ptr AccelerationStructureVersionInfoKHR)
-> ("pCompatibility" ::: Ptr AccelerationStructureCompatibilityKHR)
-> IO ())
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr Device_T
-> ("pVersionInfo" ::: Ptr AccelerationStructureVersionInfoKHR)
-> ("pCompatibility" ::: Ptr AccelerationStructureCompatibilityKHR)
-> IO ())
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
IOException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkGetDeviceAccelerationStructureCompatibilityKHR is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let vkGetDeviceAccelerationStructureCompatibilityKHR' :: Ptr Device_T
-> ("pVersionInfo" ::: Ptr AccelerationStructureVersionInfoKHR)
-> ("pCompatibility" ::: Ptr AccelerationStructureCompatibilityKHR)
-> IO ()
vkGetDeviceAccelerationStructureCompatibilityKHR' = FunPtr
(Ptr Device_T
-> ("pVersionInfo" ::: Ptr AccelerationStructureVersionInfoKHR)
-> ("pCompatibility" ::: Ptr AccelerationStructureCompatibilityKHR)
-> IO ())
-> Ptr Device_T
-> ("pVersionInfo" ::: Ptr AccelerationStructureVersionInfoKHR)
-> ("pCompatibility" ::: Ptr AccelerationStructureCompatibilityKHR)
-> IO ()
mkVkGetDeviceAccelerationStructureCompatibilityKHR FunPtr
(Ptr Device_T
-> ("pVersionInfo" ::: Ptr AccelerationStructureVersionInfoKHR)
-> ("pCompatibility" ::: Ptr AccelerationStructureCompatibilityKHR)
-> IO ())
vkGetDeviceAccelerationStructureCompatibilityKHRPtr
"pVersionInfo" ::: Ptr AccelerationStructureVersionInfoKHR
pVersionInfo <- ((("pVersionInfo" ::: Ptr AccelerationStructureVersionInfoKHR)
-> IO AccelerationStructureCompatibilityKHR)
-> IO AccelerationStructureCompatibilityKHR)
-> ContT
AccelerationStructureCompatibilityKHR
IO
("pVersionInfo" ::: Ptr AccelerationStructureVersionInfoKHR)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pVersionInfo" ::: Ptr AccelerationStructureVersionInfoKHR)
-> IO AccelerationStructureCompatibilityKHR)
-> IO AccelerationStructureCompatibilityKHR)
-> ContT
AccelerationStructureCompatibilityKHR
IO
("pVersionInfo" ::: Ptr AccelerationStructureVersionInfoKHR))
-> ((("pVersionInfo" ::: Ptr AccelerationStructureVersionInfoKHR)
-> IO AccelerationStructureCompatibilityKHR)
-> IO AccelerationStructureCompatibilityKHR)
-> ContT
AccelerationStructureCompatibilityKHR
IO
("pVersionInfo" ::: Ptr AccelerationStructureVersionInfoKHR)
forall a b. (a -> b) -> a -> b
$ AccelerationStructureVersionInfoKHR
-> (("pVersionInfo" ::: Ptr AccelerationStructureVersionInfoKHR)
-> IO AccelerationStructureCompatibilityKHR)
-> IO AccelerationStructureCompatibilityKHR
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (AccelerationStructureVersionInfoKHR
versionInfo)
"pCompatibility" ::: Ptr AccelerationStructureCompatibilityKHR
pPCompatibility <- ((("pCompatibility" ::: Ptr AccelerationStructureCompatibilityKHR)
-> IO AccelerationStructureCompatibilityKHR)
-> IO AccelerationStructureCompatibilityKHR)
-> ContT
AccelerationStructureCompatibilityKHR
IO
("pCompatibility" ::: Ptr AccelerationStructureCompatibilityKHR)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pCompatibility" ::: Ptr AccelerationStructureCompatibilityKHR)
-> IO AccelerationStructureCompatibilityKHR)
-> IO AccelerationStructureCompatibilityKHR)
-> ContT
AccelerationStructureCompatibilityKHR
IO
("pCompatibility" ::: Ptr AccelerationStructureCompatibilityKHR))
-> ((("pCompatibility"
::: Ptr AccelerationStructureCompatibilityKHR)
-> IO AccelerationStructureCompatibilityKHR)
-> IO AccelerationStructureCompatibilityKHR)
-> ContT
AccelerationStructureCompatibilityKHR
IO
("pCompatibility" ::: Ptr AccelerationStructureCompatibilityKHR)
forall a b. (a -> b) -> a -> b
$ IO ("pCompatibility" ::: Ptr AccelerationStructureCompatibilityKHR)
-> (("pCompatibility"
::: Ptr AccelerationStructureCompatibilityKHR)
-> IO ())
-> (("pCompatibility"
::: Ptr AccelerationStructureCompatibilityKHR)
-> IO AccelerationStructureCompatibilityKHR)
-> IO AccelerationStructureCompatibilityKHR
forall a b c. IO a -> (a -> IO b) -> (a -> IO c) -> IO c
bracket (forall a. Int -> IO (Ptr a)
callocBytes @AccelerationStructureCompatibilityKHR Int
4) ("pCompatibility" ::: Ptr AccelerationStructureCompatibilityKHR)
-> IO ()
forall a. Ptr a -> IO ()
free
IO () -> ContT AccelerationStructureCompatibilityKHR IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT AccelerationStructureCompatibilityKHR IO ())
-> IO () -> ContT AccelerationStructureCompatibilityKHR IO ()
forall a b. (a -> b) -> a -> b
$ String -> IO () -> IO ()
forall a. String -> IO a -> IO a
traceAroundEvent String
"vkGetDeviceAccelerationStructureCompatibilityKHR" (Ptr Device_T
-> ("pVersionInfo" ::: Ptr AccelerationStructureVersionInfoKHR)
-> ("pCompatibility" ::: Ptr AccelerationStructureCompatibilityKHR)
-> IO ()
vkGetDeviceAccelerationStructureCompatibilityKHR'
(Device -> Ptr Device_T
deviceHandle (Device
device))
"pVersionInfo" ::: Ptr AccelerationStructureVersionInfoKHR
pVersionInfo
("pCompatibility" ::: Ptr AccelerationStructureCompatibilityKHR
pPCompatibility))
AccelerationStructureCompatibilityKHR
pCompatibility <- IO AccelerationStructureCompatibilityKHR
-> ContT
AccelerationStructureCompatibilityKHR
IO
AccelerationStructureCompatibilityKHR
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO AccelerationStructureCompatibilityKHR
-> ContT
AccelerationStructureCompatibilityKHR
IO
AccelerationStructureCompatibilityKHR)
-> IO AccelerationStructureCompatibilityKHR
-> ContT
AccelerationStructureCompatibilityKHR
IO
AccelerationStructureCompatibilityKHR
forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> IO a
peek @AccelerationStructureCompatibilityKHR "pCompatibility" ::: Ptr AccelerationStructureCompatibilityKHR
pPCompatibility
AccelerationStructureCompatibilityKHR
-> ContT
AccelerationStructureCompatibilityKHR
IO
AccelerationStructureCompatibilityKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure (AccelerationStructureCompatibilityKHR
-> ContT
AccelerationStructureCompatibilityKHR
IO
AccelerationStructureCompatibilityKHR)
-> AccelerationStructureCompatibilityKHR
-> ContT
AccelerationStructureCompatibilityKHR
IO
AccelerationStructureCompatibilityKHR
forall a b. (a -> b) -> a -> b
$ (AccelerationStructureCompatibilityKHR
pCompatibility)
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkCreateAccelerationStructureKHR
:: FunPtr (Ptr Device_T -> Ptr (SomeStruct AccelerationStructureCreateInfoKHR) -> Ptr AllocationCallbacks -> Ptr AccelerationStructureKHR -> IO Result) -> Ptr Device_T -> Ptr (SomeStruct AccelerationStructureCreateInfoKHR) -> Ptr AllocationCallbacks -> Ptr AccelerationStructureKHR -> IO Result
createAccelerationStructureKHR :: forall a io
. ( Extendss AccelerationStructureCreateInfoKHR a
, PokeChain a
, MonadIO io )
=>
Device
->
(AccelerationStructureCreateInfoKHR a)
->
("allocator" ::: Maybe AllocationCallbacks)
-> io (AccelerationStructureKHR)
createAccelerationStructureKHR :: forall (a :: [*]) (io :: * -> *).
(Extendss AccelerationStructureCreateInfoKHR a, PokeChain a,
MonadIO io) =>
Device
-> AccelerationStructureCreateInfoKHR a
-> ("allocator" ::: Maybe AllocationCallbacks)
-> io AccelerationStructureKHR
createAccelerationStructureKHR Device
device
AccelerationStructureCreateInfoKHR a
createInfo
"allocator" ::: Maybe AllocationCallbacks
allocator = IO AccelerationStructureKHR -> io AccelerationStructureKHR
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO AccelerationStructureKHR -> io AccelerationStructureKHR)
-> (ContT AccelerationStructureKHR IO AccelerationStructureKHR
-> IO AccelerationStructureKHR)
-> ContT AccelerationStructureKHR IO AccelerationStructureKHR
-> io AccelerationStructureKHR
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT AccelerationStructureKHR IO AccelerationStructureKHR
-> IO AccelerationStructureKHR
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT AccelerationStructureKHR IO AccelerationStructureKHR
-> io AccelerationStructureKHR)
-> ContT AccelerationStructureKHR IO AccelerationStructureKHR
-> io AccelerationStructureKHR
forall a b. (a -> b) -> a -> b
$ do
let vkCreateAccelerationStructureKHRPtr :: FunPtr
(Ptr Device_T
-> ("pCreateInfo"
::: Ptr (SomeStruct AccelerationStructureCreateInfoKHR))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> IO Result)
vkCreateAccelerationStructureKHRPtr = DeviceCmds
-> FunPtr
(Ptr Device_T
-> ("pCreateInfo"
::: Ptr (SomeStruct AccelerationStructureCreateInfoKHR))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> IO Result)
pVkCreateAccelerationStructureKHR (case Device
device of Device{DeviceCmds
deviceCmds :: DeviceCmds
$sel:deviceCmds:Device :: Device -> DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
IO () -> ContT AccelerationStructureKHR IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT AccelerationStructureKHR IO ())
-> IO () -> ContT AccelerationStructureKHR IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr Device_T
-> ("pCreateInfo"
::: Ptr (SomeStruct AccelerationStructureCreateInfoKHR))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> IO Result)
vkCreateAccelerationStructureKHRPtr FunPtr
(Ptr Device_T
-> ("pCreateInfo"
::: Ptr (SomeStruct AccelerationStructureCreateInfoKHR))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> IO Result)
-> FunPtr
(Ptr Device_T
-> ("pCreateInfo"
::: Ptr (SomeStruct AccelerationStructureCreateInfoKHR))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> IO Result)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr Device_T
-> ("pCreateInfo"
::: Ptr (SomeStruct AccelerationStructureCreateInfoKHR))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> IO Result)
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
IOException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkCreateAccelerationStructureKHR is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let vkCreateAccelerationStructureKHR' :: Ptr Device_T
-> ("pCreateInfo"
::: Ptr (SomeStruct AccelerationStructureCreateInfoKHR))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> IO Result
vkCreateAccelerationStructureKHR' = FunPtr
(Ptr Device_T
-> ("pCreateInfo"
::: Ptr (SomeStruct AccelerationStructureCreateInfoKHR))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> IO Result)
-> Ptr Device_T
-> ("pCreateInfo"
::: Ptr (SomeStruct AccelerationStructureCreateInfoKHR))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> IO Result
mkVkCreateAccelerationStructureKHR FunPtr
(Ptr Device_T
-> ("pCreateInfo"
::: Ptr (SomeStruct AccelerationStructureCreateInfoKHR))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> IO Result)
vkCreateAccelerationStructureKHRPtr
Ptr (AccelerationStructureCreateInfoKHR a)
pCreateInfo <- ((Ptr (AccelerationStructureCreateInfoKHR a)
-> IO AccelerationStructureKHR)
-> IO AccelerationStructureKHR)
-> ContT
AccelerationStructureKHR
IO
(Ptr (AccelerationStructureCreateInfoKHR a))
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr (AccelerationStructureCreateInfoKHR a)
-> IO AccelerationStructureKHR)
-> IO AccelerationStructureKHR)
-> ContT
AccelerationStructureKHR
IO
(Ptr (AccelerationStructureCreateInfoKHR a)))
-> ((Ptr (AccelerationStructureCreateInfoKHR a)
-> IO AccelerationStructureKHR)
-> IO AccelerationStructureKHR)
-> ContT
AccelerationStructureKHR
IO
(Ptr (AccelerationStructureCreateInfoKHR a))
forall a b. (a -> b) -> a -> b
$ AccelerationStructureCreateInfoKHR a
-> (Ptr (AccelerationStructureCreateInfoKHR a)
-> IO AccelerationStructureKHR)
-> IO AccelerationStructureKHR
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (AccelerationStructureCreateInfoKHR a
createInfo)
"pAllocator" ::: Ptr AllocationCallbacks
pAllocator <- case ("allocator" ::: Maybe AllocationCallbacks
allocator) of
"allocator" ::: Maybe AllocationCallbacks
Nothing -> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ContT
AccelerationStructureKHR
IO
("pAllocator" ::: Ptr AllocationCallbacks)
forall (f :: * -> *) a. Applicative f => a -> f a
pure "pAllocator" ::: Ptr AllocationCallbacks
forall a. Ptr a
nullPtr
Just AllocationCallbacks
j -> ((("pAllocator" ::: Ptr AllocationCallbacks)
-> IO AccelerationStructureKHR)
-> IO AccelerationStructureKHR)
-> ContT
AccelerationStructureKHR
IO
("pAllocator" ::: Ptr AllocationCallbacks)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pAllocator" ::: Ptr AllocationCallbacks)
-> IO AccelerationStructureKHR)
-> IO AccelerationStructureKHR)
-> ContT
AccelerationStructureKHR
IO
("pAllocator" ::: Ptr AllocationCallbacks))
-> ((("pAllocator" ::: Ptr AllocationCallbacks)
-> IO AccelerationStructureKHR)
-> IO AccelerationStructureKHR)
-> ContT
AccelerationStructureKHR
IO
("pAllocator" ::: Ptr AllocationCallbacks)
forall a b. (a -> b) -> a -> b
$ AllocationCallbacks
-> (("pAllocator" ::: Ptr AllocationCallbacks)
-> IO AccelerationStructureKHR)
-> IO AccelerationStructureKHR
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (AllocationCallbacks
j)
"pAccelerationStructures" ::: Ptr AccelerationStructureKHR
pPAccelerationStructure <- ((("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> IO AccelerationStructureKHR)
-> IO AccelerationStructureKHR)
-> ContT
AccelerationStructureKHR
IO
("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> IO AccelerationStructureKHR)
-> IO AccelerationStructureKHR)
-> ContT
AccelerationStructureKHR
IO
("pAccelerationStructures" ::: Ptr AccelerationStructureKHR))
-> ((("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> IO AccelerationStructureKHR)
-> IO AccelerationStructureKHR)
-> ContT
AccelerationStructureKHR
IO
("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
forall a b. (a -> b) -> a -> b
$ IO ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> (("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> IO ())
-> (("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> IO AccelerationStructureKHR)
-> IO AccelerationStructureKHR
forall a b c. IO a -> (a -> IO b) -> (a -> IO c) -> IO c
bracket (forall a. Int -> IO (Ptr a)
callocBytes @AccelerationStructureKHR Int
8) ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> IO ()
forall a. Ptr a -> IO ()
free
Result
r <- IO Result -> ContT AccelerationStructureKHR IO Result
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO Result -> ContT AccelerationStructureKHR IO Result)
-> IO Result -> ContT AccelerationStructureKHR IO Result
forall a b. (a -> b) -> a -> b
$ String -> IO Result -> IO Result
forall a. String -> IO a -> IO a
traceAroundEvent String
"vkCreateAccelerationStructureKHR" (Ptr Device_T
-> ("pCreateInfo"
::: Ptr (SomeStruct AccelerationStructureCreateInfoKHR))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> IO Result
vkCreateAccelerationStructureKHR'
(Device -> Ptr Device_T
deviceHandle (Device
device))
(Ptr (AccelerationStructureCreateInfoKHR a)
-> "pCreateInfo"
::: Ptr (SomeStruct AccelerationStructureCreateInfoKHR)
forall (a :: [*] -> *) (es :: [*]).
Ptr (a es) -> Ptr (SomeStruct a)
forgetExtensions Ptr (AccelerationStructureCreateInfoKHR a)
pCreateInfo)
"pAllocator" ::: Ptr AllocationCallbacks
pAllocator
("pAccelerationStructures" ::: Ptr AccelerationStructureKHR
pPAccelerationStructure))
IO () -> ContT AccelerationStructureKHR IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT AccelerationStructureKHR IO ())
-> IO () -> ContT AccelerationStructureKHR IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Result
r Result -> Result -> Bool
forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (VulkanException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (Result -> VulkanException
VulkanException Result
r))
AccelerationStructureKHR
pAccelerationStructure <- IO AccelerationStructureKHR
-> ContT AccelerationStructureKHR IO AccelerationStructureKHR
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO AccelerationStructureKHR
-> ContT AccelerationStructureKHR IO AccelerationStructureKHR)
-> IO AccelerationStructureKHR
-> ContT AccelerationStructureKHR IO AccelerationStructureKHR
forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> IO a
peek @AccelerationStructureKHR "pAccelerationStructures" ::: Ptr AccelerationStructureKHR
pPAccelerationStructure
AccelerationStructureKHR
-> ContT AccelerationStructureKHR IO AccelerationStructureKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure (AccelerationStructureKHR
-> ContT AccelerationStructureKHR IO AccelerationStructureKHR)
-> AccelerationStructureKHR
-> ContT AccelerationStructureKHR IO AccelerationStructureKHR
forall a b. (a -> b) -> a -> b
$ (AccelerationStructureKHR
pAccelerationStructure)
withAccelerationStructureKHR :: forall a io r . (Extendss AccelerationStructureCreateInfoKHR a, PokeChain a, MonadIO io) => Device -> AccelerationStructureCreateInfoKHR a -> Maybe AllocationCallbacks -> (io AccelerationStructureKHR -> (AccelerationStructureKHR -> io ()) -> r) -> r
withAccelerationStructureKHR :: forall (a :: [*]) (io :: * -> *) r.
(Extendss AccelerationStructureCreateInfoKHR a, PokeChain a,
MonadIO io) =>
Device
-> AccelerationStructureCreateInfoKHR a
-> ("allocator" ::: Maybe AllocationCallbacks)
-> (io AccelerationStructureKHR
-> (AccelerationStructureKHR -> io ()) -> r)
-> r
withAccelerationStructureKHR Device
device AccelerationStructureCreateInfoKHR a
pCreateInfo "allocator" ::: Maybe AllocationCallbacks
pAllocator io AccelerationStructureKHR
-> (AccelerationStructureKHR -> io ()) -> r
b =
io AccelerationStructureKHR
-> (AccelerationStructureKHR -> io ()) -> r
b (Device
-> AccelerationStructureCreateInfoKHR a
-> ("allocator" ::: Maybe AllocationCallbacks)
-> io AccelerationStructureKHR
forall (a :: [*]) (io :: * -> *).
(Extendss AccelerationStructureCreateInfoKHR a, PokeChain a,
MonadIO io) =>
Device
-> AccelerationStructureCreateInfoKHR a
-> ("allocator" ::: Maybe AllocationCallbacks)
-> io AccelerationStructureKHR
createAccelerationStructureKHR Device
device AccelerationStructureCreateInfoKHR a
pCreateInfo "allocator" ::: Maybe AllocationCallbacks
pAllocator)
(\(AccelerationStructureKHR
o0) -> Device
-> AccelerationStructureKHR
-> ("allocator" ::: Maybe AllocationCallbacks)
-> io ()
forall (io :: * -> *).
MonadIO io =>
Device
-> AccelerationStructureKHR
-> ("allocator" ::: Maybe AllocationCallbacks)
-> io ()
destroyAccelerationStructureKHR Device
device AccelerationStructureKHR
o0 "allocator" ::: Maybe AllocationCallbacks
pAllocator)
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkCmdBuildAccelerationStructuresKHR
:: FunPtr (Ptr CommandBuffer_T -> Word32 -> Ptr AccelerationStructureBuildGeometryInfoKHR -> Ptr (Ptr AccelerationStructureBuildRangeInfoKHR) -> IO ()) -> Ptr CommandBuffer_T -> Word32 -> Ptr AccelerationStructureBuildGeometryInfoKHR -> Ptr (Ptr AccelerationStructureBuildRangeInfoKHR) -> IO ()
cmdBuildAccelerationStructuresKHR :: forall io
. (MonadIO io)
=>
CommandBuffer
->
("infos" ::: Vector AccelerationStructureBuildGeometryInfoKHR)
->
("buildRangeInfos" ::: Vector (Vector AccelerationStructureBuildRangeInfoKHR))
-> io ()
cmdBuildAccelerationStructuresKHR :: forall (io :: * -> *).
MonadIO io =>
CommandBuffer
-> ("infos" ::: Vector AccelerationStructureBuildGeometryInfoKHR)
-> ("buildRangeInfos"
::: Vector (Vector AccelerationStructureBuildRangeInfoKHR))
-> io ()
cmdBuildAccelerationStructuresKHR CommandBuffer
commandBuffer
"infos" ::: Vector AccelerationStructureBuildGeometryInfoKHR
infos
"buildRangeInfos"
::: Vector (Vector AccelerationStructureBuildRangeInfoKHR)
buildRangeInfos = IO () -> io ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> io ())
-> (ContT () IO () -> IO ()) -> ContT () IO () -> io ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT () IO () -> IO ()
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT () IO () -> io ()) -> ContT () IO () -> io ()
forall a b. (a -> b) -> a -> b
$ do
let vkCmdBuildAccelerationStructuresKHRPtr :: FunPtr
(Ptr CommandBuffer_T
-> Flags
-> ("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> ("ppBuildRangeInfos"
::: Ptr (Ptr AccelerationStructureBuildRangeInfoKHR))
-> IO ())
vkCmdBuildAccelerationStructuresKHRPtr = DeviceCmds
-> FunPtr
(Ptr CommandBuffer_T
-> Flags
-> ("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> ("ppBuildRangeInfos"
::: Ptr (Ptr AccelerationStructureBuildRangeInfoKHR))
-> IO ())
pVkCmdBuildAccelerationStructuresKHR (case CommandBuffer
commandBuffer of CommandBuffer{DeviceCmds
deviceCmds :: DeviceCmds
$sel:deviceCmds:CommandBuffer :: CommandBuffer -> DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
IO () -> ContT () IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT () IO ()) -> IO () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr CommandBuffer_T
-> Flags
-> ("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> ("ppBuildRangeInfos"
::: Ptr (Ptr AccelerationStructureBuildRangeInfoKHR))
-> IO ())
vkCmdBuildAccelerationStructuresKHRPtr FunPtr
(Ptr CommandBuffer_T
-> Flags
-> ("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> ("ppBuildRangeInfos"
::: Ptr (Ptr AccelerationStructureBuildRangeInfoKHR))
-> IO ())
-> FunPtr
(Ptr CommandBuffer_T
-> Flags
-> ("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> ("ppBuildRangeInfos"
::: Ptr (Ptr AccelerationStructureBuildRangeInfoKHR))
-> IO ())
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr CommandBuffer_T
-> Flags
-> ("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> ("ppBuildRangeInfos"
::: Ptr (Ptr AccelerationStructureBuildRangeInfoKHR))
-> IO ())
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
IOException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkCmdBuildAccelerationStructuresKHR is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let vkCmdBuildAccelerationStructuresKHR' :: Ptr CommandBuffer_T
-> Flags
-> ("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> ("ppBuildRangeInfos"
::: Ptr (Ptr AccelerationStructureBuildRangeInfoKHR))
-> IO ()
vkCmdBuildAccelerationStructuresKHR' = FunPtr
(Ptr CommandBuffer_T
-> Flags
-> ("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> ("ppBuildRangeInfos"
::: Ptr (Ptr AccelerationStructureBuildRangeInfoKHR))
-> IO ())
-> Ptr CommandBuffer_T
-> Flags
-> ("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> ("ppBuildRangeInfos"
::: Ptr (Ptr AccelerationStructureBuildRangeInfoKHR))
-> IO ()
mkVkCmdBuildAccelerationStructuresKHR FunPtr
(Ptr CommandBuffer_T
-> Flags
-> ("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> ("ppBuildRangeInfos"
::: Ptr (Ptr AccelerationStructureBuildRangeInfoKHR))
-> IO ())
vkCmdBuildAccelerationStructuresKHRPtr
let pInfosLength :: Int
pInfosLength = ("infos" ::: Vector AccelerationStructureBuildGeometryInfoKHR)
-> Int
forall a. Vector a -> Int
Data.Vector.length (("infos" ::: Vector AccelerationStructureBuildGeometryInfoKHR)
-> Int)
-> ("infos" ::: Vector AccelerationStructureBuildGeometryInfoKHR)
-> Int
forall a b. (a -> b) -> a -> b
$ ("infos" ::: Vector AccelerationStructureBuildGeometryInfoKHR
infos)
IO () -> ContT () IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT () IO ()) -> IO () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless ((("buildRangeInfos"
::: Vector (Vector AccelerationStructureBuildRangeInfoKHR))
-> Int
forall a. Vector a -> Int
Data.Vector.length (("buildRangeInfos"
::: Vector (Vector AccelerationStructureBuildRangeInfoKHR))
-> Int)
-> ("buildRangeInfos"
::: Vector (Vector AccelerationStructureBuildRangeInfoKHR))
-> Int
forall a b. (a -> b) -> a -> b
$ ("buildRangeInfos"
::: Vector (Vector AccelerationStructureBuildRangeInfoKHR)
buildRangeInfos)) Int -> Int -> Bool
forall a. Eq a => a -> a -> Bool
== Int
pInfosLength) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
IOException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"ppBuildRangeInfos and pInfos must have the same length" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
"pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR
pPInfos <- ((("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> IO ())
-> IO ())
-> ContT
() IO ("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> IO ())
-> IO ())
-> ContT
() IO ("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR))
-> ((("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> IO ())
-> IO ())
-> ContT
() IO ("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
forall a b. (a -> b) -> a -> b
$ forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes @AccelerationStructureBuildGeometryInfoKHR ((("infos" ::: Vector AccelerationStructureBuildGeometryInfoKHR)
-> Int
forall a. Vector a -> Int
Data.Vector.length ("infos" ::: Vector AccelerationStructureBuildGeometryInfoKHR
infos)) Int -> Int -> Int
forall a. Num a => a -> a -> a
* Int
80)
(Int
-> AccelerationStructureBuildGeometryInfoKHR -> ContT () IO ())
-> ("infos" ::: Vector AccelerationStructureBuildGeometryInfoKHR)
-> ContT () IO ()
forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\Int
i AccelerationStructureBuildGeometryInfoKHR
e -> ((() -> IO ()) -> IO ()) -> ContT () IO ()
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((() -> IO ()) -> IO ()) -> ContT () IO ())
-> ((() -> IO ()) -> IO ()) -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ ("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> AccelerationStructureBuildGeometryInfoKHR -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct ("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR
pPInfos ("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> Int
-> "pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (Int
80 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr AccelerationStructureBuildGeometryInfoKHR) (AccelerationStructureBuildGeometryInfoKHR
e) (IO () -> IO ())
-> ((() -> IO ()) -> IO ()) -> (() -> IO ()) -> IO ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((() -> IO ()) -> () -> IO ()
forall a b. (a -> b) -> a -> b
$ ())) ("infos" ::: Vector AccelerationStructureBuildGeometryInfoKHR
infos)
"ppBuildRangeInfos"
::: Ptr (Ptr AccelerationStructureBuildRangeInfoKHR)
pPpBuildRangeInfos <- ((("ppBuildRangeInfos"
::: Ptr (Ptr AccelerationStructureBuildRangeInfoKHR))
-> IO ())
-> IO ())
-> ContT
()
IO
("ppBuildRangeInfos"
::: Ptr (Ptr AccelerationStructureBuildRangeInfoKHR))
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("ppBuildRangeInfos"
::: Ptr (Ptr AccelerationStructureBuildRangeInfoKHR))
-> IO ())
-> IO ())
-> ContT
()
IO
("ppBuildRangeInfos"
::: Ptr (Ptr AccelerationStructureBuildRangeInfoKHR)))
-> ((("ppBuildRangeInfos"
::: Ptr (Ptr AccelerationStructureBuildRangeInfoKHR))
-> IO ())
-> IO ())
-> ContT
()
IO
("ppBuildRangeInfos"
::: Ptr (Ptr AccelerationStructureBuildRangeInfoKHR))
forall a b. (a -> b) -> a -> b
$ forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes @(Ptr AccelerationStructureBuildRangeInfoKHR) ((("buildRangeInfos"
::: Vector (Vector AccelerationStructureBuildRangeInfoKHR))
-> Int
forall a. Vector a -> Int
Data.Vector.length ("buildRangeInfos"
::: Vector (Vector AccelerationStructureBuildRangeInfoKHR)
buildRangeInfos)) Int -> Int -> Int
forall a. Num a => a -> a -> a
* Int
8)
(Int
-> Vector AccelerationStructureBuildRangeInfoKHR -> ContT () IO ())
-> ("buildRangeInfos"
::: Vector (Vector AccelerationStructureBuildRangeInfoKHR))
-> ContT () IO ()
forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\Int
i Vector AccelerationStructureBuildRangeInfoKHR
e -> do
Ptr AccelerationStructureBuildRangeInfoKHR
pPpBuildRangeInfos' <- ((Ptr AccelerationStructureBuildRangeInfoKHR -> IO ()) -> IO ())
-> ContT () IO (Ptr AccelerationStructureBuildRangeInfoKHR)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr AccelerationStructureBuildRangeInfoKHR -> IO ()) -> IO ())
-> ContT () IO (Ptr AccelerationStructureBuildRangeInfoKHR))
-> ((Ptr AccelerationStructureBuildRangeInfoKHR -> IO ()) -> IO ())
-> ContT () IO (Ptr AccelerationStructureBuildRangeInfoKHR)
forall a b. (a -> b) -> a -> b
$ forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes @AccelerationStructureBuildRangeInfoKHR ((Vector AccelerationStructureBuildRangeInfoKHR -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector AccelerationStructureBuildRangeInfoKHR
e)) Int -> Int -> Int
forall a. Num a => a -> a -> a
* Int
16)
IO () -> ContT () IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT () IO ()) -> IO () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ (Int -> AccelerationStructureBuildRangeInfoKHR -> IO ())
-> Vector AccelerationStructureBuildRangeInfoKHR -> IO ()
forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\Int
i' AccelerationStructureBuildRangeInfoKHR
e' -> Ptr AccelerationStructureBuildRangeInfoKHR
-> AccelerationStructureBuildRangeInfoKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr AccelerationStructureBuildRangeInfoKHR
pPpBuildRangeInfos' Ptr AccelerationStructureBuildRangeInfoKHR
-> Int -> Ptr AccelerationStructureBuildRangeInfoKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (Int
16 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i')) :: Ptr AccelerationStructureBuildRangeInfoKHR) (AccelerationStructureBuildRangeInfoKHR
e')) (Vector AccelerationStructureBuildRangeInfoKHR
e)
IO () -> ContT () IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT () IO ()) -> IO () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ ("ppBuildRangeInfos"
::: Ptr (Ptr AccelerationStructureBuildRangeInfoKHR))
-> Ptr AccelerationStructureBuildRangeInfoKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ("ppBuildRangeInfos"
::: Ptr (Ptr AccelerationStructureBuildRangeInfoKHR)
pPpBuildRangeInfos ("ppBuildRangeInfos"
::: Ptr (Ptr AccelerationStructureBuildRangeInfoKHR))
-> Int
-> "ppBuildRangeInfos"
::: Ptr (Ptr AccelerationStructureBuildRangeInfoKHR)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (Int
8 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr (Ptr AccelerationStructureBuildRangeInfoKHR)) (Ptr AccelerationStructureBuildRangeInfoKHR
pPpBuildRangeInfos')) ("buildRangeInfos"
::: Vector (Vector AccelerationStructureBuildRangeInfoKHR)
buildRangeInfos)
IO () -> ContT () IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT () IO ()) -> IO () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ String -> IO () -> IO ()
forall a. String -> IO a -> IO a
traceAroundEvent String
"vkCmdBuildAccelerationStructuresKHR" (Ptr CommandBuffer_T
-> Flags
-> ("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> ("ppBuildRangeInfos"
::: Ptr (Ptr AccelerationStructureBuildRangeInfoKHR))
-> IO ()
vkCmdBuildAccelerationStructuresKHR'
(CommandBuffer -> Ptr CommandBuffer_T
commandBufferHandle (CommandBuffer
commandBuffer))
((Int -> Flags
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
pInfosLength :: Word32))
("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR
pPInfos)
("ppBuildRangeInfos"
::: Ptr (Ptr AccelerationStructureBuildRangeInfoKHR)
pPpBuildRangeInfos))
() -> ContT () IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure (() -> ContT () IO ()) -> () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ ()
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkCmdBuildAccelerationStructuresIndirectKHR
:: FunPtr (Ptr CommandBuffer_T -> Word32 -> Ptr AccelerationStructureBuildGeometryInfoKHR -> Ptr DeviceAddress -> Ptr Word32 -> Ptr (Ptr Word32) -> IO ()) -> Ptr CommandBuffer_T -> Word32 -> Ptr AccelerationStructureBuildGeometryInfoKHR -> Ptr DeviceAddress -> Ptr Word32 -> Ptr (Ptr Word32) -> IO ()
cmdBuildAccelerationStructuresIndirectKHR :: forall io
. (MonadIO io)
=>
CommandBuffer
->
("infos" ::: Vector AccelerationStructureBuildGeometryInfoKHR)
->
("indirectDeviceAddresses" ::: Vector DeviceAddress)
->
("indirectStrides" ::: Vector Word32)
->
("maxPrimitiveCounts" ::: Vector (Vector Word32))
-> io ()
cmdBuildAccelerationStructuresIndirectKHR :: forall (io :: * -> *).
MonadIO io =>
CommandBuffer
-> ("infos" ::: Vector AccelerationStructureBuildGeometryInfoKHR)
-> ("indirectDeviceAddresses" ::: Vector ("dataSize" ::: Word64))
-> ("indirectStrides" ::: Vector Flags)
-> ("maxPrimitiveCounts"
::: Vector ("indirectStrides" ::: Vector Flags))
-> io ()
cmdBuildAccelerationStructuresIndirectKHR CommandBuffer
commandBuffer
"infos" ::: Vector AccelerationStructureBuildGeometryInfoKHR
infos
"indirectDeviceAddresses" ::: Vector ("dataSize" ::: Word64)
indirectDeviceAddresses
"indirectStrides" ::: Vector Flags
indirectStrides
"maxPrimitiveCounts"
::: Vector ("indirectStrides" ::: Vector Flags)
maxPrimitiveCounts = IO () -> io ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> io ())
-> (ContT () IO () -> IO ()) -> ContT () IO () -> io ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT () IO () -> IO ()
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT () IO () -> io ()) -> ContT () IO () -> io ()
forall a b. (a -> b) -> a -> b
$ do
let vkCmdBuildAccelerationStructuresIndirectKHRPtr :: FunPtr
(Ptr CommandBuffer_T
-> Flags
-> ("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> ("pIndirectDeviceAddresses" ::: Ptr ("dataSize" ::: Word64))
-> ("pIndirectStrides" ::: Ptr Flags)
-> ("ppMaxPrimitiveCounts"
::: Ptr ("pIndirectStrides" ::: Ptr Flags))
-> IO ())
vkCmdBuildAccelerationStructuresIndirectKHRPtr = DeviceCmds
-> FunPtr
(Ptr CommandBuffer_T
-> Flags
-> ("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> ("pIndirectDeviceAddresses" ::: Ptr ("dataSize" ::: Word64))
-> ("pIndirectStrides" ::: Ptr Flags)
-> ("ppMaxPrimitiveCounts"
::: Ptr ("pIndirectStrides" ::: Ptr Flags))
-> IO ())
pVkCmdBuildAccelerationStructuresIndirectKHR (case CommandBuffer
commandBuffer of CommandBuffer{DeviceCmds
deviceCmds :: DeviceCmds
$sel:deviceCmds:CommandBuffer :: CommandBuffer -> DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
IO () -> ContT () IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT () IO ()) -> IO () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr CommandBuffer_T
-> Flags
-> ("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> ("pIndirectDeviceAddresses" ::: Ptr ("dataSize" ::: Word64))
-> ("pIndirectStrides" ::: Ptr Flags)
-> ("ppMaxPrimitiveCounts"
::: Ptr ("pIndirectStrides" ::: Ptr Flags))
-> IO ())
vkCmdBuildAccelerationStructuresIndirectKHRPtr FunPtr
(Ptr CommandBuffer_T
-> Flags
-> ("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> ("pIndirectDeviceAddresses" ::: Ptr ("dataSize" ::: Word64))
-> ("pIndirectStrides" ::: Ptr Flags)
-> ("ppMaxPrimitiveCounts"
::: Ptr ("pIndirectStrides" ::: Ptr Flags))
-> IO ())
-> FunPtr
(Ptr CommandBuffer_T
-> Flags
-> ("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> ("pIndirectDeviceAddresses" ::: Ptr ("dataSize" ::: Word64))
-> ("pIndirectStrides" ::: Ptr Flags)
-> ("ppMaxPrimitiveCounts"
::: Ptr ("pIndirectStrides" ::: Ptr Flags))
-> IO ())
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr CommandBuffer_T
-> Flags
-> ("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> ("pIndirectDeviceAddresses" ::: Ptr ("dataSize" ::: Word64))
-> ("pIndirectStrides" ::: Ptr Flags)
-> ("ppMaxPrimitiveCounts"
::: Ptr ("pIndirectStrides" ::: Ptr Flags))
-> IO ())
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
IOException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkCmdBuildAccelerationStructuresIndirectKHR is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let vkCmdBuildAccelerationStructuresIndirectKHR' :: Ptr CommandBuffer_T
-> Flags
-> ("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> ("pIndirectDeviceAddresses" ::: Ptr ("dataSize" ::: Word64))
-> ("pIndirectStrides" ::: Ptr Flags)
-> ("ppMaxPrimitiveCounts"
::: Ptr ("pIndirectStrides" ::: Ptr Flags))
-> IO ()
vkCmdBuildAccelerationStructuresIndirectKHR' = FunPtr
(Ptr CommandBuffer_T
-> Flags
-> ("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> ("pIndirectDeviceAddresses" ::: Ptr ("dataSize" ::: Word64))
-> ("pIndirectStrides" ::: Ptr Flags)
-> ("ppMaxPrimitiveCounts"
::: Ptr ("pIndirectStrides" ::: Ptr Flags))
-> IO ())
-> Ptr CommandBuffer_T
-> Flags
-> ("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> ("pIndirectDeviceAddresses" ::: Ptr ("dataSize" ::: Word64))
-> ("pIndirectStrides" ::: Ptr Flags)
-> ("ppMaxPrimitiveCounts"
::: Ptr ("pIndirectStrides" ::: Ptr Flags))
-> IO ()
mkVkCmdBuildAccelerationStructuresIndirectKHR FunPtr
(Ptr CommandBuffer_T
-> Flags
-> ("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> ("pIndirectDeviceAddresses" ::: Ptr ("dataSize" ::: Word64))
-> ("pIndirectStrides" ::: Ptr Flags)
-> ("ppMaxPrimitiveCounts"
::: Ptr ("pIndirectStrides" ::: Ptr Flags))
-> IO ())
vkCmdBuildAccelerationStructuresIndirectKHRPtr
let pInfosLength :: Int
pInfosLength = ("infos" ::: Vector AccelerationStructureBuildGeometryInfoKHR)
-> Int
forall a. Vector a -> Int
Data.Vector.length (("infos" ::: Vector AccelerationStructureBuildGeometryInfoKHR)
-> Int)
-> ("infos" ::: Vector AccelerationStructureBuildGeometryInfoKHR)
-> Int
forall a b. (a -> b) -> a -> b
$ ("infos" ::: Vector AccelerationStructureBuildGeometryInfoKHR
infos)
IO () -> ContT () IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT () IO ()) -> IO () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless ((("indirectDeviceAddresses" ::: Vector ("dataSize" ::: Word64))
-> Int
forall a. Vector a -> Int
Data.Vector.length (("indirectDeviceAddresses" ::: Vector ("dataSize" ::: Word64))
-> Int)
-> ("indirectDeviceAddresses" ::: Vector ("dataSize" ::: Word64))
-> Int
forall a b. (a -> b) -> a -> b
$ ("indirectDeviceAddresses" ::: Vector ("dataSize" ::: Word64)
indirectDeviceAddresses)) Int -> Int -> Bool
forall a. Eq a => a -> a -> Bool
== Int
pInfosLength) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
IOException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"pIndirectDeviceAddresses and pInfos must have the same length" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
IO () -> ContT () IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT () IO ()) -> IO () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless ((("indirectStrides" ::: Vector Flags) -> Int
forall a. Vector a -> Int
Data.Vector.length (("indirectStrides" ::: Vector Flags) -> Int)
-> ("indirectStrides" ::: Vector Flags) -> Int
forall a b. (a -> b) -> a -> b
$ ("indirectStrides" ::: Vector Flags
indirectStrides)) Int -> Int -> Bool
forall a. Eq a => a -> a -> Bool
== Int
pInfosLength) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
IOException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"pIndirectStrides and pInfos must have the same length" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
IO () -> ContT () IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT () IO ()) -> IO () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless ((("maxPrimitiveCounts"
::: Vector ("indirectStrides" ::: Vector Flags))
-> Int
forall a. Vector a -> Int
Data.Vector.length (("maxPrimitiveCounts"
::: Vector ("indirectStrides" ::: Vector Flags))
-> Int)
-> ("maxPrimitiveCounts"
::: Vector ("indirectStrides" ::: Vector Flags))
-> Int
forall a b. (a -> b) -> a -> b
$ ("maxPrimitiveCounts"
::: Vector ("indirectStrides" ::: Vector Flags)
maxPrimitiveCounts)) Int -> Int -> Bool
forall a. Eq a => a -> a -> Bool
== Int
pInfosLength) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
IOException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"ppMaxPrimitiveCounts and pInfos must have the same length" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
"pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR
pPInfos <- ((("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> IO ())
-> IO ())
-> ContT
() IO ("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> IO ())
-> IO ())
-> ContT
() IO ("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR))
-> ((("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> IO ())
-> IO ())
-> ContT
() IO ("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
forall a b. (a -> b) -> a -> b
$ forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes @AccelerationStructureBuildGeometryInfoKHR ((("infos" ::: Vector AccelerationStructureBuildGeometryInfoKHR)
-> Int
forall a. Vector a -> Int
Data.Vector.length ("infos" ::: Vector AccelerationStructureBuildGeometryInfoKHR
infos)) Int -> Int -> Int
forall a. Num a => a -> a -> a
* Int
80)
(Int
-> AccelerationStructureBuildGeometryInfoKHR -> ContT () IO ())
-> ("infos" ::: Vector AccelerationStructureBuildGeometryInfoKHR)
-> ContT () IO ()
forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\Int
i AccelerationStructureBuildGeometryInfoKHR
e -> ((() -> IO ()) -> IO ()) -> ContT () IO ()
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((() -> IO ()) -> IO ()) -> ContT () IO ())
-> ((() -> IO ()) -> IO ()) -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ ("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> AccelerationStructureBuildGeometryInfoKHR -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct ("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR
pPInfos ("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> Int
-> "pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (Int
80 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr AccelerationStructureBuildGeometryInfoKHR) (AccelerationStructureBuildGeometryInfoKHR
e) (IO () -> IO ())
-> ((() -> IO ()) -> IO ()) -> (() -> IO ()) -> IO ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((() -> IO ()) -> () -> IO ()
forall a b. (a -> b) -> a -> b
$ ())) ("infos" ::: Vector AccelerationStructureBuildGeometryInfoKHR
infos)
"pIndirectDeviceAddresses" ::: Ptr ("dataSize" ::: Word64)
pPIndirectDeviceAddresses <- ((("pIndirectDeviceAddresses" ::: Ptr ("dataSize" ::: Word64))
-> IO ())
-> IO ())
-> ContT
() IO ("pIndirectDeviceAddresses" ::: Ptr ("dataSize" ::: Word64))
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pIndirectDeviceAddresses" ::: Ptr ("dataSize" ::: Word64))
-> IO ())
-> IO ())
-> ContT
() IO ("pIndirectDeviceAddresses" ::: Ptr ("dataSize" ::: Word64)))
-> ((("pIndirectDeviceAddresses" ::: Ptr ("dataSize" ::: Word64))
-> IO ())
-> IO ())
-> ContT
() IO ("pIndirectDeviceAddresses" ::: Ptr ("dataSize" ::: Word64))
forall a b. (a -> b) -> a -> b
$ forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes @DeviceAddress ((("indirectDeviceAddresses" ::: Vector ("dataSize" ::: Word64))
-> Int
forall a. Vector a -> Int
Data.Vector.length ("indirectDeviceAddresses" ::: Vector ("dataSize" ::: Word64)
indirectDeviceAddresses)) Int -> Int -> Int
forall a. Num a => a -> a -> a
* Int
8)
IO () -> ContT () IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT () IO ()) -> IO () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ (Int -> ("dataSize" ::: Word64) -> IO ())
-> ("indirectDeviceAddresses" ::: Vector ("dataSize" ::: Word64))
-> IO ()
forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\Int
i "dataSize" ::: Word64
e -> ("pIndirectDeviceAddresses" ::: Ptr ("dataSize" ::: Word64))
-> ("dataSize" ::: Word64) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ("pIndirectDeviceAddresses" ::: Ptr ("dataSize" ::: Word64)
pPIndirectDeviceAddresses ("pIndirectDeviceAddresses" ::: Ptr ("dataSize" ::: Word64))
-> Int
-> "pIndirectDeviceAddresses" ::: Ptr ("dataSize" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (Int
8 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr DeviceAddress) ("dataSize" ::: Word64
e)) ("indirectDeviceAddresses" ::: Vector ("dataSize" ::: Word64)
indirectDeviceAddresses)
"pIndirectStrides" ::: Ptr Flags
pPIndirectStrides <- ((("pIndirectStrides" ::: Ptr Flags) -> IO ()) -> IO ())
-> ContT () IO ("pIndirectStrides" ::: Ptr Flags)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pIndirectStrides" ::: Ptr Flags) -> IO ()) -> IO ())
-> ContT () IO ("pIndirectStrides" ::: Ptr Flags))
-> ((("pIndirectStrides" ::: Ptr Flags) -> IO ()) -> IO ())
-> ContT () IO ("pIndirectStrides" ::: Ptr Flags)
forall a b. (a -> b) -> a -> b
$ forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes @Word32 ((("indirectStrides" ::: Vector Flags) -> Int
forall a. Vector a -> Int
Data.Vector.length ("indirectStrides" ::: Vector Flags
indirectStrides)) Int -> Int -> Int
forall a. Num a => a -> a -> a
* Int
4)
IO () -> ContT () IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT () IO ()) -> IO () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ (Int -> Flags -> IO ())
-> ("indirectStrides" ::: Vector Flags) -> IO ()
forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\Int
i Flags
e -> ("pIndirectStrides" ::: Ptr Flags) -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ("pIndirectStrides" ::: Ptr Flags
pPIndirectStrides ("pIndirectStrides" ::: Ptr Flags)
-> Int -> "pIndirectStrides" ::: Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (Int
4 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr Word32) (Flags
e)) ("indirectStrides" ::: Vector Flags
indirectStrides)
"ppMaxPrimitiveCounts" ::: Ptr ("pIndirectStrides" ::: Ptr Flags)
pPpMaxPrimitiveCounts <- ((("ppMaxPrimitiveCounts"
::: Ptr ("pIndirectStrides" ::: Ptr Flags))
-> IO ())
-> IO ())
-> ContT
()
IO
("ppMaxPrimitiveCounts" ::: Ptr ("pIndirectStrides" ::: Ptr Flags))
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("ppMaxPrimitiveCounts"
::: Ptr ("pIndirectStrides" ::: Ptr Flags))
-> IO ())
-> IO ())
-> ContT
()
IO
("ppMaxPrimitiveCounts"
::: Ptr ("pIndirectStrides" ::: Ptr Flags)))
-> ((("ppMaxPrimitiveCounts"
::: Ptr ("pIndirectStrides" ::: Ptr Flags))
-> IO ())
-> IO ())
-> ContT
()
IO
("ppMaxPrimitiveCounts" ::: Ptr ("pIndirectStrides" ::: Ptr Flags))
forall a b. (a -> b) -> a -> b
$ forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes @(Ptr Word32) ((("maxPrimitiveCounts"
::: Vector ("indirectStrides" ::: Vector Flags))
-> Int
forall a. Vector a -> Int
Data.Vector.length ("maxPrimitiveCounts"
::: Vector ("indirectStrides" ::: Vector Flags)
maxPrimitiveCounts)) Int -> Int -> Int
forall a. Num a => a -> a -> a
* Int
8)
(Int -> ("indirectStrides" ::: Vector Flags) -> ContT () IO ())
-> ("maxPrimitiveCounts"
::: Vector ("indirectStrides" ::: Vector Flags))
-> ContT () IO ()
forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\Int
i "indirectStrides" ::: Vector Flags
e -> do
"pIndirectStrides" ::: Ptr Flags
pPpMaxPrimitiveCounts' <- ((("pIndirectStrides" ::: Ptr Flags) -> IO ()) -> IO ())
-> ContT () IO ("pIndirectStrides" ::: Ptr Flags)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pIndirectStrides" ::: Ptr Flags) -> IO ()) -> IO ())
-> ContT () IO ("pIndirectStrides" ::: Ptr Flags))
-> ((("pIndirectStrides" ::: Ptr Flags) -> IO ()) -> IO ())
-> ContT () IO ("pIndirectStrides" ::: Ptr Flags)
forall a b. (a -> b) -> a -> b
$ forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes @Word32 ((("indirectStrides" ::: Vector Flags) -> Int
forall a. Vector a -> Int
Data.Vector.length ("indirectStrides" ::: Vector Flags
e)) Int -> Int -> Int
forall a. Num a => a -> a -> a
* Int
4)
IO () -> ContT () IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT () IO ()) -> IO () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ (Int -> Flags -> IO ())
-> ("indirectStrides" ::: Vector Flags) -> IO ()
forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\Int
i' Flags
e' -> ("pIndirectStrides" ::: Ptr Flags) -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ("pIndirectStrides" ::: Ptr Flags
pPpMaxPrimitiveCounts' ("pIndirectStrides" ::: Ptr Flags)
-> Int -> "pIndirectStrides" ::: Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (Int
4 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i')) :: Ptr Word32) (Flags
e')) ("indirectStrides" ::: Vector Flags
e)
IO () -> ContT () IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT () IO ()) -> IO () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ ("ppMaxPrimitiveCounts" ::: Ptr ("pIndirectStrides" ::: Ptr Flags))
-> ("pIndirectStrides" ::: Ptr Flags) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ("ppMaxPrimitiveCounts" ::: Ptr ("pIndirectStrides" ::: Ptr Flags)
pPpMaxPrimitiveCounts ("ppMaxPrimitiveCounts" ::: Ptr ("pIndirectStrides" ::: Ptr Flags))
-> Int
-> "ppMaxPrimitiveCounts"
::: Ptr ("pIndirectStrides" ::: Ptr Flags)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (Int
8 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr (Ptr Word32)) ("pIndirectStrides" ::: Ptr Flags
pPpMaxPrimitiveCounts')) ("maxPrimitiveCounts"
::: Vector ("indirectStrides" ::: Vector Flags)
maxPrimitiveCounts)
IO () -> ContT () IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT () IO ()) -> IO () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ String -> IO () -> IO ()
forall a. String -> IO a -> IO a
traceAroundEvent String
"vkCmdBuildAccelerationStructuresIndirectKHR" (Ptr CommandBuffer_T
-> Flags
-> ("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> ("pIndirectDeviceAddresses" ::: Ptr ("dataSize" ::: Word64))
-> ("pIndirectStrides" ::: Ptr Flags)
-> ("ppMaxPrimitiveCounts"
::: Ptr ("pIndirectStrides" ::: Ptr Flags))
-> IO ()
vkCmdBuildAccelerationStructuresIndirectKHR'
(CommandBuffer -> Ptr CommandBuffer_T
commandBufferHandle (CommandBuffer
commandBuffer))
((Int -> Flags
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
pInfosLength :: Word32))
("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR
pPInfos)
("pIndirectDeviceAddresses" ::: Ptr ("dataSize" ::: Word64)
pPIndirectDeviceAddresses)
("pIndirectStrides" ::: Ptr Flags
pPIndirectStrides)
("ppMaxPrimitiveCounts" ::: Ptr ("pIndirectStrides" ::: Ptr Flags)
pPpMaxPrimitiveCounts))
() -> ContT () IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure (() -> ContT () IO ()) -> () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ ()
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkBuildAccelerationStructuresKHR
:: FunPtr (Ptr Device_T -> DeferredOperationKHR -> Word32 -> Ptr AccelerationStructureBuildGeometryInfoKHR -> Ptr (Ptr AccelerationStructureBuildRangeInfoKHR) -> IO Result) -> Ptr Device_T -> DeferredOperationKHR -> Word32 -> Ptr AccelerationStructureBuildGeometryInfoKHR -> Ptr (Ptr AccelerationStructureBuildRangeInfoKHR) -> IO Result
buildAccelerationStructuresKHR :: forall io
. (MonadIO io)
=>
Device
->
DeferredOperationKHR
->
("infos" ::: Vector AccelerationStructureBuildGeometryInfoKHR)
->
("buildRangeInfos" ::: Vector (Vector AccelerationStructureBuildRangeInfoKHR))
-> io (Result)
buildAccelerationStructuresKHR :: forall (io :: * -> *).
MonadIO io =>
Device
-> DeferredOperationKHR
-> ("infos" ::: Vector AccelerationStructureBuildGeometryInfoKHR)
-> ("buildRangeInfos"
::: Vector (Vector AccelerationStructureBuildRangeInfoKHR))
-> io Result
buildAccelerationStructuresKHR Device
device
DeferredOperationKHR
deferredOperation
"infos" ::: Vector AccelerationStructureBuildGeometryInfoKHR
infos
"buildRangeInfos"
::: Vector (Vector AccelerationStructureBuildRangeInfoKHR)
buildRangeInfos = IO Result -> io Result
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Result -> io Result)
-> (ContT Result IO Result -> IO Result)
-> ContT Result IO Result
-> io Result
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT Result IO Result -> IO Result
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT Result IO Result -> io Result)
-> ContT Result IO Result -> io Result
forall a b. (a -> b) -> a -> b
$ do
let vkBuildAccelerationStructuresKHRPtr :: FunPtr
(Ptr Device_T
-> DeferredOperationKHR
-> Flags
-> ("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> ("ppBuildRangeInfos"
::: Ptr (Ptr AccelerationStructureBuildRangeInfoKHR))
-> IO Result)
vkBuildAccelerationStructuresKHRPtr = DeviceCmds
-> FunPtr
(Ptr Device_T
-> DeferredOperationKHR
-> Flags
-> ("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> ("ppBuildRangeInfos"
::: Ptr (Ptr AccelerationStructureBuildRangeInfoKHR))
-> IO Result)
pVkBuildAccelerationStructuresKHR (case Device
device of Device{DeviceCmds
deviceCmds :: DeviceCmds
$sel:deviceCmds:Device :: Device -> DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
IO () -> ContT Result IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT Result IO ()) -> IO () -> ContT Result IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr Device_T
-> DeferredOperationKHR
-> Flags
-> ("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> ("ppBuildRangeInfos"
::: Ptr (Ptr AccelerationStructureBuildRangeInfoKHR))
-> IO Result)
vkBuildAccelerationStructuresKHRPtr FunPtr
(Ptr Device_T
-> DeferredOperationKHR
-> Flags
-> ("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> ("ppBuildRangeInfos"
::: Ptr (Ptr AccelerationStructureBuildRangeInfoKHR))
-> IO Result)
-> FunPtr
(Ptr Device_T
-> DeferredOperationKHR
-> Flags
-> ("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> ("ppBuildRangeInfos"
::: Ptr (Ptr AccelerationStructureBuildRangeInfoKHR))
-> IO Result)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr Device_T
-> DeferredOperationKHR
-> Flags
-> ("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> ("ppBuildRangeInfos"
::: Ptr (Ptr AccelerationStructureBuildRangeInfoKHR))
-> IO Result)
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
IOException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkBuildAccelerationStructuresKHR is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let vkBuildAccelerationStructuresKHR' :: Ptr Device_T
-> DeferredOperationKHR
-> Flags
-> ("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> ("ppBuildRangeInfos"
::: Ptr (Ptr AccelerationStructureBuildRangeInfoKHR))
-> IO Result
vkBuildAccelerationStructuresKHR' = FunPtr
(Ptr Device_T
-> DeferredOperationKHR
-> Flags
-> ("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> ("ppBuildRangeInfos"
::: Ptr (Ptr AccelerationStructureBuildRangeInfoKHR))
-> IO Result)
-> Ptr Device_T
-> DeferredOperationKHR
-> Flags
-> ("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> ("ppBuildRangeInfos"
::: Ptr (Ptr AccelerationStructureBuildRangeInfoKHR))
-> IO Result
mkVkBuildAccelerationStructuresKHR FunPtr
(Ptr Device_T
-> DeferredOperationKHR
-> Flags
-> ("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> ("ppBuildRangeInfos"
::: Ptr (Ptr AccelerationStructureBuildRangeInfoKHR))
-> IO Result)
vkBuildAccelerationStructuresKHRPtr
let pInfosLength :: Int
pInfosLength = ("infos" ::: Vector AccelerationStructureBuildGeometryInfoKHR)
-> Int
forall a. Vector a -> Int
Data.Vector.length (("infos" ::: Vector AccelerationStructureBuildGeometryInfoKHR)
-> Int)
-> ("infos" ::: Vector AccelerationStructureBuildGeometryInfoKHR)
-> Int
forall a b. (a -> b) -> a -> b
$ ("infos" ::: Vector AccelerationStructureBuildGeometryInfoKHR
infos)
IO () -> ContT Result IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT Result IO ()) -> IO () -> ContT Result IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless ((("buildRangeInfos"
::: Vector (Vector AccelerationStructureBuildRangeInfoKHR))
-> Int
forall a. Vector a -> Int
Data.Vector.length (("buildRangeInfos"
::: Vector (Vector AccelerationStructureBuildRangeInfoKHR))
-> Int)
-> ("buildRangeInfos"
::: Vector (Vector AccelerationStructureBuildRangeInfoKHR))
-> Int
forall a b. (a -> b) -> a -> b
$ ("buildRangeInfos"
::: Vector (Vector AccelerationStructureBuildRangeInfoKHR)
buildRangeInfos)) Int -> Int -> Bool
forall a. Eq a => a -> a -> Bool
== Int
pInfosLength) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
IOException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"ppBuildRangeInfos and pInfos must have the same length" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
"pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR
pPInfos <- ((("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> IO Result)
-> IO Result)
-> ContT
Result
IO
("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> IO Result)
-> IO Result)
-> ContT
Result
IO
("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR))
-> ((("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> IO Result)
-> IO Result)
-> ContT
Result
IO
("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
forall a b. (a -> b) -> a -> b
$ forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes @AccelerationStructureBuildGeometryInfoKHR ((("infos" ::: Vector AccelerationStructureBuildGeometryInfoKHR)
-> Int
forall a. Vector a -> Int
Data.Vector.length ("infos" ::: Vector AccelerationStructureBuildGeometryInfoKHR
infos)) Int -> Int -> Int
forall a. Num a => a -> a -> a
* Int
80)
(Int
-> AccelerationStructureBuildGeometryInfoKHR -> ContT Result IO ())
-> ("infos" ::: Vector AccelerationStructureBuildGeometryInfoKHR)
-> ContT Result IO ()
forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\Int
i AccelerationStructureBuildGeometryInfoKHR
e -> ((() -> IO Result) -> IO Result) -> ContT Result IO ()
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((() -> IO Result) -> IO Result) -> ContT Result IO ())
-> ((() -> IO Result) -> IO Result) -> ContT Result IO ()
forall a b. (a -> b) -> a -> b
$ ("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> AccelerationStructureBuildGeometryInfoKHR
-> IO Result
-> IO Result
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct ("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR
pPInfos ("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> Int
-> "pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (Int
80 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr AccelerationStructureBuildGeometryInfoKHR) (AccelerationStructureBuildGeometryInfoKHR
e) (IO Result -> IO Result)
-> ((() -> IO Result) -> IO Result)
-> (() -> IO Result)
-> IO Result
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((() -> IO Result) -> () -> IO Result
forall a b. (a -> b) -> a -> b
$ ())) ("infos" ::: Vector AccelerationStructureBuildGeometryInfoKHR
infos)
"ppBuildRangeInfos"
::: Ptr (Ptr AccelerationStructureBuildRangeInfoKHR)
pPpBuildRangeInfos <- ((("ppBuildRangeInfos"
::: Ptr (Ptr AccelerationStructureBuildRangeInfoKHR))
-> IO Result)
-> IO Result)
-> ContT
Result
IO
("ppBuildRangeInfos"
::: Ptr (Ptr AccelerationStructureBuildRangeInfoKHR))
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("ppBuildRangeInfos"
::: Ptr (Ptr AccelerationStructureBuildRangeInfoKHR))
-> IO Result)
-> IO Result)
-> ContT
Result
IO
("ppBuildRangeInfos"
::: Ptr (Ptr AccelerationStructureBuildRangeInfoKHR)))
-> ((("ppBuildRangeInfos"
::: Ptr (Ptr AccelerationStructureBuildRangeInfoKHR))
-> IO Result)
-> IO Result)
-> ContT
Result
IO
("ppBuildRangeInfos"
::: Ptr (Ptr AccelerationStructureBuildRangeInfoKHR))
forall a b. (a -> b) -> a -> b
$ forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes @(Ptr AccelerationStructureBuildRangeInfoKHR) ((("buildRangeInfos"
::: Vector (Vector AccelerationStructureBuildRangeInfoKHR))
-> Int
forall a. Vector a -> Int
Data.Vector.length ("buildRangeInfos"
::: Vector (Vector AccelerationStructureBuildRangeInfoKHR)
buildRangeInfos)) Int -> Int -> Int
forall a. Num a => a -> a -> a
* Int
8)
(Int
-> Vector AccelerationStructureBuildRangeInfoKHR
-> ContT Result IO ())
-> ("buildRangeInfos"
::: Vector (Vector AccelerationStructureBuildRangeInfoKHR))
-> ContT Result IO ()
forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\Int
i Vector AccelerationStructureBuildRangeInfoKHR
e -> do
Ptr AccelerationStructureBuildRangeInfoKHR
pPpBuildRangeInfos' <- ((Ptr AccelerationStructureBuildRangeInfoKHR -> IO Result)
-> IO Result)
-> ContT Result IO (Ptr AccelerationStructureBuildRangeInfoKHR)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr AccelerationStructureBuildRangeInfoKHR -> IO Result)
-> IO Result)
-> ContT Result IO (Ptr AccelerationStructureBuildRangeInfoKHR))
-> ((Ptr AccelerationStructureBuildRangeInfoKHR -> IO Result)
-> IO Result)
-> ContT Result IO (Ptr AccelerationStructureBuildRangeInfoKHR)
forall a b. (a -> b) -> a -> b
$ forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes @AccelerationStructureBuildRangeInfoKHR ((Vector AccelerationStructureBuildRangeInfoKHR -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector AccelerationStructureBuildRangeInfoKHR
e)) Int -> Int -> Int
forall a. Num a => a -> a -> a
* Int
16)
IO () -> ContT Result IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT Result IO ()) -> IO () -> ContT Result IO ()
forall a b. (a -> b) -> a -> b
$ (Int -> AccelerationStructureBuildRangeInfoKHR -> IO ())
-> Vector AccelerationStructureBuildRangeInfoKHR -> IO ()
forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\Int
i' AccelerationStructureBuildRangeInfoKHR
e' -> Ptr AccelerationStructureBuildRangeInfoKHR
-> AccelerationStructureBuildRangeInfoKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr AccelerationStructureBuildRangeInfoKHR
pPpBuildRangeInfos' Ptr AccelerationStructureBuildRangeInfoKHR
-> Int -> Ptr AccelerationStructureBuildRangeInfoKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (Int
16 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i')) :: Ptr AccelerationStructureBuildRangeInfoKHR) (AccelerationStructureBuildRangeInfoKHR
e')) (Vector AccelerationStructureBuildRangeInfoKHR
e)
IO () -> ContT Result IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT Result IO ()) -> IO () -> ContT Result IO ()
forall a b. (a -> b) -> a -> b
$ ("ppBuildRangeInfos"
::: Ptr (Ptr AccelerationStructureBuildRangeInfoKHR))
-> Ptr AccelerationStructureBuildRangeInfoKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ("ppBuildRangeInfos"
::: Ptr (Ptr AccelerationStructureBuildRangeInfoKHR)
pPpBuildRangeInfos ("ppBuildRangeInfos"
::: Ptr (Ptr AccelerationStructureBuildRangeInfoKHR))
-> Int
-> "ppBuildRangeInfos"
::: Ptr (Ptr AccelerationStructureBuildRangeInfoKHR)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (Int
8 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr (Ptr AccelerationStructureBuildRangeInfoKHR)) (Ptr AccelerationStructureBuildRangeInfoKHR
pPpBuildRangeInfos')) ("buildRangeInfos"
::: Vector (Vector AccelerationStructureBuildRangeInfoKHR)
buildRangeInfos)
Result
r <- IO Result -> ContT Result IO Result
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO Result -> ContT Result IO Result)
-> IO Result -> ContT Result IO Result
forall a b. (a -> b) -> a -> b
$ String -> IO Result -> IO Result
forall a. String -> IO a -> IO a
traceAroundEvent String
"vkBuildAccelerationStructuresKHR" (Ptr Device_T
-> DeferredOperationKHR
-> Flags
-> ("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> ("ppBuildRangeInfos"
::: Ptr (Ptr AccelerationStructureBuildRangeInfoKHR))
-> IO Result
vkBuildAccelerationStructuresKHR'
(Device -> Ptr Device_T
deviceHandle (Device
device))
(DeferredOperationKHR
deferredOperation)
((Int -> Flags
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
pInfosLength :: Word32))
("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR
pPInfos)
("ppBuildRangeInfos"
::: Ptr (Ptr AccelerationStructureBuildRangeInfoKHR)
pPpBuildRangeInfos))
IO () -> ContT Result IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT Result IO ()) -> IO () -> ContT Result IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Result
r Result -> Result -> Bool
forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (VulkanException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (Result -> VulkanException
VulkanException Result
r))
Result -> ContT Result IO Result
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Result -> ContT Result IO Result)
-> Result -> ContT Result IO Result
forall a b. (a -> b) -> a -> b
$ (Result
r)
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkGetAccelerationStructureDeviceAddressKHR
:: FunPtr (Ptr Device_T -> Ptr AccelerationStructureDeviceAddressInfoKHR -> IO DeviceAddress) -> Ptr Device_T -> Ptr AccelerationStructureDeviceAddressInfoKHR -> IO DeviceAddress
getAccelerationStructureDeviceAddressKHR :: forall io
. (MonadIO io)
=>
Device
->
AccelerationStructureDeviceAddressInfoKHR
-> io (DeviceAddress)
getAccelerationStructureDeviceAddressKHR :: forall (io :: * -> *).
MonadIO io =>
Device
-> AccelerationStructureDeviceAddressInfoKHR
-> io ("dataSize" ::: Word64)
getAccelerationStructureDeviceAddressKHR Device
device AccelerationStructureDeviceAddressInfoKHR
info = IO ("dataSize" ::: Word64) -> io ("dataSize" ::: Word64)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO ("dataSize" ::: Word64) -> io ("dataSize" ::: Word64))
-> (ContT ("dataSize" ::: Word64) IO ("dataSize" ::: Word64)
-> IO ("dataSize" ::: Word64))
-> ContT ("dataSize" ::: Word64) IO ("dataSize" ::: Word64)
-> io ("dataSize" ::: Word64)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT ("dataSize" ::: Word64) IO ("dataSize" ::: Word64)
-> IO ("dataSize" ::: Word64)
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT ("dataSize" ::: Word64) IO ("dataSize" ::: Word64)
-> io ("dataSize" ::: Word64))
-> ContT ("dataSize" ::: Word64) IO ("dataSize" ::: Word64)
-> io ("dataSize" ::: Word64)
forall a b. (a -> b) -> a -> b
$ do
let vkGetAccelerationStructureDeviceAddressKHRPtr :: FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr AccelerationStructureDeviceAddressInfoKHR)
-> IO ("dataSize" ::: Word64))
vkGetAccelerationStructureDeviceAddressKHRPtr = DeviceCmds
-> FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr AccelerationStructureDeviceAddressInfoKHR)
-> IO ("dataSize" ::: Word64))
pVkGetAccelerationStructureDeviceAddressKHR (case Device
device of Device{DeviceCmds
deviceCmds :: DeviceCmds
$sel:deviceCmds:Device :: Device -> DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
IO () -> ContT ("dataSize" ::: Word64) IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT ("dataSize" ::: Word64) IO ())
-> IO () -> ContT ("dataSize" ::: Word64) IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr AccelerationStructureDeviceAddressInfoKHR)
-> IO ("dataSize" ::: Word64))
vkGetAccelerationStructureDeviceAddressKHRPtr FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr AccelerationStructureDeviceAddressInfoKHR)
-> IO ("dataSize" ::: Word64))
-> FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr AccelerationStructureDeviceAddressInfoKHR)
-> IO ("dataSize" ::: Word64))
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr AccelerationStructureDeviceAddressInfoKHR)
-> IO ("dataSize" ::: Word64))
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
IOException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkGetAccelerationStructureDeviceAddressKHR is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let vkGetAccelerationStructureDeviceAddressKHR' :: Ptr Device_T
-> ("pInfo" ::: Ptr AccelerationStructureDeviceAddressInfoKHR)
-> IO ("dataSize" ::: Word64)
vkGetAccelerationStructureDeviceAddressKHR' = FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr AccelerationStructureDeviceAddressInfoKHR)
-> IO ("dataSize" ::: Word64))
-> Ptr Device_T
-> ("pInfo" ::: Ptr AccelerationStructureDeviceAddressInfoKHR)
-> IO ("dataSize" ::: Word64)
mkVkGetAccelerationStructureDeviceAddressKHR FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr AccelerationStructureDeviceAddressInfoKHR)
-> IO ("dataSize" ::: Word64))
vkGetAccelerationStructureDeviceAddressKHRPtr
"pInfo" ::: Ptr AccelerationStructureDeviceAddressInfoKHR
pInfo <- ((("pInfo" ::: Ptr AccelerationStructureDeviceAddressInfoKHR)
-> IO ("dataSize" ::: Word64))
-> IO ("dataSize" ::: Word64))
-> ContT
("dataSize" ::: Word64)
IO
("pInfo" ::: Ptr AccelerationStructureDeviceAddressInfoKHR)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pInfo" ::: Ptr AccelerationStructureDeviceAddressInfoKHR)
-> IO ("dataSize" ::: Word64))
-> IO ("dataSize" ::: Word64))
-> ContT
("dataSize" ::: Word64)
IO
("pInfo" ::: Ptr AccelerationStructureDeviceAddressInfoKHR))
-> ((("pInfo" ::: Ptr AccelerationStructureDeviceAddressInfoKHR)
-> IO ("dataSize" ::: Word64))
-> IO ("dataSize" ::: Word64))
-> ContT
("dataSize" ::: Word64)
IO
("pInfo" ::: Ptr AccelerationStructureDeviceAddressInfoKHR)
forall a b. (a -> b) -> a -> b
$ AccelerationStructureDeviceAddressInfoKHR
-> (("pInfo" ::: Ptr AccelerationStructureDeviceAddressInfoKHR)
-> IO ("dataSize" ::: Word64))
-> IO ("dataSize" ::: Word64)
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (AccelerationStructureDeviceAddressInfoKHR
info)
"dataSize" ::: Word64
r <- IO ("dataSize" ::: Word64)
-> ContT ("dataSize" ::: Word64) IO ("dataSize" ::: Word64)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO ("dataSize" ::: Word64)
-> ContT ("dataSize" ::: Word64) IO ("dataSize" ::: Word64))
-> IO ("dataSize" ::: Word64)
-> ContT ("dataSize" ::: Word64) IO ("dataSize" ::: Word64)
forall a b. (a -> b) -> a -> b
$ String -> IO ("dataSize" ::: Word64) -> IO ("dataSize" ::: Word64)
forall a. String -> IO a -> IO a
traceAroundEvent String
"vkGetAccelerationStructureDeviceAddressKHR" (Ptr Device_T
-> ("pInfo" ::: Ptr AccelerationStructureDeviceAddressInfoKHR)
-> IO ("dataSize" ::: Word64)
vkGetAccelerationStructureDeviceAddressKHR'
(Device -> Ptr Device_T
deviceHandle (Device
device))
"pInfo" ::: Ptr AccelerationStructureDeviceAddressInfoKHR
pInfo)
("dataSize" ::: Word64)
-> ContT ("dataSize" ::: Word64) IO ("dataSize" ::: Word64)
forall (f :: * -> *) a. Applicative f => a -> f a
pure (("dataSize" ::: Word64)
-> ContT ("dataSize" ::: Word64) IO ("dataSize" ::: Word64))
-> ("dataSize" ::: Word64)
-> ContT ("dataSize" ::: Word64) IO ("dataSize" ::: Word64)
forall a b. (a -> b) -> a -> b
$ ("dataSize" ::: Word64
r)
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkGetAccelerationStructureBuildSizesKHR
:: FunPtr (Ptr Device_T -> AccelerationStructureBuildTypeKHR -> Ptr AccelerationStructureBuildGeometryInfoKHR -> Ptr Word32 -> Ptr AccelerationStructureBuildSizesInfoKHR -> IO ()) -> Ptr Device_T -> AccelerationStructureBuildTypeKHR -> Ptr AccelerationStructureBuildGeometryInfoKHR -> Ptr Word32 -> Ptr AccelerationStructureBuildSizesInfoKHR -> IO ()
getAccelerationStructureBuildSizesKHR :: forall io
. (MonadIO io)
=>
Device
->
AccelerationStructureBuildTypeKHR
->
("buildInfo" ::: AccelerationStructureBuildGeometryInfoKHR)
->
("maxPrimitiveCounts" ::: Vector Word32)
-> io (("sizeInfo" ::: AccelerationStructureBuildSizesInfoKHR))
getAccelerationStructureBuildSizesKHR :: forall (io :: * -> *).
MonadIO io =>
Device
-> AccelerationStructureBuildTypeKHR
-> AccelerationStructureBuildGeometryInfoKHR
-> ("indirectStrides" ::: Vector Flags)
-> io AccelerationStructureBuildSizesInfoKHR
getAccelerationStructureBuildSizesKHR Device
device
AccelerationStructureBuildTypeKHR
buildType
AccelerationStructureBuildGeometryInfoKHR
buildInfo
"indirectStrides" ::: Vector Flags
maxPrimitiveCounts = IO AccelerationStructureBuildSizesInfoKHR
-> io AccelerationStructureBuildSizesInfoKHR
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO AccelerationStructureBuildSizesInfoKHR
-> io AccelerationStructureBuildSizesInfoKHR)
-> (ContT
AccelerationStructureBuildSizesInfoKHR
IO
AccelerationStructureBuildSizesInfoKHR
-> IO AccelerationStructureBuildSizesInfoKHR)
-> ContT
AccelerationStructureBuildSizesInfoKHR
IO
AccelerationStructureBuildSizesInfoKHR
-> io AccelerationStructureBuildSizesInfoKHR
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT
AccelerationStructureBuildSizesInfoKHR
IO
AccelerationStructureBuildSizesInfoKHR
-> IO AccelerationStructureBuildSizesInfoKHR
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT
AccelerationStructureBuildSizesInfoKHR
IO
AccelerationStructureBuildSizesInfoKHR
-> io AccelerationStructureBuildSizesInfoKHR)
-> ContT
AccelerationStructureBuildSizesInfoKHR
IO
AccelerationStructureBuildSizesInfoKHR
-> io AccelerationStructureBuildSizesInfoKHR
forall a b. (a -> b) -> a -> b
$ do
let vkGetAccelerationStructureBuildSizesKHRPtr :: FunPtr
(Ptr Device_T
-> AccelerationStructureBuildTypeKHR
-> ("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> ("pIndirectStrides" ::: Ptr Flags)
-> ("pSizeInfo" ::: Ptr AccelerationStructureBuildSizesInfoKHR)
-> IO ())
vkGetAccelerationStructureBuildSizesKHRPtr = DeviceCmds
-> FunPtr
(Ptr Device_T
-> AccelerationStructureBuildTypeKHR
-> ("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> ("pIndirectStrides" ::: Ptr Flags)
-> ("pSizeInfo" ::: Ptr AccelerationStructureBuildSizesInfoKHR)
-> IO ())
pVkGetAccelerationStructureBuildSizesKHR (case Device
device of Device{DeviceCmds
deviceCmds :: DeviceCmds
$sel:deviceCmds:Device :: Device -> DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
IO () -> ContT AccelerationStructureBuildSizesInfoKHR IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT AccelerationStructureBuildSizesInfoKHR IO ())
-> IO () -> ContT AccelerationStructureBuildSizesInfoKHR IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr Device_T
-> AccelerationStructureBuildTypeKHR
-> ("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> ("pIndirectStrides" ::: Ptr Flags)
-> ("pSizeInfo" ::: Ptr AccelerationStructureBuildSizesInfoKHR)
-> IO ())
vkGetAccelerationStructureBuildSizesKHRPtr FunPtr
(Ptr Device_T
-> AccelerationStructureBuildTypeKHR
-> ("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> ("pIndirectStrides" ::: Ptr Flags)
-> ("pSizeInfo" ::: Ptr AccelerationStructureBuildSizesInfoKHR)
-> IO ())
-> FunPtr
(Ptr Device_T
-> AccelerationStructureBuildTypeKHR
-> ("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> ("pIndirectStrides" ::: Ptr Flags)
-> ("pSizeInfo" ::: Ptr AccelerationStructureBuildSizesInfoKHR)
-> IO ())
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr Device_T
-> AccelerationStructureBuildTypeKHR
-> ("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> ("pIndirectStrides" ::: Ptr Flags)
-> ("pSizeInfo" ::: Ptr AccelerationStructureBuildSizesInfoKHR)
-> IO ())
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
IOException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkGetAccelerationStructureBuildSizesKHR is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let vkGetAccelerationStructureBuildSizesKHR' :: Ptr Device_T
-> AccelerationStructureBuildTypeKHR
-> ("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> ("pIndirectStrides" ::: Ptr Flags)
-> ("pSizeInfo" ::: Ptr AccelerationStructureBuildSizesInfoKHR)
-> IO ()
vkGetAccelerationStructureBuildSizesKHR' = FunPtr
(Ptr Device_T
-> AccelerationStructureBuildTypeKHR
-> ("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> ("pIndirectStrides" ::: Ptr Flags)
-> ("pSizeInfo" ::: Ptr AccelerationStructureBuildSizesInfoKHR)
-> IO ())
-> Ptr Device_T
-> AccelerationStructureBuildTypeKHR
-> ("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> ("pIndirectStrides" ::: Ptr Flags)
-> ("pSizeInfo" ::: Ptr AccelerationStructureBuildSizesInfoKHR)
-> IO ()
mkVkGetAccelerationStructureBuildSizesKHR FunPtr
(Ptr Device_T
-> AccelerationStructureBuildTypeKHR
-> ("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> ("pIndirectStrides" ::: Ptr Flags)
-> ("pSizeInfo" ::: Ptr AccelerationStructureBuildSizesInfoKHR)
-> IO ())
vkGetAccelerationStructureBuildSizesKHRPtr
"pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR
pBuildInfo <- ((("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> IO AccelerationStructureBuildSizesInfoKHR)
-> IO AccelerationStructureBuildSizesInfoKHR)
-> ContT
AccelerationStructureBuildSizesInfoKHR
IO
("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> IO AccelerationStructureBuildSizesInfoKHR)
-> IO AccelerationStructureBuildSizesInfoKHR)
-> ContT
AccelerationStructureBuildSizesInfoKHR
IO
("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR))
-> ((("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> IO AccelerationStructureBuildSizesInfoKHR)
-> IO AccelerationStructureBuildSizesInfoKHR)
-> ContT
AccelerationStructureBuildSizesInfoKHR
IO
("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
forall a b. (a -> b) -> a -> b
$ AccelerationStructureBuildGeometryInfoKHR
-> (("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> IO AccelerationStructureBuildSizesInfoKHR)
-> IO AccelerationStructureBuildSizesInfoKHR
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (AccelerationStructureBuildGeometryInfoKHR
buildInfo)
"pIndirectStrides" ::: Ptr Flags
pMaxPrimitiveCounts <- if ("indirectStrides" ::: Vector Flags) -> Bool
forall a. Vector a -> Bool
Data.Vector.null ("indirectStrides" ::: Vector Flags
maxPrimitiveCounts)
then ("pIndirectStrides" ::: Ptr Flags)
-> ContT
AccelerationStructureBuildSizesInfoKHR
IO
("pIndirectStrides" ::: Ptr Flags)
forall (f :: * -> *) a. Applicative f => a -> f a
pure "pIndirectStrides" ::: Ptr Flags
forall a. Ptr a
nullPtr
else do
"pIndirectStrides" ::: Ptr Flags
pPMaxPrimitiveCounts <- ((("pIndirectStrides" ::: Ptr Flags)
-> IO AccelerationStructureBuildSizesInfoKHR)
-> IO AccelerationStructureBuildSizesInfoKHR)
-> ContT
AccelerationStructureBuildSizesInfoKHR
IO
("pIndirectStrides" ::: Ptr Flags)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pIndirectStrides" ::: Ptr Flags)
-> IO AccelerationStructureBuildSizesInfoKHR)
-> IO AccelerationStructureBuildSizesInfoKHR)
-> ContT
AccelerationStructureBuildSizesInfoKHR
IO
("pIndirectStrides" ::: Ptr Flags))
-> ((("pIndirectStrides" ::: Ptr Flags)
-> IO AccelerationStructureBuildSizesInfoKHR)
-> IO AccelerationStructureBuildSizesInfoKHR)
-> ContT
AccelerationStructureBuildSizesInfoKHR
IO
("pIndirectStrides" ::: Ptr Flags)
forall a b. (a -> b) -> a -> b
$ forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes @Word32 (((("indirectStrides" ::: Vector Flags) -> Int
forall a. Vector a -> Int
Data.Vector.length ("indirectStrides" ::: Vector Flags
maxPrimitiveCounts))) Int -> Int -> Int
forall a. Num a => a -> a -> a
* Int
4)
IO () -> ContT AccelerationStructureBuildSizesInfoKHR IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT AccelerationStructureBuildSizesInfoKHR IO ())
-> IO () -> ContT AccelerationStructureBuildSizesInfoKHR IO ()
forall a b. (a -> b) -> a -> b
$ (Int -> Flags -> IO ())
-> ("indirectStrides" ::: Vector Flags) -> IO ()
forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\Int
i Flags
e -> ("pIndirectStrides" ::: Ptr Flags) -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ("pIndirectStrides" ::: Ptr Flags
pPMaxPrimitiveCounts ("pIndirectStrides" ::: Ptr Flags)
-> Int -> "pIndirectStrides" ::: Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (Int
4 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr Word32) (Flags
e)) (("indirectStrides" ::: Vector Flags
maxPrimitiveCounts))
("pIndirectStrides" ::: Ptr Flags)
-> ContT
AccelerationStructureBuildSizesInfoKHR
IO
("pIndirectStrides" ::: Ptr Flags)
forall (f :: * -> *) a. Applicative f => a -> f a
pure (("pIndirectStrides" ::: Ptr Flags)
-> ContT
AccelerationStructureBuildSizesInfoKHR
IO
("pIndirectStrides" ::: Ptr Flags))
-> ("pIndirectStrides" ::: Ptr Flags)
-> ContT
AccelerationStructureBuildSizesInfoKHR
IO
("pIndirectStrides" ::: Ptr Flags)
forall a b. (a -> b) -> a -> b
$ "pIndirectStrides" ::: Ptr Flags
pPMaxPrimitiveCounts
"pSizeInfo" ::: Ptr AccelerationStructureBuildSizesInfoKHR
pPSizeInfo <- ((("pSizeInfo" ::: Ptr AccelerationStructureBuildSizesInfoKHR)
-> IO AccelerationStructureBuildSizesInfoKHR)
-> IO AccelerationStructureBuildSizesInfoKHR)
-> ContT
AccelerationStructureBuildSizesInfoKHR
IO
("pSizeInfo" ::: Ptr AccelerationStructureBuildSizesInfoKHR)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (forall a b. ToCStruct a => (Ptr a -> IO b) -> IO b
withZeroCStruct @AccelerationStructureBuildSizesInfoKHR)
IO () -> ContT AccelerationStructureBuildSizesInfoKHR IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT AccelerationStructureBuildSizesInfoKHR IO ())
-> IO () -> ContT AccelerationStructureBuildSizesInfoKHR IO ()
forall a b. (a -> b) -> a -> b
$ String -> IO () -> IO ()
forall a. String -> IO a -> IO a
traceAroundEvent String
"vkGetAccelerationStructureBuildSizesKHR" (Ptr Device_T
-> AccelerationStructureBuildTypeKHR
-> ("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> ("pIndirectStrides" ::: Ptr Flags)
-> ("pSizeInfo" ::: Ptr AccelerationStructureBuildSizesInfoKHR)
-> IO ()
vkGetAccelerationStructureBuildSizesKHR'
(Device -> Ptr Device_T
deviceHandle (Device
device))
(AccelerationStructureBuildTypeKHR
buildType)
"pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR
pBuildInfo
"pIndirectStrides" ::: Ptr Flags
pMaxPrimitiveCounts
("pSizeInfo" ::: Ptr AccelerationStructureBuildSizesInfoKHR
pPSizeInfo))
AccelerationStructureBuildSizesInfoKHR
pSizeInfo <- IO AccelerationStructureBuildSizesInfoKHR
-> ContT
AccelerationStructureBuildSizesInfoKHR
IO
AccelerationStructureBuildSizesInfoKHR
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO AccelerationStructureBuildSizesInfoKHR
-> ContT
AccelerationStructureBuildSizesInfoKHR
IO
AccelerationStructureBuildSizesInfoKHR)
-> IO AccelerationStructureBuildSizesInfoKHR
-> ContT
AccelerationStructureBuildSizesInfoKHR
IO
AccelerationStructureBuildSizesInfoKHR
forall a b. (a -> b) -> a -> b
$ forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @AccelerationStructureBuildSizesInfoKHR "pSizeInfo" ::: Ptr AccelerationStructureBuildSizesInfoKHR
pPSizeInfo
AccelerationStructureBuildSizesInfoKHR
-> ContT
AccelerationStructureBuildSizesInfoKHR
IO
AccelerationStructureBuildSizesInfoKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure (AccelerationStructureBuildSizesInfoKHR
-> ContT
AccelerationStructureBuildSizesInfoKHR
IO
AccelerationStructureBuildSizesInfoKHR)
-> AccelerationStructureBuildSizesInfoKHR
-> ContT
AccelerationStructureBuildSizesInfoKHR
IO
AccelerationStructureBuildSizesInfoKHR
forall a b. (a -> b) -> a -> b
$ (AccelerationStructureBuildSizesInfoKHR
pSizeInfo)
pattern $bGEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_KHR :: GeometryInstanceFlagBitsKHR
$mGEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_KHR :: forall {r}.
GeometryInstanceFlagBitsKHR -> (Void# -> r) -> (Void# -> r) -> r
GEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_KHR = GEOMETRY_INSTANCE_TRIANGLE_FLIP_FACING_BIT_KHR
data WriteDescriptorSetAccelerationStructureKHR = WriteDescriptorSetAccelerationStructureKHR
{
WriteDescriptorSetAccelerationStructureKHR
-> "accelerationStructures" ::: Vector AccelerationStructureKHR
accelerationStructures :: Vector AccelerationStructureKHR }
deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (WriteDescriptorSetAccelerationStructureKHR)
#endif
deriving instance Show WriteDescriptorSetAccelerationStructureKHR
instance ToCStruct WriteDescriptorSetAccelerationStructureKHR where
withCStruct :: forall b.
WriteDescriptorSetAccelerationStructureKHR
-> (Ptr WriteDescriptorSetAccelerationStructureKHR -> IO b) -> IO b
withCStruct WriteDescriptorSetAccelerationStructureKHR
x Ptr WriteDescriptorSetAccelerationStructureKHR -> IO b
f = Int
-> (Ptr WriteDescriptorSetAccelerationStructureKHR -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
32 ((Ptr WriteDescriptorSetAccelerationStructureKHR -> IO b) -> IO b)
-> (Ptr WriteDescriptorSetAccelerationStructureKHR -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr WriteDescriptorSetAccelerationStructureKHR
p -> Ptr WriteDescriptorSetAccelerationStructureKHR
-> WriteDescriptorSetAccelerationStructureKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr WriteDescriptorSetAccelerationStructureKHR
p WriteDescriptorSetAccelerationStructureKHR
x (Ptr WriteDescriptorSetAccelerationStructureKHR -> IO b
f Ptr WriteDescriptorSetAccelerationStructureKHR
p)
pokeCStruct :: forall b.
Ptr WriteDescriptorSetAccelerationStructureKHR
-> WriteDescriptorSetAccelerationStructureKHR -> IO b -> IO b
pokeCStruct Ptr WriteDescriptorSetAccelerationStructureKHR
p WriteDescriptorSetAccelerationStructureKHR{"accelerationStructures" ::: Vector AccelerationStructureKHR
accelerationStructures :: "accelerationStructures" ::: Vector AccelerationStructureKHR
$sel:accelerationStructures:WriteDescriptorSetAccelerationStructureKHR :: WriteDescriptorSetAccelerationStructureKHR
-> "accelerationStructures" ::: Vector AccelerationStructureKHR
..} IO b
f = ContT b IO b -> IO b
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT b IO b -> IO b) -> ContT b IO b -> IO b
forall a b. (a -> b) -> a -> b
$ do
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr WriteDescriptorSetAccelerationStructureKHR
p Ptr WriteDescriptorSetAccelerationStructureKHR
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_KHR)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr ("data" ::: Ptr ()) -> ("data" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr WriteDescriptorSetAccelerationStructureKHR
p Ptr WriteDescriptorSetAccelerationStructureKHR
-> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) ("data" ::: Ptr ()
forall a. Ptr a
nullPtr)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ ("pIndirectStrides" ::: Ptr Flags) -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr WriteDescriptorSetAccelerationStructureKHR
p Ptr WriteDescriptorSetAccelerationStructureKHR
-> Int -> "pIndirectStrides" ::: Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32)) ((Int -> Flags
forall a b. (Integral a, Num b) => a -> b
fromIntegral (("accelerationStructures" ::: Vector AccelerationStructureKHR)
-> Int
forall a. Vector a -> Int
Data.Vector.length (("accelerationStructures" ::: Vector AccelerationStructureKHR)
-> Int)
-> ("accelerationStructures" ::: Vector AccelerationStructureKHR)
-> Int
forall a b. (a -> b) -> a -> b
$ ("accelerationStructures" ::: Vector AccelerationStructureKHR
accelerationStructures)) :: Word32))
"pAccelerationStructures" ::: Ptr AccelerationStructureKHR
pPAccelerationStructures' <- ((("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> IO b)
-> IO b)
-> ContT
b IO ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> IO b)
-> IO b)
-> ContT
b IO ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR))
-> ((("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> IO b)
-> IO b)
-> ContT
b IO ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
forall a b. (a -> b) -> a -> b
$ forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes @AccelerationStructureKHR ((("accelerationStructures" ::: Vector AccelerationStructureKHR)
-> Int
forall a. Vector a -> Int
Data.Vector.length ("accelerationStructures" ::: Vector AccelerationStructureKHR
accelerationStructures)) Int -> Int -> Int
forall a. Num a => a -> a -> a
* Int
8)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ (Int -> AccelerationStructureKHR -> IO ())
-> ("accelerationStructures" ::: Vector AccelerationStructureKHR)
-> IO ()
forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\Int
i AccelerationStructureKHR
e -> ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> AccelerationStructureKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR
pPAccelerationStructures' ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> Int
-> "pAccelerationStructures" ::: Ptr AccelerationStructureKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (Int
8 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr AccelerationStructureKHR) (AccelerationStructureKHR
e)) ("accelerationStructures" ::: Vector AccelerationStructureKHR
accelerationStructures)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr WriteDescriptorSetAccelerationStructureKHR
p Ptr WriteDescriptorSetAccelerationStructureKHR
-> Int
-> Ptr ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr (Ptr AccelerationStructureKHR))) ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR
pPAccelerationStructures')
IO b -> ContT b IO b
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO b -> ContT b IO b) -> IO b -> ContT b IO b
forall a b. (a -> b) -> a -> b
$ IO b
f
cStructSize :: Int
cStructSize = Int
32
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
Ptr WriteDescriptorSetAccelerationStructureKHR -> IO b -> IO b
pokeZeroCStruct Ptr WriteDescriptorSetAccelerationStructureKHR
p IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr WriteDescriptorSetAccelerationStructureKHR
p Ptr WriteDescriptorSetAccelerationStructureKHR
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_KHR)
Ptr ("data" ::: Ptr ()) -> ("data" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr WriteDescriptorSetAccelerationStructureKHR
p Ptr WriteDescriptorSetAccelerationStructureKHR
-> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) ("data" ::: Ptr ()
forall a. Ptr a
nullPtr)
IO b
f
instance FromCStruct WriteDescriptorSetAccelerationStructureKHR where
peekCStruct :: Ptr WriteDescriptorSetAccelerationStructureKHR
-> IO WriteDescriptorSetAccelerationStructureKHR
peekCStruct Ptr WriteDescriptorSetAccelerationStructureKHR
p = do
Flags
accelerationStructureCount <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr WriteDescriptorSetAccelerationStructureKHR
p Ptr WriteDescriptorSetAccelerationStructureKHR
-> Int -> "pIndirectStrides" ::: Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32))
"pAccelerationStructures" ::: Ptr AccelerationStructureKHR
pAccelerationStructures <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr AccelerationStructureKHR) ((Ptr WriteDescriptorSetAccelerationStructureKHR
p Ptr WriteDescriptorSetAccelerationStructureKHR
-> Int
-> Ptr ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr (Ptr AccelerationStructureKHR)))
"accelerationStructures" ::: Vector AccelerationStructureKHR
pAccelerationStructures' <- Int
-> (Int -> IO AccelerationStructureKHR)
-> IO
("accelerationStructures" ::: Vector AccelerationStructureKHR)
forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
generateM (Flags -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral Flags
accelerationStructureCount) (\Int
i -> forall a. Storable a => Ptr a -> IO a
peek @AccelerationStructureKHR (("pAccelerationStructures" ::: Ptr AccelerationStructureKHR
pAccelerationStructures ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> Int
-> "pAccelerationStructures" ::: Ptr AccelerationStructureKHR
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
8 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr AccelerationStructureKHR)))
WriteDescriptorSetAccelerationStructureKHR
-> IO WriteDescriptorSetAccelerationStructureKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure (WriteDescriptorSetAccelerationStructureKHR
-> IO WriteDescriptorSetAccelerationStructureKHR)
-> WriteDescriptorSetAccelerationStructureKHR
-> IO WriteDescriptorSetAccelerationStructureKHR
forall a b. (a -> b) -> a -> b
$ ("accelerationStructures" ::: Vector AccelerationStructureKHR)
-> WriteDescriptorSetAccelerationStructureKHR
WriteDescriptorSetAccelerationStructureKHR
"accelerationStructures" ::: Vector AccelerationStructureKHR
pAccelerationStructures'
instance Zero WriteDescriptorSetAccelerationStructureKHR where
zero :: WriteDescriptorSetAccelerationStructureKHR
zero = ("accelerationStructures" ::: Vector AccelerationStructureKHR)
-> WriteDescriptorSetAccelerationStructureKHR
WriteDescriptorSetAccelerationStructureKHR
"accelerationStructures" ::: Vector AccelerationStructureKHR
forall a. Monoid a => a
mempty
data PhysicalDeviceAccelerationStructureFeaturesKHR = PhysicalDeviceAccelerationStructureFeaturesKHR
{
PhysicalDeviceAccelerationStructureFeaturesKHR -> Bool
accelerationStructure :: Bool
,
PhysicalDeviceAccelerationStructureFeaturesKHR -> Bool
accelerationStructureCaptureReplay :: Bool
,
PhysicalDeviceAccelerationStructureFeaturesKHR -> Bool
accelerationStructureIndirectBuild :: Bool
,
PhysicalDeviceAccelerationStructureFeaturesKHR -> Bool
accelerationStructureHostCommands :: Bool
,
PhysicalDeviceAccelerationStructureFeaturesKHR -> Bool
descriptorBindingAccelerationStructureUpdateAfterBind :: Bool
}
deriving (Typeable, PhysicalDeviceAccelerationStructureFeaturesKHR
-> PhysicalDeviceAccelerationStructureFeaturesKHR -> Bool
(PhysicalDeviceAccelerationStructureFeaturesKHR
-> PhysicalDeviceAccelerationStructureFeaturesKHR -> Bool)
-> (PhysicalDeviceAccelerationStructureFeaturesKHR
-> PhysicalDeviceAccelerationStructureFeaturesKHR -> Bool)
-> Eq PhysicalDeviceAccelerationStructureFeaturesKHR
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PhysicalDeviceAccelerationStructureFeaturesKHR
-> PhysicalDeviceAccelerationStructureFeaturesKHR -> Bool
$c/= :: PhysicalDeviceAccelerationStructureFeaturesKHR
-> PhysicalDeviceAccelerationStructureFeaturesKHR -> Bool
== :: PhysicalDeviceAccelerationStructureFeaturesKHR
-> PhysicalDeviceAccelerationStructureFeaturesKHR -> Bool
$c== :: PhysicalDeviceAccelerationStructureFeaturesKHR
-> PhysicalDeviceAccelerationStructureFeaturesKHR -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceAccelerationStructureFeaturesKHR)
#endif
deriving instance Show PhysicalDeviceAccelerationStructureFeaturesKHR
instance ToCStruct PhysicalDeviceAccelerationStructureFeaturesKHR where
withCStruct :: forall b.
PhysicalDeviceAccelerationStructureFeaturesKHR
-> (Ptr PhysicalDeviceAccelerationStructureFeaturesKHR -> IO b)
-> IO b
withCStruct PhysicalDeviceAccelerationStructureFeaturesKHR
x Ptr PhysicalDeviceAccelerationStructureFeaturesKHR -> IO b
f = Int
-> (Ptr PhysicalDeviceAccelerationStructureFeaturesKHR -> IO b)
-> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
40 ((Ptr PhysicalDeviceAccelerationStructureFeaturesKHR -> IO b)
-> IO b)
-> (Ptr PhysicalDeviceAccelerationStructureFeaturesKHR -> IO b)
-> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr PhysicalDeviceAccelerationStructureFeaturesKHR
p -> Ptr PhysicalDeviceAccelerationStructureFeaturesKHR
-> PhysicalDeviceAccelerationStructureFeaturesKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceAccelerationStructureFeaturesKHR
p PhysicalDeviceAccelerationStructureFeaturesKHR
x (Ptr PhysicalDeviceAccelerationStructureFeaturesKHR -> IO b
f Ptr PhysicalDeviceAccelerationStructureFeaturesKHR
p)
pokeCStruct :: forall b.
Ptr PhysicalDeviceAccelerationStructureFeaturesKHR
-> PhysicalDeviceAccelerationStructureFeaturesKHR -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceAccelerationStructureFeaturesKHR
p PhysicalDeviceAccelerationStructureFeaturesKHR{Bool
descriptorBindingAccelerationStructureUpdateAfterBind :: Bool
accelerationStructureHostCommands :: Bool
accelerationStructureIndirectBuild :: Bool
accelerationStructureCaptureReplay :: Bool
accelerationStructure :: Bool
$sel:descriptorBindingAccelerationStructureUpdateAfterBind:PhysicalDeviceAccelerationStructureFeaturesKHR :: PhysicalDeviceAccelerationStructureFeaturesKHR -> Bool
$sel:accelerationStructureHostCommands:PhysicalDeviceAccelerationStructureFeaturesKHR :: PhysicalDeviceAccelerationStructureFeaturesKHR -> Bool
$sel:accelerationStructureIndirectBuild:PhysicalDeviceAccelerationStructureFeaturesKHR :: PhysicalDeviceAccelerationStructureFeaturesKHR -> Bool
$sel:accelerationStructureCaptureReplay:PhysicalDeviceAccelerationStructureFeaturesKHR :: PhysicalDeviceAccelerationStructureFeaturesKHR -> Bool
$sel:accelerationStructure:PhysicalDeviceAccelerationStructureFeaturesKHR :: PhysicalDeviceAccelerationStructureFeaturesKHR -> Bool
..} IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceAccelerationStructureFeaturesKHR
p Ptr PhysicalDeviceAccelerationStructureFeaturesKHR
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_FEATURES_KHR)
Ptr ("data" ::: Ptr ()) -> ("data" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceAccelerationStructureFeaturesKHR
p Ptr PhysicalDeviceAccelerationStructureFeaturesKHR
-> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) ("data" ::: Ptr ()
forall a. Ptr a
nullPtr)
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceAccelerationStructureFeaturesKHR
p Ptr PhysicalDeviceAccelerationStructureFeaturesKHR
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
accelerationStructure))
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceAccelerationStructureFeaturesKHR
p Ptr PhysicalDeviceAccelerationStructureFeaturesKHR
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
accelerationStructureCaptureReplay))
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceAccelerationStructureFeaturesKHR
p Ptr PhysicalDeviceAccelerationStructureFeaturesKHR
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
accelerationStructureIndirectBuild))
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceAccelerationStructureFeaturesKHR
p Ptr PhysicalDeviceAccelerationStructureFeaturesKHR
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
accelerationStructureHostCommands))
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceAccelerationStructureFeaturesKHR
p Ptr PhysicalDeviceAccelerationStructureFeaturesKHR
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
descriptorBindingAccelerationStructureUpdateAfterBind))
IO b
f
cStructSize :: Int
cStructSize = Int
40
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
Ptr PhysicalDeviceAccelerationStructureFeaturesKHR -> IO b -> IO b
pokeZeroCStruct Ptr PhysicalDeviceAccelerationStructureFeaturesKHR
p IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceAccelerationStructureFeaturesKHR
p Ptr PhysicalDeviceAccelerationStructureFeaturesKHR
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_FEATURES_KHR)
Ptr ("data" ::: Ptr ()) -> ("data" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceAccelerationStructureFeaturesKHR
p Ptr PhysicalDeviceAccelerationStructureFeaturesKHR
-> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) ("data" ::: Ptr ()
forall a. Ptr a
nullPtr)
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceAccelerationStructureFeaturesKHR
p Ptr PhysicalDeviceAccelerationStructureFeaturesKHR
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceAccelerationStructureFeaturesKHR
p Ptr PhysicalDeviceAccelerationStructureFeaturesKHR
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceAccelerationStructureFeaturesKHR
p Ptr PhysicalDeviceAccelerationStructureFeaturesKHR
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceAccelerationStructureFeaturesKHR
p Ptr PhysicalDeviceAccelerationStructureFeaturesKHR
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceAccelerationStructureFeaturesKHR
p Ptr PhysicalDeviceAccelerationStructureFeaturesKHR
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
IO b
f
instance FromCStruct PhysicalDeviceAccelerationStructureFeaturesKHR where
peekCStruct :: Ptr PhysicalDeviceAccelerationStructureFeaturesKHR
-> IO PhysicalDeviceAccelerationStructureFeaturesKHR
peekCStruct Ptr PhysicalDeviceAccelerationStructureFeaturesKHR
p = do
Bool32
accelerationStructure <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceAccelerationStructureFeaturesKHR
p Ptr PhysicalDeviceAccelerationStructureFeaturesKHR
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32))
Bool32
accelerationStructureCaptureReplay <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceAccelerationStructureFeaturesKHR
p Ptr PhysicalDeviceAccelerationStructureFeaturesKHR
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Bool32))
Bool32
accelerationStructureIndirectBuild <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceAccelerationStructureFeaturesKHR
p Ptr PhysicalDeviceAccelerationStructureFeaturesKHR
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Bool32))
Bool32
accelerationStructureHostCommands <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceAccelerationStructureFeaturesKHR
p Ptr PhysicalDeviceAccelerationStructureFeaturesKHR
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr Bool32))
Bool32
descriptorBindingAccelerationStructureUpdateAfterBind <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceAccelerationStructureFeaturesKHR
p Ptr PhysicalDeviceAccelerationStructureFeaturesKHR
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Bool32))
PhysicalDeviceAccelerationStructureFeaturesKHR
-> IO PhysicalDeviceAccelerationStructureFeaturesKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure (PhysicalDeviceAccelerationStructureFeaturesKHR
-> IO PhysicalDeviceAccelerationStructureFeaturesKHR)
-> PhysicalDeviceAccelerationStructureFeaturesKHR
-> IO PhysicalDeviceAccelerationStructureFeaturesKHR
forall a b. (a -> b) -> a -> b
$ Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> PhysicalDeviceAccelerationStructureFeaturesKHR
PhysicalDeviceAccelerationStructureFeaturesKHR
(Bool32 -> Bool
bool32ToBool Bool32
accelerationStructure)
(Bool32 -> Bool
bool32ToBool Bool32
accelerationStructureCaptureReplay)
(Bool32 -> Bool
bool32ToBool Bool32
accelerationStructureIndirectBuild)
(Bool32 -> Bool
bool32ToBool Bool32
accelerationStructureHostCommands)
(Bool32 -> Bool
bool32ToBool Bool32
descriptorBindingAccelerationStructureUpdateAfterBind)
instance Storable PhysicalDeviceAccelerationStructureFeaturesKHR where
sizeOf :: PhysicalDeviceAccelerationStructureFeaturesKHR -> Int
sizeOf ~PhysicalDeviceAccelerationStructureFeaturesKHR
_ = Int
40
alignment :: PhysicalDeviceAccelerationStructureFeaturesKHR -> Int
alignment ~PhysicalDeviceAccelerationStructureFeaturesKHR
_ = Int
8
peek :: Ptr PhysicalDeviceAccelerationStructureFeaturesKHR
-> IO PhysicalDeviceAccelerationStructureFeaturesKHR
peek = Ptr PhysicalDeviceAccelerationStructureFeaturesKHR
-> IO PhysicalDeviceAccelerationStructureFeaturesKHR
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr PhysicalDeviceAccelerationStructureFeaturesKHR
-> PhysicalDeviceAccelerationStructureFeaturesKHR -> IO ()
poke Ptr PhysicalDeviceAccelerationStructureFeaturesKHR
ptr PhysicalDeviceAccelerationStructureFeaturesKHR
poked = Ptr PhysicalDeviceAccelerationStructureFeaturesKHR
-> PhysicalDeviceAccelerationStructureFeaturesKHR -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceAccelerationStructureFeaturesKHR
ptr PhysicalDeviceAccelerationStructureFeaturesKHR
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PhysicalDeviceAccelerationStructureFeaturesKHR where
zero :: PhysicalDeviceAccelerationStructureFeaturesKHR
zero = Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> PhysicalDeviceAccelerationStructureFeaturesKHR
PhysicalDeviceAccelerationStructureFeaturesKHR
Bool
forall a. Zero a => a
zero
Bool
forall a. Zero a => a
zero
Bool
forall a. Zero a => a
zero
Bool
forall a. Zero a => a
zero
Bool
forall a. Zero a => a
zero
data PhysicalDeviceAccelerationStructurePropertiesKHR = PhysicalDeviceAccelerationStructurePropertiesKHR
{
PhysicalDeviceAccelerationStructurePropertiesKHR
-> "dataSize" ::: Word64
maxGeometryCount :: Word64
,
PhysicalDeviceAccelerationStructurePropertiesKHR
-> "dataSize" ::: Word64
maxInstanceCount :: Word64
,
PhysicalDeviceAccelerationStructurePropertiesKHR
-> "dataSize" ::: Word64
maxPrimitiveCount :: Word64
,
PhysicalDeviceAccelerationStructurePropertiesKHR -> Flags
maxPerStageDescriptorAccelerationStructures :: Word32
,
PhysicalDeviceAccelerationStructurePropertiesKHR -> Flags
maxPerStageDescriptorUpdateAfterBindAccelerationStructures :: Word32
,
PhysicalDeviceAccelerationStructurePropertiesKHR -> Flags
maxDescriptorSetAccelerationStructures :: Word32
,
PhysicalDeviceAccelerationStructurePropertiesKHR -> Flags
maxDescriptorSetUpdateAfterBindAccelerationStructures :: Word32
,
PhysicalDeviceAccelerationStructurePropertiesKHR -> Flags
minAccelerationStructureScratchOffsetAlignment :: Word32
}
deriving (Typeable, PhysicalDeviceAccelerationStructurePropertiesKHR
-> PhysicalDeviceAccelerationStructurePropertiesKHR -> Bool
(PhysicalDeviceAccelerationStructurePropertiesKHR
-> PhysicalDeviceAccelerationStructurePropertiesKHR -> Bool)
-> (PhysicalDeviceAccelerationStructurePropertiesKHR
-> PhysicalDeviceAccelerationStructurePropertiesKHR -> Bool)
-> Eq PhysicalDeviceAccelerationStructurePropertiesKHR
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PhysicalDeviceAccelerationStructurePropertiesKHR
-> PhysicalDeviceAccelerationStructurePropertiesKHR -> Bool
$c/= :: PhysicalDeviceAccelerationStructurePropertiesKHR
-> PhysicalDeviceAccelerationStructurePropertiesKHR -> Bool
== :: PhysicalDeviceAccelerationStructurePropertiesKHR
-> PhysicalDeviceAccelerationStructurePropertiesKHR -> Bool
$c== :: PhysicalDeviceAccelerationStructurePropertiesKHR
-> PhysicalDeviceAccelerationStructurePropertiesKHR -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceAccelerationStructurePropertiesKHR)
#endif
deriving instance Show PhysicalDeviceAccelerationStructurePropertiesKHR
instance ToCStruct PhysicalDeviceAccelerationStructurePropertiesKHR where
withCStruct :: forall b.
PhysicalDeviceAccelerationStructurePropertiesKHR
-> (Ptr PhysicalDeviceAccelerationStructurePropertiesKHR -> IO b)
-> IO b
withCStruct PhysicalDeviceAccelerationStructurePropertiesKHR
x Ptr PhysicalDeviceAccelerationStructurePropertiesKHR -> IO b
f = Int
-> (Ptr PhysicalDeviceAccelerationStructurePropertiesKHR -> IO b)
-> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
64 ((Ptr PhysicalDeviceAccelerationStructurePropertiesKHR -> IO b)
-> IO b)
-> (Ptr PhysicalDeviceAccelerationStructurePropertiesKHR -> IO b)
-> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr PhysicalDeviceAccelerationStructurePropertiesKHR
p -> Ptr PhysicalDeviceAccelerationStructurePropertiesKHR
-> PhysicalDeviceAccelerationStructurePropertiesKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceAccelerationStructurePropertiesKHR
p PhysicalDeviceAccelerationStructurePropertiesKHR
x (Ptr PhysicalDeviceAccelerationStructurePropertiesKHR -> IO b
f Ptr PhysicalDeviceAccelerationStructurePropertiesKHR
p)
pokeCStruct :: forall b.
Ptr PhysicalDeviceAccelerationStructurePropertiesKHR
-> PhysicalDeviceAccelerationStructurePropertiesKHR -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceAccelerationStructurePropertiesKHR
p PhysicalDeviceAccelerationStructurePropertiesKHR{Flags
"dataSize" ::: Word64
minAccelerationStructureScratchOffsetAlignment :: Flags
maxDescriptorSetUpdateAfterBindAccelerationStructures :: Flags
maxDescriptorSetAccelerationStructures :: Flags
maxPerStageDescriptorUpdateAfterBindAccelerationStructures :: Flags
maxPerStageDescriptorAccelerationStructures :: Flags
maxPrimitiveCount :: "dataSize" ::: Word64
maxInstanceCount :: "dataSize" ::: Word64
maxGeometryCount :: "dataSize" ::: Word64
$sel:minAccelerationStructureScratchOffsetAlignment:PhysicalDeviceAccelerationStructurePropertiesKHR :: PhysicalDeviceAccelerationStructurePropertiesKHR -> Flags
$sel:maxDescriptorSetUpdateAfterBindAccelerationStructures:PhysicalDeviceAccelerationStructurePropertiesKHR :: PhysicalDeviceAccelerationStructurePropertiesKHR -> Flags
$sel:maxDescriptorSetAccelerationStructures:PhysicalDeviceAccelerationStructurePropertiesKHR :: PhysicalDeviceAccelerationStructurePropertiesKHR -> Flags
$sel:maxPerStageDescriptorUpdateAfterBindAccelerationStructures:PhysicalDeviceAccelerationStructurePropertiesKHR :: PhysicalDeviceAccelerationStructurePropertiesKHR -> Flags
$sel:maxPerStageDescriptorAccelerationStructures:PhysicalDeviceAccelerationStructurePropertiesKHR :: PhysicalDeviceAccelerationStructurePropertiesKHR -> Flags
$sel:maxPrimitiveCount:PhysicalDeviceAccelerationStructurePropertiesKHR :: PhysicalDeviceAccelerationStructurePropertiesKHR
-> "dataSize" ::: Word64
$sel:maxInstanceCount:PhysicalDeviceAccelerationStructurePropertiesKHR :: PhysicalDeviceAccelerationStructurePropertiesKHR
-> "dataSize" ::: Word64
$sel:maxGeometryCount:PhysicalDeviceAccelerationStructurePropertiesKHR :: PhysicalDeviceAccelerationStructurePropertiesKHR
-> "dataSize" ::: Word64
..} IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceAccelerationStructurePropertiesKHR
p Ptr PhysicalDeviceAccelerationStructurePropertiesKHR
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_PROPERTIES_KHR)
Ptr ("data" ::: Ptr ()) -> ("data" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceAccelerationStructurePropertiesKHR
p Ptr PhysicalDeviceAccelerationStructurePropertiesKHR
-> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) ("data" ::: Ptr ()
forall a. Ptr a
nullPtr)
("pIndirectDeviceAddresses" ::: Ptr ("dataSize" ::: Word64))
-> ("dataSize" ::: Word64) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceAccelerationStructurePropertiesKHR
p Ptr PhysicalDeviceAccelerationStructurePropertiesKHR
-> Int
-> "pIndirectDeviceAddresses" ::: Ptr ("dataSize" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word64)) ("dataSize" ::: Word64
maxGeometryCount)
("pIndirectDeviceAddresses" ::: Ptr ("dataSize" ::: Word64))
-> ("dataSize" ::: Word64) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceAccelerationStructurePropertiesKHR
p Ptr PhysicalDeviceAccelerationStructurePropertiesKHR
-> Int
-> "pIndirectDeviceAddresses" ::: Ptr ("dataSize" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Word64)) ("dataSize" ::: Word64
maxInstanceCount)
("pIndirectDeviceAddresses" ::: Ptr ("dataSize" ::: Word64))
-> ("dataSize" ::: Word64) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceAccelerationStructurePropertiesKHR
p Ptr PhysicalDeviceAccelerationStructurePropertiesKHR
-> Int
-> "pIndirectDeviceAddresses" ::: Ptr ("dataSize" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Word64)) ("dataSize" ::: Word64
maxPrimitiveCount)
("pIndirectStrides" ::: Ptr Flags) -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceAccelerationStructurePropertiesKHR
p Ptr PhysicalDeviceAccelerationStructurePropertiesKHR
-> Int -> "pIndirectStrides" ::: Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr Word32)) (Flags
maxPerStageDescriptorAccelerationStructures)
("pIndirectStrides" ::: Ptr Flags) -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceAccelerationStructurePropertiesKHR
p Ptr PhysicalDeviceAccelerationStructurePropertiesKHR
-> Int -> "pIndirectStrides" ::: Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
44 :: Ptr Word32)) (Flags
maxPerStageDescriptorUpdateAfterBindAccelerationStructures)
("pIndirectStrides" ::: Ptr Flags) -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceAccelerationStructurePropertiesKHR
p Ptr PhysicalDeviceAccelerationStructurePropertiesKHR
-> Int -> "pIndirectStrides" ::: Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr Word32)) (Flags
maxDescriptorSetAccelerationStructures)
("pIndirectStrides" ::: Ptr Flags) -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceAccelerationStructurePropertiesKHR
p Ptr PhysicalDeviceAccelerationStructurePropertiesKHR
-> Int -> "pIndirectStrides" ::: Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
52 :: Ptr Word32)) (Flags
maxDescriptorSetUpdateAfterBindAccelerationStructures)
("pIndirectStrides" ::: Ptr Flags) -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceAccelerationStructurePropertiesKHR
p Ptr PhysicalDeviceAccelerationStructurePropertiesKHR
-> Int -> "pIndirectStrides" ::: Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56 :: Ptr Word32)) (Flags
minAccelerationStructureScratchOffsetAlignment)
IO b
f
cStructSize :: Int
cStructSize = Int
64
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
Ptr PhysicalDeviceAccelerationStructurePropertiesKHR
-> IO b -> IO b
pokeZeroCStruct Ptr PhysicalDeviceAccelerationStructurePropertiesKHR
p IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceAccelerationStructurePropertiesKHR
p Ptr PhysicalDeviceAccelerationStructurePropertiesKHR
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_PROPERTIES_KHR)
Ptr ("data" ::: Ptr ()) -> ("data" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceAccelerationStructurePropertiesKHR
p Ptr PhysicalDeviceAccelerationStructurePropertiesKHR
-> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) ("data" ::: Ptr ()
forall a. Ptr a
nullPtr)
("pIndirectDeviceAddresses" ::: Ptr ("dataSize" ::: Word64))
-> ("dataSize" ::: Word64) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceAccelerationStructurePropertiesKHR
p Ptr PhysicalDeviceAccelerationStructurePropertiesKHR
-> Int
-> "pIndirectDeviceAddresses" ::: Ptr ("dataSize" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word64)) ("dataSize" ::: Word64
forall a. Zero a => a
zero)
("pIndirectDeviceAddresses" ::: Ptr ("dataSize" ::: Word64))
-> ("dataSize" ::: Word64) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceAccelerationStructurePropertiesKHR
p Ptr PhysicalDeviceAccelerationStructurePropertiesKHR
-> Int
-> "pIndirectDeviceAddresses" ::: Ptr ("dataSize" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Word64)) ("dataSize" ::: Word64
forall a. Zero a => a
zero)
("pIndirectDeviceAddresses" ::: Ptr ("dataSize" ::: Word64))
-> ("dataSize" ::: Word64) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceAccelerationStructurePropertiesKHR
p Ptr PhysicalDeviceAccelerationStructurePropertiesKHR
-> Int
-> "pIndirectDeviceAddresses" ::: Ptr ("dataSize" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Word64)) ("dataSize" ::: Word64
forall a. Zero a => a
zero)
("pIndirectStrides" ::: Ptr Flags) -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceAccelerationStructurePropertiesKHR
p Ptr PhysicalDeviceAccelerationStructurePropertiesKHR
-> Int -> "pIndirectStrides" ::: Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr Word32)) (Flags
forall a. Zero a => a
zero)
("pIndirectStrides" ::: Ptr Flags) -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceAccelerationStructurePropertiesKHR
p Ptr PhysicalDeviceAccelerationStructurePropertiesKHR
-> Int -> "pIndirectStrides" ::: Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
44 :: Ptr Word32)) (Flags
forall a. Zero a => a
zero)
("pIndirectStrides" ::: Ptr Flags) -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceAccelerationStructurePropertiesKHR
p Ptr PhysicalDeviceAccelerationStructurePropertiesKHR
-> Int -> "pIndirectStrides" ::: Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr Word32)) (Flags
forall a. Zero a => a
zero)
("pIndirectStrides" ::: Ptr Flags) -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceAccelerationStructurePropertiesKHR
p Ptr PhysicalDeviceAccelerationStructurePropertiesKHR
-> Int -> "pIndirectStrides" ::: Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
52 :: Ptr Word32)) (Flags
forall a. Zero a => a
zero)
("pIndirectStrides" ::: Ptr Flags) -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceAccelerationStructurePropertiesKHR
p Ptr PhysicalDeviceAccelerationStructurePropertiesKHR
-> Int -> "pIndirectStrides" ::: Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56 :: Ptr Word32)) (Flags
forall a. Zero a => a
zero)
IO b
f
instance FromCStruct PhysicalDeviceAccelerationStructurePropertiesKHR where
peekCStruct :: Ptr PhysicalDeviceAccelerationStructurePropertiesKHR
-> IO PhysicalDeviceAccelerationStructurePropertiesKHR
peekCStruct Ptr PhysicalDeviceAccelerationStructurePropertiesKHR
p = do
"dataSize" ::: Word64
maxGeometryCount <- forall a. Storable a => Ptr a -> IO a
peek @Word64 ((Ptr PhysicalDeviceAccelerationStructurePropertiesKHR
p Ptr PhysicalDeviceAccelerationStructurePropertiesKHR
-> Int
-> "pIndirectDeviceAddresses" ::: Ptr ("dataSize" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word64))
"dataSize" ::: Word64
maxInstanceCount <- forall a. Storable a => Ptr a -> IO a
peek @Word64 ((Ptr PhysicalDeviceAccelerationStructurePropertiesKHR
p Ptr PhysicalDeviceAccelerationStructurePropertiesKHR
-> Int
-> "pIndirectDeviceAddresses" ::: Ptr ("dataSize" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Word64))
"dataSize" ::: Word64
maxPrimitiveCount <- forall a. Storable a => Ptr a -> IO a
peek @Word64 ((Ptr PhysicalDeviceAccelerationStructurePropertiesKHR
p Ptr PhysicalDeviceAccelerationStructurePropertiesKHR
-> Int
-> "pIndirectDeviceAddresses" ::: Ptr ("dataSize" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Word64))
Flags
maxPerStageDescriptorAccelerationStructures <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceAccelerationStructurePropertiesKHR
p Ptr PhysicalDeviceAccelerationStructurePropertiesKHR
-> Int -> "pIndirectStrides" ::: Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr Word32))
Flags
maxPerStageDescriptorUpdateAfterBindAccelerationStructures <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceAccelerationStructurePropertiesKHR
p Ptr PhysicalDeviceAccelerationStructurePropertiesKHR
-> Int -> "pIndirectStrides" ::: Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
44 :: Ptr Word32))
Flags
maxDescriptorSetAccelerationStructures <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceAccelerationStructurePropertiesKHR
p Ptr PhysicalDeviceAccelerationStructurePropertiesKHR
-> Int -> "pIndirectStrides" ::: Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr Word32))
Flags
maxDescriptorSetUpdateAfterBindAccelerationStructures <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceAccelerationStructurePropertiesKHR
p Ptr PhysicalDeviceAccelerationStructurePropertiesKHR
-> Int -> "pIndirectStrides" ::: Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
52 :: Ptr Word32))
Flags
minAccelerationStructureScratchOffsetAlignment <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceAccelerationStructurePropertiesKHR
p Ptr PhysicalDeviceAccelerationStructurePropertiesKHR
-> Int -> "pIndirectStrides" ::: Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56 :: Ptr Word32))
PhysicalDeviceAccelerationStructurePropertiesKHR
-> IO PhysicalDeviceAccelerationStructurePropertiesKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure (PhysicalDeviceAccelerationStructurePropertiesKHR
-> IO PhysicalDeviceAccelerationStructurePropertiesKHR)
-> PhysicalDeviceAccelerationStructurePropertiesKHR
-> IO PhysicalDeviceAccelerationStructurePropertiesKHR
forall a b. (a -> b) -> a -> b
$ ("dataSize" ::: Word64)
-> ("dataSize" ::: Word64)
-> ("dataSize" ::: Word64)
-> Flags
-> Flags
-> Flags
-> Flags
-> Flags
-> PhysicalDeviceAccelerationStructurePropertiesKHR
PhysicalDeviceAccelerationStructurePropertiesKHR
"dataSize" ::: Word64
maxGeometryCount
"dataSize" ::: Word64
maxInstanceCount
"dataSize" ::: Word64
maxPrimitiveCount
Flags
maxPerStageDescriptorAccelerationStructures
Flags
maxPerStageDescriptorUpdateAfterBindAccelerationStructures
Flags
maxDescriptorSetAccelerationStructures
Flags
maxDescriptorSetUpdateAfterBindAccelerationStructures
Flags
minAccelerationStructureScratchOffsetAlignment
instance Storable PhysicalDeviceAccelerationStructurePropertiesKHR where
sizeOf :: PhysicalDeviceAccelerationStructurePropertiesKHR -> Int
sizeOf ~PhysicalDeviceAccelerationStructurePropertiesKHR
_ = Int
64
alignment :: PhysicalDeviceAccelerationStructurePropertiesKHR -> Int
alignment ~PhysicalDeviceAccelerationStructurePropertiesKHR
_ = Int
8
peek :: Ptr PhysicalDeviceAccelerationStructurePropertiesKHR
-> IO PhysicalDeviceAccelerationStructurePropertiesKHR
peek = Ptr PhysicalDeviceAccelerationStructurePropertiesKHR
-> IO PhysicalDeviceAccelerationStructurePropertiesKHR
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr PhysicalDeviceAccelerationStructurePropertiesKHR
-> PhysicalDeviceAccelerationStructurePropertiesKHR -> IO ()
poke Ptr PhysicalDeviceAccelerationStructurePropertiesKHR
ptr PhysicalDeviceAccelerationStructurePropertiesKHR
poked = Ptr PhysicalDeviceAccelerationStructurePropertiesKHR
-> PhysicalDeviceAccelerationStructurePropertiesKHR
-> IO ()
-> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceAccelerationStructurePropertiesKHR
ptr PhysicalDeviceAccelerationStructurePropertiesKHR
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PhysicalDeviceAccelerationStructurePropertiesKHR where
zero :: PhysicalDeviceAccelerationStructurePropertiesKHR
zero = ("dataSize" ::: Word64)
-> ("dataSize" ::: Word64)
-> ("dataSize" ::: Word64)
-> Flags
-> Flags
-> Flags
-> Flags
-> Flags
-> PhysicalDeviceAccelerationStructurePropertiesKHR
PhysicalDeviceAccelerationStructurePropertiesKHR
"dataSize" ::: Word64
forall a. Zero a => a
zero
"dataSize" ::: Word64
forall a. Zero a => a
zero
"dataSize" ::: Word64
forall a. Zero a => a
zero
Flags
forall a. Zero a => a
zero
Flags
forall a. Zero a => a
zero
Flags
forall a. Zero a => a
zero
Flags
forall a. Zero a => a
zero
Flags
forall a. Zero a => a
zero
data AccelerationStructureGeometryTrianglesDataKHR (es :: [Type]) = AccelerationStructureGeometryTrianglesDataKHR
{
forall (es :: [*]).
AccelerationStructureGeometryTrianglesDataKHR es -> Chain es
next :: Chain es
,
forall (es :: [*]).
AccelerationStructureGeometryTrianglesDataKHR es -> Format
vertexFormat :: Format
,
forall (es :: [*]).
AccelerationStructureGeometryTrianglesDataKHR es
-> DeviceOrHostAddressConstKHR
vertexData :: DeviceOrHostAddressConstKHR
,
forall (es :: [*]).
AccelerationStructureGeometryTrianglesDataKHR es
-> "dataSize" ::: Word64
vertexStride :: DeviceSize
,
forall (es :: [*]).
AccelerationStructureGeometryTrianglesDataKHR es -> Flags
maxVertex :: Word32
,
forall (es :: [*]).
AccelerationStructureGeometryTrianglesDataKHR es -> IndexType
indexType :: IndexType
,
forall (es :: [*]).
AccelerationStructureGeometryTrianglesDataKHR es
-> DeviceOrHostAddressConstKHR
indexData :: DeviceOrHostAddressConstKHR
,
forall (es :: [*]).
AccelerationStructureGeometryTrianglesDataKHR es
-> DeviceOrHostAddressConstKHR
transformData :: DeviceOrHostAddressConstKHR
}
deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (AccelerationStructureGeometryTrianglesDataKHR (es :: [Type]))
#endif
deriving instance Show (Chain es) => Show (AccelerationStructureGeometryTrianglesDataKHR es)
instance Extensible AccelerationStructureGeometryTrianglesDataKHR where
extensibleTypeName :: String
extensibleTypeName = String
"AccelerationStructureGeometryTrianglesDataKHR"
setNext :: forall (ds :: [*]) (es :: [*]).
AccelerationStructureGeometryTrianglesDataKHR ds
-> Chain es -> AccelerationStructureGeometryTrianglesDataKHR es
setNext AccelerationStructureGeometryTrianglesDataKHR{Flags
"dataSize" ::: Word64
Chain ds
Format
IndexType
DeviceOrHostAddressConstKHR
transformData :: DeviceOrHostAddressConstKHR
indexData :: DeviceOrHostAddressConstKHR
indexType :: IndexType
maxVertex :: Flags
vertexStride :: "dataSize" ::: Word64
vertexData :: DeviceOrHostAddressConstKHR
vertexFormat :: Format
next :: Chain ds
$sel:transformData:AccelerationStructureGeometryTrianglesDataKHR :: forall (es :: [*]).
AccelerationStructureGeometryTrianglesDataKHR es
-> DeviceOrHostAddressConstKHR
$sel:indexData:AccelerationStructureGeometryTrianglesDataKHR :: forall (es :: [*]).
AccelerationStructureGeometryTrianglesDataKHR es
-> DeviceOrHostAddressConstKHR
$sel:indexType:AccelerationStructureGeometryTrianglesDataKHR :: forall (es :: [*]).
AccelerationStructureGeometryTrianglesDataKHR es -> IndexType
$sel:maxVertex:AccelerationStructureGeometryTrianglesDataKHR :: forall (es :: [*]).
AccelerationStructureGeometryTrianglesDataKHR es -> Flags
$sel:vertexStride:AccelerationStructureGeometryTrianglesDataKHR :: forall (es :: [*]).
AccelerationStructureGeometryTrianglesDataKHR es
-> "dataSize" ::: Word64
$sel:vertexData:AccelerationStructureGeometryTrianglesDataKHR :: forall (es :: [*]).
AccelerationStructureGeometryTrianglesDataKHR es
-> DeviceOrHostAddressConstKHR
$sel:vertexFormat:AccelerationStructureGeometryTrianglesDataKHR :: forall (es :: [*]).
AccelerationStructureGeometryTrianglesDataKHR es -> Format
$sel:next:AccelerationStructureGeometryTrianglesDataKHR :: forall (es :: [*]).
AccelerationStructureGeometryTrianglesDataKHR es -> Chain es
..} Chain es
next' = AccelerationStructureGeometryTrianglesDataKHR :: forall (es :: [*]).
Chain es
-> Format
-> DeviceOrHostAddressConstKHR
-> ("dataSize" ::: Word64)
-> Flags
-> IndexType
-> DeviceOrHostAddressConstKHR
-> DeviceOrHostAddressConstKHR
-> AccelerationStructureGeometryTrianglesDataKHR es
AccelerationStructureGeometryTrianglesDataKHR{$sel:next:AccelerationStructureGeometryTrianglesDataKHR :: Chain es
next = Chain es
next', Flags
"dataSize" ::: Word64
Format
IndexType
DeviceOrHostAddressConstKHR
transformData :: DeviceOrHostAddressConstKHR
indexData :: DeviceOrHostAddressConstKHR
indexType :: IndexType
maxVertex :: Flags
vertexStride :: "dataSize" ::: Word64
vertexData :: DeviceOrHostAddressConstKHR
vertexFormat :: Format
$sel:transformData:AccelerationStructureGeometryTrianglesDataKHR :: DeviceOrHostAddressConstKHR
$sel:indexData:AccelerationStructureGeometryTrianglesDataKHR :: DeviceOrHostAddressConstKHR
$sel:indexType:AccelerationStructureGeometryTrianglesDataKHR :: IndexType
$sel:maxVertex:AccelerationStructureGeometryTrianglesDataKHR :: Flags
$sel:vertexStride:AccelerationStructureGeometryTrianglesDataKHR :: "dataSize" ::: Word64
$sel:vertexData:AccelerationStructureGeometryTrianglesDataKHR :: DeviceOrHostAddressConstKHR
$sel:vertexFormat:AccelerationStructureGeometryTrianglesDataKHR :: Format
..}
getNext :: forall (es :: [*]).
AccelerationStructureGeometryTrianglesDataKHR es -> Chain es
getNext AccelerationStructureGeometryTrianglesDataKHR{Flags
"dataSize" ::: Word64
Chain es
Format
IndexType
DeviceOrHostAddressConstKHR
transformData :: DeviceOrHostAddressConstKHR
indexData :: DeviceOrHostAddressConstKHR
indexType :: IndexType
maxVertex :: Flags
vertexStride :: "dataSize" ::: Word64
vertexData :: DeviceOrHostAddressConstKHR
vertexFormat :: Format
next :: Chain es
$sel:transformData:AccelerationStructureGeometryTrianglesDataKHR :: forall (es :: [*]).
AccelerationStructureGeometryTrianglesDataKHR es
-> DeviceOrHostAddressConstKHR
$sel:indexData:AccelerationStructureGeometryTrianglesDataKHR :: forall (es :: [*]).
AccelerationStructureGeometryTrianglesDataKHR es
-> DeviceOrHostAddressConstKHR
$sel:indexType:AccelerationStructureGeometryTrianglesDataKHR :: forall (es :: [*]).
AccelerationStructureGeometryTrianglesDataKHR es -> IndexType
$sel:maxVertex:AccelerationStructureGeometryTrianglesDataKHR :: forall (es :: [*]).
AccelerationStructureGeometryTrianglesDataKHR es -> Flags
$sel:vertexStride:AccelerationStructureGeometryTrianglesDataKHR :: forall (es :: [*]).
AccelerationStructureGeometryTrianglesDataKHR es
-> "dataSize" ::: Word64
$sel:vertexData:AccelerationStructureGeometryTrianglesDataKHR :: forall (es :: [*]).
AccelerationStructureGeometryTrianglesDataKHR es
-> DeviceOrHostAddressConstKHR
$sel:vertexFormat:AccelerationStructureGeometryTrianglesDataKHR :: forall (es :: [*]).
AccelerationStructureGeometryTrianglesDataKHR es -> Format
$sel:next:AccelerationStructureGeometryTrianglesDataKHR :: forall (es :: [*]).
AccelerationStructureGeometryTrianglesDataKHR es -> Chain es
..} = Chain es
next
extends :: forall e b proxy. Typeable e => proxy e -> (Extends AccelerationStructureGeometryTrianglesDataKHR e => b) -> Maybe b
extends :: forall e b (proxy :: * -> *).
Typeable e =>
proxy e
-> (Extends AccelerationStructureGeometryTrianglesDataKHR e => b)
-> Maybe b
extends proxy e
_ Extends AccelerationStructureGeometryTrianglesDataKHR e => b
f
| Just e :~: AccelerationStructureTrianglesOpacityMicromapEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @AccelerationStructureTrianglesOpacityMicromapEXT = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends AccelerationStructureGeometryTrianglesDataKHR e => b
f
| Just e :~: AccelerationStructureGeometryMotionTrianglesDataNV
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @AccelerationStructureGeometryMotionTrianglesDataNV = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends AccelerationStructureGeometryTrianglesDataKHR e => b
f
| Bool
otherwise = Maybe b
forall a. Maybe a
Nothing
instance ( Extendss AccelerationStructureGeometryTrianglesDataKHR es
, PokeChain es ) => ToCStruct (AccelerationStructureGeometryTrianglesDataKHR es) where
withCStruct :: forall b.
AccelerationStructureGeometryTrianglesDataKHR es
-> (Ptr (AccelerationStructureGeometryTrianglesDataKHR es) -> IO b)
-> IO b
withCStruct AccelerationStructureGeometryTrianglesDataKHR es
x Ptr (AccelerationStructureGeometryTrianglesDataKHR es) -> IO b
f = Int
-> (Ptr (AccelerationStructureGeometryTrianglesDataKHR es) -> IO b)
-> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
64 ((Ptr (AccelerationStructureGeometryTrianglesDataKHR es) -> IO b)
-> IO b)
-> (Ptr (AccelerationStructureGeometryTrianglesDataKHR es) -> IO b)
-> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr (AccelerationStructureGeometryTrianglesDataKHR es)
p -> Ptr (AccelerationStructureGeometryTrianglesDataKHR es)
-> AccelerationStructureGeometryTrianglesDataKHR es -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr (AccelerationStructureGeometryTrianglesDataKHR es)
p AccelerationStructureGeometryTrianglesDataKHR es
x (Ptr (AccelerationStructureGeometryTrianglesDataKHR es) -> IO b
f Ptr (AccelerationStructureGeometryTrianglesDataKHR es)
p)
pokeCStruct :: forall b.
Ptr (AccelerationStructureGeometryTrianglesDataKHR es)
-> AccelerationStructureGeometryTrianglesDataKHR es -> IO b -> IO b
pokeCStruct Ptr (AccelerationStructureGeometryTrianglesDataKHR es)
p AccelerationStructureGeometryTrianglesDataKHR{Flags
"dataSize" ::: Word64
Chain es
Format
IndexType
DeviceOrHostAddressConstKHR
transformData :: DeviceOrHostAddressConstKHR
indexData :: DeviceOrHostAddressConstKHR
indexType :: IndexType
maxVertex :: Flags
vertexStride :: "dataSize" ::: Word64
vertexData :: DeviceOrHostAddressConstKHR
vertexFormat :: Format
next :: Chain es
$sel:transformData:AccelerationStructureGeometryTrianglesDataKHR :: forall (es :: [*]).
AccelerationStructureGeometryTrianglesDataKHR es
-> DeviceOrHostAddressConstKHR
$sel:indexData:AccelerationStructureGeometryTrianglesDataKHR :: forall (es :: [*]).
AccelerationStructureGeometryTrianglesDataKHR es
-> DeviceOrHostAddressConstKHR
$sel:indexType:AccelerationStructureGeometryTrianglesDataKHR :: forall (es :: [*]).
AccelerationStructureGeometryTrianglesDataKHR es -> IndexType
$sel:maxVertex:AccelerationStructureGeometryTrianglesDataKHR :: forall (es :: [*]).
AccelerationStructureGeometryTrianglesDataKHR es -> Flags
$sel:vertexStride:AccelerationStructureGeometryTrianglesDataKHR :: forall (es :: [*]).
AccelerationStructureGeometryTrianglesDataKHR es
-> "dataSize" ::: Word64
$sel:vertexData:AccelerationStructureGeometryTrianglesDataKHR :: forall (es :: [*]).
AccelerationStructureGeometryTrianglesDataKHR es
-> DeviceOrHostAddressConstKHR
$sel:vertexFormat:AccelerationStructureGeometryTrianglesDataKHR :: forall (es :: [*]).
AccelerationStructureGeometryTrianglesDataKHR es -> Format
$sel:next:AccelerationStructureGeometryTrianglesDataKHR :: forall (es :: [*]).
AccelerationStructureGeometryTrianglesDataKHR es -> Chain es
..} IO b
f = ContT b IO b -> IO b
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT b IO b -> IO b) -> ContT b IO b -> IO b
forall a b. (a -> b) -> a -> b
$ do
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (AccelerationStructureGeometryTrianglesDataKHR es)
p Ptr (AccelerationStructureGeometryTrianglesDataKHR es)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_TRIANGLES_DATA_KHR)
"data" ::: Ptr ()
pNext'' <- (Ptr (Chain es) -> "data" ::: Ptr ())
-> ContT b IO (Ptr (Chain es)) -> ContT b IO ("data" ::: Ptr ())
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap Ptr (Chain es) -> "data" ::: Ptr ()
forall a b. Ptr a -> Ptr b
castPtr (ContT b IO (Ptr (Chain es)) -> ContT b IO ("data" ::: Ptr ()))
-> (((Ptr (Chain es) -> IO b) -> IO b)
-> ContT b IO (Ptr (Chain es)))
-> ((Ptr (Chain es) -> IO b) -> IO b)
-> ContT b IO ("data" ::: Ptr ())
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((Ptr (Chain es) -> IO b) -> IO b) -> ContT b IO (Ptr (Chain es))
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr (Chain es) -> IO b) -> IO b)
-> ContT b IO ("data" ::: Ptr ()))
-> ((Ptr (Chain es) -> IO b) -> IO b)
-> ContT b IO ("data" ::: Ptr ())
forall a b. (a -> b) -> a -> b
$ Chain es -> (Ptr (Chain es) -> IO b) -> IO b
forall (es :: [*]) a.
PokeChain es =>
Chain es -> (Ptr (Chain es) -> IO a) -> IO a
withChain (Chain es
next)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr ("data" ::: Ptr ()) -> ("data" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (AccelerationStructureGeometryTrianglesDataKHR es)
p Ptr (AccelerationStructureGeometryTrianglesDataKHR es)
-> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) "data" ::: Ptr ()
pNext''
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr Format -> Format -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (AccelerationStructureGeometryTrianglesDataKHR es)
p Ptr (AccelerationStructureGeometryTrianglesDataKHR es)
-> Int -> Ptr Format
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Format)) (Format
vertexFormat)
((() -> IO b) -> IO b) -> ContT b IO ()
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((() -> IO b) -> IO b) -> ContT b IO ())
-> ((() -> IO b) -> IO b) -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr DeviceOrHostAddressConstKHR
-> DeviceOrHostAddressConstKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct ((Ptr (AccelerationStructureGeometryTrianglesDataKHR es)
p Ptr (AccelerationStructureGeometryTrianglesDataKHR es)
-> Int -> Ptr DeviceOrHostAddressConstKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr DeviceOrHostAddressConstKHR)) (DeviceOrHostAddressConstKHR
vertexData) (IO b -> IO b) -> ((() -> IO b) -> IO b) -> (() -> IO b) -> IO b
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((() -> IO b) -> () -> IO b
forall a b. (a -> b) -> a -> b
$ ())
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ ("pIndirectDeviceAddresses" ::: Ptr ("dataSize" ::: Word64))
-> ("dataSize" ::: Word64) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (AccelerationStructureGeometryTrianglesDataKHR es)
p Ptr (AccelerationStructureGeometryTrianglesDataKHR es)
-> Int
-> "pIndirectDeviceAddresses" ::: Ptr ("dataSize" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr DeviceSize)) ("dataSize" ::: Word64
vertexStride)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ ("pIndirectStrides" ::: Ptr Flags) -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (AccelerationStructureGeometryTrianglesDataKHR es)
p Ptr (AccelerationStructureGeometryTrianglesDataKHR es)
-> Int -> "pIndirectStrides" ::: Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr Word32)) (Flags
maxVertex)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr IndexType -> IndexType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (AccelerationStructureGeometryTrianglesDataKHR es)
p Ptr (AccelerationStructureGeometryTrianglesDataKHR es)
-> Int -> Ptr IndexType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
44 :: Ptr IndexType)) (IndexType
indexType)
((() -> IO b) -> IO b) -> ContT b IO ()
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((() -> IO b) -> IO b) -> ContT b IO ())
-> ((() -> IO b) -> IO b) -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr DeviceOrHostAddressConstKHR
-> DeviceOrHostAddressConstKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct ((Ptr (AccelerationStructureGeometryTrianglesDataKHR es)
p Ptr (AccelerationStructureGeometryTrianglesDataKHR es)
-> Int -> Ptr DeviceOrHostAddressConstKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr DeviceOrHostAddressConstKHR)) (DeviceOrHostAddressConstKHR
indexData) (IO b -> IO b) -> ((() -> IO b) -> IO b) -> (() -> IO b) -> IO b
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((() -> IO b) -> () -> IO b
forall a b. (a -> b) -> a -> b
$ ())
((() -> IO b) -> IO b) -> ContT b IO ()
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((() -> IO b) -> IO b) -> ContT b IO ())
-> ((() -> IO b) -> IO b) -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr DeviceOrHostAddressConstKHR
-> DeviceOrHostAddressConstKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct ((Ptr (AccelerationStructureGeometryTrianglesDataKHR es)
p Ptr (AccelerationStructureGeometryTrianglesDataKHR es)
-> Int -> Ptr DeviceOrHostAddressConstKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56 :: Ptr DeviceOrHostAddressConstKHR)) (DeviceOrHostAddressConstKHR
transformData) (IO b -> IO b) -> ((() -> IO b) -> IO b) -> (() -> IO b) -> IO b
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((() -> IO b) -> () -> IO b
forall a b. (a -> b) -> a -> b
$ ())
IO b -> ContT b IO b
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO b -> ContT b IO b) -> IO b -> ContT b IO b
forall a b. (a -> b) -> a -> b
$ IO b
f
cStructSize :: Int
cStructSize = Int
64
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
Ptr (AccelerationStructureGeometryTrianglesDataKHR es)
-> IO b -> IO b
pokeZeroCStruct Ptr (AccelerationStructureGeometryTrianglesDataKHR es)
p IO b
f = ContT b IO b -> IO b
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT b IO b -> IO b) -> ContT b IO b -> IO b
forall a b. (a -> b) -> a -> b
$ do
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (AccelerationStructureGeometryTrianglesDataKHR es)
p Ptr (AccelerationStructureGeometryTrianglesDataKHR es)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_TRIANGLES_DATA_KHR)
"data" ::: Ptr ()
pNext' <- (Ptr (Chain es) -> "data" ::: Ptr ())
-> ContT b IO (Ptr (Chain es)) -> ContT b IO ("data" ::: Ptr ())
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap Ptr (Chain es) -> "data" ::: Ptr ()
forall a b. Ptr a -> Ptr b
castPtr (ContT b IO (Ptr (Chain es)) -> ContT b IO ("data" ::: Ptr ()))
-> (((Ptr (Chain es) -> IO b) -> IO b)
-> ContT b IO (Ptr (Chain es)))
-> ((Ptr (Chain es) -> IO b) -> IO b)
-> ContT b IO ("data" ::: Ptr ())
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((Ptr (Chain es) -> IO b) -> IO b) -> ContT b IO (Ptr (Chain es))
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr (Chain es) -> IO b) -> IO b)
-> ContT b IO ("data" ::: Ptr ()))
-> ((Ptr (Chain es) -> IO b) -> IO b)
-> ContT b IO ("data" ::: Ptr ())
forall a b. (a -> b) -> a -> b
$ forall (es :: [*]) a.
PokeChain es =>
(Ptr (Chain es) -> IO a) -> IO a
withZeroChain @es
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr ("data" ::: Ptr ()) -> ("data" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (AccelerationStructureGeometryTrianglesDataKHR es)
p Ptr (AccelerationStructureGeometryTrianglesDataKHR es)
-> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) "data" ::: Ptr ()
pNext'
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr Format -> Format -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (AccelerationStructureGeometryTrianglesDataKHR es)
p Ptr (AccelerationStructureGeometryTrianglesDataKHR es)
-> Int -> Ptr Format
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Format)) (Format
forall a. Zero a => a
zero)
((() -> IO b) -> IO b) -> ContT b IO ()
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((() -> IO b) -> IO b) -> ContT b IO ())
-> ((() -> IO b) -> IO b) -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr DeviceOrHostAddressConstKHR
-> DeviceOrHostAddressConstKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct ((Ptr (AccelerationStructureGeometryTrianglesDataKHR es)
p Ptr (AccelerationStructureGeometryTrianglesDataKHR es)
-> Int -> Ptr DeviceOrHostAddressConstKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr DeviceOrHostAddressConstKHR)) (DeviceOrHostAddressConstKHR
forall a. Zero a => a
zero) (IO b -> IO b) -> ((() -> IO b) -> IO b) -> (() -> IO b) -> IO b
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((() -> IO b) -> () -> IO b
forall a b. (a -> b) -> a -> b
$ ())
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ ("pIndirectDeviceAddresses" ::: Ptr ("dataSize" ::: Word64))
-> ("dataSize" ::: Word64) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (AccelerationStructureGeometryTrianglesDataKHR es)
p Ptr (AccelerationStructureGeometryTrianglesDataKHR es)
-> Int
-> "pIndirectDeviceAddresses" ::: Ptr ("dataSize" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr DeviceSize)) ("dataSize" ::: Word64
forall a. Zero a => a
zero)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ ("pIndirectStrides" ::: Ptr Flags) -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (AccelerationStructureGeometryTrianglesDataKHR es)
p Ptr (AccelerationStructureGeometryTrianglesDataKHR es)
-> Int -> "pIndirectStrides" ::: Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr Word32)) (Flags
forall a. Zero a => a
zero)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr IndexType -> IndexType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (AccelerationStructureGeometryTrianglesDataKHR es)
p Ptr (AccelerationStructureGeometryTrianglesDataKHR es)
-> Int -> Ptr IndexType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
44 :: Ptr IndexType)) (IndexType
forall a. Zero a => a
zero)
((() -> IO b) -> IO b) -> ContT b IO ()
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((() -> IO b) -> IO b) -> ContT b IO ())
-> ((() -> IO b) -> IO b) -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr DeviceOrHostAddressConstKHR
-> DeviceOrHostAddressConstKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct ((Ptr (AccelerationStructureGeometryTrianglesDataKHR es)
p Ptr (AccelerationStructureGeometryTrianglesDataKHR es)
-> Int -> Ptr DeviceOrHostAddressConstKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr DeviceOrHostAddressConstKHR)) (DeviceOrHostAddressConstKHR
forall a. Zero a => a
zero) (IO b -> IO b) -> ((() -> IO b) -> IO b) -> (() -> IO b) -> IO b
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((() -> IO b) -> () -> IO b
forall a b. (a -> b) -> a -> b
$ ())
((() -> IO b) -> IO b) -> ContT b IO ()
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((() -> IO b) -> IO b) -> ContT b IO ())
-> ((() -> IO b) -> IO b) -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr DeviceOrHostAddressConstKHR
-> DeviceOrHostAddressConstKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct ((Ptr (AccelerationStructureGeometryTrianglesDataKHR es)
p Ptr (AccelerationStructureGeometryTrianglesDataKHR es)
-> Int -> Ptr DeviceOrHostAddressConstKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56 :: Ptr DeviceOrHostAddressConstKHR)) (DeviceOrHostAddressConstKHR
forall a. Zero a => a
zero) (IO b -> IO b) -> ((() -> IO b) -> IO b) -> (() -> IO b) -> IO b
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((() -> IO b) -> () -> IO b
forall a b. (a -> b) -> a -> b
$ ())
IO b -> ContT b IO b
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO b -> ContT b IO b) -> IO b -> ContT b IO b
forall a b. (a -> b) -> a -> b
$ IO b
f
instance es ~ '[] => Zero (AccelerationStructureGeometryTrianglesDataKHR es) where
zero :: AccelerationStructureGeometryTrianglesDataKHR es
zero = Chain es
-> Format
-> DeviceOrHostAddressConstKHR
-> ("dataSize" ::: Word64)
-> Flags
-> IndexType
-> DeviceOrHostAddressConstKHR
-> DeviceOrHostAddressConstKHR
-> AccelerationStructureGeometryTrianglesDataKHR es
forall (es :: [*]).
Chain es
-> Format
-> DeviceOrHostAddressConstKHR
-> ("dataSize" ::: Word64)
-> Flags
-> IndexType
-> DeviceOrHostAddressConstKHR
-> DeviceOrHostAddressConstKHR
-> AccelerationStructureGeometryTrianglesDataKHR es
AccelerationStructureGeometryTrianglesDataKHR
()
Format
forall a. Zero a => a
zero
DeviceOrHostAddressConstKHR
forall a. Zero a => a
zero
"dataSize" ::: Word64
forall a. Zero a => a
zero
Flags
forall a. Zero a => a
zero
IndexType
forall a. Zero a => a
zero
DeviceOrHostAddressConstKHR
forall a. Zero a => a
zero
DeviceOrHostAddressConstKHR
forall a. Zero a => a
zero
data AccelerationStructureGeometryAabbsDataKHR = AccelerationStructureGeometryAabbsDataKHR
{
AccelerationStructureGeometryAabbsDataKHR
-> DeviceOrHostAddressConstKHR
data' :: DeviceOrHostAddressConstKHR
,
AccelerationStructureGeometryAabbsDataKHR -> "dataSize" ::: Word64
stride :: DeviceSize
}
deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (AccelerationStructureGeometryAabbsDataKHR)
#endif
deriving instance Show AccelerationStructureGeometryAabbsDataKHR
instance ToCStruct AccelerationStructureGeometryAabbsDataKHR where
withCStruct :: forall b.
AccelerationStructureGeometryAabbsDataKHR
-> (Ptr AccelerationStructureGeometryAabbsDataKHR -> IO b) -> IO b
withCStruct AccelerationStructureGeometryAabbsDataKHR
x Ptr AccelerationStructureGeometryAabbsDataKHR -> IO b
f = Int
-> (Ptr AccelerationStructureGeometryAabbsDataKHR -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
32 ((Ptr AccelerationStructureGeometryAabbsDataKHR -> IO b) -> IO b)
-> (Ptr AccelerationStructureGeometryAabbsDataKHR -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr AccelerationStructureGeometryAabbsDataKHR
p -> Ptr AccelerationStructureGeometryAabbsDataKHR
-> AccelerationStructureGeometryAabbsDataKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr AccelerationStructureGeometryAabbsDataKHR
p AccelerationStructureGeometryAabbsDataKHR
x (Ptr AccelerationStructureGeometryAabbsDataKHR -> IO b
f Ptr AccelerationStructureGeometryAabbsDataKHR
p)
pokeCStruct :: forall b.
Ptr AccelerationStructureGeometryAabbsDataKHR
-> AccelerationStructureGeometryAabbsDataKHR -> IO b -> IO b
pokeCStruct Ptr AccelerationStructureGeometryAabbsDataKHR
p AccelerationStructureGeometryAabbsDataKHR{"dataSize" ::: Word64
DeviceOrHostAddressConstKHR
stride :: "dataSize" ::: Word64
data' :: DeviceOrHostAddressConstKHR
$sel:stride:AccelerationStructureGeometryAabbsDataKHR :: AccelerationStructureGeometryAabbsDataKHR -> "dataSize" ::: Word64
$sel:data':AccelerationStructureGeometryAabbsDataKHR :: AccelerationStructureGeometryAabbsDataKHR
-> DeviceOrHostAddressConstKHR
..} IO b
f = ContT b IO b -> IO b
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT b IO b -> IO b) -> ContT b IO b -> IO b
forall a b. (a -> b) -> a -> b
$ do
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureGeometryAabbsDataKHR
p Ptr AccelerationStructureGeometryAabbsDataKHR
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_AABBS_DATA_KHR)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr ("data" ::: Ptr ()) -> ("data" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureGeometryAabbsDataKHR
p Ptr AccelerationStructureGeometryAabbsDataKHR
-> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) ("data" ::: Ptr ()
forall a. Ptr a
nullPtr)
((() -> IO b) -> IO b) -> ContT b IO ()
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((() -> IO b) -> IO b) -> ContT b IO ())
-> ((() -> IO b) -> IO b) -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr DeviceOrHostAddressConstKHR
-> DeviceOrHostAddressConstKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct ((Ptr AccelerationStructureGeometryAabbsDataKHR
p Ptr AccelerationStructureGeometryAabbsDataKHR
-> Int -> Ptr DeviceOrHostAddressConstKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr DeviceOrHostAddressConstKHR)) (DeviceOrHostAddressConstKHR
data') (IO b -> IO b) -> ((() -> IO b) -> IO b) -> (() -> IO b) -> IO b
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((() -> IO b) -> () -> IO b
forall a b. (a -> b) -> a -> b
$ ())
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ ("pIndirectDeviceAddresses" ::: Ptr ("dataSize" ::: Word64))
-> ("dataSize" ::: Word64) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureGeometryAabbsDataKHR
p Ptr AccelerationStructureGeometryAabbsDataKHR
-> Int
-> "pIndirectDeviceAddresses" ::: Ptr ("dataSize" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr DeviceSize)) ("dataSize" ::: Word64
stride)
IO b -> ContT b IO b
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO b -> ContT b IO b) -> IO b -> ContT b IO b
forall a b. (a -> b) -> a -> b
$ IO b
f
cStructSize :: Int
cStructSize = Int
32
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
Ptr AccelerationStructureGeometryAabbsDataKHR -> IO b -> IO b
pokeZeroCStruct Ptr AccelerationStructureGeometryAabbsDataKHR
p IO b
f = ContT b IO b -> IO b
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT b IO b -> IO b) -> ContT b IO b -> IO b
forall a b. (a -> b) -> a -> b
$ do
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureGeometryAabbsDataKHR
p Ptr AccelerationStructureGeometryAabbsDataKHR
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_AABBS_DATA_KHR)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr ("data" ::: Ptr ()) -> ("data" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureGeometryAabbsDataKHR
p Ptr AccelerationStructureGeometryAabbsDataKHR
-> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) ("data" ::: Ptr ()
forall a. Ptr a
nullPtr)
((() -> IO b) -> IO b) -> ContT b IO ()
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((() -> IO b) -> IO b) -> ContT b IO ())
-> ((() -> IO b) -> IO b) -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr DeviceOrHostAddressConstKHR
-> DeviceOrHostAddressConstKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct ((Ptr AccelerationStructureGeometryAabbsDataKHR
p Ptr AccelerationStructureGeometryAabbsDataKHR
-> Int -> Ptr DeviceOrHostAddressConstKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr DeviceOrHostAddressConstKHR)) (DeviceOrHostAddressConstKHR
forall a. Zero a => a
zero) (IO b -> IO b) -> ((() -> IO b) -> IO b) -> (() -> IO b) -> IO b
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((() -> IO b) -> () -> IO b
forall a b. (a -> b) -> a -> b
$ ())
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ ("pIndirectDeviceAddresses" ::: Ptr ("dataSize" ::: Word64))
-> ("dataSize" ::: Word64) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureGeometryAabbsDataKHR
p Ptr AccelerationStructureGeometryAabbsDataKHR
-> Int
-> "pIndirectDeviceAddresses" ::: Ptr ("dataSize" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr DeviceSize)) ("dataSize" ::: Word64
forall a. Zero a => a
zero)
IO b -> ContT b IO b
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO b -> ContT b IO b) -> IO b -> ContT b IO b
forall a b. (a -> b) -> a -> b
$ IO b
f
instance Zero AccelerationStructureGeometryAabbsDataKHR where
zero :: AccelerationStructureGeometryAabbsDataKHR
zero = DeviceOrHostAddressConstKHR
-> ("dataSize" ::: Word64)
-> AccelerationStructureGeometryAabbsDataKHR
AccelerationStructureGeometryAabbsDataKHR
DeviceOrHostAddressConstKHR
forall a. Zero a => a
zero
"dataSize" ::: Word64
forall a. Zero a => a
zero
data AccelerationStructureGeometryInstancesDataKHR = AccelerationStructureGeometryInstancesDataKHR
{
AccelerationStructureGeometryInstancesDataKHR -> Bool
arrayOfPointers :: Bool
,
AccelerationStructureGeometryInstancesDataKHR
-> DeviceOrHostAddressConstKHR
data' :: DeviceOrHostAddressConstKHR
}
deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (AccelerationStructureGeometryInstancesDataKHR)
#endif
deriving instance Show AccelerationStructureGeometryInstancesDataKHR
instance ToCStruct AccelerationStructureGeometryInstancesDataKHR where
withCStruct :: forall b.
AccelerationStructureGeometryInstancesDataKHR
-> (Ptr AccelerationStructureGeometryInstancesDataKHR -> IO b)
-> IO b
withCStruct AccelerationStructureGeometryInstancesDataKHR
x Ptr AccelerationStructureGeometryInstancesDataKHR -> IO b
f = Int
-> (Ptr AccelerationStructureGeometryInstancesDataKHR -> IO b)
-> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
32 ((Ptr AccelerationStructureGeometryInstancesDataKHR -> IO b)
-> IO b)
-> (Ptr AccelerationStructureGeometryInstancesDataKHR -> IO b)
-> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr AccelerationStructureGeometryInstancesDataKHR
p -> Ptr AccelerationStructureGeometryInstancesDataKHR
-> AccelerationStructureGeometryInstancesDataKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr AccelerationStructureGeometryInstancesDataKHR
p AccelerationStructureGeometryInstancesDataKHR
x (Ptr AccelerationStructureGeometryInstancesDataKHR -> IO b
f Ptr AccelerationStructureGeometryInstancesDataKHR
p)
pokeCStruct :: forall b.
Ptr AccelerationStructureGeometryInstancesDataKHR
-> AccelerationStructureGeometryInstancesDataKHR -> IO b -> IO b
pokeCStruct Ptr AccelerationStructureGeometryInstancesDataKHR
p AccelerationStructureGeometryInstancesDataKHR{Bool
DeviceOrHostAddressConstKHR
data' :: DeviceOrHostAddressConstKHR
arrayOfPointers :: Bool
$sel:data':AccelerationStructureGeometryInstancesDataKHR :: AccelerationStructureGeometryInstancesDataKHR
-> DeviceOrHostAddressConstKHR
$sel:arrayOfPointers:AccelerationStructureGeometryInstancesDataKHR :: AccelerationStructureGeometryInstancesDataKHR -> Bool
..} IO b
f = ContT b IO b -> IO b
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT b IO b -> IO b) -> ContT b IO b -> IO b
forall a b. (a -> b) -> a -> b
$ do
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureGeometryInstancesDataKHR
p Ptr AccelerationStructureGeometryInstancesDataKHR
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_INSTANCES_DATA_KHR)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr ("data" ::: Ptr ()) -> ("data" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureGeometryInstancesDataKHR
p Ptr AccelerationStructureGeometryInstancesDataKHR
-> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) ("data" ::: Ptr ()
forall a. Ptr a
nullPtr)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureGeometryInstancesDataKHR
p Ptr AccelerationStructureGeometryInstancesDataKHR
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
arrayOfPointers))
((() -> IO b) -> IO b) -> ContT b IO ()
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((() -> IO b) -> IO b) -> ContT b IO ())
-> ((() -> IO b) -> IO b) -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr DeviceOrHostAddressConstKHR
-> DeviceOrHostAddressConstKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct ((Ptr AccelerationStructureGeometryInstancesDataKHR
p Ptr AccelerationStructureGeometryInstancesDataKHR
-> Int -> Ptr DeviceOrHostAddressConstKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr DeviceOrHostAddressConstKHR)) (DeviceOrHostAddressConstKHR
data') (IO b -> IO b) -> ((() -> IO b) -> IO b) -> (() -> IO b) -> IO b
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((() -> IO b) -> () -> IO b
forall a b. (a -> b) -> a -> b
$ ())
IO b -> ContT b IO b
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO b -> ContT b IO b) -> IO b -> ContT b IO b
forall a b. (a -> b) -> a -> b
$ IO b
f
cStructSize :: Int
cStructSize = Int
32
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
Ptr AccelerationStructureGeometryInstancesDataKHR -> IO b -> IO b
pokeZeroCStruct Ptr AccelerationStructureGeometryInstancesDataKHR
p IO b
f = ContT b IO b -> IO b
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT b IO b -> IO b) -> ContT b IO b -> IO b
forall a b. (a -> b) -> a -> b
$ do
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureGeometryInstancesDataKHR
p Ptr AccelerationStructureGeometryInstancesDataKHR
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_INSTANCES_DATA_KHR)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr ("data" ::: Ptr ()) -> ("data" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureGeometryInstancesDataKHR
p Ptr AccelerationStructureGeometryInstancesDataKHR
-> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) ("data" ::: Ptr ()
forall a. Ptr a
nullPtr)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureGeometryInstancesDataKHR
p Ptr AccelerationStructureGeometryInstancesDataKHR
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
((() -> IO b) -> IO b) -> ContT b IO ()
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((() -> IO b) -> IO b) -> ContT b IO ())
-> ((() -> IO b) -> IO b) -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr DeviceOrHostAddressConstKHR
-> DeviceOrHostAddressConstKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct ((Ptr AccelerationStructureGeometryInstancesDataKHR
p Ptr AccelerationStructureGeometryInstancesDataKHR
-> Int -> Ptr DeviceOrHostAddressConstKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr DeviceOrHostAddressConstKHR)) (DeviceOrHostAddressConstKHR
forall a. Zero a => a
zero) (IO b -> IO b) -> ((() -> IO b) -> IO b) -> (() -> IO b) -> IO b
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((() -> IO b) -> () -> IO b
forall a b. (a -> b) -> a -> b
$ ())
IO b -> ContT b IO b
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO b -> ContT b IO b) -> IO b -> ContT b IO b
forall a b. (a -> b) -> a -> b
$ IO b
f
instance Zero AccelerationStructureGeometryInstancesDataKHR where
zero :: AccelerationStructureGeometryInstancesDataKHR
zero = Bool
-> DeviceOrHostAddressConstKHR
-> AccelerationStructureGeometryInstancesDataKHR
AccelerationStructureGeometryInstancesDataKHR
Bool
forall a. Zero a => a
zero
DeviceOrHostAddressConstKHR
forall a. Zero a => a
zero
data AccelerationStructureGeometryKHR = AccelerationStructureGeometryKHR
{
AccelerationStructureGeometryKHR -> GeometryTypeKHR
geometryType :: GeometryTypeKHR
,
AccelerationStructureGeometryKHR
-> AccelerationStructureGeometryDataKHR
geometry :: AccelerationStructureGeometryDataKHR
,
AccelerationStructureGeometryKHR -> GeometryFlagBitsKHR
flags :: GeometryFlagsKHR
}
deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (AccelerationStructureGeometryKHR)
#endif
deriving instance Show AccelerationStructureGeometryKHR
instance ToCStruct AccelerationStructureGeometryKHR where
withCStruct :: forall b.
AccelerationStructureGeometryKHR
-> (Ptr AccelerationStructureGeometryKHR -> IO b) -> IO b
withCStruct AccelerationStructureGeometryKHR
x Ptr AccelerationStructureGeometryKHR -> IO b
f = Int -> (Ptr AccelerationStructureGeometryKHR -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
96 ((Ptr AccelerationStructureGeometryKHR -> IO b) -> IO b)
-> (Ptr AccelerationStructureGeometryKHR -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr AccelerationStructureGeometryKHR
p -> Ptr AccelerationStructureGeometryKHR
-> AccelerationStructureGeometryKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr AccelerationStructureGeometryKHR
p AccelerationStructureGeometryKHR
x (Ptr AccelerationStructureGeometryKHR -> IO b
f Ptr AccelerationStructureGeometryKHR
p)
pokeCStruct :: forall b.
Ptr AccelerationStructureGeometryKHR
-> AccelerationStructureGeometryKHR -> IO b -> IO b
pokeCStruct Ptr AccelerationStructureGeometryKHR
p AccelerationStructureGeometryKHR{GeometryTypeKHR
GeometryFlagBitsKHR
AccelerationStructureGeometryDataKHR
flags :: GeometryFlagBitsKHR
geometry :: AccelerationStructureGeometryDataKHR
geometryType :: GeometryTypeKHR
$sel:flags:AccelerationStructureGeometryKHR :: AccelerationStructureGeometryKHR -> GeometryFlagBitsKHR
$sel:geometry:AccelerationStructureGeometryKHR :: AccelerationStructureGeometryKHR
-> AccelerationStructureGeometryDataKHR
$sel:geometryType:AccelerationStructureGeometryKHR :: AccelerationStructureGeometryKHR -> GeometryTypeKHR
..} IO b
f = ContT b IO b -> IO b
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT b IO b -> IO b) -> ContT b IO b -> IO b
forall a b. (a -> b) -> a -> b
$ do
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureGeometryKHR
p Ptr AccelerationStructureGeometryKHR -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_KHR)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr ("data" ::: Ptr ()) -> ("data" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureGeometryKHR
p Ptr AccelerationStructureGeometryKHR
-> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) ("data" ::: Ptr ()
forall a. Ptr a
nullPtr)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr GeometryTypeKHR -> GeometryTypeKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureGeometryKHR
p Ptr AccelerationStructureGeometryKHR -> Int -> Ptr GeometryTypeKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr GeometryTypeKHR)) (GeometryTypeKHR
geometryType)
((() -> IO b) -> IO b) -> ContT b IO ()
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((() -> IO b) -> IO b) -> ContT b IO ())
-> ((() -> IO b) -> IO b) -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr AccelerationStructureGeometryDataKHR
-> AccelerationStructureGeometryDataKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct ((Ptr AccelerationStructureGeometryKHR
p Ptr AccelerationStructureGeometryKHR
-> Int -> Ptr AccelerationStructureGeometryDataKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr AccelerationStructureGeometryDataKHR)) (AccelerationStructureGeometryDataKHR
geometry) (IO b -> IO b) -> ((() -> IO b) -> IO b) -> (() -> IO b) -> IO b
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((() -> IO b) -> () -> IO b
forall a b. (a -> b) -> a -> b
$ ())
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr GeometryFlagBitsKHR -> GeometryFlagBitsKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureGeometryKHR
p Ptr AccelerationStructureGeometryKHR
-> Int -> Ptr GeometryFlagBitsKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
88 :: Ptr GeometryFlagsKHR)) (GeometryFlagBitsKHR
flags)
IO b -> ContT b IO b
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO b -> ContT b IO b) -> IO b -> ContT b IO b
forall a b. (a -> b) -> a -> b
$ IO b
f
cStructSize :: Int
cStructSize = Int
96
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b. Ptr AccelerationStructureGeometryKHR -> IO b -> IO b
pokeZeroCStruct Ptr AccelerationStructureGeometryKHR
p IO b
f = ContT b IO b -> IO b
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT b IO b -> IO b) -> ContT b IO b -> IO b
forall a b. (a -> b) -> a -> b
$ do
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureGeometryKHR
p Ptr AccelerationStructureGeometryKHR -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_KHR)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr ("data" ::: Ptr ()) -> ("data" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureGeometryKHR
p Ptr AccelerationStructureGeometryKHR
-> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) ("data" ::: Ptr ()
forall a. Ptr a
nullPtr)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr GeometryTypeKHR -> GeometryTypeKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureGeometryKHR
p Ptr AccelerationStructureGeometryKHR -> Int -> Ptr GeometryTypeKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr GeometryTypeKHR)) (GeometryTypeKHR
forall a. Zero a => a
zero)
((() -> IO b) -> IO b) -> ContT b IO ()
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((() -> IO b) -> IO b) -> ContT b IO ())
-> ((() -> IO b) -> IO b) -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr AccelerationStructureGeometryDataKHR
-> AccelerationStructureGeometryDataKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct ((Ptr AccelerationStructureGeometryKHR
p Ptr AccelerationStructureGeometryKHR
-> Int -> Ptr AccelerationStructureGeometryDataKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr AccelerationStructureGeometryDataKHR)) (AccelerationStructureGeometryDataKHR
forall a. Zero a => a
zero) (IO b -> IO b) -> ((() -> IO b) -> IO b) -> (() -> IO b) -> IO b
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((() -> IO b) -> () -> IO b
forall a b. (a -> b) -> a -> b
$ ())
IO b -> ContT b IO b
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO b -> ContT b IO b) -> IO b -> ContT b IO b
forall a b. (a -> b) -> a -> b
$ IO b
f
instance Zero AccelerationStructureGeometryKHR where
zero :: AccelerationStructureGeometryKHR
zero = GeometryTypeKHR
-> AccelerationStructureGeometryDataKHR
-> GeometryFlagBitsKHR
-> AccelerationStructureGeometryKHR
AccelerationStructureGeometryKHR
GeometryTypeKHR
forall a. Zero a => a
zero
AccelerationStructureGeometryDataKHR
forall a. Zero a => a
zero
GeometryFlagBitsKHR
forall a. Zero a => a
zero
data AccelerationStructureBuildGeometryInfoKHR = AccelerationStructureBuildGeometryInfoKHR
{
AccelerationStructureBuildGeometryInfoKHR
-> AccelerationStructureTypeKHR
type' :: AccelerationStructureTypeKHR
,
AccelerationStructureBuildGeometryInfoKHR
-> BuildAccelerationStructureFlagBitsKHR
flags :: BuildAccelerationStructureFlagsKHR
,
AccelerationStructureBuildGeometryInfoKHR
-> BuildAccelerationStructureModeKHR
mode :: BuildAccelerationStructureModeKHR
,
AccelerationStructureBuildGeometryInfoKHR
-> AccelerationStructureKHR
srcAccelerationStructure :: AccelerationStructureKHR
,
AccelerationStructureBuildGeometryInfoKHR
-> AccelerationStructureKHR
dstAccelerationStructure :: AccelerationStructureKHR
,
AccelerationStructureBuildGeometryInfoKHR
-> Vector AccelerationStructureGeometryKHR
geometries :: Vector AccelerationStructureGeometryKHR
,
AccelerationStructureBuildGeometryInfoKHR -> DeviceOrHostAddressKHR
scratchData :: DeviceOrHostAddressKHR
}
deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (AccelerationStructureBuildGeometryInfoKHR)
#endif
deriving instance Show AccelerationStructureBuildGeometryInfoKHR
instance ToCStruct AccelerationStructureBuildGeometryInfoKHR where
withCStruct :: forall b.
AccelerationStructureBuildGeometryInfoKHR
-> (("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> IO b)
-> IO b
withCStruct AccelerationStructureBuildGeometryInfoKHR
x ("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> IO b
f = Int
-> (("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> IO b)
-> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
80 ((("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> IO b)
-> IO b)
-> (("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> IO b)
-> IO b
forall a b. (a -> b) -> a -> b
$ \"pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR
p -> ("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> AccelerationStructureBuildGeometryInfoKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR
p AccelerationStructureBuildGeometryInfoKHR
x (("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> IO b
f "pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR
p)
pokeCStruct :: forall b.
("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> AccelerationStructureBuildGeometryInfoKHR -> IO b -> IO b
pokeCStruct "pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR
p AccelerationStructureBuildGeometryInfoKHR{Vector AccelerationStructureGeometryKHR
AccelerationStructureKHR
AccelerationStructureTypeKHR
BuildAccelerationStructureFlagBitsKHR
BuildAccelerationStructureModeKHR
DeviceOrHostAddressKHR
scratchData :: DeviceOrHostAddressKHR
geometries :: Vector AccelerationStructureGeometryKHR
dstAccelerationStructure :: AccelerationStructureKHR
srcAccelerationStructure :: AccelerationStructureKHR
mode :: BuildAccelerationStructureModeKHR
flags :: BuildAccelerationStructureFlagBitsKHR
type' :: AccelerationStructureTypeKHR
$sel:scratchData:AccelerationStructureBuildGeometryInfoKHR :: AccelerationStructureBuildGeometryInfoKHR -> DeviceOrHostAddressKHR
$sel:geometries:AccelerationStructureBuildGeometryInfoKHR :: AccelerationStructureBuildGeometryInfoKHR
-> Vector AccelerationStructureGeometryKHR
$sel:dstAccelerationStructure:AccelerationStructureBuildGeometryInfoKHR :: AccelerationStructureBuildGeometryInfoKHR
-> AccelerationStructureKHR
$sel:srcAccelerationStructure:AccelerationStructureBuildGeometryInfoKHR :: AccelerationStructureBuildGeometryInfoKHR
-> AccelerationStructureKHR
$sel:mode:AccelerationStructureBuildGeometryInfoKHR :: AccelerationStructureBuildGeometryInfoKHR
-> BuildAccelerationStructureModeKHR
$sel:flags:AccelerationStructureBuildGeometryInfoKHR :: AccelerationStructureBuildGeometryInfoKHR
-> BuildAccelerationStructureFlagBitsKHR
$sel:type':AccelerationStructureBuildGeometryInfoKHR :: AccelerationStructureBuildGeometryInfoKHR
-> AccelerationStructureTypeKHR
..} IO b
f = ContT b IO b -> IO b
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT b IO b -> IO b) -> ContT b IO b -> IO b
forall a b. (a -> b) -> a -> b
$ do
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR
p ("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_ACCELERATION_STRUCTURE_BUILD_GEOMETRY_INFO_KHR)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr ("data" ::: Ptr ()) -> ("data" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR
p ("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) ("data" ::: Ptr ()
forall a. Ptr a
nullPtr)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr AccelerationStructureTypeKHR
-> AccelerationStructureTypeKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR
p ("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> Int -> Ptr AccelerationStructureTypeKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr AccelerationStructureTypeKHR)) (AccelerationStructureTypeKHR
type')
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr BuildAccelerationStructureFlagBitsKHR
-> BuildAccelerationStructureFlagBitsKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR
p ("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> Int -> Ptr BuildAccelerationStructureFlagBitsKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr BuildAccelerationStructureFlagsKHR)) (BuildAccelerationStructureFlagBitsKHR
flags)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr BuildAccelerationStructureModeKHR
-> BuildAccelerationStructureModeKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR
p ("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> Int -> Ptr BuildAccelerationStructureModeKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr BuildAccelerationStructureModeKHR)) (BuildAccelerationStructureModeKHR
mode)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> AccelerationStructureKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR
p ("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> Int
-> "pAccelerationStructures" ::: Ptr AccelerationStructureKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr AccelerationStructureKHR)) (AccelerationStructureKHR
srcAccelerationStructure)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> AccelerationStructureKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR
p ("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> Int
-> "pAccelerationStructures" ::: Ptr AccelerationStructureKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr AccelerationStructureKHR)) (AccelerationStructureKHR
dstAccelerationStructure)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ ("pIndirectStrides" ::: Ptr Flags) -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR
p ("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> Int -> "pIndirectStrides" ::: Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr Word32)) ((Int -> Flags
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Vector AccelerationStructureGeometryKHR -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector AccelerationStructureGeometryKHR -> Int)
-> Vector AccelerationStructureGeometryKHR -> Int
forall a b. (a -> b) -> a -> b
$ (Vector AccelerationStructureGeometryKHR
geometries)) :: Word32))
Ptr AccelerationStructureGeometryKHR
pPGeometries' <- ((Ptr AccelerationStructureGeometryKHR -> IO b) -> IO b)
-> ContT b IO (Ptr AccelerationStructureGeometryKHR)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr AccelerationStructureGeometryKHR -> IO b) -> IO b)
-> ContT b IO (Ptr AccelerationStructureGeometryKHR))
-> ((Ptr AccelerationStructureGeometryKHR -> IO b) -> IO b)
-> ContT b IO (Ptr AccelerationStructureGeometryKHR)
forall a b. (a -> b) -> a -> b
$ forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes @AccelerationStructureGeometryKHR ((Vector AccelerationStructureGeometryKHR -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector AccelerationStructureGeometryKHR
geometries)) Int -> Int -> Int
forall a. Num a => a -> a -> a
* Int
96)
(Int -> AccelerationStructureGeometryKHR -> ContT b IO ())
-> Vector AccelerationStructureGeometryKHR -> ContT b IO ()
forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\Int
i AccelerationStructureGeometryKHR
e -> ((() -> IO b) -> IO b) -> ContT b IO ()
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((() -> IO b) -> IO b) -> ContT b IO ())
-> ((() -> IO b) -> IO b) -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr AccelerationStructureGeometryKHR
-> AccelerationStructureGeometryKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct (Ptr AccelerationStructureGeometryKHR
pPGeometries' Ptr AccelerationStructureGeometryKHR
-> Int -> Ptr AccelerationStructureGeometryKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (Int
96 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr AccelerationStructureGeometryKHR) (AccelerationStructureGeometryKHR
e) (IO b -> IO b) -> ((() -> IO b) -> IO b) -> (() -> IO b) -> IO b
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((() -> IO b) -> () -> IO b
forall a b. (a -> b) -> a -> b
$ ())) (Vector AccelerationStructureGeometryKHR
geometries)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (Ptr AccelerationStructureGeometryKHR)
-> Ptr AccelerationStructureGeometryKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR
p ("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> Int -> Ptr (Ptr AccelerationStructureGeometryKHR)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56 :: Ptr (Ptr AccelerationStructureGeometryKHR))) (Ptr AccelerationStructureGeometryKHR
pPGeometries')
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (Ptr (Ptr AccelerationStructureGeometryKHR))
-> Ptr (Ptr AccelerationStructureGeometryKHR) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR
p ("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> Int -> Ptr (Ptr (Ptr AccelerationStructureGeometryKHR))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
64 :: Ptr (Ptr (Ptr AccelerationStructureGeometryKHR)))) (Ptr (Ptr AccelerationStructureGeometryKHR)
forall a. Ptr a
nullPtr)
((() -> IO b) -> IO b) -> ContT b IO ()
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((() -> IO b) -> IO b) -> ContT b IO ())
-> ((() -> IO b) -> IO b) -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr DeviceOrHostAddressKHR
-> DeviceOrHostAddressKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct (("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR
p ("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> Int -> Ptr DeviceOrHostAddressKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
72 :: Ptr DeviceOrHostAddressKHR)) (DeviceOrHostAddressKHR
scratchData) (IO b -> IO b) -> ((() -> IO b) -> IO b) -> (() -> IO b) -> IO b
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((() -> IO b) -> () -> IO b
forall a b. (a -> b) -> a -> b
$ ())
IO b -> ContT b IO b
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO b -> ContT b IO b) -> IO b -> ContT b IO b
forall a b. (a -> b) -> a -> b
$ IO b
f
cStructSize :: Int
cStructSize = Int
80
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> IO b -> IO b
pokeZeroCStruct "pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR
p IO b
f = ContT b IO b -> IO b
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT b IO b -> IO b) -> ContT b IO b -> IO b
forall a b. (a -> b) -> a -> b
$ do
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR
p ("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_ACCELERATION_STRUCTURE_BUILD_GEOMETRY_INFO_KHR)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr ("data" ::: Ptr ()) -> ("data" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR
p ("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) ("data" ::: Ptr ()
forall a. Ptr a
nullPtr)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr AccelerationStructureTypeKHR
-> AccelerationStructureTypeKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR
p ("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> Int -> Ptr AccelerationStructureTypeKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr AccelerationStructureTypeKHR)) (AccelerationStructureTypeKHR
forall a. Zero a => a
zero)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr BuildAccelerationStructureModeKHR
-> BuildAccelerationStructureModeKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR
p ("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> Int -> Ptr BuildAccelerationStructureModeKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr BuildAccelerationStructureModeKHR)) (BuildAccelerationStructureModeKHR
forall a. Zero a => a
zero)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (Ptr (Ptr AccelerationStructureGeometryKHR))
-> Ptr (Ptr AccelerationStructureGeometryKHR) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR
p ("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> Int -> Ptr (Ptr (Ptr AccelerationStructureGeometryKHR))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
64 :: Ptr (Ptr (Ptr AccelerationStructureGeometryKHR)))) (Ptr (Ptr AccelerationStructureGeometryKHR)
forall a. Ptr a
nullPtr)
((() -> IO b) -> IO b) -> ContT b IO ()
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((() -> IO b) -> IO b) -> ContT b IO ())
-> ((() -> IO b) -> IO b) -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr DeviceOrHostAddressKHR
-> DeviceOrHostAddressKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct (("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR
p ("pInfos" ::: Ptr AccelerationStructureBuildGeometryInfoKHR)
-> Int -> Ptr DeviceOrHostAddressKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
72 :: Ptr DeviceOrHostAddressKHR)) (DeviceOrHostAddressKHR
forall a. Zero a => a
zero) (IO b -> IO b) -> ((() -> IO b) -> IO b) -> (() -> IO b) -> IO b
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((() -> IO b) -> () -> IO b
forall a b. (a -> b) -> a -> b
$ ())
IO b -> ContT b IO b
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO b -> ContT b IO b) -> IO b -> ContT b IO b
forall a b. (a -> b) -> a -> b
$ IO b
f
instance Zero AccelerationStructureBuildGeometryInfoKHR where
zero :: AccelerationStructureBuildGeometryInfoKHR
zero = AccelerationStructureTypeKHR
-> BuildAccelerationStructureFlagBitsKHR
-> BuildAccelerationStructureModeKHR
-> AccelerationStructureKHR
-> AccelerationStructureKHR
-> Vector AccelerationStructureGeometryKHR
-> DeviceOrHostAddressKHR
-> AccelerationStructureBuildGeometryInfoKHR
AccelerationStructureBuildGeometryInfoKHR
AccelerationStructureTypeKHR
forall a. Zero a => a
zero
BuildAccelerationStructureFlagBitsKHR
forall a. Zero a => a
zero
BuildAccelerationStructureModeKHR
forall a. Zero a => a
zero
AccelerationStructureKHR
forall a. Zero a => a
zero
AccelerationStructureKHR
forall a. Zero a => a
zero
Vector AccelerationStructureGeometryKHR
forall a. Monoid a => a
mempty
DeviceOrHostAddressKHR
forall a. Zero a => a
zero
data AccelerationStructureBuildRangeInfoKHR = AccelerationStructureBuildRangeInfoKHR
{
AccelerationStructureBuildRangeInfoKHR -> Flags
primitiveCount :: Word32
,
AccelerationStructureBuildRangeInfoKHR -> Flags
primitiveOffset :: Word32
,
AccelerationStructureBuildRangeInfoKHR -> Flags
firstVertex :: Word32
,
AccelerationStructureBuildRangeInfoKHR -> Flags
transformOffset :: Word32
}
deriving (Typeable, AccelerationStructureBuildRangeInfoKHR
-> AccelerationStructureBuildRangeInfoKHR -> Bool
(AccelerationStructureBuildRangeInfoKHR
-> AccelerationStructureBuildRangeInfoKHR -> Bool)
-> (AccelerationStructureBuildRangeInfoKHR
-> AccelerationStructureBuildRangeInfoKHR -> Bool)
-> Eq AccelerationStructureBuildRangeInfoKHR
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AccelerationStructureBuildRangeInfoKHR
-> AccelerationStructureBuildRangeInfoKHR -> Bool
$c/= :: AccelerationStructureBuildRangeInfoKHR
-> AccelerationStructureBuildRangeInfoKHR -> Bool
== :: AccelerationStructureBuildRangeInfoKHR
-> AccelerationStructureBuildRangeInfoKHR -> Bool
$c== :: AccelerationStructureBuildRangeInfoKHR
-> AccelerationStructureBuildRangeInfoKHR -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (AccelerationStructureBuildRangeInfoKHR)
#endif
deriving instance Show AccelerationStructureBuildRangeInfoKHR
instance ToCStruct AccelerationStructureBuildRangeInfoKHR where
withCStruct :: forall b.
AccelerationStructureBuildRangeInfoKHR
-> (Ptr AccelerationStructureBuildRangeInfoKHR -> IO b) -> IO b
withCStruct AccelerationStructureBuildRangeInfoKHR
x Ptr AccelerationStructureBuildRangeInfoKHR -> IO b
f = Int -> (Ptr AccelerationStructureBuildRangeInfoKHR -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
16 ((Ptr AccelerationStructureBuildRangeInfoKHR -> IO b) -> IO b)
-> (Ptr AccelerationStructureBuildRangeInfoKHR -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr AccelerationStructureBuildRangeInfoKHR
p -> Ptr AccelerationStructureBuildRangeInfoKHR
-> AccelerationStructureBuildRangeInfoKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr AccelerationStructureBuildRangeInfoKHR
p AccelerationStructureBuildRangeInfoKHR
x (Ptr AccelerationStructureBuildRangeInfoKHR -> IO b
f Ptr AccelerationStructureBuildRangeInfoKHR
p)
pokeCStruct :: forall b.
Ptr AccelerationStructureBuildRangeInfoKHR
-> AccelerationStructureBuildRangeInfoKHR -> IO b -> IO b
pokeCStruct Ptr AccelerationStructureBuildRangeInfoKHR
p AccelerationStructureBuildRangeInfoKHR{Flags
transformOffset :: Flags
firstVertex :: Flags
primitiveOffset :: Flags
primitiveCount :: Flags
$sel:transformOffset:AccelerationStructureBuildRangeInfoKHR :: AccelerationStructureBuildRangeInfoKHR -> Flags
$sel:firstVertex:AccelerationStructureBuildRangeInfoKHR :: AccelerationStructureBuildRangeInfoKHR -> Flags
$sel:primitiveOffset:AccelerationStructureBuildRangeInfoKHR :: AccelerationStructureBuildRangeInfoKHR -> Flags
$sel:primitiveCount:AccelerationStructureBuildRangeInfoKHR :: AccelerationStructureBuildRangeInfoKHR -> Flags
..} IO b
f = do
("pIndirectStrides" ::: Ptr Flags) -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureBuildRangeInfoKHR
p Ptr AccelerationStructureBuildRangeInfoKHR
-> Int -> "pIndirectStrides" ::: Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr Word32)) (Flags
primitiveCount)
("pIndirectStrides" ::: Ptr Flags) -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureBuildRangeInfoKHR
p Ptr AccelerationStructureBuildRangeInfoKHR
-> Int -> "pIndirectStrides" ::: Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4 :: Ptr Word32)) (Flags
primitiveOffset)
("pIndirectStrides" ::: Ptr Flags) -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureBuildRangeInfoKHR
p Ptr AccelerationStructureBuildRangeInfoKHR
-> Int -> "pIndirectStrides" ::: Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr Word32)) (Flags
firstVertex)
("pIndirectStrides" ::: Ptr Flags) -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureBuildRangeInfoKHR
p Ptr AccelerationStructureBuildRangeInfoKHR
-> Int -> "pIndirectStrides" ::: Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
12 :: Ptr Word32)) (Flags
transformOffset)
IO b
f
cStructSize :: Int
cStructSize = Int
16
cStructAlignment :: Int
cStructAlignment = Int
4
pokeZeroCStruct :: forall b.
Ptr AccelerationStructureBuildRangeInfoKHR -> IO b -> IO b
pokeZeroCStruct Ptr AccelerationStructureBuildRangeInfoKHR
p IO b
f = do
("pIndirectStrides" ::: Ptr Flags) -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureBuildRangeInfoKHR
p Ptr AccelerationStructureBuildRangeInfoKHR
-> Int -> "pIndirectStrides" ::: Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr Word32)) (Flags
forall a. Zero a => a
zero)
("pIndirectStrides" ::: Ptr Flags) -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureBuildRangeInfoKHR
p Ptr AccelerationStructureBuildRangeInfoKHR
-> Int -> "pIndirectStrides" ::: Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4 :: Ptr Word32)) (Flags
forall a. Zero a => a
zero)
("pIndirectStrides" ::: Ptr Flags) -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureBuildRangeInfoKHR
p Ptr AccelerationStructureBuildRangeInfoKHR
-> Int -> "pIndirectStrides" ::: Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr Word32)) (Flags
forall a. Zero a => a
zero)
("pIndirectStrides" ::: Ptr Flags) -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureBuildRangeInfoKHR
p Ptr AccelerationStructureBuildRangeInfoKHR
-> Int -> "pIndirectStrides" ::: Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
12 :: Ptr Word32)) (Flags
forall a. Zero a => a
zero)
IO b
f
instance FromCStruct AccelerationStructureBuildRangeInfoKHR where
peekCStruct :: Ptr AccelerationStructureBuildRangeInfoKHR
-> IO AccelerationStructureBuildRangeInfoKHR
peekCStruct Ptr AccelerationStructureBuildRangeInfoKHR
p = do
Flags
primitiveCount <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr AccelerationStructureBuildRangeInfoKHR
p Ptr AccelerationStructureBuildRangeInfoKHR
-> Int -> "pIndirectStrides" ::: Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr Word32))
Flags
primitiveOffset <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr AccelerationStructureBuildRangeInfoKHR
p Ptr AccelerationStructureBuildRangeInfoKHR
-> Int -> "pIndirectStrides" ::: Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4 :: Ptr Word32))
Flags
firstVertex <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr AccelerationStructureBuildRangeInfoKHR
p Ptr AccelerationStructureBuildRangeInfoKHR
-> Int -> "pIndirectStrides" ::: Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr Word32))
Flags
transformOffset <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr AccelerationStructureBuildRangeInfoKHR
p Ptr AccelerationStructureBuildRangeInfoKHR
-> Int -> "pIndirectStrides" ::: Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
12 :: Ptr Word32))
AccelerationStructureBuildRangeInfoKHR
-> IO AccelerationStructureBuildRangeInfoKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure (AccelerationStructureBuildRangeInfoKHR
-> IO AccelerationStructureBuildRangeInfoKHR)
-> AccelerationStructureBuildRangeInfoKHR
-> IO AccelerationStructureBuildRangeInfoKHR
forall a b. (a -> b) -> a -> b
$ Flags
-> Flags
-> Flags
-> Flags
-> AccelerationStructureBuildRangeInfoKHR
AccelerationStructureBuildRangeInfoKHR
Flags
primitiveCount Flags
primitiveOffset Flags
firstVertex Flags
transformOffset
instance Storable AccelerationStructureBuildRangeInfoKHR where
sizeOf :: AccelerationStructureBuildRangeInfoKHR -> Int
sizeOf ~AccelerationStructureBuildRangeInfoKHR
_ = Int
16
alignment :: AccelerationStructureBuildRangeInfoKHR -> Int
alignment ~AccelerationStructureBuildRangeInfoKHR
_ = Int
4
peek :: Ptr AccelerationStructureBuildRangeInfoKHR
-> IO AccelerationStructureBuildRangeInfoKHR
peek = Ptr AccelerationStructureBuildRangeInfoKHR
-> IO AccelerationStructureBuildRangeInfoKHR
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr AccelerationStructureBuildRangeInfoKHR
-> AccelerationStructureBuildRangeInfoKHR -> IO ()
poke Ptr AccelerationStructureBuildRangeInfoKHR
ptr AccelerationStructureBuildRangeInfoKHR
poked = Ptr AccelerationStructureBuildRangeInfoKHR
-> AccelerationStructureBuildRangeInfoKHR -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr AccelerationStructureBuildRangeInfoKHR
ptr AccelerationStructureBuildRangeInfoKHR
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero AccelerationStructureBuildRangeInfoKHR where
zero :: AccelerationStructureBuildRangeInfoKHR
zero = Flags
-> Flags
-> Flags
-> Flags
-> AccelerationStructureBuildRangeInfoKHR
AccelerationStructureBuildRangeInfoKHR
Flags
forall a. Zero a => a
zero
Flags
forall a. Zero a => a
zero
Flags
forall a. Zero a => a
zero
Flags
forall a. Zero a => a
zero
data AccelerationStructureCreateInfoKHR (es :: [Type]) = AccelerationStructureCreateInfoKHR
{
forall (es :: [*]).
AccelerationStructureCreateInfoKHR es -> Chain es
next :: Chain es
,
forall (es :: [*]).
AccelerationStructureCreateInfoKHR es
-> AccelerationStructureCreateFlagBitsKHR
createFlags :: AccelerationStructureCreateFlagsKHR
,
forall (es :: [*]). AccelerationStructureCreateInfoKHR es -> Buffer
buffer :: Buffer
,
forall (es :: [*]).
AccelerationStructureCreateInfoKHR es -> "dataSize" ::: Word64
offset :: DeviceSize
,
forall (es :: [*]).
AccelerationStructureCreateInfoKHR es -> "dataSize" ::: Word64
size :: DeviceSize
,
forall (es :: [*]).
AccelerationStructureCreateInfoKHR es
-> AccelerationStructureTypeKHR
type' :: AccelerationStructureTypeKHR
,
forall (es :: [*]).
AccelerationStructureCreateInfoKHR es -> "dataSize" ::: Word64
deviceAddress :: DeviceAddress
}
deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (AccelerationStructureCreateInfoKHR (es :: [Type]))
#endif
deriving instance Show (Chain es) => Show (AccelerationStructureCreateInfoKHR es)
instance Extensible AccelerationStructureCreateInfoKHR where
extensibleTypeName :: String
extensibleTypeName = String
"AccelerationStructureCreateInfoKHR"
setNext :: forall (ds :: [*]) (es :: [*]).
AccelerationStructureCreateInfoKHR ds
-> Chain es -> AccelerationStructureCreateInfoKHR es
setNext AccelerationStructureCreateInfoKHR{"dataSize" ::: Word64
Chain ds
Buffer
AccelerationStructureTypeKHR
AccelerationStructureCreateFlagBitsKHR
deviceAddress :: "dataSize" ::: Word64
type' :: AccelerationStructureTypeKHR
size :: "dataSize" ::: Word64
offset :: "dataSize" ::: Word64
buffer :: Buffer
createFlags :: AccelerationStructureCreateFlagBitsKHR
next :: Chain ds
$sel:deviceAddress:AccelerationStructureCreateInfoKHR :: forall (es :: [*]).
AccelerationStructureCreateInfoKHR es -> "dataSize" ::: Word64
$sel:type':AccelerationStructureCreateInfoKHR :: forall (es :: [*]).
AccelerationStructureCreateInfoKHR es
-> AccelerationStructureTypeKHR
$sel:size:AccelerationStructureCreateInfoKHR :: forall (es :: [*]).
AccelerationStructureCreateInfoKHR es -> "dataSize" ::: Word64
$sel:offset:AccelerationStructureCreateInfoKHR :: forall (es :: [*]).
AccelerationStructureCreateInfoKHR es -> "dataSize" ::: Word64
$sel:buffer:AccelerationStructureCreateInfoKHR :: forall (es :: [*]). AccelerationStructureCreateInfoKHR es -> Buffer
$sel:createFlags:AccelerationStructureCreateInfoKHR :: forall (es :: [*]).
AccelerationStructureCreateInfoKHR es
-> AccelerationStructureCreateFlagBitsKHR
$sel:next:AccelerationStructureCreateInfoKHR :: forall (es :: [*]).
AccelerationStructureCreateInfoKHR es -> Chain es
..} Chain es
next' = AccelerationStructureCreateInfoKHR :: forall (es :: [*]).
Chain es
-> AccelerationStructureCreateFlagBitsKHR
-> Buffer
-> ("dataSize" ::: Word64)
-> ("dataSize" ::: Word64)
-> AccelerationStructureTypeKHR
-> ("dataSize" ::: Word64)
-> AccelerationStructureCreateInfoKHR es
AccelerationStructureCreateInfoKHR{$sel:next:AccelerationStructureCreateInfoKHR :: Chain es
next = Chain es
next', "dataSize" ::: Word64
Buffer
AccelerationStructureTypeKHR
AccelerationStructureCreateFlagBitsKHR
deviceAddress :: "dataSize" ::: Word64
type' :: AccelerationStructureTypeKHR
size :: "dataSize" ::: Word64
offset :: "dataSize" ::: Word64
buffer :: Buffer
createFlags :: AccelerationStructureCreateFlagBitsKHR
$sel:deviceAddress:AccelerationStructureCreateInfoKHR :: "dataSize" ::: Word64
$sel:type':AccelerationStructureCreateInfoKHR :: AccelerationStructureTypeKHR
$sel:size:AccelerationStructureCreateInfoKHR :: "dataSize" ::: Word64
$sel:offset:AccelerationStructureCreateInfoKHR :: "dataSize" ::: Word64
$sel:buffer:AccelerationStructureCreateInfoKHR :: Buffer
$sel:createFlags:AccelerationStructureCreateInfoKHR :: AccelerationStructureCreateFlagBitsKHR
..}
getNext :: forall (es :: [*]).
AccelerationStructureCreateInfoKHR es -> Chain es
getNext AccelerationStructureCreateInfoKHR{"dataSize" ::: Word64
Chain es
Buffer
AccelerationStructureTypeKHR
AccelerationStructureCreateFlagBitsKHR
deviceAddress :: "dataSize" ::: Word64
type' :: AccelerationStructureTypeKHR
size :: "dataSize" ::: Word64
offset :: "dataSize" ::: Word64
buffer :: Buffer
createFlags :: AccelerationStructureCreateFlagBitsKHR
next :: Chain es
$sel:deviceAddress:AccelerationStructureCreateInfoKHR :: forall (es :: [*]).
AccelerationStructureCreateInfoKHR es -> "dataSize" ::: Word64
$sel:type':AccelerationStructureCreateInfoKHR :: forall (es :: [*]).
AccelerationStructureCreateInfoKHR es
-> AccelerationStructureTypeKHR
$sel:size:AccelerationStructureCreateInfoKHR :: forall (es :: [*]).
AccelerationStructureCreateInfoKHR es -> "dataSize" ::: Word64
$sel:offset:AccelerationStructureCreateInfoKHR :: forall (es :: [*]).
AccelerationStructureCreateInfoKHR es -> "dataSize" ::: Word64
$sel:buffer:AccelerationStructureCreateInfoKHR :: forall (es :: [*]). AccelerationStructureCreateInfoKHR es -> Buffer
$sel:createFlags:AccelerationStructureCreateInfoKHR :: forall (es :: [*]).
AccelerationStructureCreateInfoKHR es
-> AccelerationStructureCreateFlagBitsKHR
$sel:next:AccelerationStructureCreateInfoKHR :: forall (es :: [*]).
AccelerationStructureCreateInfoKHR es -> Chain es
..} = Chain es
next
extends :: forall e b proxy. Typeable e => proxy e -> (Extends AccelerationStructureCreateInfoKHR e => b) -> Maybe b
extends :: forall e b (proxy :: * -> *).
Typeable e =>
proxy e
-> (Extends AccelerationStructureCreateInfoKHR e => b) -> Maybe b
extends proxy e
_ Extends AccelerationStructureCreateInfoKHR e => b
f
| Just e :~: AccelerationStructureMotionInfoNV
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @AccelerationStructureMotionInfoNV = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends AccelerationStructureCreateInfoKHR e => b
f
| Bool
otherwise = Maybe b
forall a. Maybe a
Nothing
instance ( Extendss AccelerationStructureCreateInfoKHR es
, PokeChain es ) => ToCStruct (AccelerationStructureCreateInfoKHR es) where
withCStruct :: forall b.
AccelerationStructureCreateInfoKHR es
-> (Ptr (AccelerationStructureCreateInfoKHR es) -> IO b) -> IO b
withCStruct AccelerationStructureCreateInfoKHR es
x Ptr (AccelerationStructureCreateInfoKHR es) -> IO b
f = Int
-> (Ptr (AccelerationStructureCreateInfoKHR es) -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
64 ((Ptr (AccelerationStructureCreateInfoKHR es) -> IO b) -> IO b)
-> (Ptr (AccelerationStructureCreateInfoKHR es) -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr (AccelerationStructureCreateInfoKHR es)
p -> Ptr (AccelerationStructureCreateInfoKHR es)
-> AccelerationStructureCreateInfoKHR es -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr (AccelerationStructureCreateInfoKHR es)
p AccelerationStructureCreateInfoKHR es
x (Ptr (AccelerationStructureCreateInfoKHR es) -> IO b
f Ptr (AccelerationStructureCreateInfoKHR es)
p)
pokeCStruct :: forall b.
Ptr (AccelerationStructureCreateInfoKHR es)
-> AccelerationStructureCreateInfoKHR es -> IO b -> IO b
pokeCStruct Ptr (AccelerationStructureCreateInfoKHR es)
p AccelerationStructureCreateInfoKHR{"dataSize" ::: Word64
Chain es
Buffer
AccelerationStructureTypeKHR
AccelerationStructureCreateFlagBitsKHR
deviceAddress :: "dataSize" ::: Word64
type' :: AccelerationStructureTypeKHR
size :: "dataSize" ::: Word64
offset :: "dataSize" ::: Word64
buffer :: Buffer
createFlags :: AccelerationStructureCreateFlagBitsKHR
next :: Chain es
$sel:deviceAddress:AccelerationStructureCreateInfoKHR :: forall (es :: [*]).
AccelerationStructureCreateInfoKHR es -> "dataSize" ::: Word64
$sel:type':AccelerationStructureCreateInfoKHR :: forall (es :: [*]).
AccelerationStructureCreateInfoKHR es
-> AccelerationStructureTypeKHR
$sel:size:AccelerationStructureCreateInfoKHR :: forall (es :: [*]).
AccelerationStructureCreateInfoKHR es -> "dataSize" ::: Word64
$sel:offset:AccelerationStructureCreateInfoKHR :: forall (es :: [*]).
AccelerationStructureCreateInfoKHR es -> "dataSize" ::: Word64
$sel:buffer:AccelerationStructureCreateInfoKHR :: forall (es :: [*]). AccelerationStructureCreateInfoKHR es -> Buffer
$sel:createFlags:AccelerationStructureCreateInfoKHR :: forall (es :: [*]).
AccelerationStructureCreateInfoKHR es
-> AccelerationStructureCreateFlagBitsKHR
$sel:next:AccelerationStructureCreateInfoKHR :: forall (es :: [*]).
AccelerationStructureCreateInfoKHR es -> Chain es
..} IO b
f = ContT b IO b -> IO b
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT b IO b -> IO b) -> ContT b IO b -> IO b
forall a b. (a -> b) -> a -> b
$ do
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (AccelerationStructureCreateInfoKHR es)
p Ptr (AccelerationStructureCreateInfoKHR es)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_ACCELERATION_STRUCTURE_CREATE_INFO_KHR)
"data" ::: Ptr ()
pNext'' <- (Ptr (Chain es) -> "data" ::: Ptr ())
-> ContT b IO (Ptr (Chain es)) -> ContT b IO ("data" ::: Ptr ())
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap Ptr (Chain es) -> "data" ::: Ptr ()
forall a b. Ptr a -> Ptr b
castPtr (ContT b IO (Ptr (Chain es)) -> ContT b IO ("data" ::: Ptr ()))
-> (((Ptr (Chain es) -> IO b) -> IO b)
-> ContT b IO (Ptr (Chain es)))
-> ((Ptr (Chain es) -> IO b) -> IO b)
-> ContT b IO ("data" ::: Ptr ())
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((Ptr (Chain es) -> IO b) -> IO b) -> ContT b IO (Ptr (Chain es))
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr (Chain es) -> IO b) -> IO b)
-> ContT b IO ("data" ::: Ptr ()))
-> ((Ptr (Chain es) -> IO b) -> IO b)
-> ContT b IO ("data" ::: Ptr ())
forall a b. (a -> b) -> a -> b
$ Chain es -> (Ptr (Chain es) -> IO b) -> IO b
forall (es :: [*]) a.
PokeChain es =>
Chain es -> (Ptr (Chain es) -> IO a) -> IO a
withChain (Chain es
next)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr ("data" ::: Ptr ()) -> ("data" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (AccelerationStructureCreateInfoKHR es)
p Ptr (AccelerationStructureCreateInfoKHR es)
-> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) "data" ::: Ptr ()
pNext''
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr AccelerationStructureCreateFlagBitsKHR
-> AccelerationStructureCreateFlagBitsKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (AccelerationStructureCreateInfoKHR es)
p Ptr (AccelerationStructureCreateInfoKHR es)
-> Int -> Ptr AccelerationStructureCreateFlagBitsKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr AccelerationStructureCreateFlagsKHR)) (AccelerationStructureCreateFlagBitsKHR
createFlags)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr Buffer -> Buffer -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (AccelerationStructureCreateInfoKHR es)
p Ptr (AccelerationStructureCreateInfoKHR es) -> Int -> Ptr Buffer
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Buffer)) (Buffer
buffer)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ ("pIndirectDeviceAddresses" ::: Ptr ("dataSize" ::: Word64))
-> ("dataSize" ::: Word64) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (AccelerationStructureCreateInfoKHR es)
p Ptr (AccelerationStructureCreateInfoKHR es)
-> Int
-> "pIndirectDeviceAddresses" ::: Ptr ("dataSize" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr DeviceSize)) ("dataSize" ::: Word64
offset)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ ("pIndirectDeviceAddresses" ::: Ptr ("dataSize" ::: Word64))
-> ("dataSize" ::: Word64) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (AccelerationStructureCreateInfoKHR es)
p Ptr (AccelerationStructureCreateInfoKHR es)
-> Int
-> "pIndirectDeviceAddresses" ::: Ptr ("dataSize" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr DeviceSize)) ("dataSize" ::: Word64
size)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr AccelerationStructureTypeKHR
-> AccelerationStructureTypeKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (AccelerationStructureCreateInfoKHR es)
p Ptr (AccelerationStructureCreateInfoKHR es)
-> Int -> Ptr AccelerationStructureTypeKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr AccelerationStructureTypeKHR)) (AccelerationStructureTypeKHR
type')
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ ("pIndirectDeviceAddresses" ::: Ptr ("dataSize" ::: Word64))
-> ("dataSize" ::: Word64) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (AccelerationStructureCreateInfoKHR es)
p Ptr (AccelerationStructureCreateInfoKHR es)
-> Int
-> "pIndirectDeviceAddresses" ::: Ptr ("dataSize" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56 :: Ptr DeviceAddress)) ("dataSize" ::: Word64
deviceAddress)
IO b -> ContT b IO b
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO b -> ContT b IO b) -> IO b -> ContT b IO b
forall a b. (a -> b) -> a -> b
$ IO b
f
cStructSize :: Int
cStructSize = Int
64
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
Ptr (AccelerationStructureCreateInfoKHR es) -> IO b -> IO b
pokeZeroCStruct Ptr (AccelerationStructureCreateInfoKHR es)
p IO b
f = ContT b IO b -> IO b
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT b IO b -> IO b) -> ContT b IO b -> IO b
forall a b. (a -> b) -> a -> b
$ do
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (AccelerationStructureCreateInfoKHR es)
p Ptr (AccelerationStructureCreateInfoKHR es)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_ACCELERATION_STRUCTURE_CREATE_INFO_KHR)
"data" ::: Ptr ()
pNext' <- (Ptr (Chain es) -> "data" ::: Ptr ())
-> ContT b IO (Ptr (Chain es)) -> ContT b IO ("data" ::: Ptr ())
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap Ptr (Chain es) -> "data" ::: Ptr ()
forall a b. Ptr a -> Ptr b
castPtr (ContT b IO (Ptr (Chain es)) -> ContT b IO ("data" ::: Ptr ()))
-> (((Ptr (Chain es) -> IO b) -> IO b)
-> ContT b IO (Ptr (Chain es)))
-> ((Ptr (Chain es) -> IO b) -> IO b)
-> ContT b IO ("data" ::: Ptr ())
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((Ptr (Chain es) -> IO b) -> IO b) -> ContT b IO (Ptr (Chain es))
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr (Chain es) -> IO b) -> IO b)
-> ContT b IO ("data" ::: Ptr ()))
-> ((Ptr (Chain es) -> IO b) -> IO b)
-> ContT b IO ("data" ::: Ptr ())
forall a b. (a -> b) -> a -> b
$ forall (es :: [*]) a.
PokeChain es =>
(Ptr (Chain es) -> IO a) -> IO a
withZeroChain @es
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr ("data" ::: Ptr ()) -> ("data" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (AccelerationStructureCreateInfoKHR es)
p Ptr (AccelerationStructureCreateInfoKHR es)
-> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) "data" ::: Ptr ()
pNext'
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr Buffer -> Buffer -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (AccelerationStructureCreateInfoKHR es)
p Ptr (AccelerationStructureCreateInfoKHR es) -> Int -> Ptr Buffer
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Buffer)) (Buffer
forall a. Zero a => a
zero)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ ("pIndirectDeviceAddresses" ::: Ptr ("dataSize" ::: Word64))
-> ("dataSize" ::: Word64) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (AccelerationStructureCreateInfoKHR es)
p Ptr (AccelerationStructureCreateInfoKHR es)
-> Int
-> "pIndirectDeviceAddresses" ::: Ptr ("dataSize" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr DeviceSize)) ("dataSize" ::: Word64
forall a. Zero a => a
zero)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ ("pIndirectDeviceAddresses" ::: Ptr ("dataSize" ::: Word64))
-> ("dataSize" ::: Word64) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (AccelerationStructureCreateInfoKHR es)
p Ptr (AccelerationStructureCreateInfoKHR es)
-> Int
-> "pIndirectDeviceAddresses" ::: Ptr ("dataSize" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr DeviceSize)) ("dataSize" ::: Word64
forall a. Zero a => a
zero)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr AccelerationStructureTypeKHR
-> AccelerationStructureTypeKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (AccelerationStructureCreateInfoKHR es)
p Ptr (AccelerationStructureCreateInfoKHR es)
-> Int -> Ptr AccelerationStructureTypeKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr AccelerationStructureTypeKHR)) (AccelerationStructureTypeKHR
forall a. Zero a => a
zero)
IO b -> ContT b IO b
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO b -> ContT b IO b) -> IO b -> ContT b IO b
forall a b. (a -> b) -> a -> b
$ IO b
f
instance ( Extendss AccelerationStructureCreateInfoKHR es
, PeekChain es ) => FromCStruct (AccelerationStructureCreateInfoKHR es) where
peekCStruct :: Ptr (AccelerationStructureCreateInfoKHR es)
-> IO (AccelerationStructureCreateInfoKHR es)
peekCStruct Ptr (AccelerationStructureCreateInfoKHR es)
p = do
"data" ::: Ptr ()
pNext <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr ()) ((Ptr (AccelerationStructureCreateInfoKHR es)
p Ptr (AccelerationStructureCreateInfoKHR es)
-> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ())))
Chain es
next <- Ptr (Chain es) -> IO (Chain es)
forall (es :: [*]). PeekChain es => Ptr (Chain es) -> IO (Chain es)
peekChain (("data" ::: Ptr ()) -> Ptr (Chain es)
forall a b. Ptr a -> Ptr b
castPtr "data" ::: Ptr ()
pNext)
AccelerationStructureCreateFlagBitsKHR
createFlags <- forall a. Storable a => Ptr a -> IO a
peek @AccelerationStructureCreateFlagsKHR ((Ptr (AccelerationStructureCreateInfoKHR es)
p Ptr (AccelerationStructureCreateInfoKHR es)
-> Int -> Ptr AccelerationStructureCreateFlagBitsKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr AccelerationStructureCreateFlagsKHR))
Buffer
buffer <- forall a. Storable a => Ptr a -> IO a
peek @Buffer ((Ptr (AccelerationStructureCreateInfoKHR es)
p Ptr (AccelerationStructureCreateInfoKHR es) -> Int -> Ptr Buffer
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Buffer))
"dataSize" ::: Word64
offset <- forall a. Storable a => Ptr a -> IO a
peek @DeviceSize ((Ptr (AccelerationStructureCreateInfoKHR es)
p Ptr (AccelerationStructureCreateInfoKHR es)
-> Int
-> "pIndirectDeviceAddresses" ::: Ptr ("dataSize" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr DeviceSize))
"dataSize" ::: Word64
size <- forall a. Storable a => Ptr a -> IO a
peek @DeviceSize ((Ptr (AccelerationStructureCreateInfoKHR es)
p Ptr (AccelerationStructureCreateInfoKHR es)
-> Int
-> "pIndirectDeviceAddresses" ::: Ptr ("dataSize" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr DeviceSize))
AccelerationStructureTypeKHR
type' <- forall a. Storable a => Ptr a -> IO a
peek @AccelerationStructureTypeKHR ((Ptr (AccelerationStructureCreateInfoKHR es)
p Ptr (AccelerationStructureCreateInfoKHR es)
-> Int -> Ptr AccelerationStructureTypeKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr AccelerationStructureTypeKHR))
"dataSize" ::: Word64
deviceAddress <- forall a. Storable a => Ptr a -> IO a
peek @DeviceAddress ((Ptr (AccelerationStructureCreateInfoKHR es)
p Ptr (AccelerationStructureCreateInfoKHR es)
-> Int
-> "pIndirectDeviceAddresses" ::: Ptr ("dataSize" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56 :: Ptr DeviceAddress))
AccelerationStructureCreateInfoKHR es
-> IO (AccelerationStructureCreateInfoKHR es)
forall (f :: * -> *) a. Applicative f => a -> f a
pure (AccelerationStructureCreateInfoKHR es
-> IO (AccelerationStructureCreateInfoKHR es))
-> AccelerationStructureCreateInfoKHR es
-> IO (AccelerationStructureCreateInfoKHR es)
forall a b. (a -> b) -> a -> b
$ Chain es
-> AccelerationStructureCreateFlagBitsKHR
-> Buffer
-> ("dataSize" ::: Word64)
-> ("dataSize" ::: Word64)
-> AccelerationStructureTypeKHR
-> ("dataSize" ::: Word64)
-> AccelerationStructureCreateInfoKHR es
forall (es :: [*]).
Chain es
-> AccelerationStructureCreateFlagBitsKHR
-> Buffer
-> ("dataSize" ::: Word64)
-> ("dataSize" ::: Word64)
-> AccelerationStructureTypeKHR
-> ("dataSize" ::: Word64)
-> AccelerationStructureCreateInfoKHR es
AccelerationStructureCreateInfoKHR
Chain es
next AccelerationStructureCreateFlagBitsKHR
createFlags Buffer
buffer "dataSize" ::: Word64
offset "dataSize" ::: Word64
size AccelerationStructureTypeKHR
type' "dataSize" ::: Word64
deviceAddress
instance es ~ '[] => Zero (AccelerationStructureCreateInfoKHR es) where
zero :: AccelerationStructureCreateInfoKHR es
zero = Chain es
-> AccelerationStructureCreateFlagBitsKHR
-> Buffer
-> ("dataSize" ::: Word64)
-> ("dataSize" ::: Word64)
-> AccelerationStructureTypeKHR
-> ("dataSize" ::: Word64)
-> AccelerationStructureCreateInfoKHR es
forall (es :: [*]).
Chain es
-> AccelerationStructureCreateFlagBitsKHR
-> Buffer
-> ("dataSize" ::: Word64)
-> ("dataSize" ::: Word64)
-> AccelerationStructureTypeKHR
-> ("dataSize" ::: Word64)
-> AccelerationStructureCreateInfoKHR es
AccelerationStructureCreateInfoKHR
()
AccelerationStructureCreateFlagBitsKHR
forall a. Zero a => a
zero
Buffer
forall a. Zero a => a
zero
"dataSize" ::: Word64
forall a. Zero a => a
zero
"dataSize" ::: Word64
forall a. Zero a => a
zero
AccelerationStructureTypeKHR
forall a. Zero a => a
zero
"dataSize" ::: Word64
forall a. Zero a => a
zero
data AabbPositionsKHR = AabbPositionsKHR
{
AabbPositionsKHR -> Float
minX :: Float
,
AabbPositionsKHR -> Float
minY :: Float
,
AabbPositionsKHR -> Float
minZ :: Float
,
AabbPositionsKHR -> Float
maxX :: Float
,
AabbPositionsKHR -> Float
maxY :: Float
,
AabbPositionsKHR -> Float
maxZ :: Float
}
deriving (Typeable, AabbPositionsKHR -> AabbPositionsKHR -> Bool
(AabbPositionsKHR -> AabbPositionsKHR -> Bool)
-> (AabbPositionsKHR -> AabbPositionsKHR -> Bool)
-> Eq AabbPositionsKHR
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AabbPositionsKHR -> AabbPositionsKHR -> Bool
$c/= :: AabbPositionsKHR -> AabbPositionsKHR -> Bool
== :: AabbPositionsKHR -> AabbPositionsKHR -> Bool
$c== :: AabbPositionsKHR -> AabbPositionsKHR -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (AabbPositionsKHR)
#endif
deriving instance Show AabbPositionsKHR
instance ToCStruct AabbPositionsKHR where
withCStruct :: forall b.
AabbPositionsKHR -> (Ptr AabbPositionsKHR -> IO b) -> IO b
withCStruct AabbPositionsKHR
x Ptr AabbPositionsKHR -> IO b
f = Int -> (Ptr AabbPositionsKHR -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 ((Ptr AabbPositionsKHR -> IO b) -> IO b)
-> (Ptr AabbPositionsKHR -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr AabbPositionsKHR
p -> Ptr AabbPositionsKHR -> AabbPositionsKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr AabbPositionsKHR
p AabbPositionsKHR
x (Ptr AabbPositionsKHR -> IO b
f Ptr AabbPositionsKHR
p)
pokeCStruct :: forall b. Ptr AabbPositionsKHR -> AabbPositionsKHR -> IO b -> IO b
pokeCStruct Ptr AabbPositionsKHR
p AabbPositionsKHR{Float
maxZ :: Float
maxY :: Float
maxX :: Float
minZ :: Float
minY :: Float
minX :: Float
$sel:maxZ:AabbPositionsKHR :: AabbPositionsKHR -> Float
$sel:maxY:AabbPositionsKHR :: AabbPositionsKHR -> Float
$sel:maxX:AabbPositionsKHR :: AabbPositionsKHR -> Float
$sel:minZ:AabbPositionsKHR :: AabbPositionsKHR -> Float
$sel:minY:AabbPositionsKHR :: AabbPositionsKHR -> Float
$sel:minX:AabbPositionsKHR :: AabbPositionsKHR -> Float
..} IO b
f = do
Ptr CFloat -> CFloat -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AabbPositionsKHR
p Ptr AabbPositionsKHR -> Int -> Ptr CFloat
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr CFloat)) (Float -> CFloat
CFloat (Float
minX))
Ptr CFloat -> CFloat -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AabbPositionsKHR
p Ptr AabbPositionsKHR -> Int -> Ptr CFloat
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4 :: Ptr CFloat)) (Float -> CFloat
CFloat (Float
minY))
Ptr CFloat -> CFloat -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AabbPositionsKHR
p Ptr AabbPositionsKHR -> Int -> Ptr CFloat
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr CFloat)) (Float -> CFloat
CFloat (Float
minZ))
Ptr CFloat -> CFloat -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AabbPositionsKHR
p Ptr AabbPositionsKHR -> Int -> Ptr CFloat
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
12 :: Ptr CFloat)) (Float -> CFloat
CFloat (Float
maxX))
Ptr CFloat -> CFloat -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AabbPositionsKHR
p Ptr AabbPositionsKHR -> Int -> Ptr CFloat
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr CFloat)) (Float -> CFloat
CFloat (Float
maxY))
Ptr CFloat -> CFloat -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AabbPositionsKHR
p Ptr AabbPositionsKHR -> Int -> Ptr CFloat
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr CFloat)) (Float -> CFloat
CFloat (Float
maxZ))
IO b
f
cStructSize :: Int
cStructSize = Int
24
cStructAlignment :: Int
cStructAlignment = Int
4
pokeZeroCStruct :: forall b. Ptr AabbPositionsKHR -> IO b -> IO b
pokeZeroCStruct Ptr AabbPositionsKHR
p IO b
f = do
Ptr CFloat -> CFloat -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AabbPositionsKHR
p Ptr AabbPositionsKHR -> Int -> Ptr CFloat
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr CFloat)) (Float -> CFloat
CFloat (Float
forall a. Zero a => a
zero))
Ptr CFloat -> CFloat -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AabbPositionsKHR
p Ptr AabbPositionsKHR -> Int -> Ptr CFloat
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4 :: Ptr CFloat)) (Float -> CFloat
CFloat (Float
forall a. Zero a => a
zero))
Ptr CFloat -> CFloat -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AabbPositionsKHR
p Ptr AabbPositionsKHR -> Int -> Ptr CFloat
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr CFloat)) (Float -> CFloat
CFloat (Float
forall a. Zero a => a
zero))
Ptr CFloat -> CFloat -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AabbPositionsKHR
p Ptr AabbPositionsKHR -> Int -> Ptr CFloat
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
12 :: Ptr CFloat)) (Float -> CFloat
CFloat (Float
forall a. Zero a => a
zero))
Ptr CFloat -> CFloat -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AabbPositionsKHR
p Ptr AabbPositionsKHR -> Int -> Ptr CFloat
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr CFloat)) (Float -> CFloat
CFloat (Float
forall a. Zero a => a
zero))
Ptr CFloat -> CFloat -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AabbPositionsKHR
p Ptr AabbPositionsKHR -> Int -> Ptr CFloat
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr CFloat)) (Float -> CFloat
CFloat (Float
forall a. Zero a => a
zero))
IO b
f
instance FromCStruct AabbPositionsKHR where
peekCStruct :: Ptr AabbPositionsKHR -> IO AabbPositionsKHR
peekCStruct Ptr AabbPositionsKHR
p = do
CFloat
minX <- forall a. Storable a => Ptr a -> IO a
peek @CFloat ((Ptr AabbPositionsKHR
p Ptr AabbPositionsKHR -> Int -> Ptr CFloat
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr CFloat))
CFloat
minY <- forall a. Storable a => Ptr a -> IO a
peek @CFloat ((Ptr AabbPositionsKHR
p Ptr AabbPositionsKHR -> Int -> Ptr CFloat
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4 :: Ptr CFloat))
CFloat
minZ <- forall a. Storable a => Ptr a -> IO a
peek @CFloat ((Ptr AabbPositionsKHR
p Ptr AabbPositionsKHR -> Int -> Ptr CFloat
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr CFloat))
CFloat
maxX <- forall a. Storable a => Ptr a -> IO a
peek @CFloat ((Ptr AabbPositionsKHR
p Ptr AabbPositionsKHR -> Int -> Ptr CFloat
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
12 :: Ptr CFloat))
CFloat
maxY <- forall a. Storable a => Ptr a -> IO a
peek @CFloat ((Ptr AabbPositionsKHR
p Ptr AabbPositionsKHR -> Int -> Ptr CFloat
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr CFloat))
CFloat
maxZ <- forall a. Storable a => Ptr a -> IO a
peek @CFloat ((Ptr AabbPositionsKHR
p Ptr AabbPositionsKHR -> Int -> Ptr CFloat
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr CFloat))
AabbPositionsKHR -> IO AabbPositionsKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure (AabbPositionsKHR -> IO AabbPositionsKHR)
-> AabbPositionsKHR -> IO AabbPositionsKHR
forall a b. (a -> b) -> a -> b
$ Float
-> Float -> Float -> Float -> Float -> Float -> AabbPositionsKHR
AabbPositionsKHR
(forall a b. Coercible a b => a -> b
coerce @CFloat @Float CFloat
minX)
(forall a b. Coercible a b => a -> b
coerce @CFloat @Float CFloat
minY)
(forall a b. Coercible a b => a -> b
coerce @CFloat @Float CFloat
minZ)
(forall a b. Coercible a b => a -> b
coerce @CFloat @Float CFloat
maxX)
(forall a b. Coercible a b => a -> b
coerce @CFloat @Float CFloat
maxY)
(forall a b. Coercible a b => a -> b
coerce @CFloat @Float CFloat
maxZ)
instance Storable AabbPositionsKHR where
sizeOf :: AabbPositionsKHR -> Int
sizeOf ~AabbPositionsKHR
_ = Int
24
alignment :: AabbPositionsKHR -> Int
alignment ~AabbPositionsKHR
_ = Int
4
peek :: Ptr AabbPositionsKHR -> IO AabbPositionsKHR
peek = Ptr AabbPositionsKHR -> IO AabbPositionsKHR
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr AabbPositionsKHR -> AabbPositionsKHR -> IO ()
poke Ptr AabbPositionsKHR
ptr AabbPositionsKHR
poked = Ptr AabbPositionsKHR -> AabbPositionsKHR -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr AabbPositionsKHR
ptr AabbPositionsKHR
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero AabbPositionsKHR where
zero :: AabbPositionsKHR
zero = Float
-> Float -> Float -> Float -> Float -> Float -> AabbPositionsKHR
AabbPositionsKHR
Float
forall a. Zero a => a
zero
Float
forall a. Zero a => a
zero
Float
forall a. Zero a => a
zero
Float
forall a. Zero a => a
zero
Float
forall a. Zero a => a
zero
Float
forall a. Zero a => a
zero
data TransformMatrixKHR = TransformMatrixKHR
{
TransformMatrixKHR -> (Float, Float, Float, Float)
matrixRow0 :: (Float, Float, Float, Float)
,
TransformMatrixKHR -> (Float, Float, Float, Float)
matrixRow1 :: (Float, Float, Float, Float)
,
TransformMatrixKHR -> (Float, Float, Float, Float)
matrixRow2 :: (Float, Float, Float, Float)
}
deriving (Typeable, TransformMatrixKHR -> TransformMatrixKHR -> Bool
(TransformMatrixKHR -> TransformMatrixKHR -> Bool)
-> (TransformMatrixKHR -> TransformMatrixKHR -> Bool)
-> Eq TransformMatrixKHR
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TransformMatrixKHR -> TransformMatrixKHR -> Bool
$c/= :: TransformMatrixKHR -> TransformMatrixKHR -> Bool
== :: TransformMatrixKHR -> TransformMatrixKHR -> Bool
$c== :: TransformMatrixKHR -> TransformMatrixKHR -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (TransformMatrixKHR)
#endif
deriving instance Show TransformMatrixKHR
instance ToCStruct TransformMatrixKHR where
withCStruct :: forall b.
TransformMatrixKHR -> (Ptr TransformMatrixKHR -> IO b) -> IO b
withCStruct TransformMatrixKHR
x Ptr TransformMatrixKHR -> IO b
f = Int -> (Ptr TransformMatrixKHR -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
48 ((Ptr TransformMatrixKHR -> IO b) -> IO b)
-> (Ptr TransformMatrixKHR -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr TransformMatrixKHR
p -> Ptr TransformMatrixKHR -> TransformMatrixKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr TransformMatrixKHR
p TransformMatrixKHR
x (Ptr TransformMatrixKHR -> IO b
f Ptr TransformMatrixKHR
p)
pokeCStruct :: forall b.
Ptr TransformMatrixKHR -> TransformMatrixKHR -> IO b -> IO b
pokeCStruct Ptr TransformMatrixKHR
p TransformMatrixKHR{(Float, Float, Float, Float)
matrixRow2 :: (Float, Float, Float, Float)
matrixRow1 :: (Float, Float, Float, Float)
matrixRow0 :: (Float, Float, Float, Float)
$sel:matrixRow2:TransformMatrixKHR :: TransformMatrixKHR -> (Float, Float, Float, Float)
$sel:matrixRow1:TransformMatrixKHR :: TransformMatrixKHR -> (Float, Float, Float, Float)
$sel:matrixRow0:TransformMatrixKHR :: TransformMatrixKHR -> (Float, Float, Float, Float)
..} IO b
f = do
let pMatrixRow0' :: Ptr CFloat
pMatrixRow0' = Ptr (FixedArray 4 CFloat) -> Ptr CFloat
forall a (n :: Nat). Ptr (FixedArray n a) -> Ptr a
lowerArrayPtr ((Ptr TransformMatrixKHR
p Ptr TransformMatrixKHR -> Int -> Ptr (FixedArray 4 CFloat)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr (FixedArray 4 CFloat)))
case ((Float, Float, Float, Float)
matrixRow0) of
(Float
e0, Float
e1, Float
e2, Float
e3) -> do
Ptr CFloat -> CFloat -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr CFloat
pMatrixRow0' :: Ptr CFloat) (Float -> CFloat
CFloat (Float
e0))
Ptr CFloat -> CFloat -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr CFloat
pMatrixRow0' Ptr CFloat -> Int -> Ptr CFloat
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4 :: Ptr CFloat) (Float -> CFloat
CFloat (Float
e1))
Ptr CFloat -> CFloat -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr CFloat
pMatrixRow0' Ptr CFloat -> Int -> Ptr CFloat
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr CFloat) (Float -> CFloat
CFloat (Float
e2))
Ptr CFloat -> CFloat -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr CFloat
pMatrixRow0' Ptr CFloat -> Int -> Ptr CFloat
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
12 :: Ptr CFloat) (Float -> CFloat
CFloat (Float
e3))
let pMatrixRow1' :: Ptr CFloat
pMatrixRow1' = Ptr (FixedArray 4 CFloat) -> Ptr CFloat
forall a (n :: Nat). Ptr (FixedArray n a) -> Ptr a
lowerArrayPtr ((Ptr TransformMatrixKHR
p Ptr TransformMatrixKHR -> Int -> Ptr (FixedArray 4 CFloat)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr (FixedArray 4 CFloat)))
case ((Float, Float, Float, Float)
matrixRow1) of
(Float
e0, Float
e1, Float
e2, Float
e3) -> do
Ptr CFloat -> CFloat -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr CFloat
pMatrixRow1' :: Ptr CFloat) (Float -> CFloat
CFloat (Float
e0))
Ptr CFloat -> CFloat -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr CFloat
pMatrixRow1' Ptr CFloat -> Int -> Ptr CFloat
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4 :: Ptr CFloat) (Float -> CFloat
CFloat (Float
e1))
Ptr CFloat -> CFloat -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr CFloat
pMatrixRow1' Ptr CFloat -> Int -> Ptr CFloat
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr CFloat) (Float -> CFloat
CFloat (Float
e2))
Ptr CFloat -> CFloat -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr CFloat
pMatrixRow1' Ptr CFloat -> Int -> Ptr CFloat
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
12 :: Ptr CFloat) (Float -> CFloat
CFloat (Float
e3))
let pMatrixRow2' :: Ptr CFloat
pMatrixRow2' = Ptr (FixedArray 4 CFloat) -> Ptr CFloat
forall a (n :: Nat). Ptr (FixedArray n a) -> Ptr a
lowerArrayPtr ((Ptr TransformMatrixKHR
p Ptr TransformMatrixKHR -> Int -> Ptr (FixedArray 4 CFloat)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr (FixedArray 4 CFloat)))
case ((Float, Float, Float, Float)
matrixRow2) of
(Float
e0, Float
e1, Float
e2, Float
e3) -> do
Ptr CFloat -> CFloat -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr CFloat
pMatrixRow2' :: Ptr CFloat) (Float -> CFloat
CFloat (Float
e0))
Ptr CFloat -> CFloat -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr CFloat
pMatrixRow2' Ptr CFloat -> Int -> Ptr CFloat
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4 :: Ptr CFloat) (Float -> CFloat
CFloat (Float
e1))
Ptr CFloat -> CFloat -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr CFloat
pMatrixRow2' Ptr CFloat -> Int -> Ptr CFloat
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr CFloat) (Float -> CFloat
CFloat (Float
e2))
Ptr CFloat -> CFloat -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr CFloat
pMatrixRow2' Ptr CFloat -> Int -> Ptr CFloat
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
12 :: Ptr CFloat) (Float -> CFloat
CFloat (Float
e3))
IO b
f
cStructSize :: Int
cStructSize = Int
48
cStructAlignment :: Int
cStructAlignment = Int
4
pokeZeroCStruct :: forall b. Ptr TransformMatrixKHR -> IO b -> IO b
pokeZeroCStruct Ptr TransformMatrixKHR
p IO b
f = do
Ptr CFloat -> CFloat -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr TransformMatrixKHR
p Ptr TransformMatrixKHR -> Int -> Ptr CFloat
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0) (Float -> CFloat
CFloat Float
1)
Ptr CFloat -> CFloat -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr TransformMatrixKHR
p Ptr TransformMatrixKHR -> Int -> Ptr CFloat
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20) (Float -> CFloat
CFloat Float
1)
Ptr CFloat -> CFloat -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr TransformMatrixKHR
p Ptr TransformMatrixKHR -> Int -> Ptr CFloat
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40) (Float -> CFloat
CFloat Float
1)
IO b
f
instance FromCStruct TransformMatrixKHR where
peekCStruct :: Ptr TransformMatrixKHR -> IO TransformMatrixKHR
peekCStruct Ptr TransformMatrixKHR
p = do
let pmatrixRow0 :: Ptr CFloat
pmatrixRow0 = forall a (n :: Nat). Ptr (FixedArray n a) -> Ptr a
lowerArrayPtr @CFloat ((Ptr TransformMatrixKHR
p Ptr TransformMatrixKHR -> Int -> Ptr (FixedArray 4 CFloat)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr (FixedArray 4 CFloat)))
CFloat
matrixRow00 <- forall a. Storable a => Ptr a -> IO a
peek @CFloat ((Ptr CFloat
pmatrixRow0 Ptr CFloat -> Int -> Ptr CFloat
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` Int
0 :: Ptr CFloat))
CFloat
matrixRow01 <- forall a. Storable a => Ptr a -> IO a
peek @CFloat ((Ptr CFloat
pmatrixRow0 Ptr CFloat -> Int -> Ptr CFloat
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` Int
4 :: Ptr CFloat))
CFloat
matrixRow02 <- forall a. Storable a => Ptr a -> IO a
peek @CFloat ((Ptr CFloat
pmatrixRow0 Ptr CFloat -> Int -> Ptr CFloat
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` Int
8 :: Ptr CFloat))
CFloat
matrixRow03 <- forall a. Storable a => Ptr a -> IO a
peek @CFloat ((Ptr CFloat
pmatrixRow0 Ptr CFloat -> Int -> Ptr CFloat
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` Int
12 :: Ptr CFloat))
let pmatrixRow1 :: Ptr CFloat
pmatrixRow1 = forall a (n :: Nat). Ptr (FixedArray n a) -> Ptr a
lowerArrayPtr @CFloat ((Ptr TransformMatrixKHR
p Ptr TransformMatrixKHR -> Int -> Ptr (FixedArray 4 CFloat)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr (FixedArray 4 CFloat)))
CFloat
matrixRow10 <- forall a. Storable a => Ptr a -> IO a
peek @CFloat ((Ptr CFloat
pmatrixRow1 Ptr CFloat -> Int -> Ptr CFloat
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` Int
0 :: Ptr CFloat))
CFloat
matrixRow11 <- forall a. Storable a => Ptr a -> IO a
peek @CFloat ((Ptr CFloat
pmatrixRow1 Ptr CFloat -> Int -> Ptr CFloat
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` Int
4 :: Ptr CFloat))
CFloat
matrixRow12 <- forall a. Storable a => Ptr a -> IO a
peek @CFloat ((Ptr CFloat
pmatrixRow1 Ptr CFloat -> Int -> Ptr CFloat
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` Int
8 :: Ptr CFloat))
CFloat
matrixRow13 <- forall a. Storable a => Ptr a -> IO a
peek @CFloat ((Ptr CFloat
pmatrixRow1 Ptr CFloat -> Int -> Ptr CFloat
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` Int
12 :: Ptr CFloat))
let pmatrixRow2 :: Ptr CFloat
pmatrixRow2 = forall a (n :: Nat). Ptr (FixedArray n a) -> Ptr a
lowerArrayPtr @CFloat ((Ptr TransformMatrixKHR
p Ptr TransformMatrixKHR -> Int -> Ptr (FixedArray 4 CFloat)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr (FixedArray 4 CFloat)))
CFloat
matrixRow20 <- forall a. Storable a => Ptr a -> IO a
peek @CFloat ((Ptr CFloat
pmatrixRow2 Ptr CFloat -> Int -> Ptr CFloat
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` Int
0 :: Ptr CFloat))
CFloat
matrixRow21 <- forall a. Storable a => Ptr a -> IO a
peek @CFloat ((Ptr CFloat
pmatrixRow2 Ptr CFloat -> Int -> Ptr CFloat
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` Int
4 :: Ptr CFloat))
CFloat
matrixRow22 <- forall a. Storable a => Ptr a -> IO a
peek @CFloat ((Ptr CFloat
pmatrixRow2 Ptr CFloat -> Int -> Ptr CFloat
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` Int
8 :: Ptr CFloat))
CFloat
matrixRow23 <- forall a. Storable a => Ptr a -> IO a
peek @CFloat ((Ptr CFloat
pmatrixRow2 Ptr CFloat -> Int -> Ptr CFloat
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` Int
12 :: Ptr CFloat))
TransformMatrixKHR -> IO TransformMatrixKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure (TransformMatrixKHR -> IO TransformMatrixKHR)
-> TransformMatrixKHR -> IO TransformMatrixKHR
forall a b. (a -> b) -> a -> b
$ (Float, Float, Float, Float)
-> (Float, Float, Float, Float)
-> (Float, Float, Float, Float)
-> TransformMatrixKHR
TransformMatrixKHR
(( (forall a b. Coercible a b => a -> b
coerce @CFloat @Float CFloat
matrixRow00)
, (forall a b. Coercible a b => a -> b
coerce @CFloat @Float CFloat
matrixRow01)
, (forall a b. Coercible a b => a -> b
coerce @CFloat @Float CFloat
matrixRow02)
, (forall a b. Coercible a b => a -> b
coerce @CFloat @Float CFloat
matrixRow03) ))
(( (forall a b. Coercible a b => a -> b
coerce @CFloat @Float CFloat
matrixRow10)
, (forall a b. Coercible a b => a -> b
coerce @CFloat @Float CFloat
matrixRow11)
, (forall a b. Coercible a b => a -> b
coerce @CFloat @Float CFloat
matrixRow12)
, (forall a b. Coercible a b => a -> b
coerce @CFloat @Float CFloat
matrixRow13) ))
(( (forall a b. Coercible a b => a -> b
coerce @CFloat @Float CFloat
matrixRow20)
, (forall a b. Coercible a b => a -> b
coerce @CFloat @Float CFloat
matrixRow21)
, (forall a b. Coercible a b => a -> b
coerce @CFloat @Float CFloat
matrixRow22)
, (forall a b. Coercible a b => a -> b
coerce @CFloat @Float CFloat
matrixRow23) ))
instance Storable TransformMatrixKHR where
sizeOf :: TransformMatrixKHR -> Int
sizeOf ~TransformMatrixKHR
_ = Int
48
alignment :: TransformMatrixKHR -> Int
alignment ~TransformMatrixKHR
_ = Int
4
peek :: Ptr TransformMatrixKHR -> IO TransformMatrixKHR
peek = Ptr TransformMatrixKHR -> IO TransformMatrixKHR
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr TransformMatrixKHR -> TransformMatrixKHR -> IO ()
poke Ptr TransformMatrixKHR
ptr TransformMatrixKHR
poked = Ptr TransformMatrixKHR -> TransformMatrixKHR -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr TransformMatrixKHR
ptr TransformMatrixKHR
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero TransformMatrixKHR where
zero :: TransformMatrixKHR
zero = (Float, Float, Float, Float)
-> (Float, Float, Float, Float)
-> (Float, Float, Float, Float)
-> TransformMatrixKHR
TransformMatrixKHR
(Float
1,Float
0,Float
0,Float
0)
(Float
0,Float
1,Float
0,Float
0)
(Float
0,Float
0,Float
1,Float
0)
data AccelerationStructureInstanceKHR = AccelerationStructureInstanceKHR
{
AccelerationStructureInstanceKHR -> TransformMatrixKHR
transform :: TransformMatrixKHR
,
AccelerationStructureInstanceKHR -> Flags
instanceCustomIndex :: Word32
,
AccelerationStructureInstanceKHR -> Flags
mask :: Word32
,
AccelerationStructureInstanceKHR -> Flags
instanceShaderBindingTableRecordOffset :: Word32
,
AccelerationStructureInstanceKHR -> GeometryInstanceFlagBitsKHR
flags :: GeometryInstanceFlagsKHR
,
AccelerationStructureInstanceKHR -> "dataSize" ::: Word64
accelerationStructureReference :: Word64
}
deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (AccelerationStructureInstanceKHR)
#endif
deriving instance Show AccelerationStructureInstanceKHR
instance ToCStruct AccelerationStructureInstanceKHR where
withCStruct :: forall b.
AccelerationStructureInstanceKHR
-> (Ptr AccelerationStructureInstanceKHR -> IO b) -> IO b
withCStruct AccelerationStructureInstanceKHR
x Ptr AccelerationStructureInstanceKHR -> IO b
f = Int -> (Ptr AccelerationStructureInstanceKHR -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
64 ((Ptr AccelerationStructureInstanceKHR -> IO b) -> IO b)
-> (Ptr AccelerationStructureInstanceKHR -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr AccelerationStructureInstanceKHR
p -> Ptr AccelerationStructureInstanceKHR
-> AccelerationStructureInstanceKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr AccelerationStructureInstanceKHR
p AccelerationStructureInstanceKHR
x (Ptr AccelerationStructureInstanceKHR -> IO b
f Ptr AccelerationStructureInstanceKHR
p)
pokeCStruct :: forall b.
Ptr AccelerationStructureInstanceKHR
-> AccelerationStructureInstanceKHR -> IO b -> IO b
pokeCStruct Ptr AccelerationStructureInstanceKHR
p AccelerationStructureInstanceKHR{Flags
"dataSize" ::: Word64
GeometryInstanceFlagBitsKHR
TransformMatrixKHR
accelerationStructureReference :: "dataSize" ::: Word64
flags :: GeometryInstanceFlagBitsKHR
instanceShaderBindingTableRecordOffset :: Flags
mask :: Flags
instanceCustomIndex :: Flags
transform :: TransformMatrixKHR
$sel:accelerationStructureReference:AccelerationStructureInstanceKHR :: AccelerationStructureInstanceKHR -> "dataSize" ::: Word64
$sel:flags:AccelerationStructureInstanceKHR :: AccelerationStructureInstanceKHR -> GeometryInstanceFlagBitsKHR
$sel:instanceShaderBindingTableRecordOffset:AccelerationStructureInstanceKHR :: AccelerationStructureInstanceKHR -> Flags
$sel:mask:AccelerationStructureInstanceKHR :: AccelerationStructureInstanceKHR -> Flags
$sel:instanceCustomIndex:AccelerationStructureInstanceKHR :: AccelerationStructureInstanceKHR -> Flags
$sel:transform:AccelerationStructureInstanceKHR :: AccelerationStructureInstanceKHR -> TransformMatrixKHR
..} IO b
f = do
Ptr TransformMatrixKHR -> TransformMatrixKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureInstanceKHR
p Ptr AccelerationStructureInstanceKHR
-> Int -> Ptr TransformMatrixKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr TransformMatrixKHR)) (TransformMatrixKHR
transform)
("pIndirectStrides" ::: Ptr Flags) -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureInstanceKHR
p Ptr AccelerationStructureInstanceKHR
-> Int -> "pIndirectStrides" ::: Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr Word32)) (((forall a b. Coercible a b => a -> b
coerce @_ @Word32 (Flags
mask)) Flags -> Int -> Flags
forall a. Bits a => a -> Int -> a
`shiftL` Int
24) Flags -> Flags -> Flags
forall a. Bits a => a -> a -> a
.|. (Flags
instanceCustomIndex))
("pIndirectStrides" ::: Ptr Flags) -> Flags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureInstanceKHR
p Ptr AccelerationStructureInstanceKHR
-> Int -> "pIndirectStrides" ::: Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
52 :: Ptr Word32)) (((forall a b. Coercible a b => a -> b
coerce @_ @Word32 (GeometryInstanceFlagBitsKHR
flags)) Flags -> Int -> Flags
forall a. Bits a => a -> Int -> a
`shiftL` Int
24) Flags -> Flags -> Flags
forall a. Bits a => a -> a -> a
.|. (Flags
instanceShaderBindingTableRecordOffset))
("pIndirectDeviceAddresses" ::: Ptr ("dataSize" ::: Word64))
-> ("dataSize" ::: Word64) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureInstanceKHR
p Ptr AccelerationStructureInstanceKHR
-> Int
-> "pIndirectDeviceAddresses" ::: Ptr ("dataSize" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56 :: Ptr Word64)) ("dataSize" ::: Word64
accelerationStructureReference)
IO b
f
cStructSize :: Int
cStructSize = Int
64
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b. Ptr AccelerationStructureInstanceKHR -> IO b -> IO b
pokeZeroCStruct Ptr AccelerationStructureInstanceKHR
p IO b
f = do
Ptr TransformMatrixKHR -> TransformMatrixKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureInstanceKHR
p Ptr AccelerationStructureInstanceKHR
-> Int -> Ptr TransformMatrixKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr TransformMatrixKHR)) (TransformMatrixKHR
forall a. Zero a => a
zero)
("pIndirectDeviceAddresses" ::: Ptr ("dataSize" ::: Word64))
-> ("dataSize" ::: Word64) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureInstanceKHR
p Ptr AccelerationStructureInstanceKHR
-> Int
-> "pIndirectDeviceAddresses" ::: Ptr ("dataSize" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56 :: Ptr Word64)) ("dataSize" ::: Word64
forall a. Zero a => a
zero)
IO b
f
instance FromCStruct AccelerationStructureInstanceKHR where
peekCStruct :: Ptr AccelerationStructureInstanceKHR
-> IO AccelerationStructureInstanceKHR
peekCStruct Ptr AccelerationStructureInstanceKHR
p = do
TransformMatrixKHR
transform <- forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @TransformMatrixKHR ((Ptr AccelerationStructureInstanceKHR
p Ptr AccelerationStructureInstanceKHR
-> Int -> Ptr TransformMatrixKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr TransformMatrixKHR))
Flags
instanceCustomIndex <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr AccelerationStructureInstanceKHR
p Ptr AccelerationStructureInstanceKHR
-> Int -> "pIndirectStrides" ::: Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr Word32))
let instanceCustomIndex' :: Flags
instanceCustomIndex' = ((Flags
instanceCustomIndex Flags -> Flags -> Flags
forall a. Bits a => a -> a -> a
.&. forall a b. Coercible a b => a -> b
coerce @Word32 Flags
0xffffff))
Flags
mask <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr AccelerationStructureInstanceKHR
p Ptr AccelerationStructureInstanceKHR
-> Int -> "pIndirectStrides" ::: Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr Word32))
let mask' :: Flags
mask' = ((((Flags
mask Flags -> Int -> Flags
forall a. Bits a => a -> Int -> a
`shiftR` Int
24)) Flags -> Flags -> Flags
forall a. Bits a => a -> a -> a
.&. forall a b. Coercible a b => a -> b
coerce @Word32 Flags
0xff))
Flags
instanceShaderBindingTableRecordOffset <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr AccelerationStructureInstanceKHR
p Ptr AccelerationStructureInstanceKHR
-> Int -> "pIndirectStrides" ::: Ptr Flags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
52 :: Ptr Word32))
let instanceShaderBindingTableRecordOffset' :: Flags
instanceShaderBindingTableRecordOffset' = ((Flags
instanceShaderBindingTableRecordOffset Flags -> Flags -> Flags
forall a. Bits a => a -> a -> a
.&. forall a b. Coercible a b => a -> b
coerce @Word32 Flags
0xffffff))
GeometryInstanceFlagBitsKHR
flags <- forall a. Storable a => Ptr a -> IO a
peek @GeometryInstanceFlagsKHR ((Ptr AccelerationStructureInstanceKHR
p Ptr AccelerationStructureInstanceKHR
-> Int -> Ptr GeometryInstanceFlagBitsKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
52 :: Ptr GeometryInstanceFlagsKHR))
let flags' :: GeometryInstanceFlagBitsKHR
flags' = ((((GeometryInstanceFlagBitsKHR
flags GeometryInstanceFlagBitsKHR -> Int -> GeometryInstanceFlagBitsKHR
forall a. Bits a => a -> Int -> a
`shiftR` Int
24)) GeometryInstanceFlagBitsKHR
-> GeometryInstanceFlagBitsKHR -> GeometryInstanceFlagBitsKHR
forall a. Bits a => a -> a -> a
.&. forall a b. Coercible a b => a -> b
coerce @Word32 Flags
0xff))
"dataSize" ::: Word64
accelerationStructureReference <- forall a. Storable a => Ptr a -> IO a
peek @Word64 ((Ptr AccelerationStructureInstanceKHR
p Ptr AccelerationStructureInstanceKHR
-> Int
-> "pIndirectDeviceAddresses" ::: Ptr ("dataSize" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56 :: Ptr Word64))
AccelerationStructureInstanceKHR
-> IO AccelerationStructureInstanceKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure (AccelerationStructureInstanceKHR
-> IO AccelerationStructureInstanceKHR)
-> AccelerationStructureInstanceKHR
-> IO AccelerationStructureInstanceKHR
forall a b. (a -> b) -> a -> b
$ TransformMatrixKHR
-> Flags
-> Flags
-> Flags
-> GeometryInstanceFlagBitsKHR
-> ("dataSize" ::: Word64)
-> AccelerationStructureInstanceKHR
AccelerationStructureInstanceKHR
TransformMatrixKHR
transform
Flags
instanceCustomIndex'
Flags
mask'
Flags
instanceShaderBindingTableRecordOffset'
GeometryInstanceFlagBitsKHR
flags'
"dataSize" ::: Word64
accelerationStructureReference
instance Storable AccelerationStructureInstanceKHR where
sizeOf :: AccelerationStructureInstanceKHR -> Int
sizeOf ~AccelerationStructureInstanceKHR
_ = Int
64
alignment :: AccelerationStructureInstanceKHR -> Int
alignment ~AccelerationStructureInstanceKHR
_ = Int
8
peek :: Ptr AccelerationStructureInstanceKHR
-> IO AccelerationStructureInstanceKHR
peek = Ptr AccelerationStructureInstanceKHR
-> IO AccelerationStructureInstanceKHR
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr AccelerationStructureInstanceKHR
-> AccelerationStructureInstanceKHR -> IO ()
poke Ptr AccelerationStructureInstanceKHR
ptr AccelerationStructureInstanceKHR
poked = Ptr AccelerationStructureInstanceKHR
-> AccelerationStructureInstanceKHR -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr AccelerationStructureInstanceKHR
ptr AccelerationStructureInstanceKHR
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero AccelerationStructureInstanceKHR where
zero :: AccelerationStructureInstanceKHR
zero = TransformMatrixKHR
-> Flags
-> Flags
-> Flags
-> GeometryInstanceFlagBitsKHR
-> ("dataSize" ::: Word64)
-> AccelerationStructureInstanceKHR
AccelerationStructureInstanceKHR
TransformMatrixKHR
forall a. Zero a => a
zero
Flags
forall a. Zero a => a
zero
Flags
forall a. Zero a => a
zero
Flags
forall a. Zero a => a
zero
GeometryInstanceFlagBitsKHR
forall a. Zero a => a
zero
"dataSize" ::: Word64
forall a. Zero a => a
zero
data AccelerationStructureDeviceAddressInfoKHR = AccelerationStructureDeviceAddressInfoKHR
{
AccelerationStructureDeviceAddressInfoKHR
-> AccelerationStructureKHR
accelerationStructure :: AccelerationStructureKHR }
deriving (Typeable, AccelerationStructureDeviceAddressInfoKHR
-> AccelerationStructureDeviceAddressInfoKHR -> Bool
(AccelerationStructureDeviceAddressInfoKHR
-> AccelerationStructureDeviceAddressInfoKHR -> Bool)
-> (AccelerationStructureDeviceAddressInfoKHR
-> AccelerationStructureDeviceAddressInfoKHR -> Bool)
-> Eq AccelerationStructureDeviceAddressInfoKHR
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AccelerationStructureDeviceAddressInfoKHR
-> AccelerationStructureDeviceAddressInfoKHR -> Bool
$c/= :: AccelerationStructureDeviceAddressInfoKHR
-> AccelerationStructureDeviceAddressInfoKHR -> Bool
== :: AccelerationStructureDeviceAddressInfoKHR
-> AccelerationStructureDeviceAddressInfoKHR -> Bool
$c== :: AccelerationStructureDeviceAddressInfoKHR
-> AccelerationStructureDeviceAddressInfoKHR -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (AccelerationStructureDeviceAddressInfoKHR)
#endif
deriving instance Show AccelerationStructureDeviceAddressInfoKHR
instance ToCStruct AccelerationStructureDeviceAddressInfoKHR where
withCStruct :: forall b.
AccelerationStructureDeviceAddressInfoKHR
-> (("pInfo" ::: Ptr AccelerationStructureDeviceAddressInfoKHR)
-> IO b)
-> IO b
withCStruct AccelerationStructureDeviceAddressInfoKHR
x ("pInfo" ::: Ptr AccelerationStructureDeviceAddressInfoKHR) -> IO b
f = Int
-> (("pInfo" ::: Ptr AccelerationStructureDeviceAddressInfoKHR)
-> IO b)
-> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 ((("pInfo" ::: Ptr AccelerationStructureDeviceAddressInfoKHR)
-> IO b)
-> IO b)
-> (("pInfo" ::: Ptr AccelerationStructureDeviceAddressInfoKHR)
-> IO b)
-> IO b
forall a b. (a -> b) -> a -> b
$ \"pInfo" ::: Ptr AccelerationStructureDeviceAddressInfoKHR
p -> ("pInfo" ::: Ptr AccelerationStructureDeviceAddressInfoKHR)
-> AccelerationStructureDeviceAddressInfoKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pInfo" ::: Ptr AccelerationStructureDeviceAddressInfoKHR
p AccelerationStructureDeviceAddressInfoKHR
x (("pInfo" ::: Ptr AccelerationStructureDeviceAddressInfoKHR) -> IO b
f "pInfo" ::: Ptr AccelerationStructureDeviceAddressInfoKHR
p)
pokeCStruct :: forall b.
("pInfo" ::: Ptr AccelerationStructureDeviceAddressInfoKHR)
-> AccelerationStructureDeviceAddressInfoKHR -> IO b -> IO b
pokeCStruct "pInfo" ::: Ptr AccelerationStructureDeviceAddressInfoKHR
p AccelerationStructureDeviceAddressInfoKHR{AccelerationStructureKHR
accelerationStructure :: AccelerationStructureKHR
$sel:accelerationStructure:AccelerationStructureDeviceAddressInfoKHR :: AccelerationStructureDeviceAddressInfoKHR
-> AccelerationStructureKHR
..} IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr AccelerationStructureDeviceAddressInfoKHR
p ("pInfo" ::: Ptr AccelerationStructureDeviceAddressInfoKHR)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_ACCELERATION_STRUCTURE_DEVICE_ADDRESS_INFO_KHR)
Ptr ("data" ::: Ptr ()) -> ("data" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr AccelerationStructureDeviceAddressInfoKHR
p ("pInfo" ::: Ptr AccelerationStructureDeviceAddressInfoKHR)
-> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) ("data" ::: Ptr ()
forall a. Ptr a
nullPtr)
("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> AccelerationStructureKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr AccelerationStructureDeviceAddressInfoKHR
p ("pInfo" ::: Ptr AccelerationStructureDeviceAddressInfoKHR)
-> Int
-> "pAccelerationStructures" ::: Ptr AccelerationStructureKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr AccelerationStructureKHR)) (AccelerationStructureKHR
accelerationStructure)
IO b
f
cStructSize :: Int
cStructSize = Int
24
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
("pInfo" ::: Ptr AccelerationStructureDeviceAddressInfoKHR)
-> IO b -> IO b
pokeZeroCStruct "pInfo" ::: Ptr AccelerationStructureDeviceAddressInfoKHR
p IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr AccelerationStructureDeviceAddressInfoKHR
p ("pInfo" ::: Ptr AccelerationStructureDeviceAddressInfoKHR)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_ACCELERATION_STRUCTURE_DEVICE_ADDRESS_INFO_KHR)
Ptr ("data" ::: Ptr ()) -> ("data" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr AccelerationStructureDeviceAddressInfoKHR
p ("pInfo" ::: Ptr AccelerationStructureDeviceAddressInfoKHR)
-> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) ("data" ::: Ptr ()
forall a. Ptr a
nullPtr)
("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> AccelerationStructureKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr AccelerationStructureDeviceAddressInfoKHR
p ("pInfo" ::: Ptr AccelerationStructureDeviceAddressInfoKHR)
-> Int
-> "pAccelerationStructures" ::: Ptr AccelerationStructureKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr AccelerationStructureKHR)) (AccelerationStructureKHR
forall a. Zero a => a
zero)
IO b
f
instance FromCStruct AccelerationStructureDeviceAddressInfoKHR where
peekCStruct :: ("pInfo" ::: Ptr AccelerationStructureDeviceAddressInfoKHR)
-> IO AccelerationStructureDeviceAddressInfoKHR
peekCStruct "pInfo" ::: Ptr AccelerationStructureDeviceAddressInfoKHR
p = do
AccelerationStructureKHR
accelerationStructure <- forall a. Storable a => Ptr a -> IO a
peek @AccelerationStructureKHR (("pInfo" ::: Ptr AccelerationStructureDeviceAddressInfoKHR
p ("pInfo" ::: Ptr AccelerationStructureDeviceAddressInfoKHR)
-> Int
-> "pAccelerationStructures" ::: Ptr AccelerationStructureKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr AccelerationStructureKHR))
AccelerationStructureDeviceAddressInfoKHR
-> IO AccelerationStructureDeviceAddressInfoKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure (AccelerationStructureDeviceAddressInfoKHR
-> IO AccelerationStructureDeviceAddressInfoKHR)
-> AccelerationStructureDeviceAddressInfoKHR
-> IO AccelerationStructureDeviceAddressInfoKHR
forall a b. (a -> b) -> a -> b
$ AccelerationStructureKHR
-> AccelerationStructureDeviceAddressInfoKHR
AccelerationStructureDeviceAddressInfoKHR
AccelerationStructureKHR
accelerationStructure
instance Storable AccelerationStructureDeviceAddressInfoKHR where
sizeOf :: AccelerationStructureDeviceAddressInfoKHR -> Int
sizeOf ~AccelerationStructureDeviceAddressInfoKHR
_ = Int
24
alignment :: AccelerationStructureDeviceAddressInfoKHR -> Int
alignment ~AccelerationStructureDeviceAddressInfoKHR
_ = Int
8
peek :: ("pInfo" ::: Ptr AccelerationStructureDeviceAddressInfoKHR)
-> IO AccelerationStructureDeviceAddressInfoKHR
peek = ("pInfo" ::: Ptr AccelerationStructureDeviceAddressInfoKHR)
-> IO AccelerationStructureDeviceAddressInfoKHR
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: ("pInfo" ::: Ptr AccelerationStructureDeviceAddressInfoKHR)
-> AccelerationStructureDeviceAddressInfoKHR -> IO ()
poke "pInfo" ::: Ptr AccelerationStructureDeviceAddressInfoKHR
ptr AccelerationStructureDeviceAddressInfoKHR
poked = ("pInfo" ::: Ptr AccelerationStructureDeviceAddressInfoKHR)
-> AccelerationStructureDeviceAddressInfoKHR -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pInfo" ::: Ptr AccelerationStructureDeviceAddressInfoKHR
ptr AccelerationStructureDeviceAddressInfoKHR
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero AccelerationStructureDeviceAddressInfoKHR where
zero :: AccelerationStructureDeviceAddressInfoKHR
zero = AccelerationStructureKHR
-> AccelerationStructureDeviceAddressInfoKHR
AccelerationStructureDeviceAddressInfoKHR
AccelerationStructureKHR
forall a. Zero a => a
zero
data AccelerationStructureVersionInfoKHR = AccelerationStructureVersionInfoKHR
{
AccelerationStructureVersionInfoKHR -> ByteString
versionData :: ByteString }
deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (AccelerationStructureVersionInfoKHR)
#endif
deriving instance Show AccelerationStructureVersionInfoKHR
instance ToCStruct AccelerationStructureVersionInfoKHR where
withCStruct :: forall b.
AccelerationStructureVersionInfoKHR
-> (("pVersionInfo" ::: Ptr AccelerationStructureVersionInfoKHR)
-> IO b)
-> IO b
withCStruct AccelerationStructureVersionInfoKHR
x ("pVersionInfo" ::: Ptr AccelerationStructureVersionInfoKHR)
-> IO b
f = Int
-> (("pVersionInfo" ::: Ptr AccelerationStructureVersionInfoKHR)
-> IO b)
-> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 ((("pVersionInfo" ::: Ptr AccelerationStructureVersionInfoKHR)
-> IO b)
-> IO b)
-> (("pVersionInfo" ::: Ptr AccelerationStructureVersionInfoKHR)
-> IO b)
-> IO b
forall a b. (a -> b) -> a -> b
$ \"pVersionInfo" ::: Ptr AccelerationStructureVersionInfoKHR
p -> ("pVersionInfo" ::: Ptr AccelerationStructureVersionInfoKHR)
-> AccelerationStructureVersionInfoKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pVersionInfo" ::: Ptr AccelerationStructureVersionInfoKHR
p AccelerationStructureVersionInfoKHR
x (("pVersionInfo" ::: Ptr AccelerationStructureVersionInfoKHR)
-> IO b
f "pVersionInfo" ::: Ptr AccelerationStructureVersionInfoKHR
p)
pokeCStruct :: forall b.
("pVersionInfo" ::: Ptr AccelerationStructureVersionInfoKHR)
-> AccelerationStructureVersionInfoKHR -> IO b -> IO b
pokeCStruct "pVersionInfo" ::: Ptr AccelerationStructureVersionInfoKHR
p AccelerationStructureVersionInfoKHR{ByteString
versionData :: ByteString
$sel:versionData:AccelerationStructureVersionInfoKHR :: AccelerationStructureVersionInfoKHR -> ByteString
..} IO b
f = ContT b IO b -> IO b
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT b IO b -> IO b) -> ContT b IO b -> IO b
forall a b. (a -> b) -> a -> b
$ do
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pVersionInfo" ::: Ptr AccelerationStructureVersionInfoKHR
p ("pVersionInfo" ::: Ptr AccelerationStructureVersionInfoKHR)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_ACCELERATION_STRUCTURE_VERSION_INFO_KHR)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr ("data" ::: Ptr ()) -> ("data" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pVersionInfo" ::: Ptr AccelerationStructureVersionInfoKHR
p ("pVersionInfo" ::: Ptr AccelerationStructureVersionInfoKHR)
-> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) ("data" ::: Ptr ()
forall a. Ptr a
nullPtr)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (ByteString -> Int
Data.ByteString.length (ByteString
versionData) Int -> Int -> Bool
forall a. Eq a => a -> a -> Bool
== Int
2 Int -> Int -> Int
forall a. Num a => a -> a -> a
* Int
forall a. Integral a => a
UUID_SIZE) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
IOException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"VkAccelerationStructureVersionInfoKHR::versionData must be 2*VK_UUID_SIZE bytes" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
Ptr Word8
versionData' <- (Ptr CChar -> Ptr Word8)
-> ContT b IO (Ptr CChar) -> ContT b IO (Ptr Word8)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap (forall a b. Ptr a -> Ptr b
castPtr @CChar @Word8) (ContT b IO (Ptr CChar) -> ContT b IO (Ptr Word8))
-> (((Ptr CChar -> IO b) -> IO b) -> ContT b IO (Ptr CChar))
-> ((Ptr CChar -> IO b) -> IO b)
-> ContT b IO (Ptr Word8)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((Ptr CChar -> IO b) -> IO b) -> ContT b IO (Ptr CChar)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr CChar -> IO b) -> IO b) -> ContT b IO (Ptr Word8))
-> ((Ptr CChar -> IO b) -> IO b) -> ContT b IO (Ptr Word8)
forall a b. (a -> b) -> a -> b
$ ByteString -> (Ptr CChar -> IO b) -> IO b
forall a. ByteString -> (Ptr CChar -> IO a) -> IO a
unsafeUseAsCString (ByteString
versionData)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (Ptr Word8) -> Ptr Word8 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pVersionInfo" ::: Ptr AccelerationStructureVersionInfoKHR
p ("pVersionInfo" ::: Ptr AccelerationStructureVersionInfoKHR)
-> Int -> Ptr (Ptr Word8)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr (Ptr Word8))) Ptr Word8
versionData'
IO b -> ContT b IO b
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO b -> ContT b IO b) -> IO b -> ContT b IO b
forall a b. (a -> b) -> a -> b
$ IO b
f
cStructSize :: Int
cStructSize = Int
24
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
("pVersionInfo" ::: Ptr AccelerationStructureVersionInfoKHR)
-> IO b -> IO b
pokeZeroCStruct "pVersionInfo" ::: Ptr AccelerationStructureVersionInfoKHR
p IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pVersionInfo" ::: Ptr AccelerationStructureVersionInfoKHR
p ("pVersionInfo" ::: Ptr AccelerationStructureVersionInfoKHR)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_ACCELERATION_STRUCTURE_VERSION_INFO_KHR)
Ptr ("data" ::: Ptr ()) -> ("data" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pVersionInfo" ::: Ptr AccelerationStructureVersionInfoKHR
p ("pVersionInfo" ::: Ptr AccelerationStructureVersionInfoKHR)
-> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) ("data" ::: Ptr ()
forall a. Ptr a
nullPtr)
IO b
f
instance FromCStruct AccelerationStructureVersionInfoKHR where
peekCStruct :: ("pVersionInfo" ::: Ptr AccelerationStructureVersionInfoKHR)
-> IO AccelerationStructureVersionInfoKHR
peekCStruct "pVersionInfo" ::: Ptr AccelerationStructureVersionInfoKHR
p = do
Ptr Word8
versionData <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr Word8) (("pVersionInfo" ::: Ptr AccelerationStructureVersionInfoKHR
p ("pVersionInfo" ::: Ptr AccelerationStructureVersionInfoKHR)
-> Int -> Ptr (Ptr Word8)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr (Ptr Word8)))
ByteString
versionData' <- CStringLen -> IO ByteString
packCStringLen ( forall a b. Ptr a -> Ptr b
castPtr @Word8 @CChar Ptr Word8
versionData
, Int
2 Int -> Int -> Int
forall a. Num a => a -> a -> a
* Int
forall a. Integral a => a
UUID_SIZE )
AccelerationStructureVersionInfoKHR
-> IO AccelerationStructureVersionInfoKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure (AccelerationStructureVersionInfoKHR
-> IO AccelerationStructureVersionInfoKHR)
-> AccelerationStructureVersionInfoKHR
-> IO AccelerationStructureVersionInfoKHR
forall a b. (a -> b) -> a -> b
$ ByteString -> AccelerationStructureVersionInfoKHR
AccelerationStructureVersionInfoKHR
ByteString
versionData'
instance Zero AccelerationStructureVersionInfoKHR where
zero :: AccelerationStructureVersionInfoKHR
zero = ByteString -> AccelerationStructureVersionInfoKHR
AccelerationStructureVersionInfoKHR
ByteString
forall a. Monoid a => a
mempty
data CopyAccelerationStructureInfoKHR = CopyAccelerationStructureInfoKHR
{
CopyAccelerationStructureInfoKHR -> AccelerationStructureKHR
src :: AccelerationStructureKHR
,
CopyAccelerationStructureInfoKHR -> AccelerationStructureKHR
dst :: AccelerationStructureKHR
,
CopyAccelerationStructureInfoKHR
-> CopyAccelerationStructureModeKHR
mode :: CopyAccelerationStructureModeKHR
}
deriving (Typeable, CopyAccelerationStructureInfoKHR
-> CopyAccelerationStructureInfoKHR -> Bool
(CopyAccelerationStructureInfoKHR
-> CopyAccelerationStructureInfoKHR -> Bool)
-> (CopyAccelerationStructureInfoKHR
-> CopyAccelerationStructureInfoKHR -> Bool)
-> Eq CopyAccelerationStructureInfoKHR
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CopyAccelerationStructureInfoKHR
-> CopyAccelerationStructureInfoKHR -> Bool
$c/= :: CopyAccelerationStructureInfoKHR
-> CopyAccelerationStructureInfoKHR -> Bool
== :: CopyAccelerationStructureInfoKHR
-> CopyAccelerationStructureInfoKHR -> Bool
$c== :: CopyAccelerationStructureInfoKHR
-> CopyAccelerationStructureInfoKHR -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (CopyAccelerationStructureInfoKHR)
#endif
deriving instance Show CopyAccelerationStructureInfoKHR
instance ToCStruct CopyAccelerationStructureInfoKHR where
withCStruct :: forall b.
CopyAccelerationStructureInfoKHR
-> (("pInfo" ::: Ptr CopyAccelerationStructureInfoKHR) -> IO b)
-> IO b
withCStruct CopyAccelerationStructureInfoKHR
x ("pInfo" ::: Ptr CopyAccelerationStructureInfoKHR) -> IO b
f = Int
-> (("pInfo" ::: Ptr CopyAccelerationStructureInfoKHR) -> IO b)
-> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
40 ((("pInfo" ::: Ptr CopyAccelerationStructureInfoKHR) -> IO b)
-> IO b)
-> (("pInfo" ::: Ptr CopyAccelerationStructureInfoKHR) -> IO b)
-> IO b
forall a b. (a -> b) -> a -> b
$ \"pInfo" ::: Ptr CopyAccelerationStructureInfoKHR
p -> ("pInfo" ::: Ptr CopyAccelerationStructureInfoKHR)
-> CopyAccelerationStructureInfoKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pInfo" ::: Ptr CopyAccelerationStructureInfoKHR
p CopyAccelerationStructureInfoKHR
x (("pInfo" ::: Ptr CopyAccelerationStructureInfoKHR) -> IO b
f "pInfo" ::: Ptr CopyAccelerationStructureInfoKHR
p)
pokeCStruct :: forall b.
("pInfo" ::: Ptr CopyAccelerationStructureInfoKHR)
-> CopyAccelerationStructureInfoKHR -> IO b -> IO b
pokeCStruct "pInfo" ::: Ptr CopyAccelerationStructureInfoKHR
p CopyAccelerationStructureInfoKHR{AccelerationStructureKHR
CopyAccelerationStructureModeKHR
mode :: CopyAccelerationStructureModeKHR
dst :: AccelerationStructureKHR
src :: AccelerationStructureKHR
$sel:mode:CopyAccelerationStructureInfoKHR :: CopyAccelerationStructureInfoKHR
-> CopyAccelerationStructureModeKHR
$sel:dst:CopyAccelerationStructureInfoKHR :: CopyAccelerationStructureInfoKHR -> AccelerationStructureKHR
$sel:src:CopyAccelerationStructureInfoKHR :: CopyAccelerationStructureInfoKHR -> AccelerationStructureKHR
..} IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr CopyAccelerationStructureInfoKHR
p ("pInfo" ::: Ptr CopyAccelerationStructureInfoKHR)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_COPY_ACCELERATION_STRUCTURE_INFO_KHR)
Ptr ("data" ::: Ptr ()) -> ("data" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr CopyAccelerationStructureInfoKHR
p ("pInfo" ::: Ptr CopyAccelerationStructureInfoKHR)
-> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) ("data" ::: Ptr ()
forall a. Ptr a
nullPtr)
("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> AccelerationStructureKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr CopyAccelerationStructureInfoKHR
p ("pInfo" ::: Ptr CopyAccelerationStructureInfoKHR)
-> Int
-> "pAccelerationStructures" ::: Ptr AccelerationStructureKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr AccelerationStructureKHR)) (AccelerationStructureKHR
src)
("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> AccelerationStructureKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr CopyAccelerationStructureInfoKHR
p ("pInfo" ::: Ptr CopyAccelerationStructureInfoKHR)
-> Int
-> "pAccelerationStructures" ::: Ptr AccelerationStructureKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr AccelerationStructureKHR)) (AccelerationStructureKHR
dst)
Ptr CopyAccelerationStructureModeKHR
-> CopyAccelerationStructureModeKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr CopyAccelerationStructureInfoKHR
p ("pInfo" ::: Ptr CopyAccelerationStructureInfoKHR)
-> Int -> Ptr CopyAccelerationStructureModeKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr CopyAccelerationStructureModeKHR)) (CopyAccelerationStructureModeKHR
mode)
IO b
f
cStructSize :: Int
cStructSize = Int
40
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
("pInfo" ::: Ptr CopyAccelerationStructureInfoKHR) -> IO b -> IO b
pokeZeroCStruct "pInfo" ::: Ptr CopyAccelerationStructureInfoKHR
p IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr CopyAccelerationStructureInfoKHR
p ("pInfo" ::: Ptr CopyAccelerationStructureInfoKHR)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_COPY_ACCELERATION_STRUCTURE_INFO_KHR)
Ptr ("data" ::: Ptr ()) -> ("data" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr CopyAccelerationStructureInfoKHR
p ("pInfo" ::: Ptr CopyAccelerationStructureInfoKHR)
-> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) ("data" ::: Ptr ()
forall a. Ptr a
nullPtr)
("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> AccelerationStructureKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr CopyAccelerationStructureInfoKHR
p ("pInfo" ::: Ptr CopyAccelerationStructureInfoKHR)
-> Int
-> "pAccelerationStructures" ::: Ptr AccelerationStructureKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr AccelerationStructureKHR)) (AccelerationStructureKHR
forall a. Zero a => a
zero)
("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> AccelerationStructureKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr CopyAccelerationStructureInfoKHR
p ("pInfo" ::: Ptr CopyAccelerationStructureInfoKHR)
-> Int
-> "pAccelerationStructures" ::: Ptr AccelerationStructureKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr AccelerationStructureKHR)) (AccelerationStructureKHR
forall a. Zero a => a
zero)
Ptr CopyAccelerationStructureModeKHR
-> CopyAccelerationStructureModeKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr CopyAccelerationStructureInfoKHR
p ("pInfo" ::: Ptr CopyAccelerationStructureInfoKHR)
-> Int -> Ptr CopyAccelerationStructureModeKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr CopyAccelerationStructureModeKHR)) (CopyAccelerationStructureModeKHR
forall a. Zero a => a
zero)
IO b
f
instance FromCStruct CopyAccelerationStructureInfoKHR where
peekCStruct :: ("pInfo" ::: Ptr CopyAccelerationStructureInfoKHR)
-> IO CopyAccelerationStructureInfoKHR
peekCStruct "pInfo" ::: Ptr CopyAccelerationStructureInfoKHR
p = do
AccelerationStructureKHR
src <- forall a. Storable a => Ptr a -> IO a
peek @AccelerationStructureKHR (("pInfo" ::: Ptr CopyAccelerationStructureInfoKHR
p ("pInfo" ::: Ptr CopyAccelerationStructureInfoKHR)
-> Int
-> "pAccelerationStructures" ::: Ptr AccelerationStructureKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr AccelerationStructureKHR))
AccelerationStructureKHR
dst <- forall a. Storable a => Ptr a -> IO a
peek @AccelerationStructureKHR (("pInfo" ::: Ptr CopyAccelerationStructureInfoKHR
p ("pInfo" ::: Ptr CopyAccelerationStructureInfoKHR)
-> Int
-> "pAccelerationStructures" ::: Ptr AccelerationStructureKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr AccelerationStructureKHR))
CopyAccelerationStructureModeKHR
mode <- forall a. Storable a => Ptr a -> IO a
peek @CopyAccelerationStructureModeKHR (("pInfo" ::: Ptr CopyAccelerationStructureInfoKHR
p ("pInfo" ::: Ptr CopyAccelerationStructureInfoKHR)
-> Int -> Ptr CopyAccelerationStructureModeKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr CopyAccelerationStructureModeKHR))
CopyAccelerationStructureInfoKHR
-> IO CopyAccelerationStructureInfoKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure (CopyAccelerationStructureInfoKHR
-> IO CopyAccelerationStructureInfoKHR)
-> CopyAccelerationStructureInfoKHR
-> IO CopyAccelerationStructureInfoKHR
forall a b. (a -> b) -> a -> b
$ AccelerationStructureKHR
-> AccelerationStructureKHR
-> CopyAccelerationStructureModeKHR
-> CopyAccelerationStructureInfoKHR
CopyAccelerationStructureInfoKHR
AccelerationStructureKHR
src AccelerationStructureKHR
dst CopyAccelerationStructureModeKHR
mode
instance Storable CopyAccelerationStructureInfoKHR where
sizeOf :: CopyAccelerationStructureInfoKHR -> Int
sizeOf ~CopyAccelerationStructureInfoKHR
_ = Int
40
alignment :: CopyAccelerationStructureInfoKHR -> Int
alignment ~CopyAccelerationStructureInfoKHR
_ = Int
8
peek :: ("pInfo" ::: Ptr CopyAccelerationStructureInfoKHR)
-> IO CopyAccelerationStructureInfoKHR
peek = ("pInfo" ::: Ptr CopyAccelerationStructureInfoKHR)
-> IO CopyAccelerationStructureInfoKHR
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: ("pInfo" ::: Ptr CopyAccelerationStructureInfoKHR)
-> CopyAccelerationStructureInfoKHR -> IO ()
poke "pInfo" ::: Ptr CopyAccelerationStructureInfoKHR
ptr CopyAccelerationStructureInfoKHR
poked = ("pInfo" ::: Ptr CopyAccelerationStructureInfoKHR)
-> CopyAccelerationStructureInfoKHR -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pInfo" ::: Ptr CopyAccelerationStructureInfoKHR
ptr CopyAccelerationStructureInfoKHR
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero CopyAccelerationStructureInfoKHR where
zero :: CopyAccelerationStructureInfoKHR
zero = AccelerationStructureKHR
-> AccelerationStructureKHR
-> CopyAccelerationStructureModeKHR
-> CopyAccelerationStructureInfoKHR
CopyAccelerationStructureInfoKHR
AccelerationStructureKHR
forall a. Zero a => a
zero
AccelerationStructureKHR
forall a. Zero a => a
zero
CopyAccelerationStructureModeKHR
forall a. Zero a => a
zero
data CopyAccelerationStructureToMemoryInfoKHR = CopyAccelerationStructureToMemoryInfoKHR
{
CopyAccelerationStructureToMemoryInfoKHR
-> AccelerationStructureKHR
src :: AccelerationStructureKHR
,
CopyAccelerationStructureToMemoryInfoKHR -> DeviceOrHostAddressKHR
dst :: DeviceOrHostAddressKHR
,
CopyAccelerationStructureToMemoryInfoKHR
-> CopyAccelerationStructureModeKHR
mode :: CopyAccelerationStructureModeKHR
}
deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (CopyAccelerationStructureToMemoryInfoKHR)
#endif
deriving instance Show CopyAccelerationStructureToMemoryInfoKHR
instance ToCStruct CopyAccelerationStructureToMemoryInfoKHR where
withCStruct :: forall b.
CopyAccelerationStructureToMemoryInfoKHR
-> (("pInfo" ::: Ptr CopyAccelerationStructureToMemoryInfoKHR)
-> IO b)
-> IO b
withCStruct CopyAccelerationStructureToMemoryInfoKHR
x ("pInfo" ::: Ptr CopyAccelerationStructureToMemoryInfoKHR) -> IO b
f = Int
-> (("pInfo" ::: Ptr CopyAccelerationStructureToMemoryInfoKHR)
-> IO b)
-> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
40 ((("pInfo" ::: Ptr CopyAccelerationStructureToMemoryInfoKHR)
-> IO b)
-> IO b)
-> (("pInfo" ::: Ptr CopyAccelerationStructureToMemoryInfoKHR)
-> IO b)
-> IO b
forall a b. (a -> b) -> a -> b
$ \"pInfo" ::: Ptr CopyAccelerationStructureToMemoryInfoKHR
p -> ("pInfo" ::: Ptr CopyAccelerationStructureToMemoryInfoKHR)
-> CopyAccelerationStructureToMemoryInfoKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pInfo" ::: Ptr CopyAccelerationStructureToMemoryInfoKHR
p CopyAccelerationStructureToMemoryInfoKHR
x (("pInfo" ::: Ptr CopyAccelerationStructureToMemoryInfoKHR) -> IO b
f "pInfo" ::: Ptr CopyAccelerationStructureToMemoryInfoKHR
p)
pokeCStruct :: forall b.
("pInfo" ::: Ptr CopyAccelerationStructureToMemoryInfoKHR)
-> CopyAccelerationStructureToMemoryInfoKHR -> IO b -> IO b
pokeCStruct "pInfo" ::: Ptr CopyAccelerationStructureToMemoryInfoKHR
p CopyAccelerationStructureToMemoryInfoKHR{AccelerationStructureKHR
CopyAccelerationStructureModeKHR
DeviceOrHostAddressKHR
mode :: CopyAccelerationStructureModeKHR
dst :: DeviceOrHostAddressKHR
src :: AccelerationStructureKHR
$sel:mode:CopyAccelerationStructureToMemoryInfoKHR :: CopyAccelerationStructureToMemoryInfoKHR
-> CopyAccelerationStructureModeKHR
$sel:dst:CopyAccelerationStructureToMemoryInfoKHR :: CopyAccelerationStructureToMemoryInfoKHR -> DeviceOrHostAddressKHR
$sel:src:CopyAccelerationStructureToMemoryInfoKHR :: CopyAccelerationStructureToMemoryInfoKHR
-> AccelerationStructureKHR
..} IO b
f = ContT b IO b -> IO b
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT b IO b -> IO b) -> ContT b IO b -> IO b
forall a b. (a -> b) -> a -> b
$ do
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr CopyAccelerationStructureToMemoryInfoKHR
p ("pInfo" ::: Ptr CopyAccelerationStructureToMemoryInfoKHR)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_COPY_ACCELERATION_STRUCTURE_TO_MEMORY_INFO_KHR)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr ("data" ::: Ptr ()) -> ("data" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr CopyAccelerationStructureToMemoryInfoKHR
p ("pInfo" ::: Ptr CopyAccelerationStructureToMemoryInfoKHR)
-> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) ("data" ::: Ptr ()
forall a. Ptr a
nullPtr)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> AccelerationStructureKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr CopyAccelerationStructureToMemoryInfoKHR
p ("pInfo" ::: Ptr CopyAccelerationStructureToMemoryInfoKHR)
-> Int
-> "pAccelerationStructures" ::: Ptr AccelerationStructureKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr AccelerationStructureKHR)) (AccelerationStructureKHR
src)
((() -> IO b) -> IO b) -> ContT b IO ()
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((() -> IO b) -> IO b) -> ContT b IO ())
-> ((() -> IO b) -> IO b) -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr DeviceOrHostAddressKHR
-> DeviceOrHostAddressKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct (("pInfo" ::: Ptr CopyAccelerationStructureToMemoryInfoKHR
p ("pInfo" ::: Ptr CopyAccelerationStructureToMemoryInfoKHR)
-> Int -> Ptr DeviceOrHostAddressKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr DeviceOrHostAddressKHR)) (DeviceOrHostAddressKHR
dst) (IO b -> IO b) -> ((() -> IO b) -> IO b) -> (() -> IO b) -> IO b
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((() -> IO b) -> () -> IO b
forall a b. (a -> b) -> a -> b
$ ())
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr CopyAccelerationStructureModeKHR
-> CopyAccelerationStructureModeKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr CopyAccelerationStructureToMemoryInfoKHR
p ("pInfo" ::: Ptr CopyAccelerationStructureToMemoryInfoKHR)
-> Int -> Ptr CopyAccelerationStructureModeKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr CopyAccelerationStructureModeKHR)) (CopyAccelerationStructureModeKHR
mode)
IO b -> ContT b IO b
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO b -> ContT b IO b) -> IO b -> ContT b IO b
forall a b. (a -> b) -> a -> b
$ IO b
f
cStructSize :: Int
cStructSize = Int
40
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
("pInfo" ::: Ptr CopyAccelerationStructureToMemoryInfoKHR)
-> IO b -> IO b
pokeZeroCStruct "pInfo" ::: Ptr CopyAccelerationStructureToMemoryInfoKHR
p IO b
f = ContT b IO b -> IO b
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT b IO b -> IO b) -> ContT b IO b -> IO b
forall a b. (a -> b) -> a -> b
$ do
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr CopyAccelerationStructureToMemoryInfoKHR
p ("pInfo" ::: Ptr CopyAccelerationStructureToMemoryInfoKHR)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_COPY_ACCELERATION_STRUCTURE_TO_MEMORY_INFO_KHR)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr ("data" ::: Ptr ()) -> ("data" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr CopyAccelerationStructureToMemoryInfoKHR
p ("pInfo" ::: Ptr CopyAccelerationStructureToMemoryInfoKHR)
-> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) ("data" ::: Ptr ()
forall a. Ptr a
nullPtr)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> AccelerationStructureKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr CopyAccelerationStructureToMemoryInfoKHR
p ("pInfo" ::: Ptr CopyAccelerationStructureToMemoryInfoKHR)
-> Int
-> "pAccelerationStructures" ::: Ptr AccelerationStructureKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr AccelerationStructureKHR)) (AccelerationStructureKHR
forall a. Zero a => a
zero)
((() -> IO b) -> IO b) -> ContT b IO ()
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((() -> IO b) -> IO b) -> ContT b IO ())
-> ((() -> IO b) -> IO b) -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr DeviceOrHostAddressKHR
-> DeviceOrHostAddressKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct (("pInfo" ::: Ptr CopyAccelerationStructureToMemoryInfoKHR
p ("pInfo" ::: Ptr CopyAccelerationStructureToMemoryInfoKHR)
-> Int -> Ptr DeviceOrHostAddressKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr DeviceOrHostAddressKHR)) (DeviceOrHostAddressKHR
forall a. Zero a => a
zero) (IO b -> IO b) -> ((() -> IO b) -> IO b) -> (() -> IO b) -> IO b
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((() -> IO b) -> () -> IO b
forall a b. (a -> b) -> a -> b
$ ())
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr CopyAccelerationStructureModeKHR
-> CopyAccelerationStructureModeKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr CopyAccelerationStructureToMemoryInfoKHR
p ("pInfo" ::: Ptr CopyAccelerationStructureToMemoryInfoKHR)
-> Int -> Ptr CopyAccelerationStructureModeKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr CopyAccelerationStructureModeKHR)) (CopyAccelerationStructureModeKHR
forall a. Zero a => a
zero)
IO b -> ContT b IO b
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO b -> ContT b IO b) -> IO b -> ContT b IO b
forall a b. (a -> b) -> a -> b
$ IO b
f
instance Zero CopyAccelerationStructureToMemoryInfoKHR where
zero :: CopyAccelerationStructureToMemoryInfoKHR
zero = AccelerationStructureKHR
-> DeviceOrHostAddressKHR
-> CopyAccelerationStructureModeKHR
-> CopyAccelerationStructureToMemoryInfoKHR
CopyAccelerationStructureToMemoryInfoKHR
AccelerationStructureKHR
forall a. Zero a => a
zero
DeviceOrHostAddressKHR
forall a. Zero a => a
zero
CopyAccelerationStructureModeKHR
forall a. Zero a => a
zero
data CopyMemoryToAccelerationStructureInfoKHR = CopyMemoryToAccelerationStructureInfoKHR
{
CopyMemoryToAccelerationStructureInfoKHR
-> DeviceOrHostAddressConstKHR
src :: DeviceOrHostAddressConstKHR
,
CopyMemoryToAccelerationStructureInfoKHR
-> AccelerationStructureKHR
dst :: AccelerationStructureKHR
,
CopyMemoryToAccelerationStructureInfoKHR
-> CopyAccelerationStructureModeKHR
mode :: CopyAccelerationStructureModeKHR
}
deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (CopyMemoryToAccelerationStructureInfoKHR)
#endif
deriving instance Show CopyMemoryToAccelerationStructureInfoKHR
instance ToCStruct CopyMemoryToAccelerationStructureInfoKHR where
withCStruct :: forall b.
CopyMemoryToAccelerationStructureInfoKHR
-> (("pInfo" ::: Ptr CopyMemoryToAccelerationStructureInfoKHR)
-> IO b)
-> IO b
withCStruct CopyMemoryToAccelerationStructureInfoKHR
x ("pInfo" ::: Ptr CopyMemoryToAccelerationStructureInfoKHR) -> IO b
f = Int
-> (("pInfo" ::: Ptr CopyMemoryToAccelerationStructureInfoKHR)
-> IO b)
-> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
40 ((("pInfo" ::: Ptr CopyMemoryToAccelerationStructureInfoKHR)
-> IO b)
-> IO b)
-> (("pInfo" ::: Ptr CopyMemoryToAccelerationStructureInfoKHR)
-> IO b)
-> IO b
forall a b. (a -> b) -> a -> b
$ \"pInfo" ::: Ptr CopyMemoryToAccelerationStructureInfoKHR
p -> ("pInfo" ::: Ptr CopyMemoryToAccelerationStructureInfoKHR)
-> CopyMemoryToAccelerationStructureInfoKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pInfo" ::: Ptr CopyMemoryToAccelerationStructureInfoKHR
p CopyMemoryToAccelerationStructureInfoKHR
x (("pInfo" ::: Ptr CopyMemoryToAccelerationStructureInfoKHR) -> IO b
f "pInfo" ::: Ptr CopyMemoryToAccelerationStructureInfoKHR
p)
pokeCStruct :: forall b.
("pInfo" ::: Ptr CopyMemoryToAccelerationStructureInfoKHR)
-> CopyMemoryToAccelerationStructureInfoKHR -> IO b -> IO b
pokeCStruct "pInfo" ::: Ptr CopyMemoryToAccelerationStructureInfoKHR
p CopyMemoryToAccelerationStructureInfoKHR{AccelerationStructureKHR
CopyAccelerationStructureModeKHR
DeviceOrHostAddressConstKHR
mode :: CopyAccelerationStructureModeKHR
dst :: AccelerationStructureKHR
src :: DeviceOrHostAddressConstKHR
$sel:mode:CopyMemoryToAccelerationStructureInfoKHR :: CopyMemoryToAccelerationStructureInfoKHR
-> CopyAccelerationStructureModeKHR
$sel:dst:CopyMemoryToAccelerationStructureInfoKHR :: CopyMemoryToAccelerationStructureInfoKHR
-> AccelerationStructureKHR
$sel:src:CopyMemoryToAccelerationStructureInfoKHR :: CopyMemoryToAccelerationStructureInfoKHR
-> DeviceOrHostAddressConstKHR
..} IO b
f = ContT b IO b -> IO b
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT b IO b -> IO b) -> ContT b IO b -> IO b
forall a b. (a -> b) -> a -> b
$ do
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr CopyMemoryToAccelerationStructureInfoKHR
p ("pInfo" ::: Ptr CopyMemoryToAccelerationStructureInfoKHR)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_COPY_MEMORY_TO_ACCELERATION_STRUCTURE_INFO_KHR)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr ("data" ::: Ptr ()) -> ("data" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr CopyMemoryToAccelerationStructureInfoKHR
p ("pInfo" ::: Ptr CopyMemoryToAccelerationStructureInfoKHR)
-> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) ("data" ::: Ptr ()
forall a. Ptr a
nullPtr)
((() -> IO b) -> IO b) -> ContT b IO ()
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((() -> IO b) -> IO b) -> ContT b IO ())
-> ((() -> IO b) -> IO b) -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr DeviceOrHostAddressConstKHR
-> DeviceOrHostAddressConstKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct (("pInfo" ::: Ptr CopyMemoryToAccelerationStructureInfoKHR
p ("pInfo" ::: Ptr CopyMemoryToAccelerationStructureInfoKHR)
-> Int -> Ptr DeviceOrHostAddressConstKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr DeviceOrHostAddressConstKHR)) (DeviceOrHostAddressConstKHR
src) (IO b -> IO b) -> ((() -> IO b) -> IO b) -> (() -> IO b) -> IO b
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((() -> IO b) -> () -> IO b
forall a b. (a -> b) -> a -> b
$ ())
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> AccelerationStructureKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr CopyMemoryToAccelerationStructureInfoKHR
p ("pInfo" ::: Ptr CopyMemoryToAccelerationStructureInfoKHR)
-> Int
-> "pAccelerationStructures" ::: Ptr AccelerationStructureKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr AccelerationStructureKHR)) (AccelerationStructureKHR
dst)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr CopyAccelerationStructureModeKHR
-> CopyAccelerationStructureModeKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr CopyMemoryToAccelerationStructureInfoKHR
p ("pInfo" ::: Ptr CopyMemoryToAccelerationStructureInfoKHR)
-> Int -> Ptr CopyAccelerationStructureModeKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr CopyAccelerationStructureModeKHR)) (CopyAccelerationStructureModeKHR
mode)
IO b -> ContT b IO b
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO b -> ContT b IO b) -> IO b -> ContT b IO b
forall a b. (a -> b) -> a -> b
$ IO b
f
cStructSize :: Int
cStructSize = Int
40
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
("pInfo" ::: Ptr CopyMemoryToAccelerationStructureInfoKHR)
-> IO b -> IO b
pokeZeroCStruct "pInfo" ::: Ptr CopyMemoryToAccelerationStructureInfoKHR
p IO b
f = ContT b IO b -> IO b
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT b IO b -> IO b) -> ContT b IO b -> IO b
forall a b. (a -> b) -> a -> b
$ do
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr CopyMemoryToAccelerationStructureInfoKHR
p ("pInfo" ::: Ptr CopyMemoryToAccelerationStructureInfoKHR)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_COPY_MEMORY_TO_ACCELERATION_STRUCTURE_INFO_KHR)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr ("data" ::: Ptr ()) -> ("data" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr CopyMemoryToAccelerationStructureInfoKHR
p ("pInfo" ::: Ptr CopyMemoryToAccelerationStructureInfoKHR)
-> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) ("data" ::: Ptr ()
forall a. Ptr a
nullPtr)
((() -> IO b) -> IO b) -> ContT b IO ()
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((() -> IO b) -> IO b) -> ContT b IO ())
-> ((() -> IO b) -> IO b) -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr DeviceOrHostAddressConstKHR
-> DeviceOrHostAddressConstKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct (("pInfo" ::: Ptr CopyMemoryToAccelerationStructureInfoKHR
p ("pInfo" ::: Ptr CopyMemoryToAccelerationStructureInfoKHR)
-> Int -> Ptr DeviceOrHostAddressConstKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr DeviceOrHostAddressConstKHR)) (DeviceOrHostAddressConstKHR
forall a. Zero a => a
zero) (IO b -> IO b) -> ((() -> IO b) -> IO b) -> (() -> IO b) -> IO b
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((() -> IO b) -> () -> IO b
forall a b. (a -> b) -> a -> b
$ ())
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> AccelerationStructureKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr CopyMemoryToAccelerationStructureInfoKHR
p ("pInfo" ::: Ptr CopyMemoryToAccelerationStructureInfoKHR)
-> Int
-> "pAccelerationStructures" ::: Ptr AccelerationStructureKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr AccelerationStructureKHR)) (AccelerationStructureKHR
forall a. Zero a => a
zero)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr CopyAccelerationStructureModeKHR
-> CopyAccelerationStructureModeKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr CopyMemoryToAccelerationStructureInfoKHR
p ("pInfo" ::: Ptr CopyMemoryToAccelerationStructureInfoKHR)
-> Int -> Ptr CopyAccelerationStructureModeKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr CopyAccelerationStructureModeKHR)) (CopyAccelerationStructureModeKHR
forall a. Zero a => a
zero)
IO b -> ContT b IO b
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO b -> ContT b IO b) -> IO b -> ContT b IO b
forall a b. (a -> b) -> a -> b
$ IO b
f
instance Zero CopyMemoryToAccelerationStructureInfoKHR where
zero :: CopyMemoryToAccelerationStructureInfoKHR
zero = DeviceOrHostAddressConstKHR
-> AccelerationStructureKHR
-> CopyAccelerationStructureModeKHR
-> CopyMemoryToAccelerationStructureInfoKHR
CopyMemoryToAccelerationStructureInfoKHR
DeviceOrHostAddressConstKHR
forall a. Zero a => a
zero
AccelerationStructureKHR
forall a. Zero a => a
zero
CopyAccelerationStructureModeKHR
forall a. Zero a => a
zero
data AccelerationStructureBuildSizesInfoKHR = AccelerationStructureBuildSizesInfoKHR
{
AccelerationStructureBuildSizesInfoKHR -> "dataSize" ::: Word64
accelerationStructureSize :: DeviceSize
,
AccelerationStructureBuildSizesInfoKHR -> "dataSize" ::: Word64
updateScratchSize :: DeviceSize
,
AccelerationStructureBuildSizesInfoKHR -> "dataSize" ::: Word64
buildScratchSize :: DeviceSize
}
deriving (Typeable, AccelerationStructureBuildSizesInfoKHR
-> AccelerationStructureBuildSizesInfoKHR -> Bool
(AccelerationStructureBuildSizesInfoKHR
-> AccelerationStructureBuildSizesInfoKHR -> Bool)
-> (AccelerationStructureBuildSizesInfoKHR
-> AccelerationStructureBuildSizesInfoKHR -> Bool)
-> Eq AccelerationStructureBuildSizesInfoKHR
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AccelerationStructureBuildSizesInfoKHR
-> AccelerationStructureBuildSizesInfoKHR -> Bool
$c/= :: AccelerationStructureBuildSizesInfoKHR
-> AccelerationStructureBuildSizesInfoKHR -> Bool
== :: AccelerationStructureBuildSizesInfoKHR
-> AccelerationStructureBuildSizesInfoKHR -> Bool
$c== :: AccelerationStructureBuildSizesInfoKHR
-> AccelerationStructureBuildSizesInfoKHR -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (AccelerationStructureBuildSizesInfoKHR)
#endif
deriving instance Show AccelerationStructureBuildSizesInfoKHR
instance ToCStruct AccelerationStructureBuildSizesInfoKHR where
withCStruct :: forall b.
AccelerationStructureBuildSizesInfoKHR
-> (("pSizeInfo" ::: Ptr AccelerationStructureBuildSizesInfoKHR)
-> IO b)
-> IO b
withCStruct AccelerationStructureBuildSizesInfoKHR
x ("pSizeInfo" ::: Ptr AccelerationStructureBuildSizesInfoKHR)
-> IO b
f = Int
-> (("pSizeInfo" ::: Ptr AccelerationStructureBuildSizesInfoKHR)
-> IO b)
-> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
40 ((("pSizeInfo" ::: Ptr AccelerationStructureBuildSizesInfoKHR)
-> IO b)
-> IO b)
-> (("pSizeInfo" ::: Ptr AccelerationStructureBuildSizesInfoKHR)
-> IO b)
-> IO b
forall a b. (a -> b) -> a -> b
$ \"pSizeInfo" ::: Ptr AccelerationStructureBuildSizesInfoKHR
p -> ("pSizeInfo" ::: Ptr AccelerationStructureBuildSizesInfoKHR)
-> AccelerationStructureBuildSizesInfoKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pSizeInfo" ::: Ptr AccelerationStructureBuildSizesInfoKHR
p AccelerationStructureBuildSizesInfoKHR
x (("pSizeInfo" ::: Ptr AccelerationStructureBuildSizesInfoKHR)
-> IO b
f "pSizeInfo" ::: Ptr AccelerationStructureBuildSizesInfoKHR
p)
pokeCStruct :: forall b.
("pSizeInfo" ::: Ptr AccelerationStructureBuildSizesInfoKHR)
-> AccelerationStructureBuildSizesInfoKHR -> IO b -> IO b
pokeCStruct "pSizeInfo" ::: Ptr AccelerationStructureBuildSizesInfoKHR
p AccelerationStructureBuildSizesInfoKHR{"dataSize" ::: Word64
buildScratchSize :: "dataSize" ::: Word64
updateScratchSize :: "dataSize" ::: Word64
accelerationStructureSize :: "dataSize" ::: Word64
$sel:buildScratchSize:AccelerationStructureBuildSizesInfoKHR :: AccelerationStructureBuildSizesInfoKHR -> "dataSize" ::: Word64
$sel:updateScratchSize:AccelerationStructureBuildSizesInfoKHR :: AccelerationStructureBuildSizesInfoKHR -> "dataSize" ::: Word64
$sel:accelerationStructureSize:AccelerationStructureBuildSizesInfoKHR :: AccelerationStructureBuildSizesInfoKHR -> "dataSize" ::: Word64
..} IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSizeInfo" ::: Ptr AccelerationStructureBuildSizesInfoKHR
p ("pSizeInfo" ::: Ptr AccelerationStructureBuildSizesInfoKHR)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_ACCELERATION_STRUCTURE_BUILD_SIZES_INFO_KHR)
Ptr ("data" ::: Ptr ()) -> ("data" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSizeInfo" ::: Ptr AccelerationStructureBuildSizesInfoKHR
p ("pSizeInfo" ::: Ptr AccelerationStructureBuildSizesInfoKHR)
-> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) ("data" ::: Ptr ()
forall a. Ptr a
nullPtr)
("pIndirectDeviceAddresses" ::: Ptr ("dataSize" ::: Word64))
-> ("dataSize" ::: Word64) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSizeInfo" ::: Ptr AccelerationStructureBuildSizesInfoKHR
p ("pSizeInfo" ::: Ptr AccelerationStructureBuildSizesInfoKHR)
-> Int
-> "pIndirectDeviceAddresses" ::: Ptr ("dataSize" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr DeviceSize)) ("dataSize" ::: Word64
accelerationStructureSize)
("pIndirectDeviceAddresses" ::: Ptr ("dataSize" ::: Word64))
-> ("dataSize" ::: Word64) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSizeInfo" ::: Ptr AccelerationStructureBuildSizesInfoKHR
p ("pSizeInfo" ::: Ptr AccelerationStructureBuildSizesInfoKHR)
-> Int
-> "pIndirectDeviceAddresses" ::: Ptr ("dataSize" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr DeviceSize)) ("dataSize" ::: Word64
updateScratchSize)
("pIndirectDeviceAddresses" ::: Ptr ("dataSize" ::: Word64))
-> ("dataSize" ::: Word64) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSizeInfo" ::: Ptr AccelerationStructureBuildSizesInfoKHR
p ("pSizeInfo" ::: Ptr AccelerationStructureBuildSizesInfoKHR)
-> Int
-> "pIndirectDeviceAddresses" ::: Ptr ("dataSize" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr DeviceSize)) ("dataSize" ::: Word64
buildScratchSize)
IO b
f
cStructSize :: Int
cStructSize = Int
40
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
("pSizeInfo" ::: Ptr AccelerationStructureBuildSizesInfoKHR)
-> IO b -> IO b
pokeZeroCStruct "pSizeInfo" ::: Ptr AccelerationStructureBuildSizesInfoKHR
p IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSizeInfo" ::: Ptr AccelerationStructureBuildSizesInfoKHR
p ("pSizeInfo" ::: Ptr AccelerationStructureBuildSizesInfoKHR)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_ACCELERATION_STRUCTURE_BUILD_SIZES_INFO_KHR)
Ptr ("data" ::: Ptr ()) -> ("data" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSizeInfo" ::: Ptr AccelerationStructureBuildSizesInfoKHR
p ("pSizeInfo" ::: Ptr AccelerationStructureBuildSizesInfoKHR)
-> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) ("data" ::: Ptr ()
forall a. Ptr a
nullPtr)
("pIndirectDeviceAddresses" ::: Ptr ("dataSize" ::: Word64))
-> ("dataSize" ::: Word64) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSizeInfo" ::: Ptr AccelerationStructureBuildSizesInfoKHR
p ("pSizeInfo" ::: Ptr AccelerationStructureBuildSizesInfoKHR)
-> Int
-> "pIndirectDeviceAddresses" ::: Ptr ("dataSize" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr DeviceSize)) ("dataSize" ::: Word64
forall a. Zero a => a
zero)
("pIndirectDeviceAddresses" ::: Ptr ("dataSize" ::: Word64))
-> ("dataSize" ::: Word64) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSizeInfo" ::: Ptr AccelerationStructureBuildSizesInfoKHR
p ("pSizeInfo" ::: Ptr AccelerationStructureBuildSizesInfoKHR)
-> Int
-> "pIndirectDeviceAddresses" ::: Ptr ("dataSize" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr DeviceSize)) ("dataSize" ::: Word64
forall a. Zero a => a
zero)
("pIndirectDeviceAddresses" ::: Ptr ("dataSize" ::: Word64))
-> ("dataSize" ::: Word64) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pSizeInfo" ::: Ptr AccelerationStructureBuildSizesInfoKHR
p ("pSizeInfo" ::: Ptr AccelerationStructureBuildSizesInfoKHR)
-> Int
-> "pIndirectDeviceAddresses" ::: Ptr ("dataSize" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr DeviceSize)) ("dataSize" ::: Word64
forall a. Zero a => a
zero)
IO b
f
instance FromCStruct AccelerationStructureBuildSizesInfoKHR where
peekCStruct :: ("pSizeInfo" ::: Ptr AccelerationStructureBuildSizesInfoKHR)
-> IO AccelerationStructureBuildSizesInfoKHR
peekCStruct "pSizeInfo" ::: Ptr AccelerationStructureBuildSizesInfoKHR
p = do
"dataSize" ::: Word64
accelerationStructureSize <- forall a. Storable a => Ptr a -> IO a
peek @DeviceSize (("pSizeInfo" ::: Ptr AccelerationStructureBuildSizesInfoKHR
p ("pSizeInfo" ::: Ptr AccelerationStructureBuildSizesInfoKHR)
-> Int
-> "pIndirectDeviceAddresses" ::: Ptr ("dataSize" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr DeviceSize))
"dataSize" ::: Word64
updateScratchSize <- forall a. Storable a => Ptr a -> IO a
peek @DeviceSize (("pSizeInfo" ::: Ptr AccelerationStructureBuildSizesInfoKHR
p ("pSizeInfo" ::: Ptr AccelerationStructureBuildSizesInfoKHR)
-> Int
-> "pIndirectDeviceAddresses" ::: Ptr ("dataSize" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr DeviceSize))
"dataSize" ::: Word64
buildScratchSize <- forall a. Storable a => Ptr a -> IO a
peek @DeviceSize (("pSizeInfo" ::: Ptr AccelerationStructureBuildSizesInfoKHR
p ("pSizeInfo" ::: Ptr AccelerationStructureBuildSizesInfoKHR)
-> Int
-> "pIndirectDeviceAddresses" ::: Ptr ("dataSize" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr DeviceSize))
AccelerationStructureBuildSizesInfoKHR
-> IO AccelerationStructureBuildSizesInfoKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure (AccelerationStructureBuildSizesInfoKHR
-> IO AccelerationStructureBuildSizesInfoKHR)
-> AccelerationStructureBuildSizesInfoKHR
-> IO AccelerationStructureBuildSizesInfoKHR
forall a b. (a -> b) -> a -> b
$ ("dataSize" ::: Word64)
-> ("dataSize" ::: Word64)
-> ("dataSize" ::: Word64)
-> AccelerationStructureBuildSizesInfoKHR
AccelerationStructureBuildSizesInfoKHR
"dataSize" ::: Word64
accelerationStructureSize "dataSize" ::: Word64
updateScratchSize "dataSize" ::: Word64
buildScratchSize
instance Storable AccelerationStructureBuildSizesInfoKHR where
sizeOf :: AccelerationStructureBuildSizesInfoKHR -> Int
sizeOf ~AccelerationStructureBuildSizesInfoKHR
_ = Int
40
alignment :: AccelerationStructureBuildSizesInfoKHR -> Int
alignment ~AccelerationStructureBuildSizesInfoKHR
_ = Int
8
peek :: ("pSizeInfo" ::: Ptr AccelerationStructureBuildSizesInfoKHR)
-> IO AccelerationStructureBuildSizesInfoKHR
peek = ("pSizeInfo" ::: Ptr AccelerationStructureBuildSizesInfoKHR)
-> IO AccelerationStructureBuildSizesInfoKHR
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: ("pSizeInfo" ::: Ptr AccelerationStructureBuildSizesInfoKHR)
-> AccelerationStructureBuildSizesInfoKHR -> IO ()
poke "pSizeInfo" ::: Ptr AccelerationStructureBuildSizesInfoKHR
ptr AccelerationStructureBuildSizesInfoKHR
poked = ("pSizeInfo" ::: Ptr AccelerationStructureBuildSizesInfoKHR)
-> AccelerationStructureBuildSizesInfoKHR -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pSizeInfo" ::: Ptr AccelerationStructureBuildSizesInfoKHR
ptr AccelerationStructureBuildSizesInfoKHR
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero AccelerationStructureBuildSizesInfoKHR where
zero :: AccelerationStructureBuildSizesInfoKHR
zero = ("dataSize" ::: Word64)
-> ("dataSize" ::: Word64)
-> ("dataSize" ::: Word64)
-> AccelerationStructureBuildSizesInfoKHR
AccelerationStructureBuildSizesInfoKHR
"dataSize" ::: Word64
forall a. Zero a => a
zero
"dataSize" ::: Word64
forall a. Zero a => a
zero
"dataSize" ::: Word64
forall a. Zero a => a
zero
data DeviceOrHostAddressKHR
= DeviceAddress DeviceAddress
| HostAddress (Ptr ())
deriving (Int -> DeviceOrHostAddressKHR -> ShowS
[DeviceOrHostAddressKHR] -> ShowS
DeviceOrHostAddressKHR -> String
(Int -> DeviceOrHostAddressKHR -> ShowS)
-> (DeviceOrHostAddressKHR -> String)
-> ([DeviceOrHostAddressKHR] -> ShowS)
-> Show DeviceOrHostAddressKHR
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeviceOrHostAddressKHR] -> ShowS
$cshowList :: [DeviceOrHostAddressKHR] -> ShowS
show :: DeviceOrHostAddressKHR -> String
$cshow :: DeviceOrHostAddressKHR -> String
showsPrec :: Int -> DeviceOrHostAddressKHR -> ShowS
$cshowsPrec :: Int -> DeviceOrHostAddressKHR -> ShowS
Show)
instance ToCStruct DeviceOrHostAddressKHR where
withCStruct :: forall b.
DeviceOrHostAddressKHR
-> (Ptr DeviceOrHostAddressKHR -> IO b) -> IO b
withCStruct DeviceOrHostAddressKHR
x Ptr DeviceOrHostAddressKHR -> IO b
f = Int -> (Ptr DeviceOrHostAddressKHR -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
8 ((Ptr DeviceOrHostAddressKHR -> IO b) -> IO b)
-> (Ptr DeviceOrHostAddressKHR -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr DeviceOrHostAddressKHR
p -> Ptr DeviceOrHostAddressKHR
-> DeviceOrHostAddressKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr DeviceOrHostAddressKHR
p DeviceOrHostAddressKHR
x (Ptr DeviceOrHostAddressKHR -> IO b
f Ptr DeviceOrHostAddressKHR
p)
pokeCStruct :: Ptr DeviceOrHostAddressKHR -> DeviceOrHostAddressKHR -> IO a -> IO a
pokeCStruct :: forall b.
Ptr DeviceOrHostAddressKHR
-> DeviceOrHostAddressKHR -> IO b -> IO b
pokeCStruct Ptr DeviceOrHostAddressKHR
p = (((() -> IO a) -> IO a) -> (IO a -> () -> IO a) -> IO a -> IO a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. IO a -> () -> IO a
forall a b. a -> b -> a
const) (((() -> IO a) -> IO a) -> IO a -> IO a)
-> (DeviceOrHostAddressKHR -> (() -> IO a) -> IO a)
-> DeviceOrHostAddressKHR
-> IO a
-> IO a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT a IO () -> (() -> IO a) -> IO a
forall {k} (r :: k) (m :: k -> *) a.
ContT r m a -> (a -> m r) -> m r
runContT (ContT a IO () -> (() -> IO a) -> IO a)
-> (DeviceOrHostAddressKHR -> ContT a IO ())
-> DeviceOrHostAddressKHR
-> (() -> IO a)
-> IO a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. \case
DeviceAddress "dataSize" ::: Word64
v -> IO () -> ContT a IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT a IO ()) -> IO () -> ContT a IO ()
forall a b. (a -> b) -> a -> b
$ ("pIndirectDeviceAddresses" ::: Ptr ("dataSize" ::: Word64))
-> ("dataSize" ::: Word64) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (forall a b. Ptr a -> Ptr b
castPtr @_ @DeviceAddress Ptr DeviceOrHostAddressKHR
p) ("dataSize" ::: Word64
v)
HostAddress "data" ::: Ptr ()
v -> IO () -> ContT a IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT a IO ()) -> IO () -> ContT a IO ()
forall a b. (a -> b) -> a -> b
$ Ptr ("data" ::: Ptr ()) -> ("data" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (forall a b. Ptr a -> Ptr b
castPtr @_ @(Ptr ()) Ptr DeviceOrHostAddressKHR
p) ("data" ::: Ptr ()
v)
pokeZeroCStruct :: Ptr DeviceOrHostAddressKHR -> IO b -> IO b
pokeZeroCStruct :: forall b. Ptr DeviceOrHostAddressKHR -> IO b -> IO b
pokeZeroCStruct Ptr DeviceOrHostAddressKHR
_ IO b
f = IO b
f
cStructSize :: Int
cStructSize = Int
8
cStructAlignment :: Int
cStructAlignment = Int
8
instance Zero DeviceOrHostAddressKHR where
zero :: DeviceOrHostAddressKHR
zero = ("dataSize" ::: Word64) -> DeviceOrHostAddressKHR
DeviceAddress "dataSize" ::: Word64
forall a. Zero a => a
zero
data DeviceOrHostAddressConstKHR
= DeviceAddressConst DeviceAddress
| HostAddressConst (Ptr ())
deriving (Int -> DeviceOrHostAddressConstKHR -> ShowS
[DeviceOrHostAddressConstKHR] -> ShowS
DeviceOrHostAddressConstKHR -> String
(Int -> DeviceOrHostAddressConstKHR -> ShowS)
-> (DeviceOrHostAddressConstKHR -> String)
-> ([DeviceOrHostAddressConstKHR] -> ShowS)
-> Show DeviceOrHostAddressConstKHR
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeviceOrHostAddressConstKHR] -> ShowS
$cshowList :: [DeviceOrHostAddressConstKHR] -> ShowS
show :: DeviceOrHostAddressConstKHR -> String
$cshow :: DeviceOrHostAddressConstKHR -> String
showsPrec :: Int -> DeviceOrHostAddressConstKHR -> ShowS
$cshowsPrec :: Int -> DeviceOrHostAddressConstKHR -> ShowS
Show)
instance ToCStruct DeviceOrHostAddressConstKHR where
withCStruct :: forall b.
DeviceOrHostAddressConstKHR
-> (Ptr DeviceOrHostAddressConstKHR -> IO b) -> IO b
withCStruct DeviceOrHostAddressConstKHR
x Ptr DeviceOrHostAddressConstKHR -> IO b
f = Int -> (Ptr DeviceOrHostAddressConstKHR -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
8 ((Ptr DeviceOrHostAddressConstKHR -> IO b) -> IO b)
-> (Ptr DeviceOrHostAddressConstKHR -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr DeviceOrHostAddressConstKHR
p -> Ptr DeviceOrHostAddressConstKHR
-> DeviceOrHostAddressConstKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr DeviceOrHostAddressConstKHR
p DeviceOrHostAddressConstKHR
x (Ptr DeviceOrHostAddressConstKHR -> IO b
f Ptr DeviceOrHostAddressConstKHR
p)
pokeCStruct :: Ptr DeviceOrHostAddressConstKHR -> DeviceOrHostAddressConstKHR -> IO a -> IO a
pokeCStruct :: forall b.
Ptr DeviceOrHostAddressConstKHR
-> DeviceOrHostAddressConstKHR -> IO b -> IO b
pokeCStruct Ptr DeviceOrHostAddressConstKHR
p = (((() -> IO a) -> IO a) -> (IO a -> () -> IO a) -> IO a -> IO a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. IO a -> () -> IO a
forall a b. a -> b -> a
const) (((() -> IO a) -> IO a) -> IO a -> IO a)
-> (DeviceOrHostAddressConstKHR -> (() -> IO a) -> IO a)
-> DeviceOrHostAddressConstKHR
-> IO a
-> IO a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT a IO () -> (() -> IO a) -> IO a
forall {k} (r :: k) (m :: k -> *) a.
ContT r m a -> (a -> m r) -> m r
runContT (ContT a IO () -> (() -> IO a) -> IO a)
-> (DeviceOrHostAddressConstKHR -> ContT a IO ())
-> DeviceOrHostAddressConstKHR
-> (() -> IO a)
-> IO a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. \case
DeviceAddressConst "dataSize" ::: Word64
v -> IO () -> ContT a IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT a IO ()) -> IO () -> ContT a IO ()
forall a b. (a -> b) -> a -> b
$ ("pIndirectDeviceAddresses" ::: Ptr ("dataSize" ::: Word64))
-> ("dataSize" ::: Word64) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (forall a b. Ptr a -> Ptr b
castPtr @_ @DeviceAddress Ptr DeviceOrHostAddressConstKHR
p) ("dataSize" ::: Word64
v)
HostAddressConst "data" ::: Ptr ()
v -> IO () -> ContT a IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT a IO ()) -> IO () -> ContT a IO ()
forall a b. (a -> b) -> a -> b
$ Ptr ("data" ::: Ptr ()) -> ("data" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (forall a b. Ptr a -> Ptr b
castPtr @_ @(Ptr ()) Ptr DeviceOrHostAddressConstKHR
p) ("data" ::: Ptr ()
v)
pokeZeroCStruct :: Ptr DeviceOrHostAddressConstKHR -> IO b -> IO b
pokeZeroCStruct :: forall b. Ptr DeviceOrHostAddressConstKHR -> IO b -> IO b
pokeZeroCStruct Ptr DeviceOrHostAddressConstKHR
_ IO b
f = IO b
f
cStructSize :: Int
cStructSize = Int
8
cStructAlignment :: Int
cStructAlignment = Int
8
instance Zero DeviceOrHostAddressConstKHR where
zero :: DeviceOrHostAddressConstKHR
zero = ("dataSize" ::: Word64) -> DeviceOrHostAddressConstKHR
DeviceAddressConst "dataSize" ::: Word64
forall a. Zero a => a
zero
data AccelerationStructureGeometryDataKHR
= Triangles (SomeStruct AccelerationStructureGeometryTrianglesDataKHR)
| Aabbs AccelerationStructureGeometryAabbsDataKHR
| Instances AccelerationStructureGeometryInstancesDataKHR
deriving (Int -> AccelerationStructureGeometryDataKHR -> ShowS
[AccelerationStructureGeometryDataKHR] -> ShowS
AccelerationStructureGeometryDataKHR -> String
(Int -> AccelerationStructureGeometryDataKHR -> ShowS)
-> (AccelerationStructureGeometryDataKHR -> String)
-> ([AccelerationStructureGeometryDataKHR] -> ShowS)
-> Show AccelerationStructureGeometryDataKHR
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AccelerationStructureGeometryDataKHR] -> ShowS
$cshowList :: [AccelerationStructureGeometryDataKHR] -> ShowS
show :: AccelerationStructureGeometryDataKHR -> String
$cshow :: AccelerationStructureGeometryDataKHR -> String
showsPrec :: Int -> AccelerationStructureGeometryDataKHR -> ShowS
$cshowsPrec :: Int -> AccelerationStructureGeometryDataKHR -> ShowS
Show)
instance ToCStruct AccelerationStructureGeometryDataKHR where
withCStruct :: forall b.
AccelerationStructureGeometryDataKHR
-> (Ptr AccelerationStructureGeometryDataKHR -> IO b) -> IO b
withCStruct AccelerationStructureGeometryDataKHR
x Ptr AccelerationStructureGeometryDataKHR -> IO b
f = Int -> (Ptr AccelerationStructureGeometryDataKHR -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
64 ((Ptr AccelerationStructureGeometryDataKHR -> IO b) -> IO b)
-> (Ptr AccelerationStructureGeometryDataKHR -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr AccelerationStructureGeometryDataKHR
p -> Ptr AccelerationStructureGeometryDataKHR
-> AccelerationStructureGeometryDataKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr AccelerationStructureGeometryDataKHR
p AccelerationStructureGeometryDataKHR
x (Ptr AccelerationStructureGeometryDataKHR -> IO b
f Ptr AccelerationStructureGeometryDataKHR
p)
pokeCStruct :: Ptr AccelerationStructureGeometryDataKHR -> AccelerationStructureGeometryDataKHR -> IO a -> IO a
pokeCStruct :: forall b.
Ptr AccelerationStructureGeometryDataKHR
-> AccelerationStructureGeometryDataKHR -> IO b -> IO b
pokeCStruct Ptr AccelerationStructureGeometryDataKHR
p = (((() -> IO a) -> IO a) -> (IO a -> () -> IO a) -> IO a -> IO a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. IO a -> () -> IO a
forall a b. a -> b -> a
const) (((() -> IO a) -> IO a) -> IO a -> IO a)
-> (AccelerationStructureGeometryDataKHR -> (() -> IO a) -> IO a)
-> AccelerationStructureGeometryDataKHR
-> IO a
-> IO a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT a IO () -> (() -> IO a) -> IO a
forall {k} (r :: k) (m :: k -> *) a.
ContT r m a -> (a -> m r) -> m r
runContT (ContT a IO () -> (() -> IO a) -> IO a)
-> (AccelerationStructureGeometryDataKHR -> ContT a IO ())
-> AccelerationStructureGeometryDataKHR
-> (() -> IO a)
-> IO a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. \case
Triangles SomeStruct AccelerationStructureGeometryTrianglesDataKHR
v -> ((() -> IO a) -> IO a) -> ContT a IO ()
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((() -> IO a) -> IO a) -> ContT a IO ())
-> ((() -> IO a) -> IO a) -> ContT a IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (SomeStruct AccelerationStructureGeometryTrianglesDataKHR)
-> SomeStruct AccelerationStructureGeometryTrianglesDataKHR
-> IO a
-> IO a
forall (a :: [*] -> *) b.
(forall (es :: [*]).
(Extendss a es, PokeChain es) =>
ToCStruct (a es)) =>
Ptr (SomeStruct a) -> SomeStruct a -> IO b -> IO b
pokeSomeCStruct (Ptr (AccelerationStructureGeometryTrianglesDataKHR Any)
-> Ptr (SomeStruct AccelerationStructureGeometryTrianglesDataKHR)
forall (a :: [*] -> *) (es :: [*]).
Ptr (a es) -> Ptr (SomeStruct a)
forgetExtensions (forall a b. Ptr a -> Ptr b
castPtr @_ @(AccelerationStructureGeometryTrianglesDataKHR _) Ptr AccelerationStructureGeometryDataKHR
p)) (SomeStruct AccelerationStructureGeometryTrianglesDataKHR
v) (IO a -> IO a) -> ((() -> IO a) -> IO a) -> (() -> IO a) -> IO a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((() -> IO a) -> () -> IO a
forall a b. (a -> b) -> a -> b
$ ())
Aabbs AccelerationStructureGeometryAabbsDataKHR
v -> ((() -> IO a) -> IO a) -> ContT a IO ()
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((() -> IO a) -> IO a) -> ContT a IO ())
-> ((() -> IO a) -> IO a) -> ContT a IO ()
forall a b. (a -> b) -> a -> b
$ Ptr AccelerationStructureGeometryAabbsDataKHR
-> AccelerationStructureGeometryAabbsDataKHR -> IO a -> IO a
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct (forall a b. Ptr a -> Ptr b
castPtr @_ @AccelerationStructureGeometryAabbsDataKHR Ptr AccelerationStructureGeometryDataKHR
p) (AccelerationStructureGeometryAabbsDataKHR
v) (IO a -> IO a) -> ((() -> IO a) -> IO a) -> (() -> IO a) -> IO a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((() -> IO a) -> () -> IO a
forall a b. (a -> b) -> a -> b
$ ())
Instances AccelerationStructureGeometryInstancesDataKHR
v -> ((() -> IO a) -> IO a) -> ContT a IO ()
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((() -> IO a) -> IO a) -> ContT a IO ())
-> ((() -> IO a) -> IO a) -> ContT a IO ()
forall a b. (a -> b) -> a -> b
$ Ptr AccelerationStructureGeometryInstancesDataKHR
-> AccelerationStructureGeometryInstancesDataKHR -> IO a -> IO a
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct (forall a b. Ptr a -> Ptr b
castPtr @_ @AccelerationStructureGeometryInstancesDataKHR Ptr AccelerationStructureGeometryDataKHR
p) (AccelerationStructureGeometryInstancesDataKHR
v) (IO a -> IO a) -> ((() -> IO a) -> IO a) -> (() -> IO a) -> IO a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((() -> IO a) -> () -> IO a
forall a b. (a -> b) -> a -> b
$ ())
pokeZeroCStruct :: Ptr AccelerationStructureGeometryDataKHR -> IO b -> IO b
pokeZeroCStruct :: forall b. Ptr AccelerationStructureGeometryDataKHR -> IO b -> IO b
pokeZeroCStruct Ptr AccelerationStructureGeometryDataKHR
_ IO b
f = IO b
f
cStructSize :: Int
cStructSize = Int
64
cStructAlignment :: Int
cStructAlignment = Int
8
instance Zero AccelerationStructureGeometryDataKHR where
zero :: AccelerationStructureGeometryDataKHR
zero = SomeStruct AccelerationStructureGeometryTrianglesDataKHR
-> AccelerationStructureGeometryDataKHR
Triangles (AccelerationStructureGeometryTrianglesDataKHR '[]
-> SomeStruct AccelerationStructureGeometryTrianglesDataKHR
forall (a :: [*] -> *) (es :: [*]).
(Extendss a es, PokeChain es, Show (Chain es)) =>
a es -> SomeStruct a
SomeStruct AccelerationStructureGeometryTrianglesDataKHR '[]
forall a. Zero a => a
zero)
type GeometryInstanceFlagsKHR = GeometryInstanceFlagBitsKHR
newtype GeometryInstanceFlagBitsKHR = GeometryInstanceFlagBitsKHR Flags
deriving newtype (GeometryInstanceFlagBitsKHR -> GeometryInstanceFlagBitsKHR -> Bool
(GeometryInstanceFlagBitsKHR
-> GeometryInstanceFlagBitsKHR -> Bool)
-> (GeometryInstanceFlagBitsKHR
-> GeometryInstanceFlagBitsKHR -> Bool)
-> Eq GeometryInstanceFlagBitsKHR
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GeometryInstanceFlagBitsKHR -> GeometryInstanceFlagBitsKHR -> Bool
$c/= :: GeometryInstanceFlagBitsKHR -> GeometryInstanceFlagBitsKHR -> Bool
== :: GeometryInstanceFlagBitsKHR -> GeometryInstanceFlagBitsKHR -> Bool
$c== :: GeometryInstanceFlagBitsKHR -> GeometryInstanceFlagBitsKHR -> Bool
Eq, Eq GeometryInstanceFlagBitsKHR
Eq GeometryInstanceFlagBitsKHR
-> (GeometryInstanceFlagBitsKHR
-> GeometryInstanceFlagBitsKHR -> Ordering)
-> (GeometryInstanceFlagBitsKHR
-> GeometryInstanceFlagBitsKHR -> Bool)
-> (GeometryInstanceFlagBitsKHR
-> GeometryInstanceFlagBitsKHR -> Bool)
-> (GeometryInstanceFlagBitsKHR
-> GeometryInstanceFlagBitsKHR -> Bool)
-> (GeometryInstanceFlagBitsKHR
-> GeometryInstanceFlagBitsKHR -> Bool)
-> (GeometryInstanceFlagBitsKHR
-> GeometryInstanceFlagBitsKHR -> GeometryInstanceFlagBitsKHR)
-> (GeometryInstanceFlagBitsKHR
-> GeometryInstanceFlagBitsKHR -> GeometryInstanceFlagBitsKHR)
-> Ord GeometryInstanceFlagBitsKHR
GeometryInstanceFlagBitsKHR -> GeometryInstanceFlagBitsKHR -> Bool
GeometryInstanceFlagBitsKHR
-> GeometryInstanceFlagBitsKHR -> Ordering
GeometryInstanceFlagBitsKHR
-> GeometryInstanceFlagBitsKHR -> GeometryInstanceFlagBitsKHR
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 :: GeometryInstanceFlagBitsKHR
-> GeometryInstanceFlagBitsKHR -> GeometryInstanceFlagBitsKHR
$cmin :: GeometryInstanceFlagBitsKHR
-> GeometryInstanceFlagBitsKHR -> GeometryInstanceFlagBitsKHR
max :: GeometryInstanceFlagBitsKHR
-> GeometryInstanceFlagBitsKHR -> GeometryInstanceFlagBitsKHR
$cmax :: GeometryInstanceFlagBitsKHR
-> GeometryInstanceFlagBitsKHR -> GeometryInstanceFlagBitsKHR
>= :: GeometryInstanceFlagBitsKHR -> GeometryInstanceFlagBitsKHR -> Bool
$c>= :: GeometryInstanceFlagBitsKHR -> GeometryInstanceFlagBitsKHR -> Bool
> :: GeometryInstanceFlagBitsKHR -> GeometryInstanceFlagBitsKHR -> Bool
$c> :: GeometryInstanceFlagBitsKHR -> GeometryInstanceFlagBitsKHR -> Bool
<= :: GeometryInstanceFlagBitsKHR -> GeometryInstanceFlagBitsKHR -> Bool
$c<= :: GeometryInstanceFlagBitsKHR -> GeometryInstanceFlagBitsKHR -> Bool
< :: GeometryInstanceFlagBitsKHR -> GeometryInstanceFlagBitsKHR -> Bool
$c< :: GeometryInstanceFlagBitsKHR -> GeometryInstanceFlagBitsKHR -> Bool
compare :: GeometryInstanceFlagBitsKHR
-> GeometryInstanceFlagBitsKHR -> Ordering
$ccompare :: GeometryInstanceFlagBitsKHR
-> GeometryInstanceFlagBitsKHR -> Ordering
Ord, Ptr GeometryInstanceFlagBitsKHR -> IO GeometryInstanceFlagBitsKHR
Ptr GeometryInstanceFlagBitsKHR
-> Int -> IO GeometryInstanceFlagBitsKHR
Ptr GeometryInstanceFlagBitsKHR
-> Int -> GeometryInstanceFlagBitsKHR -> IO ()
Ptr GeometryInstanceFlagBitsKHR
-> GeometryInstanceFlagBitsKHR -> IO ()
GeometryInstanceFlagBitsKHR -> Int
(GeometryInstanceFlagBitsKHR -> Int)
-> (GeometryInstanceFlagBitsKHR -> Int)
-> (Ptr GeometryInstanceFlagBitsKHR
-> Int -> IO GeometryInstanceFlagBitsKHR)
-> (Ptr GeometryInstanceFlagBitsKHR
-> Int -> GeometryInstanceFlagBitsKHR -> IO ())
-> (forall b. Ptr b -> Int -> IO GeometryInstanceFlagBitsKHR)
-> (forall b. Ptr b -> Int -> GeometryInstanceFlagBitsKHR -> IO ())
-> (Ptr GeometryInstanceFlagBitsKHR
-> IO GeometryInstanceFlagBitsKHR)
-> (Ptr GeometryInstanceFlagBitsKHR
-> GeometryInstanceFlagBitsKHR -> IO ())
-> Storable GeometryInstanceFlagBitsKHR
forall b. Ptr b -> Int -> IO GeometryInstanceFlagBitsKHR
forall b. Ptr b -> Int -> GeometryInstanceFlagBitsKHR -> 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 GeometryInstanceFlagBitsKHR
-> GeometryInstanceFlagBitsKHR -> IO ()
$cpoke :: Ptr GeometryInstanceFlagBitsKHR
-> GeometryInstanceFlagBitsKHR -> IO ()
peek :: Ptr GeometryInstanceFlagBitsKHR -> IO GeometryInstanceFlagBitsKHR
$cpeek :: Ptr GeometryInstanceFlagBitsKHR -> IO GeometryInstanceFlagBitsKHR
pokeByteOff :: forall b. Ptr b -> Int -> GeometryInstanceFlagBitsKHR -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> GeometryInstanceFlagBitsKHR -> IO ()
peekByteOff :: forall b. Ptr b -> Int -> IO GeometryInstanceFlagBitsKHR
$cpeekByteOff :: forall b. Ptr b -> Int -> IO GeometryInstanceFlagBitsKHR
pokeElemOff :: Ptr GeometryInstanceFlagBitsKHR
-> Int -> GeometryInstanceFlagBitsKHR -> IO ()
$cpokeElemOff :: Ptr GeometryInstanceFlagBitsKHR
-> Int -> GeometryInstanceFlagBitsKHR -> IO ()
peekElemOff :: Ptr GeometryInstanceFlagBitsKHR
-> Int -> IO GeometryInstanceFlagBitsKHR
$cpeekElemOff :: Ptr GeometryInstanceFlagBitsKHR
-> Int -> IO GeometryInstanceFlagBitsKHR
alignment :: GeometryInstanceFlagBitsKHR -> Int
$calignment :: GeometryInstanceFlagBitsKHR -> Int
sizeOf :: GeometryInstanceFlagBitsKHR -> Int
$csizeOf :: GeometryInstanceFlagBitsKHR -> Int
Storable, GeometryInstanceFlagBitsKHR
GeometryInstanceFlagBitsKHR -> Zero GeometryInstanceFlagBitsKHR
forall a. a -> Zero a
zero :: GeometryInstanceFlagBitsKHR
$czero :: GeometryInstanceFlagBitsKHR
Zero, Eq GeometryInstanceFlagBitsKHR
GeometryInstanceFlagBitsKHR
Eq GeometryInstanceFlagBitsKHR
-> (GeometryInstanceFlagBitsKHR
-> GeometryInstanceFlagBitsKHR -> GeometryInstanceFlagBitsKHR)
-> (GeometryInstanceFlagBitsKHR
-> GeometryInstanceFlagBitsKHR -> GeometryInstanceFlagBitsKHR)
-> (GeometryInstanceFlagBitsKHR
-> GeometryInstanceFlagBitsKHR -> GeometryInstanceFlagBitsKHR)
-> (GeometryInstanceFlagBitsKHR -> GeometryInstanceFlagBitsKHR)
-> (GeometryInstanceFlagBitsKHR
-> Int -> GeometryInstanceFlagBitsKHR)
-> (GeometryInstanceFlagBitsKHR
-> Int -> GeometryInstanceFlagBitsKHR)
-> GeometryInstanceFlagBitsKHR
-> (Int -> GeometryInstanceFlagBitsKHR)
-> (GeometryInstanceFlagBitsKHR
-> Int -> GeometryInstanceFlagBitsKHR)
-> (GeometryInstanceFlagBitsKHR
-> Int -> GeometryInstanceFlagBitsKHR)
-> (GeometryInstanceFlagBitsKHR
-> Int -> GeometryInstanceFlagBitsKHR)
-> (GeometryInstanceFlagBitsKHR -> Int -> Bool)
-> (GeometryInstanceFlagBitsKHR -> Maybe Int)
-> (GeometryInstanceFlagBitsKHR -> Int)
-> (GeometryInstanceFlagBitsKHR -> Bool)
-> (GeometryInstanceFlagBitsKHR
-> Int -> GeometryInstanceFlagBitsKHR)
-> (GeometryInstanceFlagBitsKHR
-> Int -> GeometryInstanceFlagBitsKHR)
-> (GeometryInstanceFlagBitsKHR
-> Int -> GeometryInstanceFlagBitsKHR)
-> (GeometryInstanceFlagBitsKHR
-> Int -> GeometryInstanceFlagBitsKHR)
-> (GeometryInstanceFlagBitsKHR
-> Int -> GeometryInstanceFlagBitsKHR)
-> (GeometryInstanceFlagBitsKHR
-> Int -> GeometryInstanceFlagBitsKHR)
-> (GeometryInstanceFlagBitsKHR -> Int)
-> Bits GeometryInstanceFlagBitsKHR
Int -> GeometryInstanceFlagBitsKHR
GeometryInstanceFlagBitsKHR -> Bool
GeometryInstanceFlagBitsKHR -> Int
GeometryInstanceFlagBitsKHR -> Maybe Int
GeometryInstanceFlagBitsKHR -> GeometryInstanceFlagBitsKHR
GeometryInstanceFlagBitsKHR -> Int -> Bool
GeometryInstanceFlagBitsKHR -> Int -> GeometryInstanceFlagBitsKHR
GeometryInstanceFlagBitsKHR
-> GeometryInstanceFlagBitsKHR -> GeometryInstanceFlagBitsKHR
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 :: GeometryInstanceFlagBitsKHR -> Int
$cpopCount :: GeometryInstanceFlagBitsKHR -> Int
rotateR :: GeometryInstanceFlagBitsKHR -> Int -> GeometryInstanceFlagBitsKHR
$crotateR :: GeometryInstanceFlagBitsKHR -> Int -> GeometryInstanceFlagBitsKHR
rotateL :: GeometryInstanceFlagBitsKHR -> Int -> GeometryInstanceFlagBitsKHR
$crotateL :: GeometryInstanceFlagBitsKHR -> Int -> GeometryInstanceFlagBitsKHR
unsafeShiftR :: GeometryInstanceFlagBitsKHR -> Int -> GeometryInstanceFlagBitsKHR
$cunsafeShiftR :: GeometryInstanceFlagBitsKHR -> Int -> GeometryInstanceFlagBitsKHR
shiftR :: GeometryInstanceFlagBitsKHR -> Int -> GeometryInstanceFlagBitsKHR
$cshiftR :: GeometryInstanceFlagBitsKHR -> Int -> GeometryInstanceFlagBitsKHR
unsafeShiftL :: GeometryInstanceFlagBitsKHR -> Int -> GeometryInstanceFlagBitsKHR
$cunsafeShiftL :: GeometryInstanceFlagBitsKHR -> Int -> GeometryInstanceFlagBitsKHR
shiftL :: GeometryInstanceFlagBitsKHR -> Int -> GeometryInstanceFlagBitsKHR
$cshiftL :: GeometryInstanceFlagBitsKHR -> Int -> GeometryInstanceFlagBitsKHR
isSigned :: GeometryInstanceFlagBitsKHR -> Bool
$cisSigned :: GeometryInstanceFlagBitsKHR -> Bool
bitSize :: GeometryInstanceFlagBitsKHR -> Int
$cbitSize :: GeometryInstanceFlagBitsKHR -> Int
bitSizeMaybe :: GeometryInstanceFlagBitsKHR -> Maybe Int
$cbitSizeMaybe :: GeometryInstanceFlagBitsKHR -> Maybe Int
testBit :: GeometryInstanceFlagBitsKHR -> Int -> Bool
$ctestBit :: GeometryInstanceFlagBitsKHR -> Int -> Bool
complementBit :: GeometryInstanceFlagBitsKHR -> Int -> GeometryInstanceFlagBitsKHR
$ccomplementBit :: GeometryInstanceFlagBitsKHR -> Int -> GeometryInstanceFlagBitsKHR
clearBit :: GeometryInstanceFlagBitsKHR -> Int -> GeometryInstanceFlagBitsKHR
$cclearBit :: GeometryInstanceFlagBitsKHR -> Int -> GeometryInstanceFlagBitsKHR
setBit :: GeometryInstanceFlagBitsKHR -> Int -> GeometryInstanceFlagBitsKHR
$csetBit :: GeometryInstanceFlagBitsKHR -> Int -> GeometryInstanceFlagBitsKHR
bit :: Int -> GeometryInstanceFlagBitsKHR
$cbit :: Int -> GeometryInstanceFlagBitsKHR
zeroBits :: GeometryInstanceFlagBitsKHR
$czeroBits :: GeometryInstanceFlagBitsKHR
rotate :: GeometryInstanceFlagBitsKHR -> Int -> GeometryInstanceFlagBitsKHR
$crotate :: GeometryInstanceFlagBitsKHR -> Int -> GeometryInstanceFlagBitsKHR
shift :: GeometryInstanceFlagBitsKHR -> Int -> GeometryInstanceFlagBitsKHR
$cshift :: GeometryInstanceFlagBitsKHR -> Int -> GeometryInstanceFlagBitsKHR
complement :: GeometryInstanceFlagBitsKHR -> GeometryInstanceFlagBitsKHR
$ccomplement :: GeometryInstanceFlagBitsKHR -> GeometryInstanceFlagBitsKHR
xor :: GeometryInstanceFlagBitsKHR
-> GeometryInstanceFlagBitsKHR -> GeometryInstanceFlagBitsKHR
$cxor :: GeometryInstanceFlagBitsKHR
-> GeometryInstanceFlagBitsKHR -> GeometryInstanceFlagBitsKHR
.|. :: GeometryInstanceFlagBitsKHR
-> GeometryInstanceFlagBitsKHR -> GeometryInstanceFlagBitsKHR
$c.|. :: GeometryInstanceFlagBitsKHR
-> GeometryInstanceFlagBitsKHR -> GeometryInstanceFlagBitsKHR
.&. :: GeometryInstanceFlagBitsKHR
-> GeometryInstanceFlagBitsKHR -> GeometryInstanceFlagBitsKHR
$c.&. :: GeometryInstanceFlagBitsKHR
-> GeometryInstanceFlagBitsKHR -> GeometryInstanceFlagBitsKHR
Bits, Bits GeometryInstanceFlagBitsKHR
Bits GeometryInstanceFlagBitsKHR
-> (GeometryInstanceFlagBitsKHR -> Int)
-> (GeometryInstanceFlagBitsKHR -> Int)
-> (GeometryInstanceFlagBitsKHR -> Int)
-> FiniteBits GeometryInstanceFlagBitsKHR
GeometryInstanceFlagBitsKHR -> Int
forall b.
Bits b -> (b -> Int) -> (b -> Int) -> (b -> Int) -> FiniteBits b
countTrailingZeros :: GeometryInstanceFlagBitsKHR -> Int
$ccountTrailingZeros :: GeometryInstanceFlagBitsKHR -> Int
countLeadingZeros :: GeometryInstanceFlagBitsKHR -> Int
$ccountLeadingZeros :: GeometryInstanceFlagBitsKHR -> Int
finiteBitSize :: GeometryInstanceFlagBitsKHR -> Int
$cfiniteBitSize :: GeometryInstanceFlagBitsKHR -> Int
FiniteBits)
pattern $bGEOMETRY_INSTANCE_TRIANGLE_FACING_CULL_DISABLE_BIT_KHR :: GeometryInstanceFlagBitsKHR
$mGEOMETRY_INSTANCE_TRIANGLE_FACING_CULL_DISABLE_BIT_KHR :: forall {r}.
GeometryInstanceFlagBitsKHR -> (Void# -> r) -> (Void# -> r) -> r
GEOMETRY_INSTANCE_TRIANGLE_FACING_CULL_DISABLE_BIT_KHR = GeometryInstanceFlagBitsKHR 0x00000001
pattern $bGEOMETRY_INSTANCE_TRIANGLE_FLIP_FACING_BIT_KHR :: GeometryInstanceFlagBitsKHR
$mGEOMETRY_INSTANCE_TRIANGLE_FLIP_FACING_BIT_KHR :: forall {r}.
GeometryInstanceFlagBitsKHR -> (Void# -> r) -> (Void# -> r) -> r
GEOMETRY_INSTANCE_TRIANGLE_FLIP_FACING_BIT_KHR = GeometryInstanceFlagBitsKHR 0x00000002
pattern $bGEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_KHR :: GeometryInstanceFlagBitsKHR
$mGEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_KHR :: forall {r}.
GeometryInstanceFlagBitsKHR -> (Void# -> r) -> (Void# -> r) -> r
GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_KHR = GeometryInstanceFlagBitsKHR 0x00000004
pattern $bGEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_KHR :: GeometryInstanceFlagBitsKHR
$mGEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_KHR :: forall {r}.
GeometryInstanceFlagBitsKHR -> (Void# -> r) -> (Void# -> r) -> r
GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_KHR = GeometryInstanceFlagBitsKHR 0x00000008
pattern $bGEOMETRY_INSTANCE_DISABLE_OPACITY_MICROMAPS_EXT :: GeometryInstanceFlagBitsKHR
$mGEOMETRY_INSTANCE_DISABLE_OPACITY_MICROMAPS_EXT :: forall {r}.
GeometryInstanceFlagBitsKHR -> (Void# -> r) -> (Void# -> r) -> r
GEOMETRY_INSTANCE_DISABLE_OPACITY_MICROMAPS_EXT = GeometryInstanceFlagBitsKHR 0x00000020
pattern $bGEOMETRY_INSTANCE_FORCE_OPACITY_MICROMAP_2_STATE_EXT :: GeometryInstanceFlagBitsKHR
$mGEOMETRY_INSTANCE_FORCE_OPACITY_MICROMAP_2_STATE_EXT :: forall {r}.
GeometryInstanceFlagBitsKHR -> (Void# -> r) -> (Void# -> r) -> r
GEOMETRY_INSTANCE_FORCE_OPACITY_MICROMAP_2_STATE_EXT = GeometryInstanceFlagBitsKHR 0x00000010
conNameGeometryInstanceFlagBitsKHR :: String
conNameGeometryInstanceFlagBitsKHR :: String
conNameGeometryInstanceFlagBitsKHR = String
"GeometryInstanceFlagBitsKHR"
enumPrefixGeometryInstanceFlagBitsKHR :: String
enumPrefixGeometryInstanceFlagBitsKHR :: String
enumPrefixGeometryInstanceFlagBitsKHR = String
"GEOMETRY_INSTANCE_"
showTableGeometryInstanceFlagBitsKHR :: [(GeometryInstanceFlagBitsKHR, String)]
showTableGeometryInstanceFlagBitsKHR :: [(GeometryInstanceFlagBitsKHR, String)]
showTableGeometryInstanceFlagBitsKHR =
[
( GeometryInstanceFlagBitsKHR
GEOMETRY_INSTANCE_TRIANGLE_FACING_CULL_DISABLE_BIT_KHR
, String
"TRIANGLE_FACING_CULL_DISABLE_BIT_KHR"
)
,
( GeometryInstanceFlagBitsKHR
GEOMETRY_INSTANCE_TRIANGLE_FLIP_FACING_BIT_KHR
, String
"TRIANGLE_FLIP_FACING_BIT_KHR"
)
,
( GeometryInstanceFlagBitsKHR
GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_KHR
, String
"FORCE_OPAQUE_BIT_KHR"
)
,
( GeometryInstanceFlagBitsKHR
GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_KHR
, String
"FORCE_NO_OPAQUE_BIT_KHR"
)
,
( GeometryInstanceFlagBitsKHR
GEOMETRY_INSTANCE_DISABLE_OPACITY_MICROMAPS_EXT
, String
"DISABLE_OPACITY_MICROMAPS_EXT"
)
,
( GeometryInstanceFlagBitsKHR
GEOMETRY_INSTANCE_FORCE_OPACITY_MICROMAP_2_STATE_EXT
, String
"FORCE_OPACITY_MICROMAP_2_STATE_EXT"
)
]
instance Show GeometryInstanceFlagBitsKHR where
showsPrec :: Int -> GeometryInstanceFlagBitsKHR -> ShowS
showsPrec =
String
-> [(GeometryInstanceFlagBitsKHR, String)]
-> String
-> (GeometryInstanceFlagBitsKHR -> Flags)
-> (Flags -> ShowS)
-> Int
-> GeometryInstanceFlagBitsKHR
-> ShowS
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec
String
enumPrefixGeometryInstanceFlagBitsKHR
[(GeometryInstanceFlagBitsKHR, String)]
showTableGeometryInstanceFlagBitsKHR
String
conNameGeometryInstanceFlagBitsKHR
(\(GeometryInstanceFlagBitsKHR Flags
x) -> Flags
x)
(\Flags
x -> String -> ShowS
showString String
"0x" ShowS -> ShowS -> ShowS
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Flags -> ShowS
forall a. (Integral a, Show a) => a -> ShowS
showHex Flags
x)
instance Read GeometryInstanceFlagBitsKHR where
readPrec :: ReadPrec GeometryInstanceFlagBitsKHR
readPrec =
String
-> [(GeometryInstanceFlagBitsKHR, String)]
-> String
-> (Flags -> GeometryInstanceFlagBitsKHR)
-> ReadPrec GeometryInstanceFlagBitsKHR
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec
String
enumPrefixGeometryInstanceFlagBitsKHR
[(GeometryInstanceFlagBitsKHR, String)]
showTableGeometryInstanceFlagBitsKHR
String
conNameGeometryInstanceFlagBitsKHR
Flags -> GeometryInstanceFlagBitsKHR
GeometryInstanceFlagBitsKHR
type GeometryFlagsKHR = GeometryFlagBitsKHR
newtype GeometryFlagBitsKHR = GeometryFlagBitsKHR Flags
deriving newtype (GeometryFlagBitsKHR -> GeometryFlagBitsKHR -> Bool
(GeometryFlagBitsKHR -> GeometryFlagBitsKHR -> Bool)
-> (GeometryFlagBitsKHR -> GeometryFlagBitsKHR -> Bool)
-> Eq GeometryFlagBitsKHR
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GeometryFlagBitsKHR -> GeometryFlagBitsKHR -> Bool
$c/= :: GeometryFlagBitsKHR -> GeometryFlagBitsKHR -> Bool
== :: GeometryFlagBitsKHR -> GeometryFlagBitsKHR -> Bool
$c== :: GeometryFlagBitsKHR -> GeometryFlagBitsKHR -> Bool
Eq, Eq GeometryFlagBitsKHR
Eq GeometryFlagBitsKHR
-> (GeometryFlagBitsKHR -> GeometryFlagBitsKHR -> Ordering)
-> (GeometryFlagBitsKHR -> GeometryFlagBitsKHR -> Bool)
-> (GeometryFlagBitsKHR -> GeometryFlagBitsKHR -> Bool)
-> (GeometryFlagBitsKHR -> GeometryFlagBitsKHR -> Bool)
-> (GeometryFlagBitsKHR -> GeometryFlagBitsKHR -> Bool)
-> (GeometryFlagBitsKHR
-> GeometryFlagBitsKHR -> GeometryFlagBitsKHR)
-> (GeometryFlagBitsKHR
-> GeometryFlagBitsKHR -> GeometryFlagBitsKHR)
-> Ord GeometryFlagBitsKHR
GeometryFlagBitsKHR -> GeometryFlagBitsKHR -> Bool
GeometryFlagBitsKHR -> GeometryFlagBitsKHR -> Ordering
GeometryFlagBitsKHR -> GeometryFlagBitsKHR -> GeometryFlagBitsKHR
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 :: GeometryFlagBitsKHR -> GeometryFlagBitsKHR -> GeometryFlagBitsKHR
$cmin :: GeometryFlagBitsKHR -> GeometryFlagBitsKHR -> GeometryFlagBitsKHR
max :: GeometryFlagBitsKHR -> GeometryFlagBitsKHR -> GeometryFlagBitsKHR
$cmax :: GeometryFlagBitsKHR -> GeometryFlagBitsKHR -> GeometryFlagBitsKHR
>= :: GeometryFlagBitsKHR -> GeometryFlagBitsKHR -> Bool
$c>= :: GeometryFlagBitsKHR -> GeometryFlagBitsKHR -> Bool
> :: GeometryFlagBitsKHR -> GeometryFlagBitsKHR -> Bool
$c> :: GeometryFlagBitsKHR -> GeometryFlagBitsKHR -> Bool
<= :: GeometryFlagBitsKHR -> GeometryFlagBitsKHR -> Bool
$c<= :: GeometryFlagBitsKHR -> GeometryFlagBitsKHR -> Bool
< :: GeometryFlagBitsKHR -> GeometryFlagBitsKHR -> Bool
$c< :: GeometryFlagBitsKHR -> GeometryFlagBitsKHR -> Bool
compare :: GeometryFlagBitsKHR -> GeometryFlagBitsKHR -> Ordering
$ccompare :: GeometryFlagBitsKHR -> GeometryFlagBitsKHR -> Ordering
Ord, Ptr GeometryFlagBitsKHR -> IO GeometryFlagBitsKHR
Ptr GeometryFlagBitsKHR -> Int -> IO GeometryFlagBitsKHR
Ptr GeometryFlagBitsKHR -> Int -> GeometryFlagBitsKHR -> IO ()
Ptr GeometryFlagBitsKHR -> GeometryFlagBitsKHR -> IO ()
GeometryFlagBitsKHR -> Int
(GeometryFlagBitsKHR -> Int)
-> (GeometryFlagBitsKHR -> Int)
-> (Ptr GeometryFlagBitsKHR -> Int -> IO GeometryFlagBitsKHR)
-> (Ptr GeometryFlagBitsKHR -> Int -> GeometryFlagBitsKHR -> IO ())
-> (forall b. Ptr b -> Int -> IO GeometryFlagBitsKHR)
-> (forall b. Ptr b -> Int -> GeometryFlagBitsKHR -> IO ())
-> (Ptr GeometryFlagBitsKHR -> IO GeometryFlagBitsKHR)
-> (Ptr GeometryFlagBitsKHR -> GeometryFlagBitsKHR -> IO ())
-> Storable GeometryFlagBitsKHR
forall b. Ptr b -> Int -> IO GeometryFlagBitsKHR
forall b. Ptr b -> Int -> GeometryFlagBitsKHR -> 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 GeometryFlagBitsKHR -> GeometryFlagBitsKHR -> IO ()
$cpoke :: Ptr GeometryFlagBitsKHR -> GeometryFlagBitsKHR -> IO ()
peek :: Ptr GeometryFlagBitsKHR -> IO GeometryFlagBitsKHR
$cpeek :: Ptr GeometryFlagBitsKHR -> IO GeometryFlagBitsKHR
pokeByteOff :: forall b. Ptr b -> Int -> GeometryFlagBitsKHR -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> GeometryFlagBitsKHR -> IO ()
peekByteOff :: forall b. Ptr b -> Int -> IO GeometryFlagBitsKHR
$cpeekByteOff :: forall b. Ptr b -> Int -> IO GeometryFlagBitsKHR
pokeElemOff :: Ptr GeometryFlagBitsKHR -> Int -> GeometryFlagBitsKHR -> IO ()
$cpokeElemOff :: Ptr GeometryFlagBitsKHR -> Int -> GeometryFlagBitsKHR -> IO ()
peekElemOff :: Ptr GeometryFlagBitsKHR -> Int -> IO GeometryFlagBitsKHR
$cpeekElemOff :: Ptr GeometryFlagBitsKHR -> Int -> IO GeometryFlagBitsKHR
alignment :: GeometryFlagBitsKHR -> Int
$calignment :: GeometryFlagBitsKHR -> Int
sizeOf :: GeometryFlagBitsKHR -> Int
$csizeOf :: GeometryFlagBitsKHR -> Int
Storable, GeometryFlagBitsKHR
GeometryFlagBitsKHR -> Zero GeometryFlagBitsKHR
forall a. a -> Zero a
zero :: GeometryFlagBitsKHR
$czero :: GeometryFlagBitsKHR
Zero, Eq GeometryFlagBitsKHR
GeometryFlagBitsKHR
Eq GeometryFlagBitsKHR
-> (GeometryFlagBitsKHR
-> GeometryFlagBitsKHR -> GeometryFlagBitsKHR)
-> (GeometryFlagBitsKHR
-> GeometryFlagBitsKHR -> GeometryFlagBitsKHR)
-> (GeometryFlagBitsKHR
-> GeometryFlagBitsKHR -> GeometryFlagBitsKHR)
-> (GeometryFlagBitsKHR -> GeometryFlagBitsKHR)
-> (GeometryFlagBitsKHR -> Int -> GeometryFlagBitsKHR)
-> (GeometryFlagBitsKHR -> Int -> GeometryFlagBitsKHR)
-> GeometryFlagBitsKHR
-> (Int -> GeometryFlagBitsKHR)
-> (GeometryFlagBitsKHR -> Int -> GeometryFlagBitsKHR)
-> (GeometryFlagBitsKHR -> Int -> GeometryFlagBitsKHR)
-> (GeometryFlagBitsKHR -> Int -> GeometryFlagBitsKHR)
-> (GeometryFlagBitsKHR -> Int -> Bool)
-> (GeometryFlagBitsKHR -> Maybe Int)
-> (GeometryFlagBitsKHR -> Int)
-> (GeometryFlagBitsKHR -> Bool)
-> (GeometryFlagBitsKHR -> Int -> GeometryFlagBitsKHR)
-> (GeometryFlagBitsKHR -> Int -> GeometryFlagBitsKHR)
-> (GeometryFlagBitsKHR -> Int -> GeometryFlagBitsKHR)
-> (GeometryFlagBitsKHR -> Int -> GeometryFlagBitsKHR)
-> (GeometryFlagBitsKHR -> Int -> GeometryFlagBitsKHR)
-> (GeometryFlagBitsKHR -> Int -> GeometryFlagBitsKHR)
-> (GeometryFlagBitsKHR -> Int)
-> Bits GeometryFlagBitsKHR
Int -> GeometryFlagBitsKHR
GeometryFlagBitsKHR -> Bool
GeometryFlagBitsKHR -> Int
GeometryFlagBitsKHR -> Maybe Int
GeometryFlagBitsKHR -> GeometryFlagBitsKHR
GeometryFlagBitsKHR -> Int -> Bool
GeometryFlagBitsKHR -> Int -> GeometryFlagBitsKHR
GeometryFlagBitsKHR -> GeometryFlagBitsKHR -> GeometryFlagBitsKHR
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 :: GeometryFlagBitsKHR -> Int
$cpopCount :: GeometryFlagBitsKHR -> Int
rotateR :: GeometryFlagBitsKHR -> Int -> GeometryFlagBitsKHR
$crotateR :: GeometryFlagBitsKHR -> Int -> GeometryFlagBitsKHR
rotateL :: GeometryFlagBitsKHR -> Int -> GeometryFlagBitsKHR
$crotateL :: GeometryFlagBitsKHR -> Int -> GeometryFlagBitsKHR
unsafeShiftR :: GeometryFlagBitsKHR -> Int -> GeometryFlagBitsKHR
$cunsafeShiftR :: GeometryFlagBitsKHR -> Int -> GeometryFlagBitsKHR
shiftR :: GeometryFlagBitsKHR -> Int -> GeometryFlagBitsKHR
$cshiftR :: GeometryFlagBitsKHR -> Int -> GeometryFlagBitsKHR
unsafeShiftL :: GeometryFlagBitsKHR -> Int -> GeometryFlagBitsKHR
$cunsafeShiftL :: GeometryFlagBitsKHR -> Int -> GeometryFlagBitsKHR
shiftL :: GeometryFlagBitsKHR -> Int -> GeometryFlagBitsKHR
$cshiftL :: GeometryFlagBitsKHR -> Int -> GeometryFlagBitsKHR
isSigned :: GeometryFlagBitsKHR -> Bool
$cisSigned :: GeometryFlagBitsKHR -> Bool
bitSize :: GeometryFlagBitsKHR -> Int
$cbitSize :: GeometryFlagBitsKHR -> Int
bitSizeMaybe :: GeometryFlagBitsKHR -> Maybe Int
$cbitSizeMaybe :: GeometryFlagBitsKHR -> Maybe Int
testBit :: GeometryFlagBitsKHR -> Int -> Bool
$ctestBit :: GeometryFlagBitsKHR -> Int -> Bool
complementBit :: GeometryFlagBitsKHR -> Int -> GeometryFlagBitsKHR
$ccomplementBit :: GeometryFlagBitsKHR -> Int -> GeometryFlagBitsKHR
clearBit :: GeometryFlagBitsKHR -> Int -> GeometryFlagBitsKHR
$cclearBit :: GeometryFlagBitsKHR -> Int -> GeometryFlagBitsKHR
setBit :: GeometryFlagBitsKHR -> Int -> GeometryFlagBitsKHR
$csetBit :: GeometryFlagBitsKHR -> Int -> GeometryFlagBitsKHR
bit :: Int -> GeometryFlagBitsKHR
$cbit :: Int -> GeometryFlagBitsKHR
zeroBits :: GeometryFlagBitsKHR
$czeroBits :: GeometryFlagBitsKHR
rotate :: GeometryFlagBitsKHR -> Int -> GeometryFlagBitsKHR
$crotate :: GeometryFlagBitsKHR -> Int -> GeometryFlagBitsKHR
shift :: GeometryFlagBitsKHR -> Int -> GeometryFlagBitsKHR
$cshift :: GeometryFlagBitsKHR -> Int -> GeometryFlagBitsKHR
complement :: GeometryFlagBitsKHR -> GeometryFlagBitsKHR
$ccomplement :: GeometryFlagBitsKHR -> GeometryFlagBitsKHR
xor :: GeometryFlagBitsKHR -> GeometryFlagBitsKHR -> GeometryFlagBitsKHR
$cxor :: GeometryFlagBitsKHR -> GeometryFlagBitsKHR -> GeometryFlagBitsKHR
.|. :: GeometryFlagBitsKHR -> GeometryFlagBitsKHR -> GeometryFlagBitsKHR
$c.|. :: GeometryFlagBitsKHR -> GeometryFlagBitsKHR -> GeometryFlagBitsKHR
.&. :: GeometryFlagBitsKHR -> GeometryFlagBitsKHR -> GeometryFlagBitsKHR
$c.&. :: GeometryFlagBitsKHR -> GeometryFlagBitsKHR -> GeometryFlagBitsKHR
Bits, Bits GeometryFlagBitsKHR
Bits GeometryFlagBitsKHR
-> (GeometryFlagBitsKHR -> Int)
-> (GeometryFlagBitsKHR -> Int)
-> (GeometryFlagBitsKHR -> Int)
-> FiniteBits GeometryFlagBitsKHR
GeometryFlagBitsKHR -> Int
forall b.
Bits b -> (b -> Int) -> (b -> Int) -> (b -> Int) -> FiniteBits b
countTrailingZeros :: GeometryFlagBitsKHR -> Int
$ccountTrailingZeros :: GeometryFlagBitsKHR -> Int
countLeadingZeros :: GeometryFlagBitsKHR -> Int
$ccountLeadingZeros :: GeometryFlagBitsKHR -> Int
finiteBitSize :: GeometryFlagBitsKHR -> Int
$cfiniteBitSize :: GeometryFlagBitsKHR -> Int
FiniteBits)
pattern $bGEOMETRY_OPAQUE_BIT_KHR :: GeometryFlagBitsKHR
$mGEOMETRY_OPAQUE_BIT_KHR :: forall {r}.
GeometryFlagBitsKHR -> (Void# -> r) -> (Void# -> r) -> r
GEOMETRY_OPAQUE_BIT_KHR = GeometryFlagBitsKHR 0x00000001
pattern $bGEOMETRY_NO_DUPLICATE_ANY_HIT_INVOCATION_BIT_KHR :: GeometryFlagBitsKHR
$mGEOMETRY_NO_DUPLICATE_ANY_HIT_INVOCATION_BIT_KHR :: forall {r}.
GeometryFlagBitsKHR -> (Void# -> r) -> (Void# -> r) -> r
GEOMETRY_NO_DUPLICATE_ANY_HIT_INVOCATION_BIT_KHR = GeometryFlagBitsKHR 0x00000002
conNameGeometryFlagBitsKHR :: String
conNameGeometryFlagBitsKHR :: String
conNameGeometryFlagBitsKHR = String
"GeometryFlagBitsKHR"
enumPrefixGeometryFlagBitsKHR :: String
enumPrefixGeometryFlagBitsKHR :: String
enumPrefixGeometryFlagBitsKHR = String
"GEOMETRY_"
showTableGeometryFlagBitsKHR :: [(GeometryFlagBitsKHR, String)]
showTableGeometryFlagBitsKHR :: [(GeometryFlagBitsKHR, String)]
showTableGeometryFlagBitsKHR =
[ (GeometryFlagBitsKHR
GEOMETRY_OPAQUE_BIT_KHR, String
"OPAQUE_BIT_KHR")
,
( GeometryFlagBitsKHR
GEOMETRY_NO_DUPLICATE_ANY_HIT_INVOCATION_BIT_KHR
, String
"NO_DUPLICATE_ANY_HIT_INVOCATION_BIT_KHR"
)
]
instance Show GeometryFlagBitsKHR where
showsPrec :: Int -> GeometryFlagBitsKHR -> ShowS
showsPrec =
String
-> [(GeometryFlagBitsKHR, String)]
-> String
-> (GeometryFlagBitsKHR -> Flags)
-> (Flags -> ShowS)
-> Int
-> GeometryFlagBitsKHR
-> ShowS
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec
String
enumPrefixGeometryFlagBitsKHR
[(GeometryFlagBitsKHR, String)]
showTableGeometryFlagBitsKHR
String
conNameGeometryFlagBitsKHR
(\(GeometryFlagBitsKHR Flags
x) -> Flags
x)
(\Flags
x -> String -> ShowS
showString String
"0x" ShowS -> ShowS -> ShowS
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Flags -> ShowS
forall a. (Integral a, Show a) => a -> ShowS
showHex Flags
x)
instance Read GeometryFlagBitsKHR where
readPrec :: ReadPrec GeometryFlagBitsKHR
readPrec =
String
-> [(GeometryFlagBitsKHR, String)]
-> String
-> (Flags -> GeometryFlagBitsKHR)
-> ReadPrec GeometryFlagBitsKHR
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec
String
enumPrefixGeometryFlagBitsKHR
[(GeometryFlagBitsKHR, String)]
showTableGeometryFlagBitsKHR
String
conNameGeometryFlagBitsKHR
Flags -> GeometryFlagBitsKHR
GeometryFlagBitsKHR
type BuildAccelerationStructureFlagsKHR = BuildAccelerationStructureFlagBitsKHR
newtype BuildAccelerationStructureFlagBitsKHR = BuildAccelerationStructureFlagBitsKHR Flags
deriving newtype (BuildAccelerationStructureFlagBitsKHR
-> BuildAccelerationStructureFlagBitsKHR -> Bool
(BuildAccelerationStructureFlagBitsKHR
-> BuildAccelerationStructureFlagBitsKHR -> Bool)
-> (BuildAccelerationStructureFlagBitsKHR
-> BuildAccelerationStructureFlagBitsKHR -> Bool)
-> Eq BuildAccelerationStructureFlagBitsKHR
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BuildAccelerationStructureFlagBitsKHR
-> BuildAccelerationStructureFlagBitsKHR -> Bool
$c/= :: BuildAccelerationStructureFlagBitsKHR
-> BuildAccelerationStructureFlagBitsKHR -> Bool
== :: BuildAccelerationStructureFlagBitsKHR
-> BuildAccelerationStructureFlagBitsKHR -> Bool
$c== :: BuildAccelerationStructureFlagBitsKHR
-> BuildAccelerationStructureFlagBitsKHR -> Bool
Eq, Eq BuildAccelerationStructureFlagBitsKHR
Eq BuildAccelerationStructureFlagBitsKHR
-> (BuildAccelerationStructureFlagBitsKHR
-> BuildAccelerationStructureFlagBitsKHR -> Ordering)
-> (BuildAccelerationStructureFlagBitsKHR
-> BuildAccelerationStructureFlagBitsKHR -> Bool)
-> (BuildAccelerationStructureFlagBitsKHR
-> BuildAccelerationStructureFlagBitsKHR -> Bool)
-> (BuildAccelerationStructureFlagBitsKHR
-> BuildAccelerationStructureFlagBitsKHR -> Bool)
-> (BuildAccelerationStructureFlagBitsKHR
-> BuildAccelerationStructureFlagBitsKHR -> Bool)
-> (BuildAccelerationStructureFlagBitsKHR
-> BuildAccelerationStructureFlagBitsKHR
-> BuildAccelerationStructureFlagBitsKHR)
-> (BuildAccelerationStructureFlagBitsKHR
-> BuildAccelerationStructureFlagBitsKHR
-> BuildAccelerationStructureFlagBitsKHR)
-> Ord BuildAccelerationStructureFlagBitsKHR
BuildAccelerationStructureFlagBitsKHR
-> BuildAccelerationStructureFlagBitsKHR -> Bool
BuildAccelerationStructureFlagBitsKHR
-> BuildAccelerationStructureFlagBitsKHR -> Ordering
BuildAccelerationStructureFlagBitsKHR
-> BuildAccelerationStructureFlagBitsKHR
-> BuildAccelerationStructureFlagBitsKHR
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 :: BuildAccelerationStructureFlagBitsKHR
-> BuildAccelerationStructureFlagBitsKHR
-> BuildAccelerationStructureFlagBitsKHR
$cmin :: BuildAccelerationStructureFlagBitsKHR
-> BuildAccelerationStructureFlagBitsKHR
-> BuildAccelerationStructureFlagBitsKHR
max :: BuildAccelerationStructureFlagBitsKHR
-> BuildAccelerationStructureFlagBitsKHR
-> BuildAccelerationStructureFlagBitsKHR
$cmax :: BuildAccelerationStructureFlagBitsKHR
-> BuildAccelerationStructureFlagBitsKHR
-> BuildAccelerationStructureFlagBitsKHR
>= :: BuildAccelerationStructureFlagBitsKHR
-> BuildAccelerationStructureFlagBitsKHR -> Bool
$c>= :: BuildAccelerationStructureFlagBitsKHR
-> BuildAccelerationStructureFlagBitsKHR -> Bool
> :: BuildAccelerationStructureFlagBitsKHR
-> BuildAccelerationStructureFlagBitsKHR -> Bool
$c> :: BuildAccelerationStructureFlagBitsKHR
-> BuildAccelerationStructureFlagBitsKHR -> Bool
<= :: BuildAccelerationStructureFlagBitsKHR
-> BuildAccelerationStructureFlagBitsKHR -> Bool
$c<= :: BuildAccelerationStructureFlagBitsKHR
-> BuildAccelerationStructureFlagBitsKHR -> Bool
< :: BuildAccelerationStructureFlagBitsKHR
-> BuildAccelerationStructureFlagBitsKHR -> Bool
$c< :: BuildAccelerationStructureFlagBitsKHR
-> BuildAccelerationStructureFlagBitsKHR -> Bool
compare :: BuildAccelerationStructureFlagBitsKHR
-> BuildAccelerationStructureFlagBitsKHR -> Ordering
$ccompare :: BuildAccelerationStructureFlagBitsKHR
-> BuildAccelerationStructureFlagBitsKHR -> Ordering
Ord, Ptr BuildAccelerationStructureFlagBitsKHR
-> IO BuildAccelerationStructureFlagBitsKHR
Ptr BuildAccelerationStructureFlagBitsKHR
-> Int -> IO BuildAccelerationStructureFlagBitsKHR
Ptr BuildAccelerationStructureFlagBitsKHR
-> Int -> BuildAccelerationStructureFlagBitsKHR -> IO ()
Ptr BuildAccelerationStructureFlagBitsKHR
-> BuildAccelerationStructureFlagBitsKHR -> IO ()
BuildAccelerationStructureFlagBitsKHR -> Int
(BuildAccelerationStructureFlagBitsKHR -> Int)
-> (BuildAccelerationStructureFlagBitsKHR -> Int)
-> (Ptr BuildAccelerationStructureFlagBitsKHR
-> Int -> IO BuildAccelerationStructureFlagBitsKHR)
-> (Ptr BuildAccelerationStructureFlagBitsKHR
-> Int -> BuildAccelerationStructureFlagBitsKHR -> IO ())
-> (forall b.
Ptr b -> Int -> IO BuildAccelerationStructureFlagBitsKHR)
-> (forall b.
Ptr b -> Int -> BuildAccelerationStructureFlagBitsKHR -> IO ())
-> (Ptr BuildAccelerationStructureFlagBitsKHR
-> IO BuildAccelerationStructureFlagBitsKHR)
-> (Ptr BuildAccelerationStructureFlagBitsKHR
-> BuildAccelerationStructureFlagBitsKHR -> IO ())
-> Storable BuildAccelerationStructureFlagBitsKHR
forall b. Ptr b -> Int -> IO BuildAccelerationStructureFlagBitsKHR
forall b.
Ptr b -> Int -> BuildAccelerationStructureFlagBitsKHR -> 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 BuildAccelerationStructureFlagBitsKHR
-> BuildAccelerationStructureFlagBitsKHR -> IO ()
$cpoke :: Ptr BuildAccelerationStructureFlagBitsKHR
-> BuildAccelerationStructureFlagBitsKHR -> IO ()
peek :: Ptr BuildAccelerationStructureFlagBitsKHR
-> IO BuildAccelerationStructureFlagBitsKHR
$cpeek :: Ptr BuildAccelerationStructureFlagBitsKHR
-> IO BuildAccelerationStructureFlagBitsKHR
pokeByteOff :: forall b.
Ptr b -> Int -> BuildAccelerationStructureFlagBitsKHR -> IO ()
$cpokeByteOff :: forall b.
Ptr b -> Int -> BuildAccelerationStructureFlagBitsKHR -> IO ()
peekByteOff :: forall b. Ptr b -> Int -> IO BuildAccelerationStructureFlagBitsKHR
$cpeekByteOff :: forall b. Ptr b -> Int -> IO BuildAccelerationStructureFlagBitsKHR
pokeElemOff :: Ptr BuildAccelerationStructureFlagBitsKHR
-> Int -> BuildAccelerationStructureFlagBitsKHR -> IO ()
$cpokeElemOff :: Ptr BuildAccelerationStructureFlagBitsKHR
-> Int -> BuildAccelerationStructureFlagBitsKHR -> IO ()
peekElemOff :: Ptr BuildAccelerationStructureFlagBitsKHR
-> Int -> IO BuildAccelerationStructureFlagBitsKHR
$cpeekElemOff :: Ptr BuildAccelerationStructureFlagBitsKHR
-> Int -> IO BuildAccelerationStructureFlagBitsKHR
alignment :: BuildAccelerationStructureFlagBitsKHR -> Int
$calignment :: BuildAccelerationStructureFlagBitsKHR -> Int
sizeOf :: BuildAccelerationStructureFlagBitsKHR -> Int
$csizeOf :: BuildAccelerationStructureFlagBitsKHR -> Int
Storable, BuildAccelerationStructureFlagBitsKHR
BuildAccelerationStructureFlagBitsKHR
-> Zero BuildAccelerationStructureFlagBitsKHR
forall a. a -> Zero a
zero :: BuildAccelerationStructureFlagBitsKHR
$czero :: BuildAccelerationStructureFlagBitsKHR
Zero, Eq BuildAccelerationStructureFlagBitsKHR
BuildAccelerationStructureFlagBitsKHR
Eq BuildAccelerationStructureFlagBitsKHR
-> (BuildAccelerationStructureFlagBitsKHR
-> BuildAccelerationStructureFlagBitsKHR
-> BuildAccelerationStructureFlagBitsKHR)
-> (BuildAccelerationStructureFlagBitsKHR
-> BuildAccelerationStructureFlagBitsKHR
-> BuildAccelerationStructureFlagBitsKHR)
-> (BuildAccelerationStructureFlagBitsKHR
-> BuildAccelerationStructureFlagBitsKHR
-> BuildAccelerationStructureFlagBitsKHR)
-> (BuildAccelerationStructureFlagBitsKHR
-> BuildAccelerationStructureFlagBitsKHR)
-> (BuildAccelerationStructureFlagBitsKHR
-> Int -> BuildAccelerationStructureFlagBitsKHR)
-> (BuildAccelerationStructureFlagBitsKHR
-> Int -> BuildAccelerationStructureFlagBitsKHR)
-> BuildAccelerationStructureFlagBitsKHR
-> (Int -> BuildAccelerationStructureFlagBitsKHR)
-> (BuildAccelerationStructureFlagBitsKHR
-> Int -> BuildAccelerationStructureFlagBitsKHR)
-> (BuildAccelerationStructureFlagBitsKHR
-> Int -> BuildAccelerationStructureFlagBitsKHR)
-> (BuildAccelerationStructureFlagBitsKHR
-> Int -> BuildAccelerationStructureFlagBitsKHR)
-> (BuildAccelerationStructureFlagBitsKHR -> Int -> Bool)
-> (BuildAccelerationStructureFlagBitsKHR -> Maybe Int)
-> (BuildAccelerationStructureFlagBitsKHR -> Int)
-> (BuildAccelerationStructureFlagBitsKHR -> Bool)
-> (BuildAccelerationStructureFlagBitsKHR
-> Int -> BuildAccelerationStructureFlagBitsKHR)
-> (BuildAccelerationStructureFlagBitsKHR
-> Int -> BuildAccelerationStructureFlagBitsKHR)
-> (BuildAccelerationStructureFlagBitsKHR
-> Int -> BuildAccelerationStructureFlagBitsKHR)
-> (BuildAccelerationStructureFlagBitsKHR
-> Int -> BuildAccelerationStructureFlagBitsKHR)
-> (BuildAccelerationStructureFlagBitsKHR
-> Int -> BuildAccelerationStructureFlagBitsKHR)
-> (BuildAccelerationStructureFlagBitsKHR
-> Int -> BuildAccelerationStructureFlagBitsKHR)
-> (BuildAccelerationStructureFlagBitsKHR -> Int)
-> Bits BuildAccelerationStructureFlagBitsKHR
Int -> BuildAccelerationStructureFlagBitsKHR
BuildAccelerationStructureFlagBitsKHR -> Bool
BuildAccelerationStructureFlagBitsKHR -> Int
BuildAccelerationStructureFlagBitsKHR -> Maybe Int
BuildAccelerationStructureFlagBitsKHR
-> BuildAccelerationStructureFlagBitsKHR
BuildAccelerationStructureFlagBitsKHR -> Int -> Bool
BuildAccelerationStructureFlagBitsKHR
-> Int -> BuildAccelerationStructureFlagBitsKHR
BuildAccelerationStructureFlagBitsKHR
-> BuildAccelerationStructureFlagBitsKHR
-> BuildAccelerationStructureFlagBitsKHR
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 :: BuildAccelerationStructureFlagBitsKHR -> Int
$cpopCount :: BuildAccelerationStructureFlagBitsKHR -> Int
rotateR :: BuildAccelerationStructureFlagBitsKHR
-> Int -> BuildAccelerationStructureFlagBitsKHR
$crotateR :: BuildAccelerationStructureFlagBitsKHR
-> Int -> BuildAccelerationStructureFlagBitsKHR
rotateL :: BuildAccelerationStructureFlagBitsKHR
-> Int -> BuildAccelerationStructureFlagBitsKHR
$crotateL :: BuildAccelerationStructureFlagBitsKHR
-> Int -> BuildAccelerationStructureFlagBitsKHR
unsafeShiftR :: BuildAccelerationStructureFlagBitsKHR
-> Int -> BuildAccelerationStructureFlagBitsKHR
$cunsafeShiftR :: BuildAccelerationStructureFlagBitsKHR
-> Int -> BuildAccelerationStructureFlagBitsKHR
shiftR :: BuildAccelerationStructureFlagBitsKHR
-> Int -> BuildAccelerationStructureFlagBitsKHR
$cshiftR :: BuildAccelerationStructureFlagBitsKHR
-> Int -> BuildAccelerationStructureFlagBitsKHR
unsafeShiftL :: BuildAccelerationStructureFlagBitsKHR
-> Int -> BuildAccelerationStructureFlagBitsKHR
$cunsafeShiftL :: BuildAccelerationStructureFlagBitsKHR
-> Int -> BuildAccelerationStructureFlagBitsKHR
shiftL :: BuildAccelerationStructureFlagBitsKHR
-> Int -> BuildAccelerationStructureFlagBitsKHR
$cshiftL :: BuildAccelerationStructureFlagBitsKHR
-> Int -> BuildAccelerationStructureFlagBitsKHR
isSigned :: BuildAccelerationStructureFlagBitsKHR -> Bool
$cisSigned :: BuildAccelerationStructureFlagBitsKHR -> Bool
bitSize :: BuildAccelerationStructureFlagBitsKHR -> Int
$cbitSize :: BuildAccelerationStructureFlagBitsKHR -> Int
bitSizeMaybe :: BuildAccelerationStructureFlagBitsKHR -> Maybe Int
$cbitSizeMaybe :: BuildAccelerationStructureFlagBitsKHR -> Maybe Int
testBit :: BuildAccelerationStructureFlagBitsKHR -> Int -> Bool
$ctestBit :: BuildAccelerationStructureFlagBitsKHR -> Int -> Bool
complementBit :: BuildAccelerationStructureFlagBitsKHR
-> Int -> BuildAccelerationStructureFlagBitsKHR
$ccomplementBit :: BuildAccelerationStructureFlagBitsKHR
-> Int -> BuildAccelerationStructureFlagBitsKHR
clearBit :: BuildAccelerationStructureFlagBitsKHR
-> Int -> BuildAccelerationStructureFlagBitsKHR
$cclearBit :: BuildAccelerationStructureFlagBitsKHR
-> Int -> BuildAccelerationStructureFlagBitsKHR
setBit :: BuildAccelerationStructureFlagBitsKHR
-> Int -> BuildAccelerationStructureFlagBitsKHR
$csetBit :: BuildAccelerationStructureFlagBitsKHR
-> Int -> BuildAccelerationStructureFlagBitsKHR
bit :: Int -> BuildAccelerationStructureFlagBitsKHR
$cbit :: Int -> BuildAccelerationStructureFlagBitsKHR
zeroBits :: BuildAccelerationStructureFlagBitsKHR
$czeroBits :: BuildAccelerationStructureFlagBitsKHR
rotate :: BuildAccelerationStructureFlagBitsKHR
-> Int -> BuildAccelerationStructureFlagBitsKHR
$crotate :: BuildAccelerationStructureFlagBitsKHR
-> Int -> BuildAccelerationStructureFlagBitsKHR
shift :: BuildAccelerationStructureFlagBitsKHR
-> Int -> BuildAccelerationStructureFlagBitsKHR
$cshift :: BuildAccelerationStructureFlagBitsKHR
-> Int -> BuildAccelerationStructureFlagBitsKHR
complement :: BuildAccelerationStructureFlagBitsKHR
-> BuildAccelerationStructureFlagBitsKHR
$ccomplement :: BuildAccelerationStructureFlagBitsKHR
-> BuildAccelerationStructureFlagBitsKHR
xor :: BuildAccelerationStructureFlagBitsKHR
-> BuildAccelerationStructureFlagBitsKHR
-> BuildAccelerationStructureFlagBitsKHR
$cxor :: BuildAccelerationStructureFlagBitsKHR
-> BuildAccelerationStructureFlagBitsKHR
-> BuildAccelerationStructureFlagBitsKHR
.|. :: BuildAccelerationStructureFlagBitsKHR
-> BuildAccelerationStructureFlagBitsKHR
-> BuildAccelerationStructureFlagBitsKHR
$c.|. :: BuildAccelerationStructureFlagBitsKHR
-> BuildAccelerationStructureFlagBitsKHR
-> BuildAccelerationStructureFlagBitsKHR
.&. :: BuildAccelerationStructureFlagBitsKHR
-> BuildAccelerationStructureFlagBitsKHR
-> BuildAccelerationStructureFlagBitsKHR
$c.&. :: BuildAccelerationStructureFlagBitsKHR
-> BuildAccelerationStructureFlagBitsKHR
-> BuildAccelerationStructureFlagBitsKHR
Bits, Bits BuildAccelerationStructureFlagBitsKHR
Bits BuildAccelerationStructureFlagBitsKHR
-> (BuildAccelerationStructureFlagBitsKHR -> Int)
-> (BuildAccelerationStructureFlagBitsKHR -> Int)
-> (BuildAccelerationStructureFlagBitsKHR -> Int)
-> FiniteBits BuildAccelerationStructureFlagBitsKHR
BuildAccelerationStructureFlagBitsKHR -> Int
forall b.
Bits b -> (b -> Int) -> (b -> Int) -> (b -> Int) -> FiniteBits b
countTrailingZeros :: BuildAccelerationStructureFlagBitsKHR -> Int
$ccountTrailingZeros :: BuildAccelerationStructureFlagBitsKHR -> Int
countLeadingZeros :: BuildAccelerationStructureFlagBitsKHR -> Int
$ccountLeadingZeros :: BuildAccelerationStructureFlagBitsKHR -> Int
finiteBitSize :: BuildAccelerationStructureFlagBitsKHR -> Int
$cfiniteBitSize :: BuildAccelerationStructureFlagBitsKHR -> Int
FiniteBits)
pattern $bBUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_KHR :: BuildAccelerationStructureFlagBitsKHR
$mBUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_KHR :: forall {r}.
BuildAccelerationStructureFlagBitsKHR
-> (Void# -> r) -> (Void# -> r) -> r
BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_KHR = BuildAccelerationStructureFlagBitsKHR 0x00000001
pattern $bBUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_KHR :: BuildAccelerationStructureFlagBitsKHR
$mBUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_KHR :: forall {r}.
BuildAccelerationStructureFlagBitsKHR
-> (Void# -> r) -> (Void# -> r) -> r
BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_KHR = BuildAccelerationStructureFlagBitsKHR 0x00000002
pattern $bBUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_KHR :: BuildAccelerationStructureFlagBitsKHR
$mBUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_KHR :: forall {r}.
BuildAccelerationStructureFlagBitsKHR
-> (Void# -> r) -> (Void# -> r) -> r
BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_KHR = BuildAccelerationStructureFlagBitsKHR 0x00000004
pattern $bBUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_KHR :: BuildAccelerationStructureFlagBitsKHR
$mBUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_KHR :: forall {r}.
BuildAccelerationStructureFlagBitsKHR
-> (Void# -> r) -> (Void# -> r) -> r
BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_KHR = BuildAccelerationStructureFlagBitsKHR 0x00000008
pattern $bBUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_KHR :: BuildAccelerationStructureFlagBitsKHR
$mBUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_KHR :: forall {r}.
BuildAccelerationStructureFlagBitsKHR
-> (Void# -> r) -> (Void# -> r) -> r
BUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_KHR = BuildAccelerationStructureFlagBitsKHR 0x00000010
pattern $bBUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_DATA_UPDATE_EXT :: BuildAccelerationStructureFlagBitsKHR
$mBUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_DATA_UPDATE_EXT :: forall {r}.
BuildAccelerationStructureFlagBitsKHR
-> (Void# -> r) -> (Void# -> r) -> r
BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_DATA_UPDATE_EXT = BuildAccelerationStructureFlagBitsKHR 0x00000100
pattern $bBUILD_ACCELERATION_STRUCTURE_ALLOW_DISABLE_OPACITY_MICROMAPS_EXT :: BuildAccelerationStructureFlagBitsKHR
$mBUILD_ACCELERATION_STRUCTURE_ALLOW_DISABLE_OPACITY_MICROMAPS_EXT :: forall {r}.
BuildAccelerationStructureFlagBitsKHR
-> (Void# -> r) -> (Void# -> r) -> r
BUILD_ACCELERATION_STRUCTURE_ALLOW_DISABLE_OPACITY_MICROMAPS_EXT = BuildAccelerationStructureFlagBitsKHR 0x00000080
pattern $bBUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_UPDATE_EXT :: BuildAccelerationStructureFlagBitsKHR
$mBUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_UPDATE_EXT :: forall {r}.
BuildAccelerationStructureFlagBitsKHR
-> (Void# -> r) -> (Void# -> r) -> r
BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_UPDATE_EXT = BuildAccelerationStructureFlagBitsKHR 0x00000040
pattern $bBUILD_ACCELERATION_STRUCTURE_MOTION_BIT_NV :: BuildAccelerationStructureFlagBitsKHR
$mBUILD_ACCELERATION_STRUCTURE_MOTION_BIT_NV :: forall {r}.
BuildAccelerationStructureFlagBitsKHR
-> (Void# -> r) -> (Void# -> r) -> r
BUILD_ACCELERATION_STRUCTURE_MOTION_BIT_NV = BuildAccelerationStructureFlagBitsKHR 0x00000020
conNameBuildAccelerationStructureFlagBitsKHR :: String
conNameBuildAccelerationStructureFlagBitsKHR :: String
conNameBuildAccelerationStructureFlagBitsKHR = String
"BuildAccelerationStructureFlagBitsKHR"
enumPrefixBuildAccelerationStructureFlagBitsKHR :: String
enumPrefixBuildAccelerationStructureFlagBitsKHR :: String
enumPrefixBuildAccelerationStructureFlagBitsKHR = String
"BUILD_ACCELERATION_STRUCTURE_"
showTableBuildAccelerationStructureFlagBitsKHR :: [(BuildAccelerationStructureFlagBitsKHR, String)]
showTableBuildAccelerationStructureFlagBitsKHR :: [(BuildAccelerationStructureFlagBitsKHR, String)]
showTableBuildAccelerationStructureFlagBitsKHR =
[
( BuildAccelerationStructureFlagBitsKHR
BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_KHR
, String
"ALLOW_UPDATE_BIT_KHR"
)
,
( BuildAccelerationStructureFlagBitsKHR
BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_KHR
, String
"ALLOW_COMPACTION_BIT_KHR"
)
,
( BuildAccelerationStructureFlagBitsKHR
BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_KHR
, String
"PREFER_FAST_TRACE_BIT_KHR"
)
,
( BuildAccelerationStructureFlagBitsKHR
BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_KHR
, String
"PREFER_FAST_BUILD_BIT_KHR"
)
,
( BuildAccelerationStructureFlagBitsKHR
BUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_KHR
, String
"LOW_MEMORY_BIT_KHR"
)
,
( BuildAccelerationStructureFlagBitsKHR
BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_DATA_UPDATE_EXT
, String
"ALLOW_OPACITY_MICROMAP_DATA_UPDATE_EXT"
)
,
( BuildAccelerationStructureFlagBitsKHR
BUILD_ACCELERATION_STRUCTURE_ALLOW_DISABLE_OPACITY_MICROMAPS_EXT
, String
"ALLOW_DISABLE_OPACITY_MICROMAPS_EXT"
)
,
( BuildAccelerationStructureFlagBitsKHR
BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_UPDATE_EXT
, String
"ALLOW_OPACITY_MICROMAP_UPDATE_EXT"
)
,
( BuildAccelerationStructureFlagBitsKHR
BUILD_ACCELERATION_STRUCTURE_MOTION_BIT_NV
, String
"MOTION_BIT_NV"
)
]
instance Show BuildAccelerationStructureFlagBitsKHR where
showsPrec :: Int -> BuildAccelerationStructureFlagBitsKHR -> ShowS
showsPrec =
String
-> [(BuildAccelerationStructureFlagBitsKHR, String)]
-> String
-> (BuildAccelerationStructureFlagBitsKHR -> Flags)
-> (Flags -> ShowS)
-> Int
-> BuildAccelerationStructureFlagBitsKHR
-> ShowS
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec
String
enumPrefixBuildAccelerationStructureFlagBitsKHR
[(BuildAccelerationStructureFlagBitsKHR, String)]
showTableBuildAccelerationStructureFlagBitsKHR
String
conNameBuildAccelerationStructureFlagBitsKHR
(\(BuildAccelerationStructureFlagBitsKHR Flags
x) -> Flags
x)
(\Flags
x -> String -> ShowS
showString String
"0x" ShowS -> ShowS -> ShowS
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Flags -> ShowS
forall a. (Integral a, Show a) => a -> ShowS
showHex Flags
x)
instance Read BuildAccelerationStructureFlagBitsKHR where
readPrec :: ReadPrec BuildAccelerationStructureFlagBitsKHR
readPrec =
String
-> [(BuildAccelerationStructureFlagBitsKHR, String)]
-> String
-> (Flags -> BuildAccelerationStructureFlagBitsKHR)
-> ReadPrec BuildAccelerationStructureFlagBitsKHR
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec
String
enumPrefixBuildAccelerationStructureFlagBitsKHR
[(BuildAccelerationStructureFlagBitsKHR, String)]
showTableBuildAccelerationStructureFlagBitsKHR
String
conNameBuildAccelerationStructureFlagBitsKHR
Flags -> BuildAccelerationStructureFlagBitsKHR
BuildAccelerationStructureFlagBitsKHR
type AccelerationStructureCreateFlagsKHR = AccelerationStructureCreateFlagBitsKHR
newtype AccelerationStructureCreateFlagBitsKHR = AccelerationStructureCreateFlagBitsKHR Flags
deriving newtype (AccelerationStructureCreateFlagBitsKHR
-> AccelerationStructureCreateFlagBitsKHR -> Bool
(AccelerationStructureCreateFlagBitsKHR
-> AccelerationStructureCreateFlagBitsKHR -> Bool)
-> (AccelerationStructureCreateFlagBitsKHR
-> AccelerationStructureCreateFlagBitsKHR -> Bool)
-> Eq AccelerationStructureCreateFlagBitsKHR
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AccelerationStructureCreateFlagBitsKHR
-> AccelerationStructureCreateFlagBitsKHR -> Bool
$c/= :: AccelerationStructureCreateFlagBitsKHR
-> AccelerationStructureCreateFlagBitsKHR -> Bool
== :: AccelerationStructureCreateFlagBitsKHR
-> AccelerationStructureCreateFlagBitsKHR -> Bool
$c== :: AccelerationStructureCreateFlagBitsKHR
-> AccelerationStructureCreateFlagBitsKHR -> Bool
Eq, Eq AccelerationStructureCreateFlagBitsKHR
Eq AccelerationStructureCreateFlagBitsKHR
-> (AccelerationStructureCreateFlagBitsKHR
-> AccelerationStructureCreateFlagBitsKHR -> Ordering)
-> (AccelerationStructureCreateFlagBitsKHR
-> AccelerationStructureCreateFlagBitsKHR -> Bool)
-> (AccelerationStructureCreateFlagBitsKHR
-> AccelerationStructureCreateFlagBitsKHR -> Bool)
-> (AccelerationStructureCreateFlagBitsKHR
-> AccelerationStructureCreateFlagBitsKHR -> Bool)
-> (AccelerationStructureCreateFlagBitsKHR
-> AccelerationStructureCreateFlagBitsKHR -> Bool)
-> (AccelerationStructureCreateFlagBitsKHR
-> AccelerationStructureCreateFlagBitsKHR
-> AccelerationStructureCreateFlagBitsKHR)
-> (AccelerationStructureCreateFlagBitsKHR
-> AccelerationStructureCreateFlagBitsKHR
-> AccelerationStructureCreateFlagBitsKHR)
-> Ord AccelerationStructureCreateFlagBitsKHR
AccelerationStructureCreateFlagBitsKHR
-> AccelerationStructureCreateFlagBitsKHR -> Bool
AccelerationStructureCreateFlagBitsKHR
-> AccelerationStructureCreateFlagBitsKHR -> Ordering
AccelerationStructureCreateFlagBitsKHR
-> AccelerationStructureCreateFlagBitsKHR
-> AccelerationStructureCreateFlagBitsKHR
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 :: AccelerationStructureCreateFlagBitsKHR
-> AccelerationStructureCreateFlagBitsKHR
-> AccelerationStructureCreateFlagBitsKHR
$cmin :: AccelerationStructureCreateFlagBitsKHR
-> AccelerationStructureCreateFlagBitsKHR
-> AccelerationStructureCreateFlagBitsKHR
max :: AccelerationStructureCreateFlagBitsKHR
-> AccelerationStructureCreateFlagBitsKHR
-> AccelerationStructureCreateFlagBitsKHR
$cmax :: AccelerationStructureCreateFlagBitsKHR
-> AccelerationStructureCreateFlagBitsKHR
-> AccelerationStructureCreateFlagBitsKHR
>= :: AccelerationStructureCreateFlagBitsKHR
-> AccelerationStructureCreateFlagBitsKHR -> Bool
$c>= :: AccelerationStructureCreateFlagBitsKHR
-> AccelerationStructureCreateFlagBitsKHR -> Bool
> :: AccelerationStructureCreateFlagBitsKHR
-> AccelerationStructureCreateFlagBitsKHR -> Bool
$c> :: AccelerationStructureCreateFlagBitsKHR
-> AccelerationStructureCreateFlagBitsKHR -> Bool
<= :: AccelerationStructureCreateFlagBitsKHR
-> AccelerationStructureCreateFlagBitsKHR -> Bool
$c<= :: AccelerationStructureCreateFlagBitsKHR
-> AccelerationStructureCreateFlagBitsKHR -> Bool
< :: AccelerationStructureCreateFlagBitsKHR
-> AccelerationStructureCreateFlagBitsKHR -> Bool
$c< :: AccelerationStructureCreateFlagBitsKHR
-> AccelerationStructureCreateFlagBitsKHR -> Bool
compare :: AccelerationStructureCreateFlagBitsKHR
-> AccelerationStructureCreateFlagBitsKHR -> Ordering
$ccompare :: AccelerationStructureCreateFlagBitsKHR
-> AccelerationStructureCreateFlagBitsKHR -> Ordering
Ord, Ptr AccelerationStructureCreateFlagBitsKHR
-> IO AccelerationStructureCreateFlagBitsKHR
Ptr AccelerationStructureCreateFlagBitsKHR
-> Int -> IO AccelerationStructureCreateFlagBitsKHR
Ptr AccelerationStructureCreateFlagBitsKHR
-> Int -> AccelerationStructureCreateFlagBitsKHR -> IO ()
Ptr AccelerationStructureCreateFlagBitsKHR
-> AccelerationStructureCreateFlagBitsKHR -> IO ()
AccelerationStructureCreateFlagBitsKHR -> Int
(AccelerationStructureCreateFlagBitsKHR -> Int)
-> (AccelerationStructureCreateFlagBitsKHR -> Int)
-> (Ptr AccelerationStructureCreateFlagBitsKHR
-> Int -> IO AccelerationStructureCreateFlagBitsKHR)
-> (Ptr AccelerationStructureCreateFlagBitsKHR
-> Int -> AccelerationStructureCreateFlagBitsKHR -> IO ())
-> (forall b.
Ptr b -> Int -> IO AccelerationStructureCreateFlagBitsKHR)
-> (forall b.
Ptr b -> Int -> AccelerationStructureCreateFlagBitsKHR -> IO ())
-> (Ptr AccelerationStructureCreateFlagBitsKHR
-> IO AccelerationStructureCreateFlagBitsKHR)
-> (Ptr AccelerationStructureCreateFlagBitsKHR
-> AccelerationStructureCreateFlagBitsKHR -> IO ())
-> Storable AccelerationStructureCreateFlagBitsKHR
forall b. Ptr b -> Int -> IO AccelerationStructureCreateFlagBitsKHR
forall b.
Ptr b -> Int -> AccelerationStructureCreateFlagBitsKHR -> 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 AccelerationStructureCreateFlagBitsKHR
-> AccelerationStructureCreateFlagBitsKHR -> IO ()
$cpoke :: Ptr AccelerationStructureCreateFlagBitsKHR
-> AccelerationStructureCreateFlagBitsKHR -> IO ()
peek :: Ptr AccelerationStructureCreateFlagBitsKHR
-> IO AccelerationStructureCreateFlagBitsKHR
$cpeek :: Ptr AccelerationStructureCreateFlagBitsKHR
-> IO AccelerationStructureCreateFlagBitsKHR
pokeByteOff :: forall b.
Ptr b -> Int -> AccelerationStructureCreateFlagBitsKHR -> IO ()
$cpokeByteOff :: forall b.
Ptr b -> Int -> AccelerationStructureCreateFlagBitsKHR -> IO ()
peekByteOff :: forall b. Ptr b -> Int -> IO AccelerationStructureCreateFlagBitsKHR
$cpeekByteOff :: forall b. Ptr b -> Int -> IO AccelerationStructureCreateFlagBitsKHR
pokeElemOff :: Ptr AccelerationStructureCreateFlagBitsKHR
-> Int -> AccelerationStructureCreateFlagBitsKHR -> IO ()
$cpokeElemOff :: Ptr AccelerationStructureCreateFlagBitsKHR
-> Int -> AccelerationStructureCreateFlagBitsKHR -> IO ()
peekElemOff :: Ptr AccelerationStructureCreateFlagBitsKHR
-> Int -> IO AccelerationStructureCreateFlagBitsKHR
$cpeekElemOff :: Ptr AccelerationStructureCreateFlagBitsKHR
-> Int -> IO AccelerationStructureCreateFlagBitsKHR
alignment :: AccelerationStructureCreateFlagBitsKHR -> Int
$calignment :: AccelerationStructureCreateFlagBitsKHR -> Int
sizeOf :: AccelerationStructureCreateFlagBitsKHR -> Int
$csizeOf :: AccelerationStructureCreateFlagBitsKHR -> Int
Storable, AccelerationStructureCreateFlagBitsKHR
AccelerationStructureCreateFlagBitsKHR
-> Zero AccelerationStructureCreateFlagBitsKHR
forall a. a -> Zero a
zero :: AccelerationStructureCreateFlagBitsKHR
$czero :: AccelerationStructureCreateFlagBitsKHR
Zero, Eq AccelerationStructureCreateFlagBitsKHR
AccelerationStructureCreateFlagBitsKHR
Eq AccelerationStructureCreateFlagBitsKHR
-> (AccelerationStructureCreateFlagBitsKHR
-> AccelerationStructureCreateFlagBitsKHR
-> AccelerationStructureCreateFlagBitsKHR)
-> (AccelerationStructureCreateFlagBitsKHR
-> AccelerationStructureCreateFlagBitsKHR
-> AccelerationStructureCreateFlagBitsKHR)
-> (AccelerationStructureCreateFlagBitsKHR
-> AccelerationStructureCreateFlagBitsKHR
-> AccelerationStructureCreateFlagBitsKHR)
-> (AccelerationStructureCreateFlagBitsKHR
-> AccelerationStructureCreateFlagBitsKHR)
-> (AccelerationStructureCreateFlagBitsKHR
-> Int -> AccelerationStructureCreateFlagBitsKHR)
-> (AccelerationStructureCreateFlagBitsKHR
-> Int -> AccelerationStructureCreateFlagBitsKHR)
-> AccelerationStructureCreateFlagBitsKHR
-> (Int -> AccelerationStructureCreateFlagBitsKHR)
-> (AccelerationStructureCreateFlagBitsKHR
-> Int -> AccelerationStructureCreateFlagBitsKHR)
-> (AccelerationStructureCreateFlagBitsKHR
-> Int -> AccelerationStructureCreateFlagBitsKHR)
-> (AccelerationStructureCreateFlagBitsKHR
-> Int -> AccelerationStructureCreateFlagBitsKHR)
-> (AccelerationStructureCreateFlagBitsKHR -> Int -> Bool)
-> (AccelerationStructureCreateFlagBitsKHR -> Maybe Int)
-> (AccelerationStructureCreateFlagBitsKHR -> Int)
-> (AccelerationStructureCreateFlagBitsKHR -> Bool)
-> (AccelerationStructureCreateFlagBitsKHR
-> Int -> AccelerationStructureCreateFlagBitsKHR)
-> (AccelerationStructureCreateFlagBitsKHR
-> Int -> AccelerationStructureCreateFlagBitsKHR)
-> (AccelerationStructureCreateFlagBitsKHR
-> Int -> AccelerationStructureCreateFlagBitsKHR)
-> (AccelerationStructureCreateFlagBitsKHR
-> Int -> AccelerationStructureCreateFlagBitsKHR)
-> (AccelerationStructureCreateFlagBitsKHR
-> Int -> AccelerationStructureCreateFlagBitsKHR)
-> (AccelerationStructureCreateFlagBitsKHR
-> Int -> AccelerationStructureCreateFlagBitsKHR)
-> (AccelerationStructureCreateFlagBitsKHR -> Int)
-> Bits AccelerationStructureCreateFlagBitsKHR
Int -> AccelerationStructureCreateFlagBitsKHR
AccelerationStructureCreateFlagBitsKHR -> Bool
AccelerationStructureCreateFlagBitsKHR -> Int
AccelerationStructureCreateFlagBitsKHR -> Maybe Int
AccelerationStructureCreateFlagBitsKHR
-> AccelerationStructureCreateFlagBitsKHR
AccelerationStructureCreateFlagBitsKHR -> Int -> Bool
AccelerationStructureCreateFlagBitsKHR
-> Int -> AccelerationStructureCreateFlagBitsKHR
AccelerationStructureCreateFlagBitsKHR
-> AccelerationStructureCreateFlagBitsKHR
-> AccelerationStructureCreateFlagBitsKHR
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 :: AccelerationStructureCreateFlagBitsKHR -> Int
$cpopCount :: AccelerationStructureCreateFlagBitsKHR -> Int
rotateR :: AccelerationStructureCreateFlagBitsKHR
-> Int -> AccelerationStructureCreateFlagBitsKHR
$crotateR :: AccelerationStructureCreateFlagBitsKHR
-> Int -> AccelerationStructureCreateFlagBitsKHR
rotateL :: AccelerationStructureCreateFlagBitsKHR
-> Int -> AccelerationStructureCreateFlagBitsKHR
$crotateL :: AccelerationStructureCreateFlagBitsKHR
-> Int -> AccelerationStructureCreateFlagBitsKHR
unsafeShiftR :: AccelerationStructureCreateFlagBitsKHR
-> Int -> AccelerationStructureCreateFlagBitsKHR
$cunsafeShiftR :: AccelerationStructureCreateFlagBitsKHR
-> Int -> AccelerationStructureCreateFlagBitsKHR
shiftR :: AccelerationStructureCreateFlagBitsKHR
-> Int -> AccelerationStructureCreateFlagBitsKHR
$cshiftR :: AccelerationStructureCreateFlagBitsKHR
-> Int -> AccelerationStructureCreateFlagBitsKHR
unsafeShiftL :: AccelerationStructureCreateFlagBitsKHR
-> Int -> AccelerationStructureCreateFlagBitsKHR
$cunsafeShiftL :: AccelerationStructureCreateFlagBitsKHR
-> Int -> AccelerationStructureCreateFlagBitsKHR
shiftL :: AccelerationStructureCreateFlagBitsKHR
-> Int -> AccelerationStructureCreateFlagBitsKHR
$cshiftL :: AccelerationStructureCreateFlagBitsKHR
-> Int -> AccelerationStructureCreateFlagBitsKHR
isSigned :: AccelerationStructureCreateFlagBitsKHR -> Bool
$cisSigned :: AccelerationStructureCreateFlagBitsKHR -> Bool
bitSize :: AccelerationStructureCreateFlagBitsKHR -> Int
$cbitSize :: AccelerationStructureCreateFlagBitsKHR -> Int
bitSizeMaybe :: AccelerationStructureCreateFlagBitsKHR -> Maybe Int
$cbitSizeMaybe :: AccelerationStructureCreateFlagBitsKHR -> Maybe Int
testBit :: AccelerationStructureCreateFlagBitsKHR -> Int -> Bool
$ctestBit :: AccelerationStructureCreateFlagBitsKHR -> Int -> Bool
complementBit :: AccelerationStructureCreateFlagBitsKHR
-> Int -> AccelerationStructureCreateFlagBitsKHR
$ccomplementBit :: AccelerationStructureCreateFlagBitsKHR
-> Int -> AccelerationStructureCreateFlagBitsKHR
clearBit :: AccelerationStructureCreateFlagBitsKHR
-> Int -> AccelerationStructureCreateFlagBitsKHR
$cclearBit :: AccelerationStructureCreateFlagBitsKHR
-> Int -> AccelerationStructureCreateFlagBitsKHR
setBit :: AccelerationStructureCreateFlagBitsKHR
-> Int -> AccelerationStructureCreateFlagBitsKHR
$csetBit :: AccelerationStructureCreateFlagBitsKHR
-> Int -> AccelerationStructureCreateFlagBitsKHR
bit :: Int -> AccelerationStructureCreateFlagBitsKHR
$cbit :: Int -> AccelerationStructureCreateFlagBitsKHR
zeroBits :: AccelerationStructureCreateFlagBitsKHR
$czeroBits :: AccelerationStructureCreateFlagBitsKHR
rotate :: AccelerationStructureCreateFlagBitsKHR
-> Int -> AccelerationStructureCreateFlagBitsKHR
$crotate :: AccelerationStructureCreateFlagBitsKHR
-> Int -> AccelerationStructureCreateFlagBitsKHR
shift :: AccelerationStructureCreateFlagBitsKHR
-> Int -> AccelerationStructureCreateFlagBitsKHR
$cshift :: AccelerationStructureCreateFlagBitsKHR
-> Int -> AccelerationStructureCreateFlagBitsKHR
complement :: AccelerationStructureCreateFlagBitsKHR
-> AccelerationStructureCreateFlagBitsKHR
$ccomplement :: AccelerationStructureCreateFlagBitsKHR
-> AccelerationStructureCreateFlagBitsKHR
xor :: AccelerationStructureCreateFlagBitsKHR
-> AccelerationStructureCreateFlagBitsKHR
-> AccelerationStructureCreateFlagBitsKHR
$cxor :: AccelerationStructureCreateFlagBitsKHR
-> AccelerationStructureCreateFlagBitsKHR
-> AccelerationStructureCreateFlagBitsKHR
.|. :: AccelerationStructureCreateFlagBitsKHR
-> AccelerationStructureCreateFlagBitsKHR
-> AccelerationStructureCreateFlagBitsKHR
$c.|. :: AccelerationStructureCreateFlagBitsKHR
-> AccelerationStructureCreateFlagBitsKHR
-> AccelerationStructureCreateFlagBitsKHR
.&. :: AccelerationStructureCreateFlagBitsKHR
-> AccelerationStructureCreateFlagBitsKHR
-> AccelerationStructureCreateFlagBitsKHR
$c.&. :: AccelerationStructureCreateFlagBitsKHR
-> AccelerationStructureCreateFlagBitsKHR
-> AccelerationStructureCreateFlagBitsKHR
Bits, Bits AccelerationStructureCreateFlagBitsKHR
Bits AccelerationStructureCreateFlagBitsKHR
-> (AccelerationStructureCreateFlagBitsKHR -> Int)
-> (AccelerationStructureCreateFlagBitsKHR -> Int)
-> (AccelerationStructureCreateFlagBitsKHR -> Int)
-> FiniteBits AccelerationStructureCreateFlagBitsKHR
AccelerationStructureCreateFlagBitsKHR -> Int
forall b.
Bits b -> (b -> Int) -> (b -> Int) -> (b -> Int) -> FiniteBits b
countTrailingZeros :: AccelerationStructureCreateFlagBitsKHR -> Int
$ccountTrailingZeros :: AccelerationStructureCreateFlagBitsKHR -> Int
countLeadingZeros :: AccelerationStructureCreateFlagBitsKHR -> Int
$ccountLeadingZeros :: AccelerationStructureCreateFlagBitsKHR -> Int
finiteBitSize :: AccelerationStructureCreateFlagBitsKHR -> Int
$cfiniteBitSize :: AccelerationStructureCreateFlagBitsKHR -> Int
FiniteBits)
pattern $bACCELERATION_STRUCTURE_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_KHR :: AccelerationStructureCreateFlagBitsKHR
$mACCELERATION_STRUCTURE_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_KHR :: forall {r}.
AccelerationStructureCreateFlagBitsKHR
-> (Void# -> r) -> (Void# -> r) -> r
ACCELERATION_STRUCTURE_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_KHR = AccelerationStructureCreateFlagBitsKHR 0x00000001
pattern $bACCELERATION_STRUCTURE_CREATE_MOTION_BIT_NV :: AccelerationStructureCreateFlagBitsKHR
$mACCELERATION_STRUCTURE_CREATE_MOTION_BIT_NV :: forall {r}.
AccelerationStructureCreateFlagBitsKHR
-> (Void# -> r) -> (Void# -> r) -> r
ACCELERATION_STRUCTURE_CREATE_MOTION_BIT_NV = AccelerationStructureCreateFlagBitsKHR 0x00000004
conNameAccelerationStructureCreateFlagBitsKHR :: String
conNameAccelerationStructureCreateFlagBitsKHR :: String
conNameAccelerationStructureCreateFlagBitsKHR = String
"AccelerationStructureCreateFlagBitsKHR"
enumPrefixAccelerationStructureCreateFlagBitsKHR :: String
enumPrefixAccelerationStructureCreateFlagBitsKHR :: String
enumPrefixAccelerationStructureCreateFlagBitsKHR = String
"ACCELERATION_STRUCTURE_CREATE_"
showTableAccelerationStructureCreateFlagBitsKHR :: [(AccelerationStructureCreateFlagBitsKHR, String)]
showTableAccelerationStructureCreateFlagBitsKHR :: [(AccelerationStructureCreateFlagBitsKHR, String)]
showTableAccelerationStructureCreateFlagBitsKHR =
[
( AccelerationStructureCreateFlagBitsKHR
ACCELERATION_STRUCTURE_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_KHR
, String
"DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_KHR"
)
,
( AccelerationStructureCreateFlagBitsKHR
ACCELERATION_STRUCTURE_CREATE_MOTION_BIT_NV
, String
"MOTION_BIT_NV"
)
]
instance Show AccelerationStructureCreateFlagBitsKHR where
showsPrec :: Int -> AccelerationStructureCreateFlagBitsKHR -> ShowS
showsPrec =
String
-> [(AccelerationStructureCreateFlagBitsKHR, String)]
-> String
-> (AccelerationStructureCreateFlagBitsKHR -> Flags)
-> (Flags -> ShowS)
-> Int
-> AccelerationStructureCreateFlagBitsKHR
-> ShowS
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec
String
enumPrefixAccelerationStructureCreateFlagBitsKHR
[(AccelerationStructureCreateFlagBitsKHR, String)]
showTableAccelerationStructureCreateFlagBitsKHR
String
conNameAccelerationStructureCreateFlagBitsKHR
(\(AccelerationStructureCreateFlagBitsKHR Flags
x) -> Flags
x)
(\Flags
x -> String -> ShowS
showString String
"0x" ShowS -> ShowS -> ShowS
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Flags -> ShowS
forall a. (Integral a, Show a) => a -> ShowS
showHex Flags
x)
instance Read AccelerationStructureCreateFlagBitsKHR where
readPrec :: ReadPrec AccelerationStructureCreateFlagBitsKHR
readPrec =
String
-> [(AccelerationStructureCreateFlagBitsKHR, String)]
-> String
-> (Flags -> AccelerationStructureCreateFlagBitsKHR)
-> ReadPrec AccelerationStructureCreateFlagBitsKHR
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec
String
enumPrefixAccelerationStructureCreateFlagBitsKHR
[(AccelerationStructureCreateFlagBitsKHR, String)]
showTableAccelerationStructureCreateFlagBitsKHR
String
conNameAccelerationStructureCreateFlagBitsKHR
Flags -> AccelerationStructureCreateFlagBitsKHR
AccelerationStructureCreateFlagBitsKHR
newtype CopyAccelerationStructureModeKHR = CopyAccelerationStructureModeKHR Int32
deriving newtype (CopyAccelerationStructureModeKHR
-> CopyAccelerationStructureModeKHR -> Bool
(CopyAccelerationStructureModeKHR
-> CopyAccelerationStructureModeKHR -> Bool)
-> (CopyAccelerationStructureModeKHR
-> CopyAccelerationStructureModeKHR -> Bool)
-> Eq CopyAccelerationStructureModeKHR
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CopyAccelerationStructureModeKHR
-> CopyAccelerationStructureModeKHR -> Bool
$c/= :: CopyAccelerationStructureModeKHR
-> CopyAccelerationStructureModeKHR -> Bool
== :: CopyAccelerationStructureModeKHR
-> CopyAccelerationStructureModeKHR -> Bool
$c== :: CopyAccelerationStructureModeKHR
-> CopyAccelerationStructureModeKHR -> Bool
Eq, Eq CopyAccelerationStructureModeKHR
Eq CopyAccelerationStructureModeKHR
-> (CopyAccelerationStructureModeKHR
-> CopyAccelerationStructureModeKHR -> Ordering)
-> (CopyAccelerationStructureModeKHR
-> CopyAccelerationStructureModeKHR -> Bool)
-> (CopyAccelerationStructureModeKHR
-> CopyAccelerationStructureModeKHR -> Bool)
-> (CopyAccelerationStructureModeKHR
-> CopyAccelerationStructureModeKHR -> Bool)
-> (CopyAccelerationStructureModeKHR
-> CopyAccelerationStructureModeKHR -> Bool)
-> (CopyAccelerationStructureModeKHR
-> CopyAccelerationStructureModeKHR
-> CopyAccelerationStructureModeKHR)
-> (CopyAccelerationStructureModeKHR
-> CopyAccelerationStructureModeKHR
-> CopyAccelerationStructureModeKHR)
-> Ord CopyAccelerationStructureModeKHR
CopyAccelerationStructureModeKHR
-> CopyAccelerationStructureModeKHR -> Bool
CopyAccelerationStructureModeKHR
-> CopyAccelerationStructureModeKHR -> Ordering
CopyAccelerationStructureModeKHR
-> CopyAccelerationStructureModeKHR
-> CopyAccelerationStructureModeKHR
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 :: CopyAccelerationStructureModeKHR
-> CopyAccelerationStructureModeKHR
-> CopyAccelerationStructureModeKHR
$cmin :: CopyAccelerationStructureModeKHR
-> CopyAccelerationStructureModeKHR
-> CopyAccelerationStructureModeKHR
max :: CopyAccelerationStructureModeKHR
-> CopyAccelerationStructureModeKHR
-> CopyAccelerationStructureModeKHR
$cmax :: CopyAccelerationStructureModeKHR
-> CopyAccelerationStructureModeKHR
-> CopyAccelerationStructureModeKHR
>= :: CopyAccelerationStructureModeKHR
-> CopyAccelerationStructureModeKHR -> Bool
$c>= :: CopyAccelerationStructureModeKHR
-> CopyAccelerationStructureModeKHR -> Bool
> :: CopyAccelerationStructureModeKHR
-> CopyAccelerationStructureModeKHR -> Bool
$c> :: CopyAccelerationStructureModeKHR
-> CopyAccelerationStructureModeKHR -> Bool
<= :: CopyAccelerationStructureModeKHR
-> CopyAccelerationStructureModeKHR -> Bool
$c<= :: CopyAccelerationStructureModeKHR
-> CopyAccelerationStructureModeKHR -> Bool
< :: CopyAccelerationStructureModeKHR
-> CopyAccelerationStructureModeKHR -> Bool
$c< :: CopyAccelerationStructureModeKHR
-> CopyAccelerationStructureModeKHR -> Bool
compare :: CopyAccelerationStructureModeKHR
-> CopyAccelerationStructureModeKHR -> Ordering
$ccompare :: CopyAccelerationStructureModeKHR
-> CopyAccelerationStructureModeKHR -> Ordering
Ord, Ptr CopyAccelerationStructureModeKHR
-> IO CopyAccelerationStructureModeKHR
Ptr CopyAccelerationStructureModeKHR
-> Int -> IO CopyAccelerationStructureModeKHR
Ptr CopyAccelerationStructureModeKHR
-> Int -> CopyAccelerationStructureModeKHR -> IO ()
Ptr CopyAccelerationStructureModeKHR
-> CopyAccelerationStructureModeKHR -> IO ()
CopyAccelerationStructureModeKHR -> Int
(CopyAccelerationStructureModeKHR -> Int)
-> (CopyAccelerationStructureModeKHR -> Int)
-> (Ptr CopyAccelerationStructureModeKHR
-> Int -> IO CopyAccelerationStructureModeKHR)
-> (Ptr CopyAccelerationStructureModeKHR
-> Int -> CopyAccelerationStructureModeKHR -> IO ())
-> (forall b. Ptr b -> Int -> IO CopyAccelerationStructureModeKHR)
-> (forall b.
Ptr b -> Int -> CopyAccelerationStructureModeKHR -> IO ())
-> (Ptr CopyAccelerationStructureModeKHR
-> IO CopyAccelerationStructureModeKHR)
-> (Ptr CopyAccelerationStructureModeKHR
-> CopyAccelerationStructureModeKHR -> IO ())
-> Storable CopyAccelerationStructureModeKHR
forall b. Ptr b -> Int -> IO CopyAccelerationStructureModeKHR
forall b. Ptr b -> Int -> CopyAccelerationStructureModeKHR -> 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 CopyAccelerationStructureModeKHR
-> CopyAccelerationStructureModeKHR -> IO ()
$cpoke :: Ptr CopyAccelerationStructureModeKHR
-> CopyAccelerationStructureModeKHR -> IO ()
peek :: Ptr CopyAccelerationStructureModeKHR
-> IO CopyAccelerationStructureModeKHR
$cpeek :: Ptr CopyAccelerationStructureModeKHR
-> IO CopyAccelerationStructureModeKHR
pokeByteOff :: forall b. Ptr b -> Int -> CopyAccelerationStructureModeKHR -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> CopyAccelerationStructureModeKHR -> IO ()
peekByteOff :: forall b. Ptr b -> Int -> IO CopyAccelerationStructureModeKHR
$cpeekByteOff :: forall b. Ptr b -> Int -> IO CopyAccelerationStructureModeKHR
pokeElemOff :: Ptr CopyAccelerationStructureModeKHR
-> Int -> CopyAccelerationStructureModeKHR -> IO ()
$cpokeElemOff :: Ptr CopyAccelerationStructureModeKHR
-> Int -> CopyAccelerationStructureModeKHR -> IO ()
peekElemOff :: Ptr CopyAccelerationStructureModeKHR
-> Int -> IO CopyAccelerationStructureModeKHR
$cpeekElemOff :: Ptr CopyAccelerationStructureModeKHR
-> Int -> IO CopyAccelerationStructureModeKHR
alignment :: CopyAccelerationStructureModeKHR -> Int
$calignment :: CopyAccelerationStructureModeKHR -> Int
sizeOf :: CopyAccelerationStructureModeKHR -> Int
$csizeOf :: CopyAccelerationStructureModeKHR -> Int
Storable, CopyAccelerationStructureModeKHR
CopyAccelerationStructureModeKHR
-> Zero CopyAccelerationStructureModeKHR
forall a. a -> Zero a
zero :: CopyAccelerationStructureModeKHR
$czero :: CopyAccelerationStructureModeKHR
Zero)
pattern $bCOPY_ACCELERATION_STRUCTURE_MODE_CLONE_KHR :: CopyAccelerationStructureModeKHR
$mCOPY_ACCELERATION_STRUCTURE_MODE_CLONE_KHR :: forall {r}.
CopyAccelerationStructureModeKHR
-> (Void# -> r) -> (Void# -> r) -> r
COPY_ACCELERATION_STRUCTURE_MODE_CLONE_KHR = CopyAccelerationStructureModeKHR 0
pattern $bCOPY_ACCELERATION_STRUCTURE_MODE_COMPACT_KHR :: CopyAccelerationStructureModeKHR
$mCOPY_ACCELERATION_STRUCTURE_MODE_COMPACT_KHR :: forall {r}.
CopyAccelerationStructureModeKHR
-> (Void# -> r) -> (Void# -> r) -> r
COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_KHR = CopyAccelerationStructureModeKHR 1
pattern $bCOPY_ACCELERATION_STRUCTURE_MODE_SERIALIZE_KHR :: CopyAccelerationStructureModeKHR
$mCOPY_ACCELERATION_STRUCTURE_MODE_SERIALIZE_KHR :: forall {r}.
CopyAccelerationStructureModeKHR
-> (Void# -> r) -> (Void# -> r) -> r
COPY_ACCELERATION_STRUCTURE_MODE_SERIALIZE_KHR = CopyAccelerationStructureModeKHR 2
pattern $bCOPY_ACCELERATION_STRUCTURE_MODE_DESERIALIZE_KHR :: CopyAccelerationStructureModeKHR
$mCOPY_ACCELERATION_STRUCTURE_MODE_DESERIALIZE_KHR :: forall {r}.
CopyAccelerationStructureModeKHR
-> (Void# -> r) -> (Void# -> r) -> r
COPY_ACCELERATION_STRUCTURE_MODE_DESERIALIZE_KHR = CopyAccelerationStructureModeKHR 3
{-# COMPLETE
COPY_ACCELERATION_STRUCTURE_MODE_CLONE_KHR
, COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_KHR
, COPY_ACCELERATION_STRUCTURE_MODE_SERIALIZE_KHR
, COPY_ACCELERATION_STRUCTURE_MODE_DESERIALIZE_KHR ::
CopyAccelerationStructureModeKHR
#-}
conNameCopyAccelerationStructureModeKHR :: String
conNameCopyAccelerationStructureModeKHR :: String
conNameCopyAccelerationStructureModeKHR = String
"CopyAccelerationStructureModeKHR"
enumPrefixCopyAccelerationStructureModeKHR :: String
enumPrefixCopyAccelerationStructureModeKHR :: String
enumPrefixCopyAccelerationStructureModeKHR = String
"COPY_ACCELERATION_STRUCTURE_MODE_"
showTableCopyAccelerationStructureModeKHR :: [(CopyAccelerationStructureModeKHR, String)]
showTableCopyAccelerationStructureModeKHR :: [(CopyAccelerationStructureModeKHR, String)]
showTableCopyAccelerationStructureModeKHR =
[
( CopyAccelerationStructureModeKHR
COPY_ACCELERATION_STRUCTURE_MODE_CLONE_KHR
, String
"CLONE_KHR"
)
,
( CopyAccelerationStructureModeKHR
COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_KHR
, String
"COMPACT_KHR"
)
,
( CopyAccelerationStructureModeKHR
COPY_ACCELERATION_STRUCTURE_MODE_SERIALIZE_KHR
, String
"SERIALIZE_KHR"
)
,
( CopyAccelerationStructureModeKHR
COPY_ACCELERATION_STRUCTURE_MODE_DESERIALIZE_KHR
, String
"DESERIALIZE_KHR"
)
]
instance Show CopyAccelerationStructureModeKHR where
showsPrec :: Int -> CopyAccelerationStructureModeKHR -> ShowS
showsPrec =
String
-> [(CopyAccelerationStructureModeKHR, String)]
-> String
-> (CopyAccelerationStructureModeKHR -> Int32)
-> (Int32 -> ShowS)
-> Int
-> CopyAccelerationStructureModeKHR
-> ShowS
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec
String
enumPrefixCopyAccelerationStructureModeKHR
[(CopyAccelerationStructureModeKHR, String)]
showTableCopyAccelerationStructureModeKHR
String
conNameCopyAccelerationStructureModeKHR
(\(CopyAccelerationStructureModeKHR Int32
x) -> Int32
x)
(Int -> Int32 -> ShowS
forall a. Show a => Int -> a -> ShowS
showsPrec Int
11)
instance Read CopyAccelerationStructureModeKHR where
readPrec :: ReadPrec CopyAccelerationStructureModeKHR
readPrec =
String
-> [(CopyAccelerationStructureModeKHR, String)]
-> String
-> (Int32 -> CopyAccelerationStructureModeKHR)
-> ReadPrec CopyAccelerationStructureModeKHR
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec
String
enumPrefixCopyAccelerationStructureModeKHR
[(CopyAccelerationStructureModeKHR, String)]
showTableCopyAccelerationStructureModeKHR
String
conNameCopyAccelerationStructureModeKHR
Int32 -> CopyAccelerationStructureModeKHR
CopyAccelerationStructureModeKHR
newtype BuildAccelerationStructureModeKHR = BuildAccelerationStructureModeKHR Int32
deriving newtype (BuildAccelerationStructureModeKHR
-> BuildAccelerationStructureModeKHR -> Bool
(BuildAccelerationStructureModeKHR
-> BuildAccelerationStructureModeKHR -> Bool)
-> (BuildAccelerationStructureModeKHR
-> BuildAccelerationStructureModeKHR -> Bool)
-> Eq BuildAccelerationStructureModeKHR
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BuildAccelerationStructureModeKHR
-> BuildAccelerationStructureModeKHR -> Bool
$c/= :: BuildAccelerationStructureModeKHR
-> BuildAccelerationStructureModeKHR -> Bool
== :: BuildAccelerationStructureModeKHR
-> BuildAccelerationStructureModeKHR -> Bool
$c== :: BuildAccelerationStructureModeKHR
-> BuildAccelerationStructureModeKHR -> Bool
Eq, Eq BuildAccelerationStructureModeKHR
Eq BuildAccelerationStructureModeKHR
-> (BuildAccelerationStructureModeKHR
-> BuildAccelerationStructureModeKHR -> Ordering)
-> (BuildAccelerationStructureModeKHR
-> BuildAccelerationStructureModeKHR -> Bool)
-> (BuildAccelerationStructureModeKHR
-> BuildAccelerationStructureModeKHR -> Bool)
-> (BuildAccelerationStructureModeKHR
-> BuildAccelerationStructureModeKHR -> Bool)
-> (BuildAccelerationStructureModeKHR
-> BuildAccelerationStructureModeKHR -> Bool)
-> (BuildAccelerationStructureModeKHR
-> BuildAccelerationStructureModeKHR
-> BuildAccelerationStructureModeKHR)
-> (BuildAccelerationStructureModeKHR
-> BuildAccelerationStructureModeKHR
-> BuildAccelerationStructureModeKHR)
-> Ord BuildAccelerationStructureModeKHR
BuildAccelerationStructureModeKHR
-> BuildAccelerationStructureModeKHR -> Bool
BuildAccelerationStructureModeKHR
-> BuildAccelerationStructureModeKHR -> Ordering
BuildAccelerationStructureModeKHR
-> BuildAccelerationStructureModeKHR
-> BuildAccelerationStructureModeKHR
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 :: BuildAccelerationStructureModeKHR
-> BuildAccelerationStructureModeKHR
-> BuildAccelerationStructureModeKHR
$cmin :: BuildAccelerationStructureModeKHR
-> BuildAccelerationStructureModeKHR
-> BuildAccelerationStructureModeKHR
max :: BuildAccelerationStructureModeKHR
-> BuildAccelerationStructureModeKHR
-> BuildAccelerationStructureModeKHR
$cmax :: BuildAccelerationStructureModeKHR
-> BuildAccelerationStructureModeKHR
-> BuildAccelerationStructureModeKHR
>= :: BuildAccelerationStructureModeKHR
-> BuildAccelerationStructureModeKHR -> Bool
$c>= :: BuildAccelerationStructureModeKHR
-> BuildAccelerationStructureModeKHR -> Bool
> :: BuildAccelerationStructureModeKHR
-> BuildAccelerationStructureModeKHR -> Bool
$c> :: BuildAccelerationStructureModeKHR
-> BuildAccelerationStructureModeKHR -> Bool
<= :: BuildAccelerationStructureModeKHR
-> BuildAccelerationStructureModeKHR -> Bool
$c<= :: BuildAccelerationStructureModeKHR
-> BuildAccelerationStructureModeKHR -> Bool
< :: BuildAccelerationStructureModeKHR
-> BuildAccelerationStructureModeKHR -> Bool
$c< :: BuildAccelerationStructureModeKHR
-> BuildAccelerationStructureModeKHR -> Bool
compare :: BuildAccelerationStructureModeKHR
-> BuildAccelerationStructureModeKHR -> Ordering
$ccompare :: BuildAccelerationStructureModeKHR
-> BuildAccelerationStructureModeKHR -> Ordering
Ord, Ptr BuildAccelerationStructureModeKHR
-> IO BuildAccelerationStructureModeKHR
Ptr BuildAccelerationStructureModeKHR
-> Int -> IO BuildAccelerationStructureModeKHR
Ptr BuildAccelerationStructureModeKHR
-> Int -> BuildAccelerationStructureModeKHR -> IO ()
Ptr BuildAccelerationStructureModeKHR
-> BuildAccelerationStructureModeKHR -> IO ()
BuildAccelerationStructureModeKHR -> Int
(BuildAccelerationStructureModeKHR -> Int)
-> (BuildAccelerationStructureModeKHR -> Int)
-> (Ptr BuildAccelerationStructureModeKHR
-> Int -> IO BuildAccelerationStructureModeKHR)
-> (Ptr BuildAccelerationStructureModeKHR
-> Int -> BuildAccelerationStructureModeKHR -> IO ())
-> (forall b. Ptr b -> Int -> IO BuildAccelerationStructureModeKHR)
-> (forall b.
Ptr b -> Int -> BuildAccelerationStructureModeKHR -> IO ())
-> (Ptr BuildAccelerationStructureModeKHR
-> IO BuildAccelerationStructureModeKHR)
-> (Ptr BuildAccelerationStructureModeKHR
-> BuildAccelerationStructureModeKHR -> IO ())
-> Storable BuildAccelerationStructureModeKHR
forall b. Ptr b -> Int -> IO BuildAccelerationStructureModeKHR
forall b.
Ptr b -> Int -> BuildAccelerationStructureModeKHR -> 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 BuildAccelerationStructureModeKHR
-> BuildAccelerationStructureModeKHR -> IO ()
$cpoke :: Ptr BuildAccelerationStructureModeKHR
-> BuildAccelerationStructureModeKHR -> IO ()
peek :: Ptr BuildAccelerationStructureModeKHR
-> IO BuildAccelerationStructureModeKHR
$cpeek :: Ptr BuildAccelerationStructureModeKHR
-> IO BuildAccelerationStructureModeKHR
pokeByteOff :: forall b.
Ptr b -> Int -> BuildAccelerationStructureModeKHR -> IO ()
$cpokeByteOff :: forall b.
Ptr b -> Int -> BuildAccelerationStructureModeKHR -> IO ()
peekByteOff :: forall b. Ptr b -> Int -> IO BuildAccelerationStructureModeKHR
$cpeekByteOff :: forall b. Ptr b -> Int -> IO BuildAccelerationStructureModeKHR
pokeElemOff :: Ptr BuildAccelerationStructureModeKHR
-> Int -> BuildAccelerationStructureModeKHR -> IO ()
$cpokeElemOff :: Ptr BuildAccelerationStructureModeKHR
-> Int -> BuildAccelerationStructureModeKHR -> IO ()
peekElemOff :: Ptr BuildAccelerationStructureModeKHR
-> Int -> IO BuildAccelerationStructureModeKHR
$cpeekElemOff :: Ptr BuildAccelerationStructureModeKHR
-> Int -> IO BuildAccelerationStructureModeKHR
alignment :: BuildAccelerationStructureModeKHR -> Int
$calignment :: BuildAccelerationStructureModeKHR -> Int
sizeOf :: BuildAccelerationStructureModeKHR -> Int
$csizeOf :: BuildAccelerationStructureModeKHR -> Int
Storable, BuildAccelerationStructureModeKHR
BuildAccelerationStructureModeKHR
-> Zero BuildAccelerationStructureModeKHR
forall a. a -> Zero a
zero :: BuildAccelerationStructureModeKHR
$czero :: BuildAccelerationStructureModeKHR
Zero)
pattern $bBUILD_ACCELERATION_STRUCTURE_MODE_BUILD_KHR :: BuildAccelerationStructureModeKHR
$mBUILD_ACCELERATION_STRUCTURE_MODE_BUILD_KHR :: forall {r}.
BuildAccelerationStructureModeKHR
-> (Void# -> r) -> (Void# -> r) -> r
BUILD_ACCELERATION_STRUCTURE_MODE_BUILD_KHR = BuildAccelerationStructureModeKHR 0
pattern $bBUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR :: BuildAccelerationStructureModeKHR
$mBUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR :: forall {r}.
BuildAccelerationStructureModeKHR
-> (Void# -> r) -> (Void# -> r) -> r
BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR = BuildAccelerationStructureModeKHR 1
{-# COMPLETE
BUILD_ACCELERATION_STRUCTURE_MODE_BUILD_KHR
, BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR ::
BuildAccelerationStructureModeKHR
#-}
conNameBuildAccelerationStructureModeKHR :: String
conNameBuildAccelerationStructureModeKHR :: String
conNameBuildAccelerationStructureModeKHR = String
"BuildAccelerationStructureModeKHR"
enumPrefixBuildAccelerationStructureModeKHR :: String
enumPrefixBuildAccelerationStructureModeKHR :: String
enumPrefixBuildAccelerationStructureModeKHR = String
"BUILD_ACCELERATION_STRUCTURE_MODE_"
showTableBuildAccelerationStructureModeKHR :: [(BuildAccelerationStructureModeKHR, String)]
showTableBuildAccelerationStructureModeKHR :: [(BuildAccelerationStructureModeKHR, String)]
showTableBuildAccelerationStructureModeKHR =
[
( BuildAccelerationStructureModeKHR
BUILD_ACCELERATION_STRUCTURE_MODE_BUILD_KHR
, String
"BUILD_KHR"
)
,
( BuildAccelerationStructureModeKHR
BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR
, String
"UPDATE_KHR"
)
]
instance Show BuildAccelerationStructureModeKHR where
showsPrec :: Int -> BuildAccelerationStructureModeKHR -> ShowS
showsPrec =
String
-> [(BuildAccelerationStructureModeKHR, String)]
-> String
-> (BuildAccelerationStructureModeKHR -> Int32)
-> (Int32 -> ShowS)
-> Int
-> BuildAccelerationStructureModeKHR
-> ShowS
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec
String
enumPrefixBuildAccelerationStructureModeKHR
[(BuildAccelerationStructureModeKHR, String)]
showTableBuildAccelerationStructureModeKHR
String
conNameBuildAccelerationStructureModeKHR
(\(BuildAccelerationStructureModeKHR Int32
x) -> Int32
x)
(Int -> Int32 -> ShowS
forall a. Show a => Int -> a -> ShowS
showsPrec Int
11)
instance Read BuildAccelerationStructureModeKHR where
readPrec :: ReadPrec BuildAccelerationStructureModeKHR
readPrec =
String
-> [(BuildAccelerationStructureModeKHR, String)]
-> String
-> (Int32 -> BuildAccelerationStructureModeKHR)
-> ReadPrec BuildAccelerationStructureModeKHR
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec
String
enumPrefixBuildAccelerationStructureModeKHR
[(BuildAccelerationStructureModeKHR, String)]
showTableBuildAccelerationStructureModeKHR
String
conNameBuildAccelerationStructureModeKHR
Int32 -> BuildAccelerationStructureModeKHR
BuildAccelerationStructureModeKHR
newtype AccelerationStructureTypeKHR = AccelerationStructureTypeKHR Int32
deriving newtype (AccelerationStructureTypeKHR
-> AccelerationStructureTypeKHR -> Bool
(AccelerationStructureTypeKHR
-> AccelerationStructureTypeKHR -> Bool)
-> (AccelerationStructureTypeKHR
-> AccelerationStructureTypeKHR -> Bool)
-> Eq AccelerationStructureTypeKHR
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AccelerationStructureTypeKHR
-> AccelerationStructureTypeKHR -> Bool
$c/= :: AccelerationStructureTypeKHR
-> AccelerationStructureTypeKHR -> Bool
== :: AccelerationStructureTypeKHR
-> AccelerationStructureTypeKHR -> Bool
$c== :: AccelerationStructureTypeKHR
-> AccelerationStructureTypeKHR -> Bool
Eq, Eq AccelerationStructureTypeKHR
Eq AccelerationStructureTypeKHR
-> (AccelerationStructureTypeKHR
-> AccelerationStructureTypeKHR -> Ordering)
-> (AccelerationStructureTypeKHR
-> AccelerationStructureTypeKHR -> Bool)
-> (AccelerationStructureTypeKHR
-> AccelerationStructureTypeKHR -> Bool)
-> (AccelerationStructureTypeKHR
-> AccelerationStructureTypeKHR -> Bool)
-> (AccelerationStructureTypeKHR
-> AccelerationStructureTypeKHR -> Bool)
-> (AccelerationStructureTypeKHR
-> AccelerationStructureTypeKHR -> AccelerationStructureTypeKHR)
-> (AccelerationStructureTypeKHR
-> AccelerationStructureTypeKHR -> AccelerationStructureTypeKHR)
-> Ord AccelerationStructureTypeKHR
AccelerationStructureTypeKHR
-> AccelerationStructureTypeKHR -> Bool
AccelerationStructureTypeKHR
-> AccelerationStructureTypeKHR -> Ordering
AccelerationStructureTypeKHR
-> AccelerationStructureTypeKHR -> AccelerationStructureTypeKHR
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 :: AccelerationStructureTypeKHR
-> AccelerationStructureTypeKHR -> AccelerationStructureTypeKHR
$cmin :: AccelerationStructureTypeKHR
-> AccelerationStructureTypeKHR -> AccelerationStructureTypeKHR
max :: AccelerationStructureTypeKHR
-> AccelerationStructureTypeKHR -> AccelerationStructureTypeKHR
$cmax :: AccelerationStructureTypeKHR
-> AccelerationStructureTypeKHR -> AccelerationStructureTypeKHR
>= :: AccelerationStructureTypeKHR
-> AccelerationStructureTypeKHR -> Bool
$c>= :: AccelerationStructureTypeKHR
-> AccelerationStructureTypeKHR -> Bool
> :: AccelerationStructureTypeKHR
-> AccelerationStructureTypeKHR -> Bool
$c> :: AccelerationStructureTypeKHR
-> AccelerationStructureTypeKHR -> Bool
<= :: AccelerationStructureTypeKHR
-> AccelerationStructureTypeKHR -> Bool
$c<= :: AccelerationStructureTypeKHR
-> AccelerationStructureTypeKHR -> Bool
< :: AccelerationStructureTypeKHR
-> AccelerationStructureTypeKHR -> Bool
$c< :: AccelerationStructureTypeKHR
-> AccelerationStructureTypeKHR -> Bool
compare :: AccelerationStructureTypeKHR
-> AccelerationStructureTypeKHR -> Ordering
$ccompare :: AccelerationStructureTypeKHR
-> AccelerationStructureTypeKHR -> Ordering
Ord, Ptr AccelerationStructureTypeKHR -> IO AccelerationStructureTypeKHR
Ptr AccelerationStructureTypeKHR
-> Int -> IO AccelerationStructureTypeKHR
Ptr AccelerationStructureTypeKHR
-> Int -> AccelerationStructureTypeKHR -> IO ()
Ptr AccelerationStructureTypeKHR
-> AccelerationStructureTypeKHR -> IO ()
AccelerationStructureTypeKHR -> Int
(AccelerationStructureTypeKHR -> Int)
-> (AccelerationStructureTypeKHR -> Int)
-> (Ptr AccelerationStructureTypeKHR
-> Int -> IO AccelerationStructureTypeKHR)
-> (Ptr AccelerationStructureTypeKHR
-> Int -> AccelerationStructureTypeKHR -> IO ())
-> (forall b. Ptr b -> Int -> IO AccelerationStructureTypeKHR)
-> (forall b.
Ptr b -> Int -> AccelerationStructureTypeKHR -> IO ())
-> (Ptr AccelerationStructureTypeKHR
-> IO AccelerationStructureTypeKHR)
-> (Ptr AccelerationStructureTypeKHR
-> AccelerationStructureTypeKHR -> IO ())
-> Storable AccelerationStructureTypeKHR
forall b. Ptr b -> Int -> IO AccelerationStructureTypeKHR
forall b. Ptr b -> Int -> AccelerationStructureTypeKHR -> 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 AccelerationStructureTypeKHR
-> AccelerationStructureTypeKHR -> IO ()
$cpoke :: Ptr AccelerationStructureTypeKHR
-> AccelerationStructureTypeKHR -> IO ()
peek :: Ptr AccelerationStructureTypeKHR -> IO AccelerationStructureTypeKHR
$cpeek :: Ptr AccelerationStructureTypeKHR -> IO AccelerationStructureTypeKHR
pokeByteOff :: forall b. Ptr b -> Int -> AccelerationStructureTypeKHR -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> AccelerationStructureTypeKHR -> IO ()
peekByteOff :: forall b. Ptr b -> Int -> IO AccelerationStructureTypeKHR
$cpeekByteOff :: forall b. Ptr b -> Int -> IO AccelerationStructureTypeKHR
pokeElemOff :: Ptr AccelerationStructureTypeKHR
-> Int -> AccelerationStructureTypeKHR -> IO ()
$cpokeElemOff :: Ptr AccelerationStructureTypeKHR
-> Int -> AccelerationStructureTypeKHR -> IO ()
peekElemOff :: Ptr AccelerationStructureTypeKHR
-> Int -> IO AccelerationStructureTypeKHR
$cpeekElemOff :: Ptr AccelerationStructureTypeKHR
-> Int -> IO AccelerationStructureTypeKHR
alignment :: AccelerationStructureTypeKHR -> Int
$calignment :: AccelerationStructureTypeKHR -> Int
sizeOf :: AccelerationStructureTypeKHR -> Int
$csizeOf :: AccelerationStructureTypeKHR -> Int
Storable, AccelerationStructureTypeKHR
AccelerationStructureTypeKHR -> Zero AccelerationStructureTypeKHR
forall a. a -> Zero a
zero :: AccelerationStructureTypeKHR
$czero :: AccelerationStructureTypeKHR
Zero)
pattern $bACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_KHR :: AccelerationStructureTypeKHR
$mACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_KHR :: forall {r}.
AccelerationStructureTypeKHR -> (Void# -> r) -> (Void# -> r) -> r
ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_KHR = AccelerationStructureTypeKHR 0
pattern $bACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_KHR :: AccelerationStructureTypeKHR
$mACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_KHR :: forall {r}.
AccelerationStructureTypeKHR -> (Void# -> r) -> (Void# -> r) -> r
ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_KHR = AccelerationStructureTypeKHR 1
pattern $bACCELERATION_STRUCTURE_TYPE_GENERIC_KHR :: AccelerationStructureTypeKHR
$mACCELERATION_STRUCTURE_TYPE_GENERIC_KHR :: forall {r}.
AccelerationStructureTypeKHR -> (Void# -> r) -> (Void# -> r) -> r
ACCELERATION_STRUCTURE_TYPE_GENERIC_KHR = AccelerationStructureTypeKHR 2
{-# COMPLETE
ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_KHR
, ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_KHR
, ACCELERATION_STRUCTURE_TYPE_GENERIC_KHR ::
AccelerationStructureTypeKHR
#-}
conNameAccelerationStructureTypeKHR :: String
conNameAccelerationStructureTypeKHR :: String
conNameAccelerationStructureTypeKHR = String
"AccelerationStructureTypeKHR"
enumPrefixAccelerationStructureTypeKHR :: String
enumPrefixAccelerationStructureTypeKHR :: String
enumPrefixAccelerationStructureTypeKHR = String
"ACCELERATION_STRUCTURE_TYPE_"
showTableAccelerationStructureTypeKHR :: [(AccelerationStructureTypeKHR, String)]
showTableAccelerationStructureTypeKHR :: [(AccelerationStructureTypeKHR, String)]
showTableAccelerationStructureTypeKHR =
[
( AccelerationStructureTypeKHR
ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_KHR
, String
"TOP_LEVEL_KHR"
)
,
( AccelerationStructureTypeKHR
ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_KHR
, String
"BOTTOM_LEVEL_KHR"
)
,
( AccelerationStructureTypeKHR
ACCELERATION_STRUCTURE_TYPE_GENERIC_KHR
, String
"GENERIC_KHR"
)
]
instance Show AccelerationStructureTypeKHR where
showsPrec :: Int -> AccelerationStructureTypeKHR -> ShowS
showsPrec =
String
-> [(AccelerationStructureTypeKHR, String)]
-> String
-> (AccelerationStructureTypeKHR -> Int32)
-> (Int32 -> ShowS)
-> Int
-> AccelerationStructureTypeKHR
-> ShowS
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec
String
enumPrefixAccelerationStructureTypeKHR
[(AccelerationStructureTypeKHR, String)]
showTableAccelerationStructureTypeKHR
String
conNameAccelerationStructureTypeKHR
(\(AccelerationStructureTypeKHR Int32
x) -> Int32
x)
(Int -> Int32 -> ShowS
forall a. Show a => Int -> a -> ShowS
showsPrec Int
11)
instance Read AccelerationStructureTypeKHR where
readPrec :: ReadPrec AccelerationStructureTypeKHR
readPrec =
String
-> [(AccelerationStructureTypeKHR, String)]
-> String
-> (Int32 -> AccelerationStructureTypeKHR)
-> ReadPrec AccelerationStructureTypeKHR
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec
String
enumPrefixAccelerationStructureTypeKHR
[(AccelerationStructureTypeKHR, String)]
showTableAccelerationStructureTypeKHR
String
conNameAccelerationStructureTypeKHR
Int32 -> AccelerationStructureTypeKHR
AccelerationStructureTypeKHR
newtype GeometryTypeKHR = GeometryTypeKHR Int32
deriving newtype (GeometryTypeKHR -> GeometryTypeKHR -> Bool
(GeometryTypeKHR -> GeometryTypeKHR -> Bool)
-> (GeometryTypeKHR -> GeometryTypeKHR -> Bool)
-> Eq GeometryTypeKHR
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GeometryTypeKHR -> GeometryTypeKHR -> Bool
$c/= :: GeometryTypeKHR -> GeometryTypeKHR -> Bool
== :: GeometryTypeKHR -> GeometryTypeKHR -> Bool
$c== :: GeometryTypeKHR -> GeometryTypeKHR -> Bool
Eq, Eq GeometryTypeKHR
Eq GeometryTypeKHR
-> (GeometryTypeKHR -> GeometryTypeKHR -> Ordering)
-> (GeometryTypeKHR -> GeometryTypeKHR -> Bool)
-> (GeometryTypeKHR -> GeometryTypeKHR -> Bool)
-> (GeometryTypeKHR -> GeometryTypeKHR -> Bool)
-> (GeometryTypeKHR -> GeometryTypeKHR -> Bool)
-> (GeometryTypeKHR -> GeometryTypeKHR -> GeometryTypeKHR)
-> (GeometryTypeKHR -> GeometryTypeKHR -> GeometryTypeKHR)
-> Ord GeometryTypeKHR
GeometryTypeKHR -> GeometryTypeKHR -> Bool
GeometryTypeKHR -> GeometryTypeKHR -> Ordering
GeometryTypeKHR -> GeometryTypeKHR -> GeometryTypeKHR
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 :: GeometryTypeKHR -> GeometryTypeKHR -> GeometryTypeKHR
$cmin :: GeometryTypeKHR -> GeometryTypeKHR -> GeometryTypeKHR
max :: GeometryTypeKHR -> GeometryTypeKHR -> GeometryTypeKHR
$cmax :: GeometryTypeKHR -> GeometryTypeKHR -> GeometryTypeKHR
>= :: GeometryTypeKHR -> GeometryTypeKHR -> Bool
$c>= :: GeometryTypeKHR -> GeometryTypeKHR -> Bool
> :: GeometryTypeKHR -> GeometryTypeKHR -> Bool
$c> :: GeometryTypeKHR -> GeometryTypeKHR -> Bool
<= :: GeometryTypeKHR -> GeometryTypeKHR -> Bool
$c<= :: GeometryTypeKHR -> GeometryTypeKHR -> Bool
< :: GeometryTypeKHR -> GeometryTypeKHR -> Bool
$c< :: GeometryTypeKHR -> GeometryTypeKHR -> Bool
compare :: GeometryTypeKHR -> GeometryTypeKHR -> Ordering
$ccompare :: GeometryTypeKHR -> GeometryTypeKHR -> Ordering
Ord, Ptr GeometryTypeKHR -> IO GeometryTypeKHR
Ptr GeometryTypeKHR -> Int -> IO GeometryTypeKHR
Ptr GeometryTypeKHR -> Int -> GeometryTypeKHR -> IO ()
Ptr GeometryTypeKHR -> GeometryTypeKHR -> IO ()
GeometryTypeKHR -> Int
(GeometryTypeKHR -> Int)
-> (GeometryTypeKHR -> Int)
-> (Ptr GeometryTypeKHR -> Int -> IO GeometryTypeKHR)
-> (Ptr GeometryTypeKHR -> Int -> GeometryTypeKHR -> IO ())
-> (forall b. Ptr b -> Int -> IO GeometryTypeKHR)
-> (forall b. Ptr b -> Int -> GeometryTypeKHR -> IO ())
-> (Ptr GeometryTypeKHR -> IO GeometryTypeKHR)
-> (Ptr GeometryTypeKHR -> GeometryTypeKHR -> IO ())
-> Storable GeometryTypeKHR
forall b. Ptr b -> Int -> IO GeometryTypeKHR
forall b. Ptr b -> Int -> GeometryTypeKHR -> 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 GeometryTypeKHR -> GeometryTypeKHR -> IO ()
$cpoke :: Ptr GeometryTypeKHR -> GeometryTypeKHR -> IO ()
peek :: Ptr GeometryTypeKHR -> IO GeometryTypeKHR
$cpeek :: Ptr GeometryTypeKHR -> IO GeometryTypeKHR
pokeByteOff :: forall b. Ptr b -> Int -> GeometryTypeKHR -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> GeometryTypeKHR -> IO ()
peekByteOff :: forall b. Ptr b -> Int -> IO GeometryTypeKHR
$cpeekByteOff :: forall b. Ptr b -> Int -> IO GeometryTypeKHR
pokeElemOff :: Ptr GeometryTypeKHR -> Int -> GeometryTypeKHR -> IO ()
$cpokeElemOff :: Ptr GeometryTypeKHR -> Int -> GeometryTypeKHR -> IO ()
peekElemOff :: Ptr GeometryTypeKHR -> Int -> IO GeometryTypeKHR
$cpeekElemOff :: Ptr GeometryTypeKHR -> Int -> IO GeometryTypeKHR
alignment :: GeometryTypeKHR -> Int
$calignment :: GeometryTypeKHR -> Int
sizeOf :: GeometryTypeKHR -> Int
$csizeOf :: GeometryTypeKHR -> Int
Storable, GeometryTypeKHR
GeometryTypeKHR -> Zero GeometryTypeKHR
forall a. a -> Zero a
zero :: GeometryTypeKHR
$czero :: GeometryTypeKHR
Zero)
pattern $bGEOMETRY_TYPE_TRIANGLES_KHR :: GeometryTypeKHR
$mGEOMETRY_TYPE_TRIANGLES_KHR :: forall {r}. GeometryTypeKHR -> (Void# -> r) -> (Void# -> r) -> r
GEOMETRY_TYPE_TRIANGLES_KHR = GeometryTypeKHR 0
pattern $bGEOMETRY_TYPE_AABBS_KHR :: GeometryTypeKHR
$mGEOMETRY_TYPE_AABBS_KHR :: forall {r}. GeometryTypeKHR -> (Void# -> r) -> (Void# -> r) -> r
GEOMETRY_TYPE_AABBS_KHR = GeometryTypeKHR 1
pattern $bGEOMETRY_TYPE_INSTANCES_KHR :: GeometryTypeKHR
$mGEOMETRY_TYPE_INSTANCES_KHR :: forall {r}. GeometryTypeKHR -> (Void# -> r) -> (Void# -> r) -> r
GEOMETRY_TYPE_INSTANCES_KHR = GeometryTypeKHR 2
{-# COMPLETE
GEOMETRY_TYPE_TRIANGLES_KHR
, GEOMETRY_TYPE_AABBS_KHR
, GEOMETRY_TYPE_INSTANCES_KHR ::
GeometryTypeKHR
#-}
conNameGeometryTypeKHR :: String
conNameGeometryTypeKHR :: String
conNameGeometryTypeKHR = String
"GeometryTypeKHR"
enumPrefixGeometryTypeKHR :: String
enumPrefixGeometryTypeKHR :: String
enumPrefixGeometryTypeKHR = String
"GEOMETRY_TYPE_"
showTableGeometryTypeKHR :: [(GeometryTypeKHR, String)]
showTableGeometryTypeKHR :: [(GeometryTypeKHR, String)]
showTableGeometryTypeKHR =
[ (GeometryTypeKHR
GEOMETRY_TYPE_TRIANGLES_KHR, String
"TRIANGLES_KHR")
, (GeometryTypeKHR
GEOMETRY_TYPE_AABBS_KHR, String
"AABBS_KHR")
, (GeometryTypeKHR
GEOMETRY_TYPE_INSTANCES_KHR, String
"INSTANCES_KHR")
]
instance Show GeometryTypeKHR where
showsPrec :: Int -> GeometryTypeKHR -> ShowS
showsPrec =
String
-> [(GeometryTypeKHR, String)]
-> String
-> (GeometryTypeKHR -> Int32)
-> (Int32 -> ShowS)
-> Int
-> GeometryTypeKHR
-> ShowS
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec
String
enumPrefixGeometryTypeKHR
[(GeometryTypeKHR, String)]
showTableGeometryTypeKHR
String
conNameGeometryTypeKHR
(\(GeometryTypeKHR Int32
x) -> Int32
x)
(Int -> Int32 -> ShowS
forall a. Show a => Int -> a -> ShowS
showsPrec Int
11)
instance Read GeometryTypeKHR where
readPrec :: ReadPrec GeometryTypeKHR
readPrec =
String
-> [(GeometryTypeKHR, String)]
-> String
-> (Int32 -> GeometryTypeKHR)
-> ReadPrec GeometryTypeKHR
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec
String
enumPrefixGeometryTypeKHR
[(GeometryTypeKHR, String)]
showTableGeometryTypeKHR
String
conNameGeometryTypeKHR
Int32 -> GeometryTypeKHR
GeometryTypeKHR
newtype AccelerationStructureBuildTypeKHR = AccelerationStructureBuildTypeKHR Int32
deriving newtype (AccelerationStructureBuildTypeKHR
-> AccelerationStructureBuildTypeKHR -> Bool
(AccelerationStructureBuildTypeKHR
-> AccelerationStructureBuildTypeKHR -> Bool)
-> (AccelerationStructureBuildTypeKHR
-> AccelerationStructureBuildTypeKHR -> Bool)
-> Eq AccelerationStructureBuildTypeKHR
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AccelerationStructureBuildTypeKHR
-> AccelerationStructureBuildTypeKHR -> Bool
$c/= :: AccelerationStructureBuildTypeKHR
-> AccelerationStructureBuildTypeKHR -> Bool
== :: AccelerationStructureBuildTypeKHR
-> AccelerationStructureBuildTypeKHR -> Bool
$c== :: AccelerationStructureBuildTypeKHR
-> AccelerationStructureBuildTypeKHR -> Bool
Eq, Eq AccelerationStructureBuildTypeKHR
Eq AccelerationStructureBuildTypeKHR
-> (AccelerationStructureBuildTypeKHR
-> AccelerationStructureBuildTypeKHR -> Ordering)
-> (AccelerationStructureBuildTypeKHR
-> AccelerationStructureBuildTypeKHR -> Bool)
-> (AccelerationStructureBuildTypeKHR
-> AccelerationStructureBuildTypeKHR -> Bool)
-> (AccelerationStructureBuildTypeKHR
-> AccelerationStructureBuildTypeKHR -> Bool)
-> (AccelerationStructureBuildTypeKHR
-> AccelerationStructureBuildTypeKHR -> Bool)
-> (AccelerationStructureBuildTypeKHR
-> AccelerationStructureBuildTypeKHR
-> AccelerationStructureBuildTypeKHR)
-> (AccelerationStructureBuildTypeKHR
-> AccelerationStructureBuildTypeKHR
-> AccelerationStructureBuildTypeKHR)
-> Ord AccelerationStructureBuildTypeKHR
AccelerationStructureBuildTypeKHR
-> AccelerationStructureBuildTypeKHR -> Bool
AccelerationStructureBuildTypeKHR
-> AccelerationStructureBuildTypeKHR -> Ordering
AccelerationStructureBuildTypeKHR
-> AccelerationStructureBuildTypeKHR
-> AccelerationStructureBuildTypeKHR
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 :: AccelerationStructureBuildTypeKHR
-> AccelerationStructureBuildTypeKHR
-> AccelerationStructureBuildTypeKHR
$cmin :: AccelerationStructureBuildTypeKHR
-> AccelerationStructureBuildTypeKHR
-> AccelerationStructureBuildTypeKHR
max :: AccelerationStructureBuildTypeKHR
-> AccelerationStructureBuildTypeKHR
-> AccelerationStructureBuildTypeKHR
$cmax :: AccelerationStructureBuildTypeKHR
-> AccelerationStructureBuildTypeKHR
-> AccelerationStructureBuildTypeKHR
>= :: AccelerationStructureBuildTypeKHR
-> AccelerationStructureBuildTypeKHR -> Bool
$c>= :: AccelerationStructureBuildTypeKHR
-> AccelerationStructureBuildTypeKHR -> Bool
> :: AccelerationStructureBuildTypeKHR
-> AccelerationStructureBuildTypeKHR -> Bool
$c> :: AccelerationStructureBuildTypeKHR
-> AccelerationStructureBuildTypeKHR -> Bool
<= :: AccelerationStructureBuildTypeKHR
-> AccelerationStructureBuildTypeKHR -> Bool
$c<= :: AccelerationStructureBuildTypeKHR
-> AccelerationStructureBuildTypeKHR -> Bool
< :: AccelerationStructureBuildTypeKHR
-> AccelerationStructureBuildTypeKHR -> Bool
$c< :: AccelerationStructureBuildTypeKHR
-> AccelerationStructureBuildTypeKHR -> Bool
compare :: AccelerationStructureBuildTypeKHR
-> AccelerationStructureBuildTypeKHR -> Ordering
$ccompare :: AccelerationStructureBuildTypeKHR
-> AccelerationStructureBuildTypeKHR -> Ordering
Ord, Ptr AccelerationStructureBuildTypeKHR
-> IO AccelerationStructureBuildTypeKHR
Ptr AccelerationStructureBuildTypeKHR
-> Int -> IO AccelerationStructureBuildTypeKHR
Ptr AccelerationStructureBuildTypeKHR
-> Int -> AccelerationStructureBuildTypeKHR -> IO ()
Ptr AccelerationStructureBuildTypeKHR
-> AccelerationStructureBuildTypeKHR -> IO ()
AccelerationStructureBuildTypeKHR -> Int
(AccelerationStructureBuildTypeKHR -> Int)
-> (AccelerationStructureBuildTypeKHR -> Int)
-> (Ptr AccelerationStructureBuildTypeKHR
-> Int -> IO AccelerationStructureBuildTypeKHR)
-> (Ptr AccelerationStructureBuildTypeKHR
-> Int -> AccelerationStructureBuildTypeKHR -> IO ())
-> (forall b. Ptr b -> Int -> IO AccelerationStructureBuildTypeKHR)
-> (forall b.
Ptr b -> Int -> AccelerationStructureBuildTypeKHR -> IO ())
-> (Ptr AccelerationStructureBuildTypeKHR
-> IO AccelerationStructureBuildTypeKHR)
-> (Ptr AccelerationStructureBuildTypeKHR
-> AccelerationStructureBuildTypeKHR -> IO ())
-> Storable AccelerationStructureBuildTypeKHR
forall b. Ptr b -> Int -> IO AccelerationStructureBuildTypeKHR
forall b.
Ptr b -> Int -> AccelerationStructureBuildTypeKHR -> 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 AccelerationStructureBuildTypeKHR
-> AccelerationStructureBuildTypeKHR -> IO ()
$cpoke :: Ptr AccelerationStructureBuildTypeKHR
-> AccelerationStructureBuildTypeKHR -> IO ()
peek :: Ptr AccelerationStructureBuildTypeKHR
-> IO AccelerationStructureBuildTypeKHR
$cpeek :: Ptr AccelerationStructureBuildTypeKHR
-> IO AccelerationStructureBuildTypeKHR
pokeByteOff :: forall b.
Ptr b -> Int -> AccelerationStructureBuildTypeKHR -> IO ()
$cpokeByteOff :: forall b.
Ptr b -> Int -> AccelerationStructureBuildTypeKHR -> IO ()
peekByteOff :: forall b. Ptr b -> Int -> IO AccelerationStructureBuildTypeKHR
$cpeekByteOff :: forall b. Ptr b -> Int -> IO AccelerationStructureBuildTypeKHR
pokeElemOff :: Ptr AccelerationStructureBuildTypeKHR
-> Int -> AccelerationStructureBuildTypeKHR -> IO ()
$cpokeElemOff :: Ptr AccelerationStructureBuildTypeKHR
-> Int -> AccelerationStructureBuildTypeKHR -> IO ()
peekElemOff :: Ptr AccelerationStructureBuildTypeKHR
-> Int -> IO AccelerationStructureBuildTypeKHR
$cpeekElemOff :: Ptr AccelerationStructureBuildTypeKHR
-> Int -> IO AccelerationStructureBuildTypeKHR
alignment :: AccelerationStructureBuildTypeKHR -> Int
$calignment :: AccelerationStructureBuildTypeKHR -> Int
sizeOf :: AccelerationStructureBuildTypeKHR -> Int
$csizeOf :: AccelerationStructureBuildTypeKHR -> Int
Storable, AccelerationStructureBuildTypeKHR
AccelerationStructureBuildTypeKHR
-> Zero AccelerationStructureBuildTypeKHR
forall a. a -> Zero a
zero :: AccelerationStructureBuildTypeKHR
$czero :: AccelerationStructureBuildTypeKHR
Zero)
pattern $bACCELERATION_STRUCTURE_BUILD_TYPE_HOST_KHR :: AccelerationStructureBuildTypeKHR
$mACCELERATION_STRUCTURE_BUILD_TYPE_HOST_KHR :: forall {r}.
AccelerationStructureBuildTypeKHR
-> (Void# -> r) -> (Void# -> r) -> r
ACCELERATION_STRUCTURE_BUILD_TYPE_HOST_KHR = AccelerationStructureBuildTypeKHR 0
pattern $bACCELERATION_STRUCTURE_BUILD_TYPE_DEVICE_KHR :: AccelerationStructureBuildTypeKHR
$mACCELERATION_STRUCTURE_BUILD_TYPE_DEVICE_KHR :: forall {r}.
AccelerationStructureBuildTypeKHR
-> (Void# -> r) -> (Void# -> r) -> r
ACCELERATION_STRUCTURE_BUILD_TYPE_DEVICE_KHR = AccelerationStructureBuildTypeKHR 1
pattern $bACCELERATION_STRUCTURE_BUILD_TYPE_HOST_OR_DEVICE_KHR :: AccelerationStructureBuildTypeKHR
$mACCELERATION_STRUCTURE_BUILD_TYPE_HOST_OR_DEVICE_KHR :: forall {r}.
AccelerationStructureBuildTypeKHR
-> (Void# -> r) -> (Void# -> r) -> r
ACCELERATION_STRUCTURE_BUILD_TYPE_HOST_OR_DEVICE_KHR = AccelerationStructureBuildTypeKHR 2
{-# COMPLETE
ACCELERATION_STRUCTURE_BUILD_TYPE_HOST_KHR
, ACCELERATION_STRUCTURE_BUILD_TYPE_DEVICE_KHR
, ACCELERATION_STRUCTURE_BUILD_TYPE_HOST_OR_DEVICE_KHR ::
AccelerationStructureBuildTypeKHR
#-}
conNameAccelerationStructureBuildTypeKHR :: String
conNameAccelerationStructureBuildTypeKHR :: String
conNameAccelerationStructureBuildTypeKHR = String
"AccelerationStructureBuildTypeKHR"
enumPrefixAccelerationStructureBuildTypeKHR :: String
enumPrefixAccelerationStructureBuildTypeKHR :: String
enumPrefixAccelerationStructureBuildTypeKHR = String
"ACCELERATION_STRUCTURE_BUILD_TYPE_"
showTableAccelerationStructureBuildTypeKHR :: [(AccelerationStructureBuildTypeKHR, String)]
showTableAccelerationStructureBuildTypeKHR :: [(AccelerationStructureBuildTypeKHR, String)]
showTableAccelerationStructureBuildTypeKHR =
[
( AccelerationStructureBuildTypeKHR
ACCELERATION_STRUCTURE_BUILD_TYPE_HOST_KHR
, String
"HOST_KHR"
)
,
( AccelerationStructureBuildTypeKHR
ACCELERATION_STRUCTURE_BUILD_TYPE_DEVICE_KHR
, String
"DEVICE_KHR"
)
,
( AccelerationStructureBuildTypeKHR
ACCELERATION_STRUCTURE_BUILD_TYPE_HOST_OR_DEVICE_KHR
, String
"HOST_OR_DEVICE_KHR"
)
]
instance Show AccelerationStructureBuildTypeKHR where
showsPrec :: Int -> AccelerationStructureBuildTypeKHR -> ShowS
showsPrec =
String
-> [(AccelerationStructureBuildTypeKHR, String)]
-> String
-> (AccelerationStructureBuildTypeKHR -> Int32)
-> (Int32 -> ShowS)
-> Int
-> AccelerationStructureBuildTypeKHR
-> ShowS
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec
String
enumPrefixAccelerationStructureBuildTypeKHR
[(AccelerationStructureBuildTypeKHR, String)]
showTableAccelerationStructureBuildTypeKHR
String
conNameAccelerationStructureBuildTypeKHR
(\(AccelerationStructureBuildTypeKHR Int32
x) -> Int32
x)
(Int -> Int32 -> ShowS
forall a. Show a => Int -> a -> ShowS
showsPrec Int
11)
instance Read AccelerationStructureBuildTypeKHR where
readPrec :: ReadPrec AccelerationStructureBuildTypeKHR
readPrec =
String
-> [(AccelerationStructureBuildTypeKHR, String)]
-> String
-> (Int32 -> AccelerationStructureBuildTypeKHR)
-> ReadPrec AccelerationStructureBuildTypeKHR
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec
String
enumPrefixAccelerationStructureBuildTypeKHR
[(AccelerationStructureBuildTypeKHR, String)]
showTableAccelerationStructureBuildTypeKHR
String
conNameAccelerationStructureBuildTypeKHR
Int32 -> AccelerationStructureBuildTypeKHR
AccelerationStructureBuildTypeKHR
newtype AccelerationStructureCompatibilityKHR = AccelerationStructureCompatibilityKHR Int32
deriving newtype (AccelerationStructureCompatibilityKHR
-> AccelerationStructureCompatibilityKHR -> Bool
(AccelerationStructureCompatibilityKHR
-> AccelerationStructureCompatibilityKHR -> Bool)
-> (AccelerationStructureCompatibilityKHR
-> AccelerationStructureCompatibilityKHR -> Bool)
-> Eq AccelerationStructureCompatibilityKHR
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AccelerationStructureCompatibilityKHR
-> AccelerationStructureCompatibilityKHR -> Bool
$c/= :: AccelerationStructureCompatibilityKHR
-> AccelerationStructureCompatibilityKHR -> Bool
== :: AccelerationStructureCompatibilityKHR
-> AccelerationStructureCompatibilityKHR -> Bool
$c== :: AccelerationStructureCompatibilityKHR
-> AccelerationStructureCompatibilityKHR -> Bool
Eq, Eq AccelerationStructureCompatibilityKHR
Eq AccelerationStructureCompatibilityKHR
-> (AccelerationStructureCompatibilityKHR
-> AccelerationStructureCompatibilityKHR -> Ordering)
-> (AccelerationStructureCompatibilityKHR
-> AccelerationStructureCompatibilityKHR -> Bool)
-> (AccelerationStructureCompatibilityKHR
-> AccelerationStructureCompatibilityKHR -> Bool)
-> (AccelerationStructureCompatibilityKHR
-> AccelerationStructureCompatibilityKHR -> Bool)
-> (AccelerationStructureCompatibilityKHR
-> AccelerationStructureCompatibilityKHR -> Bool)
-> (AccelerationStructureCompatibilityKHR
-> AccelerationStructureCompatibilityKHR
-> AccelerationStructureCompatibilityKHR)
-> (AccelerationStructureCompatibilityKHR
-> AccelerationStructureCompatibilityKHR
-> AccelerationStructureCompatibilityKHR)
-> Ord AccelerationStructureCompatibilityKHR
AccelerationStructureCompatibilityKHR
-> AccelerationStructureCompatibilityKHR -> Bool
AccelerationStructureCompatibilityKHR
-> AccelerationStructureCompatibilityKHR -> Ordering
AccelerationStructureCompatibilityKHR
-> AccelerationStructureCompatibilityKHR
-> AccelerationStructureCompatibilityKHR
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 :: AccelerationStructureCompatibilityKHR
-> AccelerationStructureCompatibilityKHR
-> AccelerationStructureCompatibilityKHR
$cmin :: AccelerationStructureCompatibilityKHR
-> AccelerationStructureCompatibilityKHR
-> AccelerationStructureCompatibilityKHR
max :: AccelerationStructureCompatibilityKHR
-> AccelerationStructureCompatibilityKHR
-> AccelerationStructureCompatibilityKHR
$cmax :: AccelerationStructureCompatibilityKHR
-> AccelerationStructureCompatibilityKHR
-> AccelerationStructureCompatibilityKHR
>= :: AccelerationStructureCompatibilityKHR
-> AccelerationStructureCompatibilityKHR -> Bool
$c>= :: AccelerationStructureCompatibilityKHR
-> AccelerationStructureCompatibilityKHR -> Bool
> :: AccelerationStructureCompatibilityKHR
-> AccelerationStructureCompatibilityKHR -> Bool
$c> :: AccelerationStructureCompatibilityKHR
-> AccelerationStructureCompatibilityKHR -> Bool
<= :: AccelerationStructureCompatibilityKHR
-> AccelerationStructureCompatibilityKHR -> Bool
$c<= :: AccelerationStructureCompatibilityKHR
-> AccelerationStructureCompatibilityKHR -> Bool
< :: AccelerationStructureCompatibilityKHR
-> AccelerationStructureCompatibilityKHR -> Bool
$c< :: AccelerationStructureCompatibilityKHR
-> AccelerationStructureCompatibilityKHR -> Bool
compare :: AccelerationStructureCompatibilityKHR
-> AccelerationStructureCompatibilityKHR -> Ordering
$ccompare :: AccelerationStructureCompatibilityKHR
-> AccelerationStructureCompatibilityKHR -> Ordering
Ord, ("pCompatibility" ::: Ptr AccelerationStructureCompatibilityKHR)
-> IO AccelerationStructureCompatibilityKHR
("pCompatibility" ::: Ptr AccelerationStructureCompatibilityKHR)
-> Int -> IO AccelerationStructureCompatibilityKHR
("pCompatibility" ::: Ptr AccelerationStructureCompatibilityKHR)
-> Int -> AccelerationStructureCompatibilityKHR -> IO ()
("pCompatibility" ::: Ptr AccelerationStructureCompatibilityKHR)
-> AccelerationStructureCompatibilityKHR -> IO ()
AccelerationStructureCompatibilityKHR -> Int
(AccelerationStructureCompatibilityKHR -> Int)
-> (AccelerationStructureCompatibilityKHR -> Int)
-> (("pCompatibility"
::: Ptr AccelerationStructureCompatibilityKHR)
-> Int -> IO AccelerationStructureCompatibilityKHR)
-> (("pCompatibility"
::: Ptr AccelerationStructureCompatibilityKHR)
-> Int -> AccelerationStructureCompatibilityKHR -> IO ())
-> (forall b.
Ptr b -> Int -> IO AccelerationStructureCompatibilityKHR)
-> (forall b.
Ptr b -> Int -> AccelerationStructureCompatibilityKHR -> IO ())
-> (("pCompatibility"
::: Ptr AccelerationStructureCompatibilityKHR)
-> IO AccelerationStructureCompatibilityKHR)
-> (("pCompatibility"
::: Ptr AccelerationStructureCompatibilityKHR)
-> AccelerationStructureCompatibilityKHR -> IO ())
-> Storable AccelerationStructureCompatibilityKHR
forall b. Ptr b -> Int -> IO AccelerationStructureCompatibilityKHR
forall b.
Ptr b -> Int -> AccelerationStructureCompatibilityKHR -> 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 :: ("pCompatibility" ::: Ptr AccelerationStructureCompatibilityKHR)
-> AccelerationStructureCompatibilityKHR -> IO ()
$cpoke :: ("pCompatibility" ::: Ptr AccelerationStructureCompatibilityKHR)
-> AccelerationStructureCompatibilityKHR -> IO ()
peek :: ("pCompatibility" ::: Ptr AccelerationStructureCompatibilityKHR)
-> IO AccelerationStructureCompatibilityKHR
$cpeek :: ("pCompatibility" ::: Ptr AccelerationStructureCompatibilityKHR)
-> IO AccelerationStructureCompatibilityKHR
pokeByteOff :: forall b.
Ptr b -> Int -> AccelerationStructureCompatibilityKHR -> IO ()
$cpokeByteOff :: forall b.
Ptr b -> Int -> AccelerationStructureCompatibilityKHR -> IO ()
peekByteOff :: forall b. Ptr b -> Int -> IO AccelerationStructureCompatibilityKHR
$cpeekByteOff :: forall b. Ptr b -> Int -> IO AccelerationStructureCompatibilityKHR
pokeElemOff :: ("pCompatibility" ::: Ptr AccelerationStructureCompatibilityKHR)
-> Int -> AccelerationStructureCompatibilityKHR -> IO ()
$cpokeElemOff :: ("pCompatibility" ::: Ptr AccelerationStructureCompatibilityKHR)
-> Int -> AccelerationStructureCompatibilityKHR -> IO ()
peekElemOff :: ("pCompatibility" ::: Ptr AccelerationStructureCompatibilityKHR)
-> Int -> IO AccelerationStructureCompatibilityKHR
$cpeekElemOff :: ("pCompatibility" ::: Ptr AccelerationStructureCompatibilityKHR)
-> Int -> IO AccelerationStructureCompatibilityKHR
alignment :: AccelerationStructureCompatibilityKHR -> Int
$calignment :: AccelerationStructureCompatibilityKHR -> Int
sizeOf :: AccelerationStructureCompatibilityKHR -> Int
$csizeOf :: AccelerationStructureCompatibilityKHR -> Int
Storable, AccelerationStructureCompatibilityKHR
AccelerationStructureCompatibilityKHR
-> Zero AccelerationStructureCompatibilityKHR
forall a. a -> Zero a
zero :: AccelerationStructureCompatibilityKHR
$czero :: AccelerationStructureCompatibilityKHR
Zero)
pattern $bACCELERATION_STRUCTURE_COMPATIBILITY_COMPATIBLE_KHR :: AccelerationStructureCompatibilityKHR
$mACCELERATION_STRUCTURE_COMPATIBILITY_COMPATIBLE_KHR :: forall {r}.
AccelerationStructureCompatibilityKHR
-> (Void# -> r) -> (Void# -> r) -> r
ACCELERATION_STRUCTURE_COMPATIBILITY_COMPATIBLE_KHR = AccelerationStructureCompatibilityKHR 0
pattern $bACCELERATION_STRUCTURE_COMPATIBILITY_INCOMPATIBLE_KHR :: AccelerationStructureCompatibilityKHR
$mACCELERATION_STRUCTURE_COMPATIBILITY_INCOMPATIBLE_KHR :: forall {r}.
AccelerationStructureCompatibilityKHR
-> (Void# -> r) -> (Void# -> r) -> r
ACCELERATION_STRUCTURE_COMPATIBILITY_INCOMPATIBLE_KHR = AccelerationStructureCompatibilityKHR 1
{-# COMPLETE
ACCELERATION_STRUCTURE_COMPATIBILITY_COMPATIBLE_KHR
, ACCELERATION_STRUCTURE_COMPATIBILITY_INCOMPATIBLE_KHR ::
AccelerationStructureCompatibilityKHR
#-}
conNameAccelerationStructureCompatibilityKHR :: String
conNameAccelerationStructureCompatibilityKHR :: String
conNameAccelerationStructureCompatibilityKHR = String
"AccelerationStructureCompatibilityKHR"
enumPrefixAccelerationStructureCompatibilityKHR :: String
enumPrefixAccelerationStructureCompatibilityKHR :: String
enumPrefixAccelerationStructureCompatibilityKHR = String
"ACCELERATION_STRUCTURE_COMPATIBILITY_"
showTableAccelerationStructureCompatibilityKHR :: [(AccelerationStructureCompatibilityKHR, String)]
showTableAccelerationStructureCompatibilityKHR :: [(AccelerationStructureCompatibilityKHR, String)]
showTableAccelerationStructureCompatibilityKHR =
[
( AccelerationStructureCompatibilityKHR
ACCELERATION_STRUCTURE_COMPATIBILITY_COMPATIBLE_KHR
, String
"COMPATIBLE_KHR"
)
,
( AccelerationStructureCompatibilityKHR
ACCELERATION_STRUCTURE_COMPATIBILITY_INCOMPATIBLE_KHR
, String
"INCOMPATIBLE_KHR"
)
]
instance Show AccelerationStructureCompatibilityKHR where
showsPrec :: Int -> AccelerationStructureCompatibilityKHR -> ShowS
showsPrec =
String
-> [(AccelerationStructureCompatibilityKHR, String)]
-> String
-> (AccelerationStructureCompatibilityKHR -> Int32)
-> (Int32 -> ShowS)
-> Int
-> AccelerationStructureCompatibilityKHR
-> ShowS
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec
String
enumPrefixAccelerationStructureCompatibilityKHR
[(AccelerationStructureCompatibilityKHR, String)]
showTableAccelerationStructureCompatibilityKHR
String
conNameAccelerationStructureCompatibilityKHR
(\(AccelerationStructureCompatibilityKHR Int32
x) -> Int32
x)
(Int -> Int32 -> ShowS
forall a. Show a => Int -> a -> ShowS
showsPrec Int
11)
instance Read AccelerationStructureCompatibilityKHR where
readPrec :: ReadPrec AccelerationStructureCompatibilityKHR
readPrec =
String
-> [(AccelerationStructureCompatibilityKHR, String)]
-> String
-> (Int32 -> AccelerationStructureCompatibilityKHR)
-> ReadPrec AccelerationStructureCompatibilityKHR
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec
String
enumPrefixAccelerationStructureCompatibilityKHR
[(AccelerationStructureCompatibilityKHR, String)]
showTableAccelerationStructureCompatibilityKHR
String
conNameAccelerationStructureCompatibilityKHR
Int32 -> AccelerationStructureCompatibilityKHR
AccelerationStructureCompatibilityKHR
type KHR_ACCELERATION_STRUCTURE_SPEC_VERSION = 13
pattern KHR_ACCELERATION_STRUCTURE_SPEC_VERSION :: forall a . Integral a => a
pattern $bKHR_ACCELERATION_STRUCTURE_SPEC_VERSION :: forall a. Integral a => a
$mKHR_ACCELERATION_STRUCTURE_SPEC_VERSION :: forall {r} {a}.
Integral a =>
a -> (Void# -> r) -> (Void# -> r) -> r
KHR_ACCELERATION_STRUCTURE_SPEC_VERSION = 13
type KHR_ACCELERATION_STRUCTURE_EXTENSION_NAME = "VK_KHR_acceleration_structure"
pattern KHR_ACCELERATION_STRUCTURE_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $bKHR_ACCELERATION_STRUCTURE_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
$mKHR_ACCELERATION_STRUCTURE_EXTENSION_NAME :: forall {r} {a}.
(Eq a, IsString a) =>
a -> (Void# -> r) -> (Void# -> r) -> r
KHR_ACCELERATION_STRUCTURE_EXTENSION_NAME = "VK_KHR_acceleration_structure"