{-# language CPP #-}
module Vulkan.Extensions.VK_KHR_ray_tracing ( destroyAccelerationStructureKHR
, getAccelerationStructureMemoryRequirementsKHR
, bindAccelerationStructureMemoryKHR
, cmdCopyAccelerationStructureKHR
, copyAccelerationStructureKHR
, cmdCopyAccelerationStructureToMemoryKHR
, copyAccelerationStructureToMemoryKHR
, cmdCopyMemoryToAccelerationStructureKHR
, copyMemoryToAccelerationStructureKHR
, cmdWriteAccelerationStructuresPropertiesKHR
, writeAccelerationStructuresPropertiesKHR
, cmdTraceRaysKHR
, getRayTracingShaderGroupHandlesKHR
, getRayTracingCaptureReplayShaderGroupHandlesKHR
, createRayTracingPipelinesKHR
, cmdTraceRaysIndirectKHR
, getDeviceAccelerationStructureCompatibilityKHR
, createAccelerationStructureKHR
, withAccelerationStructureKHR
, cmdBuildAccelerationStructureKHR
, cmdBuildAccelerationStructureIndirectKHR
, buildAccelerationStructureKHR
, getAccelerationStructureDeviceAddressKHR
, RayTracingShaderGroupCreateInfoKHR(..)
, RayTracingPipelineCreateInfoKHR(..)
, BindAccelerationStructureMemoryInfoKHR(..)
, WriteDescriptorSetAccelerationStructureKHR(..)
, AccelerationStructureMemoryRequirementsInfoKHR(..)
, PhysicalDeviceRayTracingFeaturesKHR(..)
, PhysicalDeviceRayTracingPropertiesKHR(..)
, StridedBufferRegionKHR(..)
, TraceRaysIndirectCommandKHR(..)
, AccelerationStructureGeometryTrianglesDataKHR(..)
, AccelerationStructureGeometryAabbsDataKHR(..)
, AccelerationStructureGeometryInstancesDataKHR(..)
, AccelerationStructureGeometryKHR(..)
, AccelerationStructureBuildGeometryInfoKHR(..)
, AccelerationStructureBuildOffsetInfoKHR(..)
, AccelerationStructureCreateGeometryTypeInfoKHR(..)
, AccelerationStructureCreateInfoKHR(..)
, AabbPositionsKHR(..)
, TransformMatrixKHR(..)
, AccelerationStructureInstanceKHR(..)
, AccelerationStructureDeviceAddressInfoKHR(..)
, AccelerationStructureVersionKHR(..)
, CopyAccelerationStructureInfoKHR(..)
, CopyAccelerationStructureToMemoryInfoKHR(..)
, CopyMemoryToAccelerationStructureInfoKHR(..)
, RayTracingPipelineInterfaceCreateInfoKHR(..)
, DeviceOrHostAddressKHR(..)
, DeviceOrHostAddressConstKHR(..)
, AccelerationStructureGeometryDataKHR(..)
, GeometryInstanceFlagBitsKHR( GEOMETRY_INSTANCE_TRIANGLE_FACING_CULL_DISABLE_BIT_KHR
, GEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_KHR
, GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_KHR
, GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_KHR
, ..
)
, GeometryInstanceFlagsKHR
, GeometryFlagBitsKHR( GEOMETRY_OPAQUE_BIT_KHR
, GEOMETRY_NO_DUPLICATE_ANY_HIT_INVOCATION_BIT_KHR
, ..
)
, GeometryFlagsKHR
, 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
, ..
)
, BuildAccelerationStructureFlagsKHR
, 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
, ..
)
, AccelerationStructureTypeKHR( ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_KHR
, ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_KHR
, ..
)
, GeometryTypeKHR( GEOMETRY_TYPE_TRIANGLES_KHR
, GEOMETRY_TYPE_AABBS_KHR
, GEOMETRY_TYPE_INSTANCES_KHR
, ..
)
, AccelerationStructureMemoryRequirementsTypeKHR( ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_OBJECT_KHR
, ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_BUILD_SCRATCH_KHR
, ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_UPDATE_SCRATCH_KHR
, ..
)
, AccelerationStructureBuildTypeKHR( ACCELERATION_STRUCTURE_BUILD_TYPE_HOST_KHR
, ACCELERATION_STRUCTURE_BUILD_TYPE_DEVICE_KHR
, ACCELERATION_STRUCTURE_BUILD_TYPE_HOST_OR_DEVICE_KHR
, ..
)
, RayTracingShaderGroupTypeKHR( RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_KHR
, RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR
, RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR
, ..
)
, KHR_RAY_TRACING_SPEC_VERSION
, pattern KHR_RAY_TRACING_SPEC_VERSION
, KHR_RAY_TRACING_EXTENSION_NAME
, pattern KHR_RAY_TRACING_EXTENSION_NAME
, AccelerationStructureKHR(..)
, PipelineLibraryCreateInfoKHR(..)
, DebugReportObjectTypeEXT(..)
, SHADER_UNUSED_KHR
, pattern SHADER_UNUSED_KHR
) where
import Vulkan.CStruct.Utils (FixedArray)
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 (allocaBytesAligned)
import Foreign.Marshal.Alloc (callocBytes)
import Foreign.Marshal.Alloc (free)
import Foreign.Marshal.Utils (maybePeek)
import Foreign.Marshal.Utils (with)
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.Read (choose)
import GHC.Read (expectP)
import GHC.Read (parens)
import GHC.Show (showParen)
import GHC.Show (showString)
import GHC.Show (showsPrec)
import Numeric (showHex)
import Text.ParserCombinators.ReadPrec ((+++))
import Text.ParserCombinators.ReadPrec (prec)
import Text.ParserCombinators.ReadPrec (step)
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 Foreign.C.Types (CSize(..))
import Control.Monad.IO.Class (MonadIO)
import Data.Bits (Bits)
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(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.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 Data.Word (Word32)
import Data.Word (Word64)
import Data.Word (Word8)
import Text.Read.Lex (Lexeme(Ident))
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.BaseType (bool32ToBool)
import Vulkan.Core10.BaseType (boolToBool32)
import Vulkan.CStruct.Extends (forgetExtensions)
import Vulkan.CStruct.Utils (lowerArrayPtr)
import Vulkan.CStruct.Extends (peekSomeCStruct)
import Vulkan.CStruct.Extends (pokeSomeCStruct)
import Vulkan.NamedType ((:::))
import Vulkan.Extensions.Handles (AccelerationStructureKHR)
import Vulkan.Extensions.Handles (AccelerationStructureKHR(..))
import Vulkan.Core10.AllocationCallbacks (AllocationCallbacks)
import Vulkan.Core10.BaseType (Bool32)
import Vulkan.Core10.Handles (Buffer)
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_T)
import {-# SOURCE #-} Vulkan.Extensions.VK_KHR_deferred_host_operations (DeferredOperationInfoKHR)
import Vulkan.Core10.Handles (Device)
import Vulkan.Core10.Handles (Device(..))
import Vulkan.Core10.BaseType (DeviceAddress)
import Vulkan.Dynamic (DeviceCmds(pVkBindAccelerationStructureMemoryKHR))
import Vulkan.Dynamic (DeviceCmds(pVkBuildAccelerationStructureKHR))
import Vulkan.Dynamic (DeviceCmds(pVkCmdBuildAccelerationStructureIndirectKHR))
import Vulkan.Dynamic (DeviceCmds(pVkCmdBuildAccelerationStructureKHR))
import Vulkan.Dynamic (DeviceCmds(pVkCmdCopyAccelerationStructureKHR))
import Vulkan.Dynamic (DeviceCmds(pVkCmdCopyAccelerationStructureToMemoryKHR))
import Vulkan.Dynamic (DeviceCmds(pVkCmdCopyMemoryToAccelerationStructureKHR))
import Vulkan.Dynamic (DeviceCmds(pVkCmdTraceRaysIndirectKHR))
import Vulkan.Dynamic (DeviceCmds(pVkCmdTraceRaysKHR))
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(pVkCreateRayTracingPipelinesKHR))
import Vulkan.Dynamic (DeviceCmds(pVkDestroyAccelerationStructureKHR))
import Vulkan.Dynamic (DeviceCmds(pVkGetAccelerationStructureDeviceAddressKHR))
import Vulkan.Dynamic (DeviceCmds(pVkGetAccelerationStructureMemoryRequirementsKHR))
import Vulkan.Dynamic (DeviceCmds(pVkGetDeviceAccelerationStructureCompatibilityKHR))
import Vulkan.Dynamic (DeviceCmds(pVkGetRayTracingCaptureReplayShaderGroupHandlesKHR))
import Vulkan.Dynamic (DeviceCmds(pVkGetRayTracingShaderGroupHandlesKHR))
import Vulkan.Dynamic (DeviceCmds(pVkWriteAccelerationStructuresPropertiesKHR))
import Vulkan.Core10.Handles (DeviceMemory)
import Vulkan.Core10.BaseType (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.BaseType (Flags)
import Vulkan.Core10.Enums.Format (Format)
import Vulkan.CStruct (FromCStruct)
import Vulkan.CStruct (FromCStruct(..))
import Vulkan.Core10.Enums.IndexType (IndexType)
import Vulkan.Core11.Promoted_From_VK_KHR_get_memory_requirements2 (MemoryRequirements2)
import Vulkan.CStruct.Extends (PeekChain)
import Vulkan.CStruct.Extends (PeekChain(..))
import Vulkan.Core10.Handles (Pipeline)
import Vulkan.Core10.Handles (Pipeline(..))
import Vulkan.Core10.Handles (PipelineCache)
import Vulkan.Core10.Handles (PipelineCache(..))
import Vulkan.Core10.Enums.PipelineCreateFlagBits (PipelineCreateFlags)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_pipeline_creation_feedback (PipelineCreationFeedbackCreateInfoEXT)
import Vulkan.Core10.Handles (PipelineLayout)
import Vulkan.Extensions.VK_KHR_pipeline_library (PipelineLibraryCreateInfoKHR)
import Vulkan.Core10.Pipeline (PipelineShaderStageCreateInfo)
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.Core10.Enums.StructureType (StructureType)
import Vulkan.CStruct (ToCStruct)
import Vulkan.CStruct (ToCStruct(..))
import Vulkan.Exception (VulkanException(..))
import Vulkan.Zero (Zero)
import Vulkan.Zero (Zero(..))
import Vulkan.Core10.BaseType (Bool32(FALSE))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_ACCELERATION_STRUCTURE_BUILD_GEOMETRY_INFO_KHR))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_ACCELERATION_STRUCTURE_CREATE_GEOMETRY_TYPE_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_MEMORY_REQUIREMENTS_INFO_KHR))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_ACCELERATION_STRUCTURE_VERSION_KHR))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_BIND_ACCELERATION_STRUCTURE_MEMORY_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_RAY_TRACING_FEATURES_KHR))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PROPERTIES_KHR))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_RAY_TRACING_PIPELINE_CREATE_INFO_KHR))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_RAY_TRACING_PIPELINE_INTERFACE_CREATE_INFO_KHR))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_RAY_TRACING_SHADER_GROUP_CREATE_INFO_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.VK_KHR_pipeline_library (PipelineLibraryCreateInfoKHR(..))
import Vulkan.Core10.APIConstants (SHADER_UNUSED_KHR)
import Vulkan.Core10.APIConstants (pattern SHADER_UNUSED_KHR)
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 :: Device
-> AccelerationStructureKHR
-> ("allocator" ::: Maybe AllocationCallbacks)
-> io ()
destroyAccelerationStructureKHR device :: Device
device accelerationStructure :: AccelerationStructureKHR
accelerationStructure allocator :: "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 (Device -> DeviceCmds
deviceCmds (Device
device :: Device))
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 "" "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
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 j :: 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
$ 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" mkVkGetAccelerationStructureMemoryRequirementsKHR
:: FunPtr (Ptr Device_T -> Ptr AccelerationStructureMemoryRequirementsInfoKHR -> Ptr (MemoryRequirements2 a) -> IO ()) -> Ptr Device_T -> Ptr AccelerationStructureMemoryRequirementsInfoKHR -> Ptr (MemoryRequirements2 a) -> IO ()
getAccelerationStructureMemoryRequirementsKHR :: forall a io . (Extendss MemoryRequirements2 a, PokeChain a, PeekChain a, MonadIO io) => Device -> AccelerationStructureMemoryRequirementsInfoKHR -> io (MemoryRequirements2 a)
getAccelerationStructureMemoryRequirementsKHR :: Device
-> AccelerationStructureMemoryRequirementsInfoKHR
-> io (MemoryRequirements2 a)
getAccelerationStructureMemoryRequirementsKHR device :: Device
device info :: AccelerationStructureMemoryRequirementsInfoKHR
info = IO (MemoryRequirements2 a) -> io (MemoryRequirements2 a)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (MemoryRequirements2 a) -> io (MemoryRequirements2 a))
-> (ContT (MemoryRequirements2 a) IO (MemoryRequirements2 a)
-> IO (MemoryRequirements2 a))
-> ContT (MemoryRequirements2 a) IO (MemoryRequirements2 a)
-> io (MemoryRequirements2 a)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT (MemoryRequirements2 a) IO (MemoryRequirements2 a)
-> IO (MemoryRequirements2 a)
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT (MemoryRequirements2 a) IO (MemoryRequirements2 a)
-> io (MemoryRequirements2 a))
-> ContT (MemoryRequirements2 a) IO (MemoryRequirements2 a)
-> io (MemoryRequirements2 a)
forall a b. (a -> b) -> a -> b
$ do
let vkGetAccelerationStructureMemoryRequirementsKHRPtr :: FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoKHR)
-> ("pMemoryRequirements" ::: Ptr (MemoryRequirements2 a))
-> IO ())
vkGetAccelerationStructureMemoryRequirementsKHRPtr = DeviceCmds
-> forall (a :: [*]).
FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoKHR)
-> ("pMemoryRequirements" ::: Ptr (MemoryRequirements2 a))
-> IO ())
pVkGetAccelerationStructureMemoryRequirementsKHR (Device -> DeviceCmds
deviceCmds (Device
device :: Device))
IO () -> ContT (MemoryRequirements2 a) IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT (MemoryRequirements2 a) IO ())
-> IO () -> ContT (MemoryRequirements2 a) 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 AccelerationStructureMemoryRequirementsInfoKHR)
-> ("pMemoryRequirements" ::: Ptr (MemoryRequirements2 a))
-> IO ())
vkGetAccelerationStructureMemoryRequirementsKHRPtr FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoKHR)
-> ("pMemoryRequirements" ::: Ptr (MemoryRequirements2 a))
-> IO ())
-> FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoKHR)
-> ("pMemoryRequirements" ::: Ptr (MemoryRequirements2 a))
-> IO ())
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoKHR)
-> ("pMemoryRequirements" ::: Ptr (MemoryRequirements2 a))
-> 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 "" "The function pointer for vkGetAccelerationStructureMemoryRequirementsKHR is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let vkGetAccelerationStructureMemoryRequirementsKHR' :: Ptr Device_T
-> ("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoKHR)
-> ("pMemoryRequirements" ::: Ptr (MemoryRequirements2 a))
-> IO ()
vkGetAccelerationStructureMemoryRequirementsKHR' = FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoKHR)
-> ("pMemoryRequirements" ::: Ptr (MemoryRequirements2 a))
-> IO ())
-> Ptr Device_T
-> ("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoKHR)
-> ("pMemoryRequirements" ::: Ptr (MemoryRequirements2 a))
-> IO ()
forall (a :: [*]).
FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoKHR)
-> Ptr (MemoryRequirements2 a)
-> IO ())
-> Ptr Device_T
-> ("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoKHR)
-> Ptr (MemoryRequirements2 a)
-> IO ()
mkVkGetAccelerationStructureMemoryRequirementsKHR FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoKHR)
-> ("pMemoryRequirements" ::: Ptr (MemoryRequirements2 a))
-> IO ())
vkGetAccelerationStructureMemoryRequirementsKHRPtr
"pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoKHR
pInfo <- ((("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoKHR)
-> IO (MemoryRequirements2 a))
-> IO (MemoryRequirements2 a))
-> ContT
(MemoryRequirements2 a)
IO
("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoKHR)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoKHR)
-> IO (MemoryRequirements2 a))
-> IO (MemoryRequirements2 a))
-> ContT
(MemoryRequirements2 a)
IO
("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoKHR))
-> ((("pInfo"
::: Ptr AccelerationStructureMemoryRequirementsInfoKHR)
-> IO (MemoryRequirements2 a))
-> IO (MemoryRequirements2 a))
-> ContT
(MemoryRequirements2 a)
IO
("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoKHR)
forall a b. (a -> b) -> a -> b
$ AccelerationStructureMemoryRequirementsInfoKHR
-> (("pInfo"
::: Ptr AccelerationStructureMemoryRequirementsInfoKHR)
-> IO (MemoryRequirements2 a))
-> IO (MemoryRequirements2 a)
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (AccelerationStructureMemoryRequirementsInfoKHR
info)
"pMemoryRequirements" ::: Ptr (MemoryRequirements2 a)
pPMemoryRequirements <- ((("pMemoryRequirements" ::: Ptr (MemoryRequirements2 a))
-> IO (MemoryRequirements2 a))
-> IO (MemoryRequirements2 a))
-> ContT
(MemoryRequirements2 a)
IO
("pMemoryRequirements" ::: Ptr (MemoryRequirements2 a))
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (forall b.
ToCStruct (MemoryRequirements2 a) =>
(("pMemoryRequirements" ::: Ptr (MemoryRequirements2 a)) -> IO b)
-> IO b
forall a b. ToCStruct a => (Ptr a -> IO b) -> IO b
withZeroCStruct @(MemoryRequirements2 _))
IO () -> ContT (MemoryRequirements2 a) IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT (MemoryRequirements2 a) IO ())
-> IO () -> ContT (MemoryRequirements2 a) IO ()
forall a b. (a -> b) -> a -> b
$ Ptr Device_T
-> ("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoKHR)
-> ("pMemoryRequirements" ::: Ptr (MemoryRequirements2 a))
-> IO ()
vkGetAccelerationStructureMemoryRequirementsKHR' (Device -> Ptr Device_T
deviceHandle (Device
device)) "pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoKHR
pInfo ("pMemoryRequirements" ::: Ptr (MemoryRequirements2 a)
pPMemoryRequirements)
MemoryRequirements2 a
pMemoryRequirements <- IO (MemoryRequirements2 a)
-> ContT (MemoryRequirements2 a) IO (MemoryRequirements2 a)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO (MemoryRequirements2 a)
-> ContT (MemoryRequirements2 a) IO (MemoryRequirements2 a))
-> IO (MemoryRequirements2 a)
-> ContT (MemoryRequirements2 a) IO (MemoryRequirements2 a)
forall a b. (a -> b) -> a -> b
$ ("pMemoryRequirements" ::: Ptr (MemoryRequirements2 a))
-> IO (MemoryRequirements2 a)
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @(MemoryRequirements2 _) "pMemoryRequirements" ::: Ptr (MemoryRequirements2 a)
pPMemoryRequirements
MemoryRequirements2 a
-> ContT (MemoryRequirements2 a) IO (MemoryRequirements2 a)
forall (f :: * -> *) a. Applicative f => a -> f a
pure (MemoryRequirements2 a
-> ContT (MemoryRequirements2 a) IO (MemoryRequirements2 a))
-> MemoryRequirements2 a
-> ContT (MemoryRequirements2 a) IO (MemoryRequirements2 a)
forall a b. (a -> b) -> a -> b
$ (MemoryRequirements2 a
pMemoryRequirements)
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkBindAccelerationStructureMemoryKHR
:: FunPtr (Ptr Device_T -> Word32 -> Ptr BindAccelerationStructureMemoryInfoKHR -> IO Result) -> Ptr Device_T -> Word32 -> Ptr BindAccelerationStructureMemoryInfoKHR -> IO Result
bindAccelerationStructureMemoryKHR :: forall io . MonadIO io => Device -> ("bindInfos" ::: Vector BindAccelerationStructureMemoryInfoKHR) -> io ()
bindAccelerationStructureMemoryKHR :: Device
-> ("bindInfos" ::: Vector BindAccelerationStructureMemoryInfoKHR)
-> io ()
bindAccelerationStructureMemoryKHR device :: Device
device bindInfos :: "bindInfos" ::: Vector BindAccelerationStructureMemoryInfoKHR
bindInfos = 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 vkBindAccelerationStructureMemoryKHRPtr :: FunPtr
(Ptr Device_T
-> ("bindInfoCount" ::: Word32)
-> ("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoKHR)
-> IO Result)
vkBindAccelerationStructureMemoryKHRPtr = DeviceCmds
-> FunPtr
(Ptr Device_T
-> ("bindInfoCount" ::: Word32)
-> ("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoKHR)
-> IO Result)
pVkBindAccelerationStructureMemoryKHR (Device -> DeviceCmds
deviceCmds (Device
device :: Device))
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
-> ("bindInfoCount" ::: Word32)
-> ("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoKHR)
-> IO Result)
vkBindAccelerationStructureMemoryKHRPtr FunPtr
(Ptr Device_T
-> ("bindInfoCount" ::: Word32)
-> ("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoKHR)
-> IO Result)
-> FunPtr
(Ptr Device_T
-> ("bindInfoCount" ::: Word32)
-> ("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoKHR)
-> IO Result)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr Device_T
-> ("bindInfoCount" ::: Word32)
-> ("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoKHR)
-> 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 "" "The function pointer for vkBindAccelerationStructureMemoryKHR is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let vkBindAccelerationStructureMemoryKHR' :: Ptr Device_T
-> ("bindInfoCount" ::: Word32)
-> ("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoKHR)
-> IO Result
vkBindAccelerationStructureMemoryKHR' = FunPtr
(Ptr Device_T
-> ("bindInfoCount" ::: Word32)
-> ("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoKHR)
-> IO Result)
-> Ptr Device_T
-> ("bindInfoCount" ::: Word32)
-> ("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoKHR)
-> IO Result
mkVkBindAccelerationStructureMemoryKHR FunPtr
(Ptr Device_T
-> ("bindInfoCount" ::: Word32)
-> ("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoKHR)
-> IO Result)
vkBindAccelerationStructureMemoryKHRPtr
"pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoKHR
pPBindInfos <- ((("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoKHR)
-> IO ())
-> IO ())
-> ContT
() IO ("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoKHR)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoKHR)
-> IO ())
-> IO ())
-> ContT
()
IO
("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoKHR))
-> ((("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoKHR)
-> IO ())
-> IO ())
-> ContT
() IO ("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoKHR)
forall a b. (a -> b) -> a -> b
$ Int
-> Int
-> (("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoKHR)
-> IO ())
-> IO ()
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned @BindAccelerationStructureMemoryInfoKHR ((("bindInfos" ::: Vector BindAccelerationStructureMemoryInfoKHR)
-> Int
forall a. Vector a -> Int
Data.Vector.length ("bindInfos" ::: Vector BindAccelerationStructureMemoryInfoKHR
bindInfos)) Int -> Int -> Int
forall a. Num a => a -> a -> a
* 56) 8
(Int -> BindAccelerationStructureMemoryInfoKHR -> ContT () IO ())
-> ("bindInfos" ::: Vector BindAccelerationStructureMemoryInfoKHR)
-> ContT () IO ()
forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\i :: Int
i e :: BindAccelerationStructureMemoryInfoKHR
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
$ ("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoKHR)
-> BindAccelerationStructureMemoryInfoKHR -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct ("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoKHR
pPBindInfos ("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoKHR)
-> Int
-> "pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (56 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr BindAccelerationStructureMemoryInfoKHR) (BindAccelerationStructureMemoryInfoKHR
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
$ ())) ("bindInfos" ::: Vector BindAccelerationStructureMemoryInfoKHR
bindInfos)
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
$ Ptr Device_T
-> ("bindInfoCount" ::: Word32)
-> ("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoKHR)
-> IO Result
vkBindAccelerationStructureMemoryKHR' (Device -> Ptr Device_T
deviceHandle (Device
device)) ((Int -> "bindInfoCount" ::: Word32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (("bindInfos" ::: Vector BindAccelerationStructureMemoryInfoKHR)
-> Int
forall a. Vector a -> Int
Data.Vector.length (("bindInfos" ::: Vector BindAccelerationStructureMemoryInfoKHR)
-> Int)
-> ("bindInfos" ::: Vector BindAccelerationStructureMemoryInfoKHR)
-> Int
forall a b. (a -> b) -> a -> b
$ ("bindInfos" ::: Vector BindAccelerationStructureMemoryInfoKHR
bindInfos)) :: Word32)) ("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoKHR
pPBindInfos)
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" mkVkCmdCopyAccelerationStructureKHR
:: FunPtr (Ptr CommandBuffer_T -> Ptr (CopyAccelerationStructureInfoKHR a) -> IO ()) -> Ptr CommandBuffer_T -> Ptr (CopyAccelerationStructureInfoKHR a) -> IO ()
cmdCopyAccelerationStructureKHR :: forall a io . (Extendss CopyAccelerationStructureInfoKHR a, PokeChain a, MonadIO io) => CommandBuffer -> CopyAccelerationStructureInfoKHR a -> io ()
cmdCopyAccelerationStructureKHR :: CommandBuffer -> CopyAccelerationStructureInfoKHR a -> io ()
cmdCopyAccelerationStructureKHR commandBuffer :: CommandBuffer
commandBuffer info :: CopyAccelerationStructureInfoKHR a
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 a)) -> IO ())
vkCmdCopyAccelerationStructureKHRPtr = DeviceCmds
-> forall (a :: [*]).
FunPtr
(Ptr CommandBuffer_T
-> ("pInfo" ::: Ptr (CopyAccelerationStructureInfoKHR a)) -> IO ())
pVkCmdCopyAccelerationStructureKHR (CommandBuffer -> DeviceCmds
deviceCmds (CommandBuffer
commandBuffer :: CommandBuffer))
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 a)) -> IO ())
vkCmdCopyAccelerationStructureKHRPtr FunPtr
(Ptr CommandBuffer_T
-> ("pInfo" ::: Ptr (CopyAccelerationStructureInfoKHR a)) -> IO ())
-> FunPtr
(Ptr CommandBuffer_T
-> ("pInfo" ::: Ptr (CopyAccelerationStructureInfoKHR a)) -> IO ())
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr CommandBuffer_T
-> ("pInfo" ::: Ptr (CopyAccelerationStructureInfoKHR a)) -> 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 "" "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 a)) -> IO ()
vkCmdCopyAccelerationStructureKHR' = FunPtr
(Ptr CommandBuffer_T
-> ("pInfo" ::: Ptr (CopyAccelerationStructureInfoKHR a)) -> IO ())
-> Ptr CommandBuffer_T
-> ("pInfo" ::: Ptr (CopyAccelerationStructureInfoKHR a))
-> IO ()
forall (a :: [*]).
FunPtr
(Ptr CommandBuffer_T
-> Ptr (CopyAccelerationStructureInfoKHR a) -> IO ())
-> Ptr CommandBuffer_T
-> Ptr (CopyAccelerationStructureInfoKHR a)
-> IO ()
mkVkCmdCopyAccelerationStructureKHR FunPtr
(Ptr CommandBuffer_T
-> ("pInfo" ::: Ptr (CopyAccelerationStructureInfoKHR a)) -> IO ())
vkCmdCopyAccelerationStructureKHRPtr
"pInfo" ::: Ptr (CopyAccelerationStructureInfoKHR a)
pInfo <- ((("pInfo" ::: Ptr (CopyAccelerationStructureInfoKHR a)) -> IO ())
-> IO ())
-> ContT
() IO ("pInfo" ::: Ptr (CopyAccelerationStructureInfoKHR a))
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pInfo" ::: Ptr (CopyAccelerationStructureInfoKHR a)) -> IO ())
-> IO ())
-> ContT
() IO ("pInfo" ::: Ptr (CopyAccelerationStructureInfoKHR a)))
-> ((("pInfo" ::: Ptr (CopyAccelerationStructureInfoKHR a))
-> IO ())
-> IO ())
-> ContT
() IO ("pInfo" ::: Ptr (CopyAccelerationStructureInfoKHR a))
forall a b. (a -> b) -> a -> b
$ CopyAccelerationStructureInfoKHR a
-> (("pInfo" ::: Ptr (CopyAccelerationStructureInfoKHR a))
-> IO ())
-> IO ()
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (CopyAccelerationStructureInfoKHR a
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
$ Ptr CommandBuffer_T
-> ("pInfo" ::: Ptr (CopyAccelerationStructureInfoKHR a)) -> IO ()
vkCmdCopyAccelerationStructureKHR' (CommandBuffer -> Ptr CommandBuffer_T
commandBufferHandle (CommandBuffer
commandBuffer)) "pInfo" ::: Ptr (CopyAccelerationStructureInfoKHR a)
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 -> Ptr (CopyAccelerationStructureInfoKHR a) -> IO Result) -> Ptr Device_T -> Ptr (CopyAccelerationStructureInfoKHR a) -> IO Result
copyAccelerationStructureKHR :: forall a io . (Extendss CopyAccelerationStructureInfoKHR a, PokeChain a, MonadIO io) => Device -> CopyAccelerationStructureInfoKHR a -> io (Result)
copyAccelerationStructureKHR :: Device -> CopyAccelerationStructureInfoKHR a -> io Result
copyAccelerationStructureKHR device :: Device
device info :: CopyAccelerationStructureInfoKHR a
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
-> ("pInfo" ::: Ptr (CopyAccelerationStructureInfoKHR a))
-> IO Result)
vkCopyAccelerationStructureKHRPtr = DeviceCmds
-> forall (a :: [*]).
FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr (CopyAccelerationStructureInfoKHR a))
-> IO Result)
pVkCopyAccelerationStructureKHR (Device -> DeviceCmds
deviceCmds (Device
device :: Device))
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
-> ("pInfo" ::: Ptr (CopyAccelerationStructureInfoKHR a))
-> IO Result)
vkCopyAccelerationStructureKHRPtr FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr (CopyAccelerationStructureInfoKHR a))
-> IO Result)
-> FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr (CopyAccelerationStructureInfoKHR a))
-> IO Result)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr (CopyAccelerationStructureInfoKHR a))
-> 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 "" "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
-> ("pInfo" ::: Ptr (CopyAccelerationStructureInfoKHR a))
-> IO Result
vkCopyAccelerationStructureKHR' = FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr (CopyAccelerationStructureInfoKHR a))
-> IO Result)
-> Ptr Device_T
-> ("pInfo" ::: Ptr (CopyAccelerationStructureInfoKHR a))
-> IO Result
forall (a :: [*]).
FunPtr
(Ptr Device_T
-> Ptr (CopyAccelerationStructureInfoKHR a) -> IO Result)
-> Ptr Device_T
-> Ptr (CopyAccelerationStructureInfoKHR a)
-> IO Result
mkVkCopyAccelerationStructureKHR FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr (CopyAccelerationStructureInfoKHR a))
-> IO Result)
vkCopyAccelerationStructureKHRPtr
"pInfo" ::: Ptr (CopyAccelerationStructureInfoKHR a)
pInfo <- ((("pInfo" ::: Ptr (CopyAccelerationStructureInfoKHR a))
-> IO Result)
-> IO Result)
-> ContT
Result IO ("pInfo" ::: Ptr (CopyAccelerationStructureInfoKHR a))
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pInfo" ::: Ptr (CopyAccelerationStructureInfoKHR a))
-> IO Result)
-> IO Result)
-> ContT
Result IO ("pInfo" ::: Ptr (CopyAccelerationStructureInfoKHR a)))
-> ((("pInfo" ::: Ptr (CopyAccelerationStructureInfoKHR a))
-> IO Result)
-> IO Result)
-> ContT
Result IO ("pInfo" ::: Ptr (CopyAccelerationStructureInfoKHR a))
forall a b. (a -> b) -> a -> b
$ CopyAccelerationStructureInfoKHR a
-> (("pInfo" ::: Ptr (CopyAccelerationStructureInfoKHR a))
-> IO Result)
-> IO Result
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (CopyAccelerationStructureInfoKHR a
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
$ Ptr Device_T
-> ("pInfo" ::: Ptr (CopyAccelerationStructureInfoKHR a))
-> IO Result
vkCopyAccelerationStructureKHR' (Device -> Ptr Device_T
deviceHandle (Device
device)) "pInfo" ::: Ptr (CopyAccelerationStructureInfoKHR a)
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 a) -> IO ()) -> Ptr CommandBuffer_T -> Ptr (CopyAccelerationStructureToMemoryInfoKHR a) -> IO ()
cmdCopyAccelerationStructureToMemoryKHR :: forall a io . (Extendss CopyAccelerationStructureToMemoryInfoKHR a, PokeChain a, MonadIO io) => CommandBuffer -> CopyAccelerationStructureToMemoryInfoKHR a -> io ()
cmdCopyAccelerationStructureToMemoryKHR :: CommandBuffer
-> CopyAccelerationStructureToMemoryInfoKHR a -> io ()
cmdCopyAccelerationStructureToMemoryKHR commandBuffer :: CommandBuffer
commandBuffer info :: CopyAccelerationStructureToMemoryInfoKHR a
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 a))
-> IO ())
vkCmdCopyAccelerationStructureToMemoryKHRPtr = DeviceCmds
-> forall (a :: [*]).
FunPtr
(Ptr CommandBuffer_T
-> ("pInfo" ::: Ptr (CopyAccelerationStructureToMemoryInfoKHR a))
-> IO ())
pVkCmdCopyAccelerationStructureToMemoryKHR (CommandBuffer -> DeviceCmds
deviceCmds (CommandBuffer
commandBuffer :: CommandBuffer))
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 a))
-> IO ())
vkCmdCopyAccelerationStructureToMemoryKHRPtr FunPtr
(Ptr CommandBuffer_T
-> ("pInfo" ::: Ptr (CopyAccelerationStructureToMemoryInfoKHR a))
-> IO ())
-> FunPtr
(Ptr CommandBuffer_T
-> ("pInfo" ::: Ptr (CopyAccelerationStructureToMemoryInfoKHR a))
-> IO ())
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr CommandBuffer_T
-> ("pInfo" ::: Ptr (CopyAccelerationStructureToMemoryInfoKHR a))
-> 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 "" "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 a))
-> IO ()
vkCmdCopyAccelerationStructureToMemoryKHR' = FunPtr
(Ptr CommandBuffer_T
-> ("pInfo" ::: Ptr (CopyAccelerationStructureToMemoryInfoKHR a))
-> IO ())
-> Ptr CommandBuffer_T
-> ("pInfo" ::: Ptr (CopyAccelerationStructureToMemoryInfoKHR a))
-> IO ()
forall (a :: [*]).
FunPtr
(Ptr CommandBuffer_T
-> Ptr (CopyAccelerationStructureToMemoryInfoKHR a) -> IO ())
-> Ptr CommandBuffer_T
-> Ptr (CopyAccelerationStructureToMemoryInfoKHR a)
-> IO ()
mkVkCmdCopyAccelerationStructureToMemoryKHR FunPtr
(Ptr CommandBuffer_T
-> ("pInfo" ::: Ptr (CopyAccelerationStructureToMemoryInfoKHR a))
-> IO ())
vkCmdCopyAccelerationStructureToMemoryKHRPtr
"pInfo" ::: Ptr (CopyAccelerationStructureToMemoryInfoKHR a)
pInfo <- ((("pInfo" ::: Ptr (CopyAccelerationStructureToMemoryInfoKHR a))
-> IO ())
-> IO ())
-> ContT
()
IO
("pInfo" ::: Ptr (CopyAccelerationStructureToMemoryInfoKHR a))
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pInfo" ::: Ptr (CopyAccelerationStructureToMemoryInfoKHR a))
-> IO ())
-> IO ())
-> ContT
()
IO
("pInfo" ::: Ptr (CopyAccelerationStructureToMemoryInfoKHR a)))
-> ((("pInfo" ::: Ptr (CopyAccelerationStructureToMemoryInfoKHR a))
-> IO ())
-> IO ())
-> ContT
()
IO
("pInfo" ::: Ptr (CopyAccelerationStructureToMemoryInfoKHR a))
forall a b. (a -> b) -> a -> b
$ CopyAccelerationStructureToMemoryInfoKHR a
-> (("pInfo" ::: Ptr (CopyAccelerationStructureToMemoryInfoKHR a))
-> IO ())
-> IO ()
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (CopyAccelerationStructureToMemoryInfoKHR a
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
$ Ptr CommandBuffer_T
-> ("pInfo" ::: Ptr (CopyAccelerationStructureToMemoryInfoKHR a))
-> IO ()
vkCmdCopyAccelerationStructureToMemoryKHR' (CommandBuffer -> Ptr CommandBuffer_T
commandBufferHandle (CommandBuffer
commandBuffer)) "pInfo" ::: Ptr (CopyAccelerationStructureToMemoryInfoKHR a)
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 -> Ptr (CopyAccelerationStructureToMemoryInfoKHR a) -> IO Result) -> Ptr Device_T -> Ptr (CopyAccelerationStructureToMemoryInfoKHR a) -> IO Result
copyAccelerationStructureToMemoryKHR :: forall a io . (Extendss CopyAccelerationStructureToMemoryInfoKHR a, PokeChain a, MonadIO io) => Device -> CopyAccelerationStructureToMemoryInfoKHR a -> io (Result)
copyAccelerationStructureToMemoryKHR :: Device -> CopyAccelerationStructureToMemoryInfoKHR a -> io Result
copyAccelerationStructureToMemoryKHR device :: Device
device info :: CopyAccelerationStructureToMemoryInfoKHR a
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
-> ("pInfo" ::: Ptr (CopyAccelerationStructureToMemoryInfoKHR a))
-> IO Result)
vkCopyAccelerationStructureToMemoryKHRPtr = DeviceCmds
-> forall (a :: [*]).
FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr (CopyAccelerationStructureToMemoryInfoKHR a))
-> IO Result)
pVkCopyAccelerationStructureToMemoryKHR (Device -> DeviceCmds
deviceCmds (Device
device :: Device))
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
-> ("pInfo" ::: Ptr (CopyAccelerationStructureToMemoryInfoKHR a))
-> IO Result)
vkCopyAccelerationStructureToMemoryKHRPtr FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr (CopyAccelerationStructureToMemoryInfoKHR a))
-> IO Result)
-> FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr (CopyAccelerationStructureToMemoryInfoKHR a))
-> IO Result)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr (CopyAccelerationStructureToMemoryInfoKHR a))
-> 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 "" "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
-> ("pInfo" ::: Ptr (CopyAccelerationStructureToMemoryInfoKHR a))
-> IO Result
vkCopyAccelerationStructureToMemoryKHR' = FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr (CopyAccelerationStructureToMemoryInfoKHR a))
-> IO Result)
-> Ptr Device_T
-> ("pInfo" ::: Ptr (CopyAccelerationStructureToMemoryInfoKHR a))
-> IO Result
forall (a :: [*]).
FunPtr
(Ptr Device_T
-> Ptr (CopyAccelerationStructureToMemoryInfoKHR a) -> IO Result)
-> Ptr Device_T
-> Ptr (CopyAccelerationStructureToMemoryInfoKHR a)
-> IO Result
mkVkCopyAccelerationStructureToMemoryKHR FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr (CopyAccelerationStructureToMemoryInfoKHR a))
-> IO Result)
vkCopyAccelerationStructureToMemoryKHRPtr
"pInfo" ::: Ptr (CopyAccelerationStructureToMemoryInfoKHR a)
pInfo <- ((("pInfo" ::: Ptr (CopyAccelerationStructureToMemoryInfoKHR a))
-> IO Result)
-> IO Result)
-> ContT
Result
IO
("pInfo" ::: Ptr (CopyAccelerationStructureToMemoryInfoKHR a))
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pInfo" ::: Ptr (CopyAccelerationStructureToMemoryInfoKHR a))
-> IO Result)
-> IO Result)
-> ContT
Result
IO
("pInfo" ::: Ptr (CopyAccelerationStructureToMemoryInfoKHR a)))
-> ((("pInfo" ::: Ptr (CopyAccelerationStructureToMemoryInfoKHR a))
-> IO Result)
-> IO Result)
-> ContT
Result
IO
("pInfo" ::: Ptr (CopyAccelerationStructureToMemoryInfoKHR a))
forall a b. (a -> b) -> a -> b
$ CopyAccelerationStructureToMemoryInfoKHR a
-> (("pInfo" ::: Ptr (CopyAccelerationStructureToMemoryInfoKHR a))
-> IO Result)
-> IO Result
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (CopyAccelerationStructureToMemoryInfoKHR a
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
$ Ptr Device_T
-> ("pInfo" ::: Ptr (CopyAccelerationStructureToMemoryInfoKHR a))
-> IO Result
vkCopyAccelerationStructureToMemoryKHR' (Device -> Ptr Device_T
deviceHandle (Device
device)) "pInfo" ::: Ptr (CopyAccelerationStructureToMemoryInfoKHR a)
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 a) -> IO ()) -> Ptr CommandBuffer_T -> Ptr (CopyMemoryToAccelerationStructureInfoKHR a) -> IO ()
cmdCopyMemoryToAccelerationStructureKHR :: forall a io . (Extendss CopyMemoryToAccelerationStructureInfoKHR a, PokeChain a, MonadIO io) => CommandBuffer -> CopyMemoryToAccelerationStructureInfoKHR a -> io ()
cmdCopyMemoryToAccelerationStructureKHR :: CommandBuffer
-> CopyMemoryToAccelerationStructureInfoKHR a -> io ()
cmdCopyMemoryToAccelerationStructureKHR commandBuffer :: CommandBuffer
commandBuffer info :: CopyMemoryToAccelerationStructureInfoKHR a
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 a))
-> IO ())
vkCmdCopyMemoryToAccelerationStructureKHRPtr = DeviceCmds
-> forall (a :: [*]).
FunPtr
(Ptr CommandBuffer_T
-> ("pInfo" ::: Ptr (CopyMemoryToAccelerationStructureInfoKHR a))
-> IO ())
pVkCmdCopyMemoryToAccelerationStructureKHR (CommandBuffer -> DeviceCmds
deviceCmds (CommandBuffer
commandBuffer :: CommandBuffer))
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 a))
-> IO ())
vkCmdCopyMemoryToAccelerationStructureKHRPtr FunPtr
(Ptr CommandBuffer_T
-> ("pInfo" ::: Ptr (CopyMemoryToAccelerationStructureInfoKHR a))
-> IO ())
-> FunPtr
(Ptr CommandBuffer_T
-> ("pInfo" ::: Ptr (CopyMemoryToAccelerationStructureInfoKHR a))
-> IO ())
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr CommandBuffer_T
-> ("pInfo" ::: Ptr (CopyMemoryToAccelerationStructureInfoKHR a))
-> 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 "" "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 a))
-> IO ()
vkCmdCopyMemoryToAccelerationStructureKHR' = FunPtr
(Ptr CommandBuffer_T
-> ("pInfo" ::: Ptr (CopyMemoryToAccelerationStructureInfoKHR a))
-> IO ())
-> Ptr CommandBuffer_T
-> ("pInfo" ::: Ptr (CopyMemoryToAccelerationStructureInfoKHR a))
-> IO ()
forall (a :: [*]).
FunPtr
(Ptr CommandBuffer_T
-> Ptr (CopyMemoryToAccelerationStructureInfoKHR a) -> IO ())
-> Ptr CommandBuffer_T
-> Ptr (CopyMemoryToAccelerationStructureInfoKHR a)
-> IO ()
mkVkCmdCopyMemoryToAccelerationStructureKHR FunPtr
(Ptr CommandBuffer_T
-> ("pInfo" ::: Ptr (CopyMemoryToAccelerationStructureInfoKHR a))
-> IO ())
vkCmdCopyMemoryToAccelerationStructureKHRPtr
"pInfo" ::: Ptr (CopyMemoryToAccelerationStructureInfoKHR a)
pInfo <- ((("pInfo" ::: Ptr (CopyMemoryToAccelerationStructureInfoKHR a))
-> IO ())
-> IO ())
-> ContT
()
IO
("pInfo" ::: Ptr (CopyMemoryToAccelerationStructureInfoKHR a))
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pInfo" ::: Ptr (CopyMemoryToAccelerationStructureInfoKHR a))
-> IO ())
-> IO ())
-> ContT
()
IO
("pInfo" ::: Ptr (CopyMemoryToAccelerationStructureInfoKHR a)))
-> ((("pInfo" ::: Ptr (CopyMemoryToAccelerationStructureInfoKHR a))
-> IO ())
-> IO ())
-> ContT
()
IO
("pInfo" ::: Ptr (CopyMemoryToAccelerationStructureInfoKHR a))
forall a b. (a -> b) -> a -> b
$ CopyMemoryToAccelerationStructureInfoKHR a
-> (("pInfo" ::: Ptr (CopyMemoryToAccelerationStructureInfoKHR a))
-> IO ())
-> IO ()
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (CopyMemoryToAccelerationStructureInfoKHR a
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
$ Ptr CommandBuffer_T
-> ("pInfo" ::: Ptr (CopyMemoryToAccelerationStructureInfoKHR a))
-> IO ()
vkCmdCopyMemoryToAccelerationStructureKHR' (CommandBuffer -> Ptr CommandBuffer_T
commandBufferHandle (CommandBuffer
commandBuffer)) "pInfo" ::: Ptr (CopyMemoryToAccelerationStructureInfoKHR a)
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 -> Ptr (CopyMemoryToAccelerationStructureInfoKHR a) -> IO Result) -> Ptr Device_T -> Ptr (CopyMemoryToAccelerationStructureInfoKHR a) -> IO Result
copyMemoryToAccelerationStructureKHR :: forall a io . (Extendss CopyMemoryToAccelerationStructureInfoKHR a, PokeChain a, MonadIO io) => Device -> CopyMemoryToAccelerationStructureInfoKHR a -> io (Result)
copyMemoryToAccelerationStructureKHR :: Device -> CopyMemoryToAccelerationStructureInfoKHR a -> io Result
copyMemoryToAccelerationStructureKHR device :: Device
device info :: CopyMemoryToAccelerationStructureInfoKHR a
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
-> ("pInfo" ::: Ptr (CopyMemoryToAccelerationStructureInfoKHR a))
-> IO Result)
vkCopyMemoryToAccelerationStructureKHRPtr = DeviceCmds
-> forall (a :: [*]).
FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr (CopyMemoryToAccelerationStructureInfoKHR a))
-> IO Result)
pVkCopyMemoryToAccelerationStructureKHR (Device -> DeviceCmds
deviceCmds (Device
device :: Device))
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
-> ("pInfo" ::: Ptr (CopyMemoryToAccelerationStructureInfoKHR a))
-> IO Result)
vkCopyMemoryToAccelerationStructureKHRPtr FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr (CopyMemoryToAccelerationStructureInfoKHR a))
-> IO Result)
-> FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr (CopyMemoryToAccelerationStructureInfoKHR a))
-> IO Result)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr (CopyMemoryToAccelerationStructureInfoKHR a))
-> 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 "" "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
-> ("pInfo" ::: Ptr (CopyMemoryToAccelerationStructureInfoKHR a))
-> IO Result
vkCopyMemoryToAccelerationStructureKHR' = FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr (CopyMemoryToAccelerationStructureInfoKHR a))
-> IO Result)
-> Ptr Device_T
-> ("pInfo" ::: Ptr (CopyMemoryToAccelerationStructureInfoKHR a))
-> IO Result
forall (a :: [*]).
FunPtr
(Ptr Device_T
-> Ptr (CopyMemoryToAccelerationStructureInfoKHR a) -> IO Result)
-> Ptr Device_T
-> Ptr (CopyMemoryToAccelerationStructureInfoKHR a)
-> IO Result
mkVkCopyMemoryToAccelerationStructureKHR FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr (CopyMemoryToAccelerationStructureInfoKHR a))
-> IO Result)
vkCopyMemoryToAccelerationStructureKHRPtr
"pInfo" ::: Ptr (CopyMemoryToAccelerationStructureInfoKHR a)
pInfo <- ((("pInfo" ::: Ptr (CopyMemoryToAccelerationStructureInfoKHR a))
-> IO Result)
-> IO Result)
-> ContT
Result
IO
("pInfo" ::: Ptr (CopyMemoryToAccelerationStructureInfoKHR a))
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pInfo" ::: Ptr (CopyMemoryToAccelerationStructureInfoKHR a))
-> IO Result)
-> IO Result)
-> ContT
Result
IO
("pInfo" ::: Ptr (CopyMemoryToAccelerationStructureInfoKHR a)))
-> ((("pInfo" ::: Ptr (CopyMemoryToAccelerationStructureInfoKHR a))
-> IO Result)
-> IO Result)
-> ContT
Result
IO
("pInfo" ::: Ptr (CopyMemoryToAccelerationStructureInfoKHR a))
forall a b. (a -> b) -> a -> b
$ CopyMemoryToAccelerationStructureInfoKHR a
-> (("pInfo" ::: Ptr (CopyMemoryToAccelerationStructureInfoKHR a))
-> IO Result)
-> IO Result
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (CopyMemoryToAccelerationStructureInfoKHR a
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
$ Ptr Device_T
-> ("pInfo" ::: Ptr (CopyMemoryToAccelerationStructureInfoKHR a))
-> IO Result
vkCopyMemoryToAccelerationStructureKHR' (Device -> Ptr Device_T
deviceHandle (Device
device)) "pInfo" ::: Ptr (CopyMemoryToAccelerationStructureInfoKHR a)
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 :: CommandBuffer
-> ("accelerationStructures" ::: Vector AccelerationStructureKHR)
-> QueryType
-> QueryPool
-> ("bindInfoCount" ::: Word32)
-> io ()
cmdWriteAccelerationStructuresPropertiesKHR commandBuffer :: CommandBuffer
commandBuffer accelerationStructures :: "accelerationStructures" ::: Vector AccelerationStructureKHR
accelerationStructures queryType :: QueryType
queryType queryPool :: QueryPool
queryPool firstQuery :: "bindInfoCount" ::: Word32
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
-> ("bindInfoCount" ::: Word32)
-> ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> QueryType
-> QueryPool
-> ("bindInfoCount" ::: Word32)
-> IO ())
vkCmdWriteAccelerationStructuresPropertiesKHRPtr = DeviceCmds
-> FunPtr
(Ptr CommandBuffer_T
-> ("bindInfoCount" ::: Word32)
-> ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> QueryType
-> QueryPool
-> ("bindInfoCount" ::: Word32)
-> IO ())
pVkCmdWriteAccelerationStructuresPropertiesKHR (CommandBuffer -> DeviceCmds
deviceCmds (CommandBuffer
commandBuffer :: CommandBuffer))
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
-> ("bindInfoCount" ::: Word32)
-> ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> QueryType
-> QueryPool
-> ("bindInfoCount" ::: Word32)
-> IO ())
vkCmdWriteAccelerationStructuresPropertiesKHRPtr FunPtr
(Ptr CommandBuffer_T
-> ("bindInfoCount" ::: Word32)
-> ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> QueryType
-> QueryPool
-> ("bindInfoCount" ::: Word32)
-> IO ())
-> FunPtr
(Ptr CommandBuffer_T
-> ("bindInfoCount" ::: Word32)
-> ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> QueryType
-> QueryPool
-> ("bindInfoCount" ::: Word32)
-> IO ())
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr CommandBuffer_T
-> ("bindInfoCount" ::: Word32)
-> ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> QueryType
-> QueryPool
-> ("bindInfoCount" ::: Word32)
-> 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 "" "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
-> ("bindInfoCount" ::: Word32)
-> ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> QueryType
-> QueryPool
-> ("bindInfoCount" ::: Word32)
-> IO ()
vkCmdWriteAccelerationStructuresPropertiesKHR' = FunPtr
(Ptr CommandBuffer_T
-> ("bindInfoCount" ::: Word32)
-> ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> QueryType
-> QueryPool
-> ("bindInfoCount" ::: Word32)
-> IO ())
-> Ptr CommandBuffer_T
-> ("bindInfoCount" ::: Word32)
-> ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> QueryType
-> QueryPool
-> ("bindInfoCount" ::: Word32)
-> IO ()
mkVkCmdWriteAccelerationStructuresPropertiesKHR FunPtr
(Ptr CommandBuffer_T
-> ("bindInfoCount" ::: Word32)
-> ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> QueryType
-> QueryPool
-> ("bindInfoCount" ::: Word32)
-> 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
$ Int
-> Int
-> (("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> IO ())
-> IO ()
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned @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
* 8) 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_ (\i :: Int
i e :: 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` (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
$ Ptr CommandBuffer_T
-> ("bindInfoCount" ::: Word32)
-> ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> QueryType
-> QueryPool
-> ("bindInfoCount" ::: Word32)
-> IO ()
vkCmdWriteAccelerationStructuresPropertiesKHR' (CommandBuffer -> Ptr CommandBuffer_T
commandBufferHandle (CommandBuffer
commandBuffer)) ((Int -> "bindInfoCount" ::: Word32
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) ("bindInfoCount" ::: Word32
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 :: Device
-> ("accelerationStructures" ::: Vector AccelerationStructureKHR)
-> QueryType
-> ("dataSize" ::: Word64)
-> ("data" ::: Ptr ())
-> ("dataSize" ::: Word64)
-> io ()
writeAccelerationStructuresPropertiesKHR device :: Device
device accelerationStructures :: "accelerationStructures" ::: Vector AccelerationStructureKHR
accelerationStructures queryType :: QueryType
queryType dataSize :: "dataSize" ::: Word64
dataSize data' :: "data" ::: Ptr ()
data' stride :: "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
-> ("bindInfoCount" ::: Word32)
-> ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> QueryType
-> ("dataSize" ::: CSize)
-> ("data" ::: Ptr ())
-> ("dataSize" ::: CSize)
-> IO Result)
vkWriteAccelerationStructuresPropertiesKHRPtr = DeviceCmds
-> FunPtr
(Ptr Device_T
-> ("bindInfoCount" ::: Word32)
-> ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> QueryType
-> ("dataSize" ::: CSize)
-> ("data" ::: Ptr ())
-> ("dataSize" ::: CSize)
-> IO Result)
pVkWriteAccelerationStructuresPropertiesKHR (Device -> DeviceCmds
deviceCmds (Device
device :: Device))
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
-> ("bindInfoCount" ::: Word32)
-> ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> QueryType
-> ("dataSize" ::: CSize)
-> ("data" ::: Ptr ())
-> ("dataSize" ::: CSize)
-> IO Result)
vkWriteAccelerationStructuresPropertiesKHRPtr FunPtr
(Ptr Device_T
-> ("bindInfoCount" ::: Word32)
-> ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> QueryType
-> ("dataSize" ::: CSize)
-> ("data" ::: Ptr ())
-> ("dataSize" ::: CSize)
-> IO Result)
-> FunPtr
(Ptr Device_T
-> ("bindInfoCount" ::: Word32)
-> ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> QueryType
-> ("dataSize" ::: CSize)
-> ("data" ::: Ptr ())
-> ("dataSize" ::: CSize)
-> IO Result)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr Device_T
-> ("bindInfoCount" ::: Word32)
-> ("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 "" "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
-> ("bindInfoCount" ::: Word32)
-> ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> QueryType
-> ("dataSize" ::: CSize)
-> ("data" ::: Ptr ())
-> ("dataSize" ::: CSize)
-> IO Result
vkWriteAccelerationStructuresPropertiesKHR' = FunPtr
(Ptr Device_T
-> ("bindInfoCount" ::: Word32)
-> ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> QueryType
-> ("dataSize" ::: CSize)
-> ("data" ::: Ptr ())
-> ("dataSize" ::: CSize)
-> IO Result)
-> Ptr Device_T
-> ("bindInfoCount" ::: Word32)
-> ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> QueryType
-> ("dataSize" ::: CSize)
-> ("data" ::: Ptr ())
-> ("dataSize" ::: CSize)
-> IO Result
mkVkWriteAccelerationStructuresPropertiesKHR FunPtr
(Ptr Device_T
-> ("bindInfoCount" ::: Word32)
-> ("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
$ Int
-> Int
-> (("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> IO ())
-> IO ()
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned @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
* 8) 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_ (\i :: Int
i e :: 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` (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
$ Ptr Device_T
-> ("bindInfoCount" ::: Word32)
-> ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> QueryType
-> ("dataSize" ::: CSize)
-> ("data" ::: Ptr ())
-> ("dataSize" ::: CSize)
-> IO Result
vkWriteAccelerationStructuresPropertiesKHR' (Device -> Ptr Device_T
deviceHandle (Device
device)) ((Int -> "bindInfoCount" ::: Word32
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" mkVkCmdTraceRaysKHR
:: FunPtr (Ptr CommandBuffer_T -> Ptr StridedBufferRegionKHR -> Ptr StridedBufferRegionKHR -> Ptr StridedBufferRegionKHR -> Ptr StridedBufferRegionKHR -> Word32 -> Word32 -> Word32 -> IO ()) -> Ptr CommandBuffer_T -> Ptr StridedBufferRegionKHR -> Ptr StridedBufferRegionKHR -> Ptr StridedBufferRegionKHR -> Ptr StridedBufferRegionKHR -> Word32 -> Word32 -> Word32 -> IO ()
cmdTraceRaysKHR :: forall io . MonadIO io => CommandBuffer -> ("raygenShaderBindingTable" ::: StridedBufferRegionKHR) -> ("missShaderBindingTable" ::: StridedBufferRegionKHR) -> ("hitShaderBindingTable" ::: StridedBufferRegionKHR) -> ("callableShaderBindingTable" ::: StridedBufferRegionKHR) -> ("width" ::: Word32) -> ("height" ::: Word32) -> ("depth" ::: Word32) -> io ()
cmdTraceRaysKHR :: CommandBuffer
-> ("raygenShaderBindingTable" ::: StridedBufferRegionKHR)
-> ("raygenShaderBindingTable" ::: StridedBufferRegionKHR)
-> ("raygenShaderBindingTable" ::: StridedBufferRegionKHR)
-> ("raygenShaderBindingTable" ::: StridedBufferRegionKHR)
-> ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32)
-> io ()
cmdTraceRaysKHR commandBuffer :: CommandBuffer
commandBuffer raygenShaderBindingTable :: "raygenShaderBindingTable" ::: StridedBufferRegionKHR
raygenShaderBindingTable missShaderBindingTable :: "raygenShaderBindingTable" ::: StridedBufferRegionKHR
missShaderBindingTable hitShaderBindingTable :: "raygenShaderBindingTable" ::: StridedBufferRegionKHR
hitShaderBindingTable callableShaderBindingTable :: "raygenShaderBindingTable" ::: StridedBufferRegionKHR
callableShaderBindingTable width :: "bindInfoCount" ::: Word32
width height :: "bindInfoCount" ::: Word32
height depth :: "bindInfoCount" ::: Word32
depth = 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 vkCmdTraceRaysKHRPtr :: FunPtr
(Ptr CommandBuffer_T
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32)
-> IO ())
vkCmdTraceRaysKHRPtr = DeviceCmds
-> FunPtr
(Ptr CommandBuffer_T
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32)
-> IO ())
pVkCmdTraceRaysKHR (CommandBuffer -> DeviceCmds
deviceCmds (CommandBuffer
commandBuffer :: CommandBuffer))
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
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32)
-> IO ())
vkCmdTraceRaysKHRPtr FunPtr
(Ptr CommandBuffer_T
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32)
-> IO ())
-> FunPtr
(Ptr CommandBuffer_T
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32)
-> IO ())
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr CommandBuffer_T
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32)
-> 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 "" "The function pointer for vkCmdTraceRaysKHR is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let vkCmdTraceRaysKHR' :: Ptr CommandBuffer_T
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32)
-> IO ()
vkCmdTraceRaysKHR' = FunPtr
(Ptr CommandBuffer_T
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32)
-> IO ())
-> Ptr CommandBuffer_T
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32)
-> IO ()
mkVkCmdTraceRaysKHR FunPtr
(Ptr CommandBuffer_T
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32)
-> IO ())
vkCmdTraceRaysKHRPtr
"pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR)
pRaygenShaderBindingTable <- ((("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> IO ())
-> IO ())
-> ContT
()
IO
("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> IO ())
-> IO ())
-> ContT
()
IO
("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR)))
-> ((("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> IO ())
-> IO ())
-> ContT
()
IO
("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
forall a b. (a -> b) -> a -> b
$ ("raygenShaderBindingTable" ::: StridedBufferRegionKHR)
-> (("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> IO ())
-> IO ()
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct ("raygenShaderBindingTable" ::: StridedBufferRegionKHR
raygenShaderBindingTable)
"pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR)
pMissShaderBindingTable <- ((("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> IO ())
-> IO ())
-> ContT
()
IO
("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> IO ())
-> IO ())
-> ContT
()
IO
("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR)))
-> ((("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> IO ())
-> IO ())
-> ContT
()
IO
("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
forall a b. (a -> b) -> a -> b
$ ("raygenShaderBindingTable" ::: StridedBufferRegionKHR)
-> (("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> IO ())
-> IO ()
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct ("raygenShaderBindingTable" ::: StridedBufferRegionKHR
missShaderBindingTable)
"pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR)
pHitShaderBindingTable <- ((("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> IO ())
-> IO ())
-> ContT
()
IO
("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> IO ())
-> IO ())
-> ContT
()
IO
("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR)))
-> ((("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> IO ())
-> IO ())
-> ContT
()
IO
("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
forall a b. (a -> b) -> a -> b
$ ("raygenShaderBindingTable" ::: StridedBufferRegionKHR)
-> (("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> IO ())
-> IO ()
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct ("raygenShaderBindingTable" ::: StridedBufferRegionKHR
hitShaderBindingTable)
"pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR)
pCallableShaderBindingTable <- ((("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> IO ())
-> IO ())
-> ContT
()
IO
("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> IO ())
-> IO ())
-> ContT
()
IO
("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR)))
-> ((("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> IO ())
-> IO ())
-> ContT
()
IO
("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
forall a b. (a -> b) -> a -> b
$ ("raygenShaderBindingTable" ::: StridedBufferRegionKHR)
-> (("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> IO ())
-> IO ()
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct ("raygenShaderBindingTable" ::: StridedBufferRegionKHR
callableShaderBindingTable)
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
$ Ptr CommandBuffer_T
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32)
-> IO ()
vkCmdTraceRaysKHR' (CommandBuffer -> Ptr CommandBuffer_T
commandBufferHandle (CommandBuffer
commandBuffer)) "pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR)
pRaygenShaderBindingTable "pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR)
pMissShaderBindingTable "pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR)
pHitShaderBindingTable "pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR)
pCallableShaderBindingTable ("bindInfoCount" ::: Word32
width) ("bindInfoCount" ::: Word32
height) ("bindInfoCount" ::: Word32
depth)
() -> 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" mkVkGetRayTracingShaderGroupHandlesKHR
:: FunPtr (Ptr Device_T -> Pipeline -> Word32 -> Word32 -> CSize -> Ptr () -> IO Result) -> Ptr Device_T -> Pipeline -> Word32 -> Word32 -> CSize -> Ptr () -> IO Result
getRayTracingShaderGroupHandlesKHR :: forall io . MonadIO io => Device -> Pipeline -> ("firstGroup" ::: Word32) -> ("groupCount" ::: Word32) -> ("dataSize" ::: Word64) -> ("data" ::: Ptr ()) -> io ()
getRayTracingShaderGroupHandlesKHR :: Device
-> Pipeline
-> ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32)
-> ("dataSize" ::: Word64)
-> ("data" ::: Ptr ())
-> io ()
getRayTracingShaderGroupHandlesKHR device :: Device
device pipeline :: Pipeline
pipeline firstGroup :: "bindInfoCount" ::: Word32
firstGroup groupCount :: "bindInfoCount" ::: Word32
groupCount dataSize :: "dataSize" ::: Word64
dataSize data' :: "data" ::: Ptr ()
data' = IO () -> io ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> io ()) -> IO () -> io ()
forall a b. (a -> b) -> a -> b
$ do
let vkGetRayTracingShaderGroupHandlesKHRPtr :: FunPtr
(Ptr Device_T
-> Pipeline
-> ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32)
-> ("dataSize" ::: CSize)
-> ("data" ::: Ptr ())
-> IO Result)
vkGetRayTracingShaderGroupHandlesKHRPtr = DeviceCmds
-> FunPtr
(Ptr Device_T
-> Pipeline
-> ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32)
-> ("dataSize" ::: CSize)
-> ("data" ::: Ptr ())
-> IO Result)
pVkGetRayTracingShaderGroupHandlesKHR (Device -> DeviceCmds
deviceCmds (Device
device :: Device))
Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr Device_T
-> Pipeline
-> ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32)
-> ("dataSize" ::: CSize)
-> ("data" ::: Ptr ())
-> IO Result)
vkGetRayTracingShaderGroupHandlesKHRPtr FunPtr
(Ptr Device_T
-> Pipeline
-> ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32)
-> ("dataSize" ::: CSize)
-> ("data" ::: Ptr ())
-> IO Result)
-> FunPtr
(Ptr Device_T
-> Pipeline
-> ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32)
-> ("dataSize" ::: CSize)
-> ("data" ::: Ptr ())
-> IO Result)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr Device_T
-> Pipeline
-> ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32)
-> ("dataSize" ::: CSize)
-> ("data" ::: Ptr ())
-> 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 "" "The function pointer for vkGetRayTracingShaderGroupHandlesKHR is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let vkGetRayTracingShaderGroupHandlesKHR' :: Ptr Device_T
-> Pipeline
-> ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32)
-> ("dataSize" ::: CSize)
-> ("data" ::: Ptr ())
-> IO Result
vkGetRayTracingShaderGroupHandlesKHR' = FunPtr
(Ptr Device_T
-> Pipeline
-> ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32)
-> ("dataSize" ::: CSize)
-> ("data" ::: Ptr ())
-> IO Result)
-> Ptr Device_T
-> Pipeline
-> ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32)
-> ("dataSize" ::: CSize)
-> ("data" ::: Ptr ())
-> IO Result
mkVkGetRayTracingShaderGroupHandlesKHR FunPtr
(Ptr Device_T
-> Pipeline
-> ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32)
-> ("dataSize" ::: CSize)
-> ("data" ::: Ptr ())
-> IO Result)
vkGetRayTracingShaderGroupHandlesKHRPtr
Result
r <- Ptr Device_T
-> Pipeline
-> ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32)
-> ("dataSize" ::: CSize)
-> ("data" ::: Ptr ())
-> IO Result
vkGetRayTracingShaderGroupHandlesKHR' (Device -> Ptr Device_T
deviceHandle (Device
device)) (Pipeline
pipeline) ("bindInfoCount" ::: Word32
firstGroup) ("bindInfoCount" ::: Word32
groupCount) (("dataSize" ::: Word64) -> "dataSize" ::: CSize
CSize ("dataSize" ::: Word64
dataSize)) ("data" ::: Ptr ()
data')
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" mkVkGetRayTracingCaptureReplayShaderGroupHandlesKHR
:: FunPtr (Ptr Device_T -> Pipeline -> Word32 -> Word32 -> CSize -> Ptr () -> IO Result) -> Ptr Device_T -> Pipeline -> Word32 -> Word32 -> CSize -> Ptr () -> IO Result
getRayTracingCaptureReplayShaderGroupHandlesKHR :: forall io . MonadIO io => Device -> Pipeline -> ("firstGroup" ::: Word32) -> ("groupCount" ::: Word32) -> ("dataSize" ::: Word64) -> ("data" ::: Ptr ()) -> io ()
getRayTracingCaptureReplayShaderGroupHandlesKHR :: Device
-> Pipeline
-> ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32)
-> ("dataSize" ::: Word64)
-> ("data" ::: Ptr ())
-> io ()
getRayTracingCaptureReplayShaderGroupHandlesKHR device :: Device
device pipeline :: Pipeline
pipeline firstGroup :: "bindInfoCount" ::: Word32
firstGroup groupCount :: "bindInfoCount" ::: Word32
groupCount dataSize :: "dataSize" ::: Word64
dataSize data' :: "data" ::: Ptr ()
data' = IO () -> io ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> io ()) -> IO () -> io ()
forall a b. (a -> b) -> a -> b
$ do
let vkGetRayTracingCaptureReplayShaderGroupHandlesKHRPtr :: FunPtr
(Ptr Device_T
-> Pipeline
-> ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32)
-> ("dataSize" ::: CSize)
-> ("data" ::: Ptr ())
-> IO Result)
vkGetRayTracingCaptureReplayShaderGroupHandlesKHRPtr = DeviceCmds
-> FunPtr
(Ptr Device_T
-> Pipeline
-> ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32)
-> ("dataSize" ::: CSize)
-> ("data" ::: Ptr ())
-> IO Result)
pVkGetRayTracingCaptureReplayShaderGroupHandlesKHR (Device -> DeviceCmds
deviceCmds (Device
device :: Device))
Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr Device_T
-> Pipeline
-> ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32)
-> ("dataSize" ::: CSize)
-> ("data" ::: Ptr ())
-> IO Result)
vkGetRayTracingCaptureReplayShaderGroupHandlesKHRPtr FunPtr
(Ptr Device_T
-> Pipeline
-> ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32)
-> ("dataSize" ::: CSize)
-> ("data" ::: Ptr ())
-> IO Result)
-> FunPtr
(Ptr Device_T
-> Pipeline
-> ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32)
-> ("dataSize" ::: CSize)
-> ("data" ::: Ptr ())
-> IO Result)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr Device_T
-> Pipeline
-> ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32)
-> ("dataSize" ::: CSize)
-> ("data" ::: Ptr ())
-> 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 "" "The function pointer for vkGetRayTracingCaptureReplayShaderGroupHandlesKHR is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let vkGetRayTracingCaptureReplayShaderGroupHandlesKHR' :: Ptr Device_T
-> Pipeline
-> ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32)
-> ("dataSize" ::: CSize)
-> ("data" ::: Ptr ())
-> IO Result
vkGetRayTracingCaptureReplayShaderGroupHandlesKHR' = FunPtr
(Ptr Device_T
-> Pipeline
-> ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32)
-> ("dataSize" ::: CSize)
-> ("data" ::: Ptr ())
-> IO Result)
-> Ptr Device_T
-> Pipeline
-> ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32)
-> ("dataSize" ::: CSize)
-> ("data" ::: Ptr ())
-> IO Result
mkVkGetRayTracingCaptureReplayShaderGroupHandlesKHR FunPtr
(Ptr Device_T
-> Pipeline
-> ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32)
-> ("dataSize" ::: CSize)
-> ("data" ::: Ptr ())
-> IO Result)
vkGetRayTracingCaptureReplayShaderGroupHandlesKHRPtr
Result
r <- Ptr Device_T
-> Pipeline
-> ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32)
-> ("dataSize" ::: CSize)
-> ("data" ::: Ptr ())
-> IO Result
vkGetRayTracingCaptureReplayShaderGroupHandlesKHR' (Device -> Ptr Device_T
deviceHandle (Device
device)) (Pipeline
pipeline) ("bindInfoCount" ::: Word32
firstGroup) ("bindInfoCount" ::: Word32
groupCount) (("dataSize" ::: Word64) -> "dataSize" ::: CSize
CSize ("dataSize" ::: Word64
dataSize)) ("data" ::: Ptr ()
data')
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" mkVkCreateRayTracingPipelinesKHR
:: FunPtr (Ptr Device_T -> PipelineCache -> Word32 -> Ptr (RayTracingPipelineCreateInfoKHR a) -> Ptr AllocationCallbacks -> Ptr Pipeline -> IO Result) -> Ptr Device_T -> PipelineCache -> Word32 -> Ptr (RayTracingPipelineCreateInfoKHR a) -> Ptr AllocationCallbacks -> Ptr Pipeline -> IO Result
createRayTracingPipelinesKHR :: forall io . MonadIO io => Device -> PipelineCache -> ("createInfos" ::: Vector (SomeStruct RayTracingPipelineCreateInfoKHR)) -> ("allocator" ::: Maybe AllocationCallbacks) -> io (Result, ("pipelines" ::: Vector Pipeline))
createRayTracingPipelinesKHR :: Device
-> PipelineCache
-> ("createInfos"
::: Vector (SomeStruct RayTracingPipelineCreateInfoKHR))
-> ("allocator" ::: Maybe AllocationCallbacks)
-> io (Result, "pipelines" ::: Vector Pipeline)
createRayTracingPipelinesKHR device :: Device
device pipelineCache :: PipelineCache
pipelineCache createInfos :: "createInfos"
::: Vector (SomeStruct RayTracingPipelineCreateInfoKHR)
createInfos allocator :: "allocator" ::: Maybe AllocationCallbacks
allocator = IO (Result, "pipelines" ::: Vector Pipeline)
-> io (Result, "pipelines" ::: Vector Pipeline)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Result, "pipelines" ::: Vector Pipeline)
-> io (Result, "pipelines" ::: Vector Pipeline))
-> (ContT
(Result, "pipelines" ::: Vector Pipeline)
IO
(Result, "pipelines" ::: Vector Pipeline)
-> IO (Result, "pipelines" ::: Vector Pipeline))
-> ContT
(Result, "pipelines" ::: Vector Pipeline)
IO
(Result, "pipelines" ::: Vector Pipeline)
-> io (Result, "pipelines" ::: Vector Pipeline)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT
(Result, "pipelines" ::: Vector Pipeline)
IO
(Result, "pipelines" ::: Vector Pipeline)
-> IO (Result, "pipelines" ::: Vector Pipeline)
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT
(Result, "pipelines" ::: Vector Pipeline)
IO
(Result, "pipelines" ::: Vector Pipeline)
-> io (Result, "pipelines" ::: Vector Pipeline))
-> ContT
(Result, "pipelines" ::: Vector Pipeline)
IO
(Result, "pipelines" ::: Vector Pipeline)
-> io (Result, "pipelines" ::: Vector Pipeline)
forall a b. (a -> b) -> a -> b
$ do
let vkCreateRayTracingPipelinesKHRPtr :: FunPtr
(Ptr Device_T
-> PipelineCache
-> ("bindInfoCount" ::: Word32)
-> ("pCreateInfos" ::: Ptr (RayTracingPipelineCreateInfoKHR Any))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pPipelines" ::: Ptr Pipeline)
-> IO Result)
vkCreateRayTracingPipelinesKHRPtr = DeviceCmds
-> forall (a :: [*]).
FunPtr
(Ptr Device_T
-> PipelineCache
-> ("bindInfoCount" ::: Word32)
-> ("pCreateInfos" ::: Ptr (RayTracingPipelineCreateInfoKHR a))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pPipelines" ::: Ptr Pipeline)
-> IO Result)
pVkCreateRayTracingPipelinesKHR (Device -> DeviceCmds
deviceCmds (Device
device :: Device))
IO () -> ContT (Result, "pipelines" ::: Vector Pipeline) IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT (Result, "pipelines" ::: Vector Pipeline) IO ())
-> IO () -> ContT (Result, "pipelines" ::: Vector Pipeline) IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr Device_T
-> PipelineCache
-> ("bindInfoCount" ::: Word32)
-> ("pCreateInfos" ::: Ptr (RayTracingPipelineCreateInfoKHR Any))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pPipelines" ::: Ptr Pipeline)
-> IO Result)
vkCreateRayTracingPipelinesKHRPtr FunPtr
(Ptr Device_T
-> PipelineCache
-> ("bindInfoCount" ::: Word32)
-> ("pCreateInfos" ::: Ptr (RayTracingPipelineCreateInfoKHR Any))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pPipelines" ::: Ptr Pipeline)
-> IO Result)
-> FunPtr
(Ptr Device_T
-> PipelineCache
-> ("bindInfoCount" ::: Word32)
-> ("pCreateInfos" ::: Ptr (RayTracingPipelineCreateInfoKHR Any))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pPipelines" ::: Ptr Pipeline)
-> IO Result)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr Device_T
-> PipelineCache
-> ("bindInfoCount" ::: Word32)
-> ("pCreateInfos" ::: Ptr (RayTracingPipelineCreateInfoKHR Any))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pPipelines" ::: Ptr Pipeline)
-> 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 "" "The function pointer for vkCreateRayTracingPipelinesKHR is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let vkCreateRayTracingPipelinesKHR' :: Ptr Device_T
-> PipelineCache
-> ("bindInfoCount" ::: Word32)
-> ("pCreateInfos" ::: Ptr (RayTracingPipelineCreateInfoKHR Any))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pPipelines" ::: Ptr Pipeline)
-> IO Result
vkCreateRayTracingPipelinesKHR' = FunPtr
(Ptr Device_T
-> PipelineCache
-> ("bindInfoCount" ::: Word32)
-> ("pCreateInfos" ::: Ptr (RayTracingPipelineCreateInfoKHR Any))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pPipelines" ::: Ptr Pipeline)
-> IO Result)
-> Ptr Device_T
-> PipelineCache
-> ("bindInfoCount" ::: Word32)
-> ("pCreateInfos" ::: Ptr (RayTracingPipelineCreateInfoKHR Any))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pPipelines" ::: Ptr Pipeline)
-> IO Result
forall (a :: [*]).
FunPtr
(Ptr Device_T
-> PipelineCache
-> ("bindInfoCount" ::: Word32)
-> Ptr (RayTracingPipelineCreateInfoKHR a)
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pPipelines" ::: Ptr Pipeline)
-> IO Result)
-> Ptr Device_T
-> PipelineCache
-> ("bindInfoCount" ::: Word32)
-> Ptr (RayTracingPipelineCreateInfoKHR a)
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pPipelines" ::: Ptr Pipeline)
-> IO Result
mkVkCreateRayTracingPipelinesKHR FunPtr
(Ptr Device_T
-> PipelineCache
-> ("bindInfoCount" ::: Word32)
-> ("pCreateInfos" ::: Ptr (RayTracingPipelineCreateInfoKHR Any))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pPipelines" ::: Ptr Pipeline)
-> IO Result)
vkCreateRayTracingPipelinesKHRPtr
"pCreateInfos" ::: Ptr (RayTracingPipelineCreateInfoKHR Any)
pPCreateInfos <- ((("pCreateInfos" ::: Ptr (RayTracingPipelineCreateInfoKHR Any))
-> IO (Result, "pipelines" ::: Vector Pipeline))
-> IO (Result, "pipelines" ::: Vector Pipeline))
-> ContT
(Result, "pipelines" ::: Vector Pipeline)
IO
("pCreateInfos" ::: Ptr (RayTracingPipelineCreateInfoKHR Any))
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pCreateInfos" ::: Ptr (RayTracingPipelineCreateInfoKHR Any))
-> IO (Result, "pipelines" ::: Vector Pipeline))
-> IO (Result, "pipelines" ::: Vector Pipeline))
-> ContT
(Result, "pipelines" ::: Vector Pipeline)
IO
("pCreateInfos" ::: Ptr (RayTracingPipelineCreateInfoKHR Any)))
-> ((("pCreateInfos" ::: Ptr (RayTracingPipelineCreateInfoKHR Any))
-> IO (Result, "pipelines" ::: Vector Pipeline))
-> IO (Result, "pipelines" ::: Vector Pipeline))
-> ContT
(Result, "pipelines" ::: Vector Pipeline)
IO
("pCreateInfos" ::: Ptr (RayTracingPipelineCreateInfoKHR Any))
forall a b. (a -> b) -> a -> b
$ Int
-> Int
-> (("pCreateInfos" ::: Ptr (RayTracingPipelineCreateInfoKHR Any))
-> IO (Result, "pipelines" ::: Vector Pipeline))
-> IO (Result, "pipelines" ::: Vector Pipeline)
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned @(RayTracingPipelineCreateInfoKHR _) ((("createInfos"
::: Vector (SomeStruct RayTracingPipelineCreateInfoKHR))
-> Int
forall a. Vector a -> Int
Data.Vector.length ("createInfos"
::: Vector (SomeStruct RayTracingPipelineCreateInfoKHR)
createInfos)) Int -> Int -> Int
forall a. Num a => a -> a -> a
* 120) 8
(Int
-> SomeStruct RayTracingPipelineCreateInfoKHR
-> ContT (Result, "pipelines" ::: Vector Pipeline) IO ())
-> ("createInfos"
::: Vector (SomeStruct RayTracingPipelineCreateInfoKHR))
-> ContT (Result, "pipelines" ::: Vector Pipeline) IO ()
forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\i :: Int
i e :: SomeStruct RayTracingPipelineCreateInfoKHR
e -> ((() -> IO (Result, "pipelines" ::: Vector Pipeline))
-> IO (Result, "pipelines" ::: Vector Pipeline))
-> ContT (Result, "pipelines" ::: Vector Pipeline) IO ()
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((() -> IO (Result, "pipelines" ::: Vector Pipeline))
-> IO (Result, "pipelines" ::: Vector Pipeline))
-> ContT (Result, "pipelines" ::: Vector Pipeline) IO ())
-> ((() -> IO (Result, "pipelines" ::: Vector Pipeline))
-> IO (Result, "pipelines" ::: Vector Pipeline))
-> ContT (Result, "pipelines" ::: Vector Pipeline) IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (SomeStruct RayTracingPipelineCreateInfoKHR)
-> SomeStruct RayTracingPipelineCreateInfoKHR
-> IO (Result, "pipelines" ::: Vector Pipeline)
-> IO (Result, "pipelines" ::: Vector Pipeline)
forall (a :: [*] -> *) b.
(forall (es :: [*]).
(Extendss a es, PokeChain es) =>
ToCStruct (a es)) =>
Ptr (SomeStruct a) -> SomeStruct a -> IO b -> IO b
pokeSomeCStruct (("pCreateInfos" ::: Ptr (RayTracingPipelineCreateInfoKHR Any))
-> Ptr (SomeStruct RayTracingPipelineCreateInfoKHR)
forall (a :: [*] -> *) (es :: [*]).
Ptr (a es) -> Ptr (SomeStruct a)
forgetExtensions ("pCreateInfos" ::: Ptr (RayTracingPipelineCreateInfoKHR Any)
pPCreateInfos ("pCreateInfos" ::: Ptr (RayTracingPipelineCreateInfoKHR Any))
-> Int -> Ptr (RayTracingPipelineCreateInfoKHR _)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (120 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr (RayTracingPipelineCreateInfoKHR _))) (SomeStruct RayTracingPipelineCreateInfoKHR
e) (IO (Result, "pipelines" ::: Vector Pipeline)
-> IO (Result, "pipelines" ::: Vector Pipeline))
-> ((() -> IO (Result, "pipelines" ::: Vector Pipeline))
-> IO (Result, "pipelines" ::: Vector Pipeline))
-> (() -> IO (Result, "pipelines" ::: Vector Pipeline))
-> IO (Result, "pipelines" ::: Vector Pipeline)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((() -> IO (Result, "pipelines" ::: Vector Pipeline))
-> () -> IO (Result, "pipelines" ::: Vector Pipeline)
forall a b. (a -> b) -> a -> b
$ ())) ("createInfos"
::: Vector (SomeStruct RayTracingPipelineCreateInfoKHR)
createInfos)
"pAllocator" ::: Ptr AllocationCallbacks
pAllocator <- case ("allocator" ::: Maybe AllocationCallbacks
allocator) of
Nothing -> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ContT
(Result, "pipelines" ::: Vector Pipeline)
IO
("pAllocator" ::: Ptr AllocationCallbacks)
forall (f :: * -> *) a. Applicative f => a -> f a
pure "pAllocator" ::: Ptr AllocationCallbacks
forall a. Ptr a
nullPtr
Just j :: AllocationCallbacks
j -> ((("pAllocator" ::: Ptr AllocationCallbacks)
-> IO (Result, "pipelines" ::: Vector Pipeline))
-> IO (Result, "pipelines" ::: Vector Pipeline))
-> ContT
(Result, "pipelines" ::: Vector Pipeline)
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 (Result, "pipelines" ::: Vector Pipeline))
-> IO (Result, "pipelines" ::: Vector Pipeline))
-> ContT
(Result, "pipelines" ::: Vector Pipeline)
IO
("pAllocator" ::: Ptr AllocationCallbacks))
-> ((("pAllocator" ::: Ptr AllocationCallbacks)
-> IO (Result, "pipelines" ::: Vector Pipeline))
-> IO (Result, "pipelines" ::: Vector Pipeline))
-> ContT
(Result, "pipelines" ::: Vector Pipeline)
IO
("pAllocator" ::: Ptr AllocationCallbacks)
forall a b. (a -> b) -> a -> b
$ AllocationCallbacks
-> (("pAllocator" ::: Ptr AllocationCallbacks)
-> IO (Result, "pipelines" ::: Vector Pipeline))
-> IO (Result, "pipelines" ::: Vector Pipeline)
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (AllocationCallbacks
j)
"pPipelines" ::: Ptr Pipeline
pPPipelines <- ((("pPipelines" ::: Ptr Pipeline)
-> IO (Result, "pipelines" ::: Vector Pipeline))
-> IO (Result, "pipelines" ::: Vector Pipeline))
-> ContT
(Result, "pipelines" ::: Vector Pipeline)
IO
("pPipelines" ::: Ptr Pipeline)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pPipelines" ::: Ptr Pipeline)
-> IO (Result, "pipelines" ::: Vector Pipeline))
-> IO (Result, "pipelines" ::: Vector Pipeline))
-> ContT
(Result, "pipelines" ::: Vector Pipeline)
IO
("pPipelines" ::: Ptr Pipeline))
-> ((("pPipelines" ::: Ptr Pipeline)
-> IO (Result, "pipelines" ::: Vector Pipeline))
-> IO (Result, "pipelines" ::: Vector Pipeline))
-> ContT
(Result, "pipelines" ::: Vector Pipeline)
IO
("pPipelines" ::: Ptr Pipeline)
forall a b. (a -> b) -> a -> b
$ IO ("pPipelines" ::: Ptr Pipeline)
-> (("pPipelines" ::: Ptr Pipeline) -> IO ())
-> (("pPipelines" ::: Ptr Pipeline)
-> IO (Result, "pipelines" ::: Vector Pipeline))
-> IO (Result, "pipelines" ::: Vector Pipeline)
forall a b c. IO a -> (a -> IO b) -> (a -> IO c) -> IO c
bracket (Int -> IO ("pPipelines" ::: Ptr Pipeline)
forall a. Int -> IO (Ptr a)
callocBytes @Pipeline ((("bindInfoCount" ::: Word32) -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral ((Int -> "bindInfoCount" ::: Word32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (("createInfos"
::: Vector (SomeStruct RayTracingPipelineCreateInfoKHR))
-> Int
forall a. Vector a -> Int
Data.Vector.length (("createInfos"
::: Vector (SomeStruct RayTracingPipelineCreateInfoKHR))
-> Int)
-> ("createInfos"
::: Vector (SomeStruct RayTracingPipelineCreateInfoKHR))
-> Int
forall a b. (a -> b) -> a -> b
$ ("createInfos"
::: Vector (SomeStruct RayTracingPipelineCreateInfoKHR)
createInfos)) :: Word32))) Int -> Int -> Int
forall a. Num a => a -> a -> a
* 8)) ("pPipelines" ::: Ptr Pipeline) -> IO ()
forall a. Ptr a -> IO ()
free
Result
r <- IO Result
-> ContT (Result, "pipelines" ::: Vector Pipeline) IO Result
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO Result
-> ContT (Result, "pipelines" ::: Vector Pipeline) IO Result)
-> IO Result
-> ContT (Result, "pipelines" ::: Vector Pipeline) IO Result
forall a b. (a -> b) -> a -> b
$ Ptr Device_T
-> PipelineCache
-> ("bindInfoCount" ::: Word32)
-> ("pCreateInfos" ::: Ptr (RayTracingPipelineCreateInfoKHR Any))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pPipelines" ::: Ptr Pipeline)
-> IO Result
vkCreateRayTracingPipelinesKHR' (Device -> Ptr Device_T
deviceHandle (Device
device)) (PipelineCache
pipelineCache) ((Int -> "bindInfoCount" ::: Word32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (("createInfos"
::: Vector (SomeStruct RayTracingPipelineCreateInfoKHR))
-> Int
forall a. Vector a -> Int
Data.Vector.length (("createInfos"
::: Vector (SomeStruct RayTracingPipelineCreateInfoKHR))
-> Int)
-> ("createInfos"
::: Vector (SomeStruct RayTracingPipelineCreateInfoKHR))
-> Int
forall a b. (a -> b) -> a -> b
$ ("createInfos"
::: Vector (SomeStruct RayTracingPipelineCreateInfoKHR)
createInfos)) :: Word32)) ("pCreateInfos" ::: Ptr (RayTracingPipelineCreateInfoKHR Any)
pPCreateInfos) "pAllocator" ::: Ptr AllocationCallbacks
pAllocator ("pPipelines" ::: Ptr Pipeline
pPPipelines)
IO () -> ContT (Result, "pipelines" ::: Vector Pipeline) IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT (Result, "pipelines" ::: Vector Pipeline) IO ())
-> IO () -> ContT (Result, "pipelines" ::: Vector Pipeline) 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))
"pipelines" ::: Vector Pipeline
pPipelines <- IO ("pipelines" ::: Vector Pipeline)
-> ContT
(Result, "pipelines" ::: Vector Pipeline)
IO
("pipelines" ::: Vector Pipeline)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO ("pipelines" ::: Vector Pipeline)
-> ContT
(Result, "pipelines" ::: Vector Pipeline)
IO
("pipelines" ::: Vector Pipeline))
-> IO ("pipelines" ::: Vector Pipeline)
-> ContT
(Result, "pipelines" ::: Vector Pipeline)
IO
("pipelines" ::: Vector Pipeline)
forall a b. (a -> b) -> a -> b
$ Int -> (Int -> IO Pipeline) -> IO ("pipelines" ::: Vector Pipeline)
forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
generateM (("bindInfoCount" ::: Word32) -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral ((Int -> "bindInfoCount" ::: Word32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (("createInfos"
::: Vector (SomeStruct RayTracingPipelineCreateInfoKHR))
-> Int
forall a. Vector a -> Int
Data.Vector.length (("createInfos"
::: Vector (SomeStruct RayTracingPipelineCreateInfoKHR))
-> Int)
-> ("createInfos"
::: Vector (SomeStruct RayTracingPipelineCreateInfoKHR))
-> Int
forall a b. (a -> b) -> a -> b
$ ("createInfos"
::: Vector (SomeStruct RayTracingPipelineCreateInfoKHR)
createInfos)) :: Word32))) (\i :: Int
i -> ("pPipelines" ::: Ptr Pipeline) -> IO Pipeline
forall a. Storable a => Ptr a -> IO a
peek @Pipeline (("pPipelines" ::: Ptr Pipeline
pPPipelines ("pPipelines" ::: Ptr Pipeline)
-> Int -> "pPipelines" ::: Ptr Pipeline
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (8 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr Pipeline)))
(Result, "pipelines" ::: Vector Pipeline)
-> ContT
(Result, "pipelines" ::: Vector Pipeline)
IO
(Result, "pipelines" ::: Vector Pipeline)
forall (f :: * -> *) a. Applicative f => a -> f a
pure ((Result, "pipelines" ::: Vector Pipeline)
-> ContT
(Result, "pipelines" ::: Vector Pipeline)
IO
(Result, "pipelines" ::: Vector Pipeline))
-> (Result, "pipelines" ::: Vector Pipeline)
-> ContT
(Result, "pipelines" ::: Vector Pipeline)
IO
(Result, "pipelines" ::: Vector Pipeline)
forall a b. (a -> b) -> a -> b
$ (Result
r, "pipelines" ::: Vector Pipeline
pPipelines)
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkCmdTraceRaysIndirectKHR
:: FunPtr (Ptr CommandBuffer_T -> Ptr StridedBufferRegionKHR -> Ptr StridedBufferRegionKHR -> Ptr StridedBufferRegionKHR -> Ptr StridedBufferRegionKHR -> Buffer -> DeviceSize -> IO ()) -> Ptr CommandBuffer_T -> Ptr StridedBufferRegionKHR -> Ptr StridedBufferRegionKHR -> Ptr StridedBufferRegionKHR -> Ptr StridedBufferRegionKHR -> Buffer -> DeviceSize -> IO ()
cmdTraceRaysIndirectKHR :: forall io . MonadIO io => CommandBuffer -> ("raygenShaderBindingTable" ::: StridedBufferRegionKHR) -> ("missShaderBindingTable" ::: StridedBufferRegionKHR) -> ("hitShaderBindingTable" ::: StridedBufferRegionKHR) -> ("callableShaderBindingTable" ::: StridedBufferRegionKHR) -> Buffer -> ("offset" ::: DeviceSize) -> io ()
cmdTraceRaysIndirectKHR :: CommandBuffer
-> ("raygenShaderBindingTable" ::: StridedBufferRegionKHR)
-> ("raygenShaderBindingTable" ::: StridedBufferRegionKHR)
-> ("raygenShaderBindingTable" ::: StridedBufferRegionKHR)
-> ("raygenShaderBindingTable" ::: StridedBufferRegionKHR)
-> Buffer
-> ("dataSize" ::: Word64)
-> io ()
cmdTraceRaysIndirectKHR commandBuffer :: CommandBuffer
commandBuffer raygenShaderBindingTable :: "raygenShaderBindingTable" ::: StridedBufferRegionKHR
raygenShaderBindingTable missShaderBindingTable :: "raygenShaderBindingTable" ::: StridedBufferRegionKHR
missShaderBindingTable hitShaderBindingTable :: "raygenShaderBindingTable" ::: StridedBufferRegionKHR
hitShaderBindingTable callableShaderBindingTable :: "raygenShaderBindingTable" ::: StridedBufferRegionKHR
callableShaderBindingTable buffer :: Buffer
buffer offset :: "dataSize" ::: Word64
offset = 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 vkCmdTraceRaysIndirectKHRPtr :: FunPtr
(Ptr CommandBuffer_T
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> Buffer
-> ("dataSize" ::: Word64)
-> IO ())
vkCmdTraceRaysIndirectKHRPtr = DeviceCmds
-> FunPtr
(Ptr CommandBuffer_T
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> Buffer
-> ("dataSize" ::: Word64)
-> IO ())
pVkCmdTraceRaysIndirectKHR (CommandBuffer -> DeviceCmds
deviceCmds (CommandBuffer
commandBuffer :: CommandBuffer))
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
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> Buffer
-> ("dataSize" ::: Word64)
-> IO ())
vkCmdTraceRaysIndirectKHRPtr FunPtr
(Ptr CommandBuffer_T
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> Buffer
-> ("dataSize" ::: Word64)
-> IO ())
-> FunPtr
(Ptr CommandBuffer_T
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> Buffer
-> ("dataSize" ::: Word64)
-> IO ())
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr CommandBuffer_T
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> Buffer
-> ("dataSize" ::: Word64)
-> 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 "" "The function pointer for vkCmdTraceRaysIndirectKHR is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let vkCmdTraceRaysIndirectKHR' :: Ptr CommandBuffer_T
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> Buffer
-> ("dataSize" ::: Word64)
-> IO ()
vkCmdTraceRaysIndirectKHR' = FunPtr
(Ptr CommandBuffer_T
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> Buffer
-> ("dataSize" ::: Word64)
-> IO ())
-> Ptr CommandBuffer_T
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> Buffer
-> ("dataSize" ::: Word64)
-> IO ()
mkVkCmdTraceRaysIndirectKHR FunPtr
(Ptr CommandBuffer_T
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> Buffer
-> ("dataSize" ::: Word64)
-> IO ())
vkCmdTraceRaysIndirectKHRPtr
"pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR)
pRaygenShaderBindingTable <- ((("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> IO ())
-> IO ())
-> ContT
()
IO
("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> IO ())
-> IO ())
-> ContT
()
IO
("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR)))
-> ((("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> IO ())
-> IO ())
-> ContT
()
IO
("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
forall a b. (a -> b) -> a -> b
$ ("raygenShaderBindingTable" ::: StridedBufferRegionKHR)
-> (("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> IO ())
-> IO ()
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct ("raygenShaderBindingTable" ::: StridedBufferRegionKHR
raygenShaderBindingTable)
"pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR)
pMissShaderBindingTable <- ((("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> IO ())
-> IO ())
-> ContT
()
IO
("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> IO ())
-> IO ())
-> ContT
()
IO
("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR)))
-> ((("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> IO ())
-> IO ())
-> ContT
()
IO
("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
forall a b. (a -> b) -> a -> b
$ ("raygenShaderBindingTable" ::: StridedBufferRegionKHR)
-> (("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> IO ())
-> IO ()
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct ("raygenShaderBindingTable" ::: StridedBufferRegionKHR
missShaderBindingTable)
"pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR)
pHitShaderBindingTable <- ((("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> IO ())
-> IO ())
-> ContT
()
IO
("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> IO ())
-> IO ())
-> ContT
()
IO
("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR)))
-> ((("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> IO ())
-> IO ())
-> ContT
()
IO
("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
forall a b. (a -> b) -> a -> b
$ ("raygenShaderBindingTable" ::: StridedBufferRegionKHR)
-> (("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> IO ())
-> IO ()
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct ("raygenShaderBindingTable" ::: StridedBufferRegionKHR
hitShaderBindingTable)
"pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR)
pCallableShaderBindingTable <- ((("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> IO ())
-> IO ())
-> ContT
()
IO
("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> IO ())
-> IO ())
-> ContT
()
IO
("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR)))
-> ((("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> IO ())
-> IO ())
-> ContT
()
IO
("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
forall a b. (a -> b) -> a -> b
$ ("raygenShaderBindingTable" ::: StridedBufferRegionKHR)
-> (("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> IO ())
-> IO ()
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct ("raygenShaderBindingTable" ::: StridedBufferRegionKHR
callableShaderBindingTable)
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
$ Ptr CommandBuffer_T
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> Buffer
-> ("dataSize" ::: Word64)
-> IO ()
vkCmdTraceRaysIndirectKHR' (CommandBuffer -> Ptr CommandBuffer_T
commandBufferHandle (CommandBuffer
commandBuffer)) "pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR)
pRaygenShaderBindingTable "pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR)
pMissShaderBindingTable "pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR)
pHitShaderBindingTable "pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR)
pCallableShaderBindingTable (Buffer
buffer) ("dataSize" ::: Word64
offset)
() -> 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" mkVkGetDeviceAccelerationStructureCompatibilityKHR
:: FunPtr (Ptr Device_T -> Ptr AccelerationStructureVersionKHR -> IO Result) -> Ptr Device_T -> Ptr AccelerationStructureVersionKHR -> IO Result
getDeviceAccelerationStructureCompatibilityKHR :: forall io . MonadIO io => Device -> AccelerationStructureVersionKHR -> io ()
getDeviceAccelerationStructureCompatibilityKHR :: Device -> AccelerationStructureVersionKHR -> io ()
getDeviceAccelerationStructureCompatibilityKHR device :: Device
device version :: AccelerationStructureVersionKHR
version = 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 vkGetDeviceAccelerationStructureCompatibilityKHRPtr :: FunPtr
(Ptr Device_T -> Ptr AccelerationStructureVersionKHR -> IO Result)
vkGetDeviceAccelerationStructureCompatibilityKHRPtr = DeviceCmds
-> FunPtr
(Ptr Device_T -> Ptr AccelerationStructureVersionKHR -> IO Result)
pVkGetDeviceAccelerationStructureCompatibilityKHR (Device -> DeviceCmds
deviceCmds (Device
device :: Device))
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 -> Ptr AccelerationStructureVersionKHR -> IO Result)
vkGetDeviceAccelerationStructureCompatibilityKHRPtr FunPtr
(Ptr Device_T -> Ptr AccelerationStructureVersionKHR -> IO Result)
-> FunPtr
(Ptr Device_T -> Ptr AccelerationStructureVersionKHR -> IO Result)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr Device_T -> Ptr AccelerationStructureVersionKHR -> 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 "" "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 -> Ptr AccelerationStructureVersionKHR -> IO Result
vkGetDeviceAccelerationStructureCompatibilityKHR' = FunPtr
(Ptr Device_T -> Ptr AccelerationStructureVersionKHR -> IO Result)
-> Ptr Device_T -> Ptr AccelerationStructureVersionKHR -> IO Result
mkVkGetDeviceAccelerationStructureCompatibilityKHR FunPtr
(Ptr Device_T -> Ptr AccelerationStructureVersionKHR -> IO Result)
vkGetDeviceAccelerationStructureCompatibilityKHRPtr
Ptr AccelerationStructureVersionKHR
version' <- ((Ptr AccelerationStructureVersionKHR -> IO ()) -> IO ())
-> ContT () IO (Ptr AccelerationStructureVersionKHR)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr AccelerationStructureVersionKHR -> IO ()) -> IO ())
-> ContT () IO (Ptr AccelerationStructureVersionKHR))
-> ((Ptr AccelerationStructureVersionKHR -> IO ()) -> IO ())
-> ContT () IO (Ptr AccelerationStructureVersionKHR)
forall a b. (a -> b) -> a -> b
$ AccelerationStructureVersionKHR
-> (Ptr AccelerationStructureVersionKHR -> IO ()) -> IO ()
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (AccelerationStructureVersionKHR
version)
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
$ Ptr Device_T -> Ptr AccelerationStructureVersionKHR -> IO Result
vkGetDeviceAccelerationStructureCompatibilityKHR' (Device -> Ptr Device_T
deviceHandle (Device
device)) Ptr AccelerationStructureVersionKHR
version'
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" mkVkCreateAccelerationStructureKHR
:: FunPtr (Ptr Device_T -> Ptr AccelerationStructureCreateInfoKHR -> Ptr AllocationCallbacks -> Ptr AccelerationStructureKHR -> IO Result) -> Ptr Device_T -> Ptr AccelerationStructureCreateInfoKHR -> Ptr AllocationCallbacks -> Ptr AccelerationStructureKHR -> IO Result
createAccelerationStructureKHR :: forall io . MonadIO io => Device -> AccelerationStructureCreateInfoKHR -> ("allocator" ::: Maybe AllocationCallbacks) -> io (AccelerationStructureKHR)
createAccelerationStructureKHR :: Device
-> AccelerationStructureCreateInfoKHR
-> ("allocator" ::: Maybe AllocationCallbacks)
-> io AccelerationStructureKHR
createAccelerationStructureKHR device :: Device
device createInfo :: AccelerationStructureCreateInfoKHR
createInfo allocator :: "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 AccelerationStructureCreateInfoKHR)
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> IO Result)
vkCreateAccelerationStructureKHRPtr = DeviceCmds
-> FunPtr
(Ptr Device_T
-> ("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoKHR)
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> IO Result)
pVkCreateAccelerationStructureKHR (Device -> DeviceCmds
deviceCmds (Device
device :: Device))
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 AccelerationStructureCreateInfoKHR)
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> IO Result)
vkCreateAccelerationStructureKHRPtr FunPtr
(Ptr Device_T
-> ("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoKHR)
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> IO Result)
-> FunPtr
(Ptr Device_T
-> ("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoKHR)
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> IO Result)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr Device_T
-> ("pCreateInfo" ::: Ptr 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 "" "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 AccelerationStructureCreateInfoKHR)
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> IO Result
vkCreateAccelerationStructureKHR' = FunPtr
(Ptr Device_T
-> ("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoKHR)
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> IO Result)
-> Ptr Device_T
-> ("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoKHR)
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> IO Result
mkVkCreateAccelerationStructureKHR FunPtr
(Ptr Device_T
-> ("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoKHR)
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> IO Result)
vkCreateAccelerationStructureKHRPtr
"pCreateInfo" ::: Ptr AccelerationStructureCreateInfoKHR
pCreateInfo <- ((("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoKHR)
-> IO AccelerationStructureKHR)
-> IO AccelerationStructureKHR)
-> ContT
AccelerationStructureKHR
IO
("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoKHR)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoKHR)
-> IO AccelerationStructureKHR)
-> IO AccelerationStructureKHR)
-> ContT
AccelerationStructureKHR
IO
("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoKHR))
-> ((("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoKHR)
-> IO AccelerationStructureKHR)
-> IO AccelerationStructureKHR)
-> ContT
AccelerationStructureKHR
IO
("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoKHR)
forall a b. (a -> b) -> a -> b
$ AccelerationStructureCreateInfoKHR
-> (("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoKHR)
-> IO AccelerationStructureKHR)
-> IO AccelerationStructureKHR
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (AccelerationStructureCreateInfoKHR
createInfo)
"pAllocator" ::: Ptr AllocationCallbacks
pAllocator <- case ("allocator" ::: Maybe AllocationCallbacks
allocator) of
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 j :: 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 (Int
-> IO ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
forall a. Int -> IO (Ptr a)
callocBytes @AccelerationStructureKHR 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
$ Ptr Device_T
-> ("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoKHR)
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> IO Result
vkCreateAccelerationStructureKHR' (Device -> Ptr Device_T
deviceHandle (Device
device)) "pCreateInfo" ::: Ptr AccelerationStructureCreateInfoKHR
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
$ ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> IO AccelerationStructureKHR
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 io r . MonadIO io => Device -> AccelerationStructureCreateInfoKHR -> Maybe AllocationCallbacks -> (io (AccelerationStructureKHR) -> ((AccelerationStructureKHR) -> io ()) -> r) -> r
withAccelerationStructureKHR :: Device
-> AccelerationStructureCreateInfoKHR
-> ("allocator" ::: Maybe AllocationCallbacks)
-> (io AccelerationStructureKHR
-> (AccelerationStructureKHR -> io ()) -> r)
-> r
withAccelerationStructureKHR device :: Device
device pCreateInfo :: AccelerationStructureCreateInfoKHR
pCreateInfo pAllocator :: "allocator" ::: Maybe AllocationCallbacks
pAllocator b :: io AccelerationStructureKHR
-> (AccelerationStructureKHR -> io ()) -> r
b =
io AccelerationStructureKHR
-> (AccelerationStructureKHR -> io ()) -> r
b (Device
-> AccelerationStructureCreateInfoKHR
-> ("allocator" ::: Maybe AllocationCallbacks)
-> io AccelerationStructureKHR
forall (io :: * -> *).
MonadIO io =>
Device
-> AccelerationStructureCreateInfoKHR
-> ("allocator" ::: Maybe AllocationCallbacks)
-> io AccelerationStructureKHR
createAccelerationStructureKHR Device
device AccelerationStructureCreateInfoKHR
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" mkVkCmdBuildAccelerationStructureKHR
:: FunPtr (Ptr CommandBuffer_T -> Word32 -> Ptr (AccelerationStructureBuildGeometryInfoKHR a) -> Ptr (Ptr AccelerationStructureBuildOffsetInfoKHR) -> IO ()) -> Ptr CommandBuffer_T -> Word32 -> Ptr (AccelerationStructureBuildGeometryInfoKHR a) -> Ptr (Ptr AccelerationStructureBuildOffsetInfoKHR) -> IO ()
cmdBuildAccelerationStructureKHR :: forall io . MonadIO io => CommandBuffer -> ("infos" ::: Vector (SomeStruct AccelerationStructureBuildGeometryInfoKHR)) -> ("offsetInfos" ::: Vector AccelerationStructureBuildOffsetInfoKHR) -> io ()
cmdBuildAccelerationStructureKHR :: CommandBuffer
-> ("infos"
::: Vector (SomeStruct AccelerationStructureBuildGeometryInfoKHR))
-> ("offsetInfos"
::: Vector AccelerationStructureBuildOffsetInfoKHR)
-> io ()
cmdBuildAccelerationStructureKHR commandBuffer :: CommandBuffer
commandBuffer infos :: "infos"
::: Vector (SomeStruct AccelerationStructureBuildGeometryInfoKHR)
infos offsetInfos :: "offsetInfos" ::: Vector AccelerationStructureBuildOffsetInfoKHR
offsetInfos = 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 vkCmdBuildAccelerationStructureKHRPtr :: FunPtr
(Ptr CommandBuffer_T
-> ("bindInfoCount" ::: Word32)
-> ("pInfos"
::: Ptr (AccelerationStructureBuildGeometryInfoKHR Any))
-> ("ppOffsetInfos"
::: Ptr (Ptr AccelerationStructureBuildOffsetInfoKHR))
-> IO ())
vkCmdBuildAccelerationStructureKHRPtr = DeviceCmds
-> forall (a :: [*]).
FunPtr
(Ptr CommandBuffer_T
-> ("bindInfoCount" ::: Word32)
-> ("pInfos" ::: Ptr (AccelerationStructureBuildGeometryInfoKHR a))
-> ("ppOffsetInfos"
::: Ptr (Ptr AccelerationStructureBuildOffsetInfoKHR))
-> IO ())
pVkCmdBuildAccelerationStructureKHR (CommandBuffer -> DeviceCmds
deviceCmds (CommandBuffer
commandBuffer :: CommandBuffer))
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
-> ("bindInfoCount" ::: Word32)
-> ("pInfos"
::: Ptr (AccelerationStructureBuildGeometryInfoKHR Any))
-> ("ppOffsetInfos"
::: Ptr (Ptr AccelerationStructureBuildOffsetInfoKHR))
-> IO ())
vkCmdBuildAccelerationStructureKHRPtr FunPtr
(Ptr CommandBuffer_T
-> ("bindInfoCount" ::: Word32)
-> ("pInfos"
::: Ptr (AccelerationStructureBuildGeometryInfoKHR Any))
-> ("ppOffsetInfos"
::: Ptr (Ptr AccelerationStructureBuildOffsetInfoKHR))
-> IO ())
-> FunPtr
(Ptr CommandBuffer_T
-> ("bindInfoCount" ::: Word32)
-> ("pInfos"
::: Ptr (AccelerationStructureBuildGeometryInfoKHR Any))
-> ("ppOffsetInfos"
::: Ptr (Ptr AccelerationStructureBuildOffsetInfoKHR))
-> IO ())
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr CommandBuffer_T
-> ("bindInfoCount" ::: Word32)
-> ("pInfos"
::: Ptr (AccelerationStructureBuildGeometryInfoKHR Any))
-> ("ppOffsetInfos"
::: Ptr (Ptr AccelerationStructureBuildOffsetInfoKHR))
-> 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 "" "The function pointer for vkCmdBuildAccelerationStructureKHR is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let vkCmdBuildAccelerationStructureKHR' :: Ptr CommandBuffer_T
-> ("bindInfoCount" ::: Word32)
-> ("pInfos"
::: Ptr (AccelerationStructureBuildGeometryInfoKHR Any))
-> ("ppOffsetInfos"
::: Ptr (Ptr AccelerationStructureBuildOffsetInfoKHR))
-> IO ()
vkCmdBuildAccelerationStructureKHR' = FunPtr
(Ptr CommandBuffer_T
-> ("bindInfoCount" ::: Word32)
-> ("pInfos"
::: Ptr (AccelerationStructureBuildGeometryInfoKHR Any))
-> ("ppOffsetInfos"
::: Ptr (Ptr AccelerationStructureBuildOffsetInfoKHR))
-> IO ())
-> Ptr CommandBuffer_T
-> ("bindInfoCount" ::: Word32)
-> ("pInfos"
::: Ptr (AccelerationStructureBuildGeometryInfoKHR Any))
-> ("ppOffsetInfos"
::: Ptr (Ptr AccelerationStructureBuildOffsetInfoKHR))
-> IO ()
forall (a :: [*]).
FunPtr
(Ptr CommandBuffer_T
-> ("bindInfoCount" ::: Word32)
-> Ptr (AccelerationStructureBuildGeometryInfoKHR a)
-> ("ppOffsetInfos"
::: Ptr (Ptr AccelerationStructureBuildOffsetInfoKHR))
-> IO ())
-> Ptr CommandBuffer_T
-> ("bindInfoCount" ::: Word32)
-> Ptr (AccelerationStructureBuildGeometryInfoKHR a)
-> ("ppOffsetInfos"
::: Ptr (Ptr AccelerationStructureBuildOffsetInfoKHR))
-> IO ()
mkVkCmdBuildAccelerationStructureKHR FunPtr
(Ptr CommandBuffer_T
-> ("bindInfoCount" ::: Word32)
-> ("pInfos"
::: Ptr (AccelerationStructureBuildGeometryInfoKHR Any))
-> ("ppOffsetInfos"
::: Ptr (Ptr AccelerationStructureBuildOffsetInfoKHR))
-> IO ())
vkCmdBuildAccelerationStructureKHRPtr
let pInfosLength :: Int
pInfosLength = ("infos"
::: Vector (SomeStruct AccelerationStructureBuildGeometryInfoKHR))
-> Int
forall a. Vector a -> Int
Data.Vector.length (("infos"
::: Vector (SomeStruct AccelerationStructureBuildGeometryInfoKHR))
-> Int)
-> ("infos"
::: Vector (SomeStruct AccelerationStructureBuildGeometryInfoKHR))
-> Int
forall a b. (a -> b) -> a -> b
$ ("infos"
::: Vector (SomeStruct 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 ((("offsetInfos" ::: Vector AccelerationStructureBuildOffsetInfoKHR)
-> Int
forall a. Vector a -> Int
Data.Vector.length (("offsetInfos" ::: Vector AccelerationStructureBuildOffsetInfoKHR)
-> Int)
-> ("offsetInfos"
::: Vector AccelerationStructureBuildOffsetInfoKHR)
-> Int
forall a b. (a -> b) -> a -> b
$ ("offsetInfos" ::: Vector AccelerationStructureBuildOffsetInfoKHR
offsetInfos)) 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 "" "ppOffsetInfos and pInfos must have the same length" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
"pInfos" ::: Ptr (AccelerationStructureBuildGeometryInfoKHR Any)
pPInfos <- ((("pInfos"
::: Ptr (AccelerationStructureBuildGeometryInfoKHR Any))
-> IO ())
-> IO ())
-> ContT
()
IO
("pInfos" ::: Ptr (AccelerationStructureBuildGeometryInfoKHR Any))
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pInfos"
::: Ptr (AccelerationStructureBuildGeometryInfoKHR Any))
-> IO ())
-> IO ())
-> ContT
()
IO
("pInfos" ::: Ptr (AccelerationStructureBuildGeometryInfoKHR Any)))
-> ((("pInfos"
::: Ptr (AccelerationStructureBuildGeometryInfoKHR Any))
-> IO ())
-> IO ())
-> ContT
()
IO
("pInfos" ::: Ptr (AccelerationStructureBuildGeometryInfoKHR Any))
forall a b. (a -> b) -> a -> b
$ Int
-> Int
-> (("pInfos"
::: Ptr (AccelerationStructureBuildGeometryInfoKHR Any))
-> IO ())
-> IO ()
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned @(AccelerationStructureBuildGeometryInfoKHR _) ((("infos"
::: Vector (SomeStruct AccelerationStructureBuildGeometryInfoKHR))
-> Int
forall a. Vector a -> Int
Data.Vector.length ("infos"
::: Vector (SomeStruct AccelerationStructureBuildGeometryInfoKHR)
infos)) Int -> Int -> Int
forall a. Num a => a -> a -> a
* 72) 8
(Int
-> SomeStruct AccelerationStructureBuildGeometryInfoKHR
-> ContT () IO ())
-> ("infos"
::: Vector (SomeStruct AccelerationStructureBuildGeometryInfoKHR))
-> ContT () IO ()
forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\i :: Int
i e :: SomeStruct 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
$ Ptr (SomeStruct AccelerationStructureBuildGeometryInfoKHR)
-> SomeStruct AccelerationStructureBuildGeometryInfoKHR
-> IO ()
-> IO ()
forall (a :: [*] -> *) b.
(forall (es :: [*]).
(Extendss a es, PokeChain es) =>
ToCStruct (a es)) =>
Ptr (SomeStruct a) -> SomeStruct a -> IO b -> IO b
pokeSomeCStruct (("pInfos" ::: Ptr (AccelerationStructureBuildGeometryInfoKHR Any))
-> Ptr (SomeStruct AccelerationStructureBuildGeometryInfoKHR)
forall (a :: [*] -> *) (es :: [*]).
Ptr (a es) -> Ptr (SomeStruct a)
forgetExtensions ("pInfos" ::: Ptr (AccelerationStructureBuildGeometryInfoKHR Any)
pPInfos ("pInfos" ::: Ptr (AccelerationStructureBuildGeometryInfoKHR Any))
-> Int -> Ptr (AccelerationStructureBuildGeometryInfoKHR _)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (72 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr (AccelerationStructureBuildGeometryInfoKHR _))) (SomeStruct 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 (SomeStruct AccelerationStructureBuildGeometryInfoKHR)
infos)
"ppOffsetInfos"
::: Ptr (Ptr AccelerationStructureBuildOffsetInfoKHR)
pPpOffsetInfos <- ((("ppOffsetInfos"
::: Ptr (Ptr AccelerationStructureBuildOffsetInfoKHR))
-> IO ())
-> IO ())
-> ContT
()
IO
("ppOffsetInfos"
::: Ptr (Ptr AccelerationStructureBuildOffsetInfoKHR))
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("ppOffsetInfos"
::: Ptr (Ptr AccelerationStructureBuildOffsetInfoKHR))
-> IO ())
-> IO ())
-> ContT
()
IO
("ppOffsetInfos"
::: Ptr (Ptr AccelerationStructureBuildOffsetInfoKHR)))
-> ((("ppOffsetInfos"
::: Ptr (Ptr AccelerationStructureBuildOffsetInfoKHR))
-> IO ())
-> IO ())
-> ContT
()
IO
("ppOffsetInfos"
::: Ptr (Ptr AccelerationStructureBuildOffsetInfoKHR))
forall a b. (a -> b) -> a -> b
$ Int
-> Int
-> (("ppOffsetInfos"
::: Ptr (Ptr AccelerationStructureBuildOffsetInfoKHR))
-> IO ())
-> IO ()
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned @(Ptr AccelerationStructureBuildOffsetInfoKHR) ((("offsetInfos" ::: Vector AccelerationStructureBuildOffsetInfoKHR)
-> Int
forall a. Vector a -> Int
Data.Vector.length ("offsetInfos" ::: Vector AccelerationStructureBuildOffsetInfoKHR
offsetInfos)) Int -> Int -> Int
forall a. Num a => a -> a -> a
* 8) 8
(Int -> AccelerationStructureBuildOffsetInfoKHR -> ContT () IO ())
-> ("offsetInfos"
::: Vector AccelerationStructureBuildOffsetInfoKHR)
-> ContT () IO ()
forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\i :: Int
i e :: AccelerationStructureBuildOffsetInfoKHR
e -> do
Ptr AccelerationStructureBuildOffsetInfoKHR
ppOffsetInfos <- ((Ptr AccelerationStructureBuildOffsetInfoKHR -> IO ()) -> IO ())
-> ContT () IO (Ptr AccelerationStructureBuildOffsetInfoKHR)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr AccelerationStructureBuildOffsetInfoKHR -> IO ()) -> IO ())
-> ContT () IO (Ptr AccelerationStructureBuildOffsetInfoKHR))
-> ((Ptr AccelerationStructureBuildOffsetInfoKHR -> IO ())
-> IO ())
-> ContT () IO (Ptr AccelerationStructureBuildOffsetInfoKHR)
forall a b. (a -> b) -> a -> b
$ AccelerationStructureBuildOffsetInfoKHR
-> (Ptr AccelerationStructureBuildOffsetInfoKHR -> IO ()) -> IO ()
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (AccelerationStructureBuildOffsetInfoKHR
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
$ ("ppOffsetInfos"
::: Ptr (Ptr AccelerationStructureBuildOffsetInfoKHR))
-> Ptr AccelerationStructureBuildOffsetInfoKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ("ppOffsetInfos"
::: Ptr (Ptr AccelerationStructureBuildOffsetInfoKHR)
pPpOffsetInfos ("ppOffsetInfos"
::: Ptr (Ptr AccelerationStructureBuildOffsetInfoKHR))
-> Int
-> "ppOffsetInfos"
::: Ptr (Ptr AccelerationStructureBuildOffsetInfoKHR)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (8 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr (Ptr AccelerationStructureBuildOffsetInfoKHR)) Ptr AccelerationStructureBuildOffsetInfoKHR
ppOffsetInfos) ("offsetInfos" ::: Vector AccelerationStructureBuildOffsetInfoKHR
offsetInfos)
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
$ Ptr CommandBuffer_T
-> ("bindInfoCount" ::: Word32)
-> ("pInfos"
::: Ptr (AccelerationStructureBuildGeometryInfoKHR Any))
-> ("ppOffsetInfos"
::: Ptr (Ptr AccelerationStructureBuildOffsetInfoKHR))
-> IO ()
vkCmdBuildAccelerationStructureKHR' (CommandBuffer -> Ptr CommandBuffer_T
commandBufferHandle (CommandBuffer
commandBuffer)) ((Int -> "bindInfoCount" ::: Word32
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
pInfosLength :: Word32)) ("pInfos" ::: Ptr (AccelerationStructureBuildGeometryInfoKHR Any)
pPInfos) ("ppOffsetInfos"
::: Ptr (Ptr AccelerationStructureBuildOffsetInfoKHR)
pPpOffsetInfos)
() -> 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" mkVkCmdBuildAccelerationStructureIndirectKHR
:: FunPtr (Ptr CommandBuffer_T -> Ptr (AccelerationStructureBuildGeometryInfoKHR a) -> Buffer -> DeviceSize -> Word32 -> IO ()) -> Ptr CommandBuffer_T -> Ptr (AccelerationStructureBuildGeometryInfoKHR a) -> Buffer -> DeviceSize -> Word32 -> IO ()
cmdBuildAccelerationStructureIndirectKHR :: forall a io . (Extendss AccelerationStructureBuildGeometryInfoKHR a, PokeChain a, MonadIO io) => CommandBuffer -> AccelerationStructureBuildGeometryInfoKHR a -> ("indirectBuffer" ::: Buffer) -> ("indirectOffset" ::: DeviceSize) -> ("indirectStride" ::: Word32) -> io ()
cmdBuildAccelerationStructureIndirectKHR :: CommandBuffer
-> AccelerationStructureBuildGeometryInfoKHR a
-> Buffer
-> ("dataSize" ::: Word64)
-> ("bindInfoCount" ::: Word32)
-> io ()
cmdBuildAccelerationStructureIndirectKHR commandBuffer :: CommandBuffer
commandBuffer info :: AccelerationStructureBuildGeometryInfoKHR a
info indirectBuffer :: Buffer
indirectBuffer indirectOffset :: "dataSize" ::: Word64
indirectOffset indirectStride :: "bindInfoCount" ::: Word32
indirectStride = 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 vkCmdBuildAccelerationStructureIndirectKHRPtr :: FunPtr
(Ptr CommandBuffer_T
-> ("pInfo" ::: Ptr (AccelerationStructureBuildGeometryInfoKHR a))
-> Buffer
-> ("dataSize" ::: Word64)
-> ("bindInfoCount" ::: Word32)
-> IO ())
vkCmdBuildAccelerationStructureIndirectKHRPtr = DeviceCmds
-> forall (a :: [*]).
FunPtr
(Ptr CommandBuffer_T
-> ("pInfo" ::: Ptr (AccelerationStructureBuildGeometryInfoKHR a))
-> Buffer
-> ("dataSize" ::: Word64)
-> ("bindInfoCount" ::: Word32)
-> IO ())
pVkCmdBuildAccelerationStructureIndirectKHR (CommandBuffer -> DeviceCmds
deviceCmds (CommandBuffer
commandBuffer :: CommandBuffer))
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 (AccelerationStructureBuildGeometryInfoKHR a))
-> Buffer
-> ("dataSize" ::: Word64)
-> ("bindInfoCount" ::: Word32)
-> IO ())
vkCmdBuildAccelerationStructureIndirectKHRPtr FunPtr
(Ptr CommandBuffer_T
-> ("pInfo" ::: Ptr (AccelerationStructureBuildGeometryInfoKHR a))
-> Buffer
-> ("dataSize" ::: Word64)
-> ("bindInfoCount" ::: Word32)
-> IO ())
-> FunPtr
(Ptr CommandBuffer_T
-> ("pInfo" ::: Ptr (AccelerationStructureBuildGeometryInfoKHR a))
-> Buffer
-> ("dataSize" ::: Word64)
-> ("bindInfoCount" ::: Word32)
-> IO ())
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr CommandBuffer_T
-> ("pInfo" ::: Ptr (AccelerationStructureBuildGeometryInfoKHR a))
-> Buffer
-> ("dataSize" ::: Word64)
-> ("bindInfoCount" ::: Word32)
-> 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 "" "The function pointer for vkCmdBuildAccelerationStructureIndirectKHR is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let vkCmdBuildAccelerationStructureIndirectKHR' :: Ptr CommandBuffer_T
-> ("pInfo" ::: Ptr (AccelerationStructureBuildGeometryInfoKHR a))
-> Buffer
-> ("dataSize" ::: Word64)
-> ("bindInfoCount" ::: Word32)
-> IO ()
vkCmdBuildAccelerationStructureIndirectKHR' = FunPtr
(Ptr CommandBuffer_T
-> ("pInfo" ::: Ptr (AccelerationStructureBuildGeometryInfoKHR a))
-> Buffer
-> ("dataSize" ::: Word64)
-> ("bindInfoCount" ::: Word32)
-> IO ())
-> Ptr CommandBuffer_T
-> ("pInfo" ::: Ptr (AccelerationStructureBuildGeometryInfoKHR a))
-> Buffer
-> ("dataSize" ::: Word64)
-> ("bindInfoCount" ::: Word32)
-> IO ()
forall (a :: [*]).
FunPtr
(Ptr CommandBuffer_T
-> Ptr (AccelerationStructureBuildGeometryInfoKHR a)
-> Buffer
-> ("dataSize" ::: Word64)
-> ("bindInfoCount" ::: Word32)
-> IO ())
-> Ptr CommandBuffer_T
-> Ptr (AccelerationStructureBuildGeometryInfoKHR a)
-> Buffer
-> ("dataSize" ::: Word64)
-> ("bindInfoCount" ::: Word32)
-> IO ()
mkVkCmdBuildAccelerationStructureIndirectKHR FunPtr
(Ptr CommandBuffer_T
-> ("pInfo" ::: Ptr (AccelerationStructureBuildGeometryInfoKHR a))
-> Buffer
-> ("dataSize" ::: Word64)
-> ("bindInfoCount" ::: Word32)
-> IO ())
vkCmdBuildAccelerationStructureIndirectKHRPtr
"pInfo" ::: Ptr (AccelerationStructureBuildGeometryInfoKHR a)
pInfo <- ((("pInfo" ::: Ptr (AccelerationStructureBuildGeometryInfoKHR a))
-> IO ())
-> IO ())
-> ContT
()
IO
("pInfo" ::: Ptr (AccelerationStructureBuildGeometryInfoKHR a))
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pInfo" ::: Ptr (AccelerationStructureBuildGeometryInfoKHR a))
-> IO ())
-> IO ())
-> ContT
()
IO
("pInfo" ::: Ptr (AccelerationStructureBuildGeometryInfoKHR a)))
-> ((("pInfo"
::: Ptr (AccelerationStructureBuildGeometryInfoKHR a))
-> IO ())
-> IO ())
-> ContT
()
IO
("pInfo" ::: Ptr (AccelerationStructureBuildGeometryInfoKHR a))
forall a b. (a -> b) -> a -> b
$ AccelerationStructureBuildGeometryInfoKHR a
-> (("pInfo" ::: Ptr (AccelerationStructureBuildGeometryInfoKHR a))
-> IO ())
-> IO ()
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (AccelerationStructureBuildGeometryInfoKHR a
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
$ Ptr CommandBuffer_T
-> ("pInfo" ::: Ptr (AccelerationStructureBuildGeometryInfoKHR a))
-> Buffer
-> ("dataSize" ::: Word64)
-> ("bindInfoCount" ::: Word32)
-> IO ()
vkCmdBuildAccelerationStructureIndirectKHR' (CommandBuffer -> Ptr CommandBuffer_T
commandBufferHandle (CommandBuffer
commandBuffer)) "pInfo" ::: Ptr (AccelerationStructureBuildGeometryInfoKHR a)
pInfo (Buffer
indirectBuffer) ("dataSize" ::: Word64
indirectOffset) ("bindInfoCount" ::: Word32
indirectStride)
() -> 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" mkVkBuildAccelerationStructureKHR
:: FunPtr (Ptr Device_T -> Word32 -> Ptr (AccelerationStructureBuildGeometryInfoKHR a) -> Ptr (Ptr AccelerationStructureBuildOffsetInfoKHR) -> IO Result) -> Ptr Device_T -> Word32 -> Ptr (AccelerationStructureBuildGeometryInfoKHR a) -> Ptr (Ptr AccelerationStructureBuildOffsetInfoKHR) -> IO Result
buildAccelerationStructureKHR :: forall io . MonadIO io => Device -> ("infos" ::: Vector (SomeStruct AccelerationStructureBuildGeometryInfoKHR)) -> ("offsetInfos" ::: Vector AccelerationStructureBuildOffsetInfoKHR) -> io (Result)
buildAccelerationStructureKHR :: Device
-> ("infos"
::: Vector (SomeStruct AccelerationStructureBuildGeometryInfoKHR))
-> ("offsetInfos"
::: Vector AccelerationStructureBuildOffsetInfoKHR)
-> io Result
buildAccelerationStructureKHR device :: Device
device infos :: "infos"
::: Vector (SomeStruct AccelerationStructureBuildGeometryInfoKHR)
infos offsetInfos :: "offsetInfos" ::: Vector AccelerationStructureBuildOffsetInfoKHR
offsetInfos = 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 vkBuildAccelerationStructureKHRPtr :: FunPtr
(Ptr Device_T
-> ("bindInfoCount" ::: Word32)
-> ("pInfos"
::: Ptr (AccelerationStructureBuildGeometryInfoKHR Any))
-> ("ppOffsetInfos"
::: Ptr (Ptr AccelerationStructureBuildOffsetInfoKHR))
-> IO Result)
vkBuildAccelerationStructureKHRPtr = DeviceCmds
-> forall (a :: [*]).
FunPtr
(Ptr Device_T
-> ("bindInfoCount" ::: Word32)
-> ("pInfos" ::: Ptr (AccelerationStructureBuildGeometryInfoKHR a))
-> ("ppOffsetInfos"
::: Ptr (Ptr AccelerationStructureBuildOffsetInfoKHR))
-> IO Result)
pVkBuildAccelerationStructureKHR (Device -> DeviceCmds
deviceCmds (Device
device :: Device))
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
-> ("bindInfoCount" ::: Word32)
-> ("pInfos"
::: Ptr (AccelerationStructureBuildGeometryInfoKHR Any))
-> ("ppOffsetInfos"
::: Ptr (Ptr AccelerationStructureBuildOffsetInfoKHR))
-> IO Result)
vkBuildAccelerationStructureKHRPtr FunPtr
(Ptr Device_T
-> ("bindInfoCount" ::: Word32)
-> ("pInfos"
::: Ptr (AccelerationStructureBuildGeometryInfoKHR Any))
-> ("ppOffsetInfos"
::: Ptr (Ptr AccelerationStructureBuildOffsetInfoKHR))
-> IO Result)
-> FunPtr
(Ptr Device_T
-> ("bindInfoCount" ::: Word32)
-> ("pInfos"
::: Ptr (AccelerationStructureBuildGeometryInfoKHR Any))
-> ("ppOffsetInfos"
::: Ptr (Ptr AccelerationStructureBuildOffsetInfoKHR))
-> IO Result)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr Device_T
-> ("bindInfoCount" ::: Word32)
-> ("pInfos"
::: Ptr (AccelerationStructureBuildGeometryInfoKHR Any))
-> ("ppOffsetInfos"
::: Ptr (Ptr AccelerationStructureBuildOffsetInfoKHR))
-> 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 "" "The function pointer for vkBuildAccelerationStructureKHR is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let vkBuildAccelerationStructureKHR' :: Ptr Device_T
-> ("bindInfoCount" ::: Word32)
-> ("pInfos"
::: Ptr (AccelerationStructureBuildGeometryInfoKHR Any))
-> ("ppOffsetInfos"
::: Ptr (Ptr AccelerationStructureBuildOffsetInfoKHR))
-> IO Result
vkBuildAccelerationStructureKHR' = FunPtr
(Ptr Device_T
-> ("bindInfoCount" ::: Word32)
-> ("pInfos"
::: Ptr (AccelerationStructureBuildGeometryInfoKHR Any))
-> ("ppOffsetInfos"
::: Ptr (Ptr AccelerationStructureBuildOffsetInfoKHR))
-> IO Result)
-> Ptr Device_T
-> ("bindInfoCount" ::: Word32)
-> ("pInfos"
::: Ptr (AccelerationStructureBuildGeometryInfoKHR Any))
-> ("ppOffsetInfos"
::: Ptr (Ptr AccelerationStructureBuildOffsetInfoKHR))
-> IO Result
forall (a :: [*]).
FunPtr
(Ptr Device_T
-> ("bindInfoCount" ::: Word32)
-> Ptr (AccelerationStructureBuildGeometryInfoKHR a)
-> ("ppOffsetInfos"
::: Ptr (Ptr AccelerationStructureBuildOffsetInfoKHR))
-> IO Result)
-> Ptr Device_T
-> ("bindInfoCount" ::: Word32)
-> Ptr (AccelerationStructureBuildGeometryInfoKHR a)
-> ("ppOffsetInfos"
::: Ptr (Ptr AccelerationStructureBuildOffsetInfoKHR))
-> IO Result
mkVkBuildAccelerationStructureKHR FunPtr
(Ptr Device_T
-> ("bindInfoCount" ::: Word32)
-> ("pInfos"
::: Ptr (AccelerationStructureBuildGeometryInfoKHR Any))
-> ("ppOffsetInfos"
::: Ptr (Ptr AccelerationStructureBuildOffsetInfoKHR))
-> IO Result)
vkBuildAccelerationStructureKHRPtr
let pInfosLength :: Int
pInfosLength = ("infos"
::: Vector (SomeStruct AccelerationStructureBuildGeometryInfoKHR))
-> Int
forall a. Vector a -> Int
Data.Vector.length (("infos"
::: Vector (SomeStruct AccelerationStructureBuildGeometryInfoKHR))
-> Int)
-> ("infos"
::: Vector (SomeStruct AccelerationStructureBuildGeometryInfoKHR))
-> Int
forall a b. (a -> b) -> a -> b
$ ("infos"
::: Vector (SomeStruct 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 ((("offsetInfos" ::: Vector AccelerationStructureBuildOffsetInfoKHR)
-> Int
forall a. Vector a -> Int
Data.Vector.length (("offsetInfos" ::: Vector AccelerationStructureBuildOffsetInfoKHR)
-> Int)
-> ("offsetInfos"
::: Vector AccelerationStructureBuildOffsetInfoKHR)
-> Int
forall a b. (a -> b) -> a -> b
$ ("offsetInfos" ::: Vector AccelerationStructureBuildOffsetInfoKHR
offsetInfos)) 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 "" "ppOffsetInfos and pInfos must have the same length" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
"pInfos" ::: Ptr (AccelerationStructureBuildGeometryInfoKHR Any)
pPInfos <- ((("pInfos"
::: Ptr (AccelerationStructureBuildGeometryInfoKHR Any))
-> IO Result)
-> IO Result)
-> ContT
Result
IO
("pInfos" ::: Ptr (AccelerationStructureBuildGeometryInfoKHR Any))
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pInfos"
::: Ptr (AccelerationStructureBuildGeometryInfoKHR Any))
-> IO Result)
-> IO Result)
-> ContT
Result
IO
("pInfos" ::: Ptr (AccelerationStructureBuildGeometryInfoKHR Any)))
-> ((("pInfos"
::: Ptr (AccelerationStructureBuildGeometryInfoKHR Any))
-> IO Result)
-> IO Result)
-> ContT
Result
IO
("pInfos" ::: Ptr (AccelerationStructureBuildGeometryInfoKHR Any))
forall a b. (a -> b) -> a -> b
$ Int
-> Int
-> (("pInfos"
::: Ptr (AccelerationStructureBuildGeometryInfoKHR Any))
-> IO Result)
-> IO Result
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned @(AccelerationStructureBuildGeometryInfoKHR _) ((("infos"
::: Vector (SomeStruct AccelerationStructureBuildGeometryInfoKHR))
-> Int
forall a. Vector a -> Int
Data.Vector.length ("infos"
::: Vector (SomeStruct AccelerationStructureBuildGeometryInfoKHR)
infos)) Int -> Int -> Int
forall a. Num a => a -> a -> a
* 72) 8
(Int
-> SomeStruct AccelerationStructureBuildGeometryInfoKHR
-> ContT Result IO ())
-> ("infos"
::: Vector (SomeStruct AccelerationStructureBuildGeometryInfoKHR))
-> ContT Result IO ()
forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\i :: Int
i e :: SomeStruct 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
$ Ptr (SomeStruct AccelerationStructureBuildGeometryInfoKHR)
-> SomeStruct AccelerationStructureBuildGeometryInfoKHR
-> IO Result
-> IO Result
forall (a :: [*] -> *) b.
(forall (es :: [*]).
(Extendss a es, PokeChain es) =>
ToCStruct (a es)) =>
Ptr (SomeStruct a) -> SomeStruct a -> IO b -> IO b
pokeSomeCStruct (("pInfos" ::: Ptr (AccelerationStructureBuildGeometryInfoKHR Any))
-> Ptr (SomeStruct AccelerationStructureBuildGeometryInfoKHR)
forall (a :: [*] -> *) (es :: [*]).
Ptr (a es) -> Ptr (SomeStruct a)
forgetExtensions ("pInfos" ::: Ptr (AccelerationStructureBuildGeometryInfoKHR Any)
pPInfos ("pInfos" ::: Ptr (AccelerationStructureBuildGeometryInfoKHR Any))
-> Int -> Ptr (AccelerationStructureBuildGeometryInfoKHR _)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (72 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr (AccelerationStructureBuildGeometryInfoKHR _))) (SomeStruct 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 (SomeStruct AccelerationStructureBuildGeometryInfoKHR)
infos)
"ppOffsetInfos"
::: Ptr (Ptr AccelerationStructureBuildOffsetInfoKHR)
pPpOffsetInfos <- ((("ppOffsetInfos"
::: Ptr (Ptr AccelerationStructureBuildOffsetInfoKHR))
-> IO Result)
-> IO Result)
-> ContT
Result
IO
("ppOffsetInfos"
::: Ptr (Ptr AccelerationStructureBuildOffsetInfoKHR))
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("ppOffsetInfos"
::: Ptr (Ptr AccelerationStructureBuildOffsetInfoKHR))
-> IO Result)
-> IO Result)
-> ContT
Result
IO
("ppOffsetInfos"
::: Ptr (Ptr AccelerationStructureBuildOffsetInfoKHR)))
-> ((("ppOffsetInfos"
::: Ptr (Ptr AccelerationStructureBuildOffsetInfoKHR))
-> IO Result)
-> IO Result)
-> ContT
Result
IO
("ppOffsetInfos"
::: Ptr (Ptr AccelerationStructureBuildOffsetInfoKHR))
forall a b. (a -> b) -> a -> b
$ Int
-> Int
-> (("ppOffsetInfos"
::: Ptr (Ptr AccelerationStructureBuildOffsetInfoKHR))
-> IO Result)
-> IO Result
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned @(Ptr AccelerationStructureBuildOffsetInfoKHR) ((("offsetInfos" ::: Vector AccelerationStructureBuildOffsetInfoKHR)
-> Int
forall a. Vector a -> Int
Data.Vector.length ("offsetInfos" ::: Vector AccelerationStructureBuildOffsetInfoKHR
offsetInfos)) Int -> Int -> Int
forall a. Num a => a -> a -> a
* 8) 8
(Int
-> AccelerationStructureBuildOffsetInfoKHR -> ContT Result IO ())
-> ("offsetInfos"
::: Vector AccelerationStructureBuildOffsetInfoKHR)
-> ContT Result IO ()
forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\i :: Int
i e :: AccelerationStructureBuildOffsetInfoKHR
e -> do
Ptr AccelerationStructureBuildOffsetInfoKHR
ppOffsetInfos <- ((Ptr AccelerationStructureBuildOffsetInfoKHR -> IO Result)
-> IO Result)
-> ContT Result IO (Ptr AccelerationStructureBuildOffsetInfoKHR)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr AccelerationStructureBuildOffsetInfoKHR -> IO Result)
-> IO Result)
-> ContT Result IO (Ptr AccelerationStructureBuildOffsetInfoKHR))
-> ((Ptr AccelerationStructureBuildOffsetInfoKHR -> IO Result)
-> IO Result)
-> ContT Result IO (Ptr AccelerationStructureBuildOffsetInfoKHR)
forall a b. (a -> b) -> a -> b
$ AccelerationStructureBuildOffsetInfoKHR
-> (Ptr AccelerationStructureBuildOffsetInfoKHR -> IO Result)
-> IO Result
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (AccelerationStructureBuildOffsetInfoKHR
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
$ ("ppOffsetInfos"
::: Ptr (Ptr AccelerationStructureBuildOffsetInfoKHR))
-> Ptr AccelerationStructureBuildOffsetInfoKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ("ppOffsetInfos"
::: Ptr (Ptr AccelerationStructureBuildOffsetInfoKHR)
pPpOffsetInfos ("ppOffsetInfos"
::: Ptr (Ptr AccelerationStructureBuildOffsetInfoKHR))
-> Int
-> "ppOffsetInfos"
::: Ptr (Ptr AccelerationStructureBuildOffsetInfoKHR)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (8 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr (Ptr AccelerationStructureBuildOffsetInfoKHR)) Ptr AccelerationStructureBuildOffsetInfoKHR
ppOffsetInfos) ("offsetInfos" ::: Vector AccelerationStructureBuildOffsetInfoKHR
offsetInfos)
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
$ Ptr Device_T
-> ("bindInfoCount" ::: Word32)
-> ("pInfos"
::: Ptr (AccelerationStructureBuildGeometryInfoKHR Any))
-> ("ppOffsetInfos"
::: Ptr (Ptr AccelerationStructureBuildOffsetInfoKHR))
-> IO Result
vkBuildAccelerationStructureKHR' (Device -> Ptr Device_T
deviceHandle (Device
device)) ((Int -> "bindInfoCount" ::: Word32
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
pInfosLength :: Word32)) ("pInfos" ::: Ptr (AccelerationStructureBuildGeometryInfoKHR Any)
pPInfos) ("ppOffsetInfos"
::: Ptr (Ptr AccelerationStructureBuildOffsetInfoKHR)
pPpOffsetInfos)
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 :: Device
-> AccelerationStructureDeviceAddressInfoKHR
-> io ("dataSize" ::: Word64)
getAccelerationStructureDeviceAddressKHR device :: Device
device info :: 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 (Device -> DeviceCmds
deviceCmds (Device
device :: Device))
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 "" "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
$ 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)
data RayTracingShaderGroupCreateInfoKHR = RayTracingShaderGroupCreateInfoKHR
{
RayTracingShaderGroupCreateInfoKHR -> RayTracingShaderGroupTypeKHR
type' :: RayTracingShaderGroupTypeKHR
,
RayTracingShaderGroupCreateInfoKHR -> "bindInfoCount" ::: Word32
generalShader :: Word32
,
RayTracingShaderGroupCreateInfoKHR -> "bindInfoCount" ::: Word32
closestHitShader :: Word32
,
RayTracingShaderGroupCreateInfoKHR -> "bindInfoCount" ::: Word32
anyHitShader :: Word32
,
RayTracingShaderGroupCreateInfoKHR -> "bindInfoCount" ::: Word32
intersectionShader :: Word32
,
RayTracingShaderGroupCreateInfoKHR -> "data" ::: Ptr ()
shaderGroupCaptureReplayHandle :: Ptr ()
}
deriving (Typeable)
deriving instance Show RayTracingShaderGroupCreateInfoKHR
instance ToCStruct RayTracingShaderGroupCreateInfoKHR where
withCStruct :: RayTracingShaderGroupCreateInfoKHR
-> (Ptr RayTracingShaderGroupCreateInfoKHR -> IO b) -> IO b
withCStruct x :: RayTracingShaderGroupCreateInfoKHR
x f :: Ptr RayTracingShaderGroupCreateInfoKHR -> IO b
f = Int
-> Int -> (Ptr RayTracingShaderGroupCreateInfoKHR -> IO b) -> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 48 8 ((Ptr RayTracingShaderGroupCreateInfoKHR -> IO b) -> IO b)
-> (Ptr RayTracingShaderGroupCreateInfoKHR -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \p :: Ptr RayTracingShaderGroupCreateInfoKHR
p -> Ptr RayTracingShaderGroupCreateInfoKHR
-> RayTracingShaderGroupCreateInfoKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr RayTracingShaderGroupCreateInfoKHR
p RayTracingShaderGroupCreateInfoKHR
x (Ptr RayTracingShaderGroupCreateInfoKHR -> IO b
f Ptr RayTracingShaderGroupCreateInfoKHR
p)
pokeCStruct :: Ptr RayTracingShaderGroupCreateInfoKHR
-> RayTracingShaderGroupCreateInfoKHR -> IO b -> IO b
pokeCStruct p :: Ptr RayTracingShaderGroupCreateInfoKHR
p RayTracingShaderGroupCreateInfoKHR{..} f :: IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RayTracingShaderGroupCreateInfoKHR
p Ptr RayTracingShaderGroupCreateInfoKHR -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_RAY_TRACING_SHADER_GROUP_CREATE_INFO_KHR)
Ptr ("data" ::: Ptr ()) -> ("data" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RayTracingShaderGroupCreateInfoKHR
p Ptr RayTracingShaderGroupCreateInfoKHR
-> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) ("data" ::: Ptr ()
forall a. Ptr a
nullPtr)
Ptr RayTracingShaderGroupTypeKHR
-> RayTracingShaderGroupTypeKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RayTracingShaderGroupCreateInfoKHR
p Ptr RayTracingShaderGroupCreateInfoKHR
-> Int -> Ptr RayTracingShaderGroupTypeKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr RayTracingShaderGroupTypeKHR)) (RayTracingShaderGroupTypeKHR
type')
Ptr ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RayTracingShaderGroupCreateInfoKHR
p Ptr RayTracingShaderGroupCreateInfoKHR
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr Word32)) ("bindInfoCount" ::: Word32
generalShader)
Ptr ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RayTracingShaderGroupCreateInfoKHR
p Ptr RayTracingShaderGroupCreateInfoKHR
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr Word32)) ("bindInfoCount" ::: Word32
closestHitShader)
Ptr ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RayTracingShaderGroupCreateInfoKHR
p Ptr RayTracingShaderGroupCreateInfoKHR
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 28 :: Ptr Word32)) ("bindInfoCount" ::: Word32
anyHitShader)
Ptr ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RayTracingShaderGroupCreateInfoKHR
p Ptr RayTracingShaderGroupCreateInfoKHR
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr Word32)) ("bindInfoCount" ::: Word32
intersectionShader)
Ptr ("data" ::: Ptr ()) -> ("data" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RayTracingShaderGroupCreateInfoKHR
p Ptr RayTracingShaderGroupCreateInfoKHR
-> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 40 :: Ptr (Ptr ()))) ("data" ::: Ptr ()
shaderGroupCaptureReplayHandle)
IO b
f
cStructSize :: Int
cStructSize = 48
cStructAlignment :: Int
cStructAlignment = 8
pokeZeroCStruct :: Ptr RayTracingShaderGroupCreateInfoKHR -> IO b -> IO b
pokeZeroCStruct p :: Ptr RayTracingShaderGroupCreateInfoKHR
p f :: IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RayTracingShaderGroupCreateInfoKHR
p Ptr RayTracingShaderGroupCreateInfoKHR -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_RAY_TRACING_SHADER_GROUP_CREATE_INFO_KHR)
Ptr ("data" ::: Ptr ()) -> ("data" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RayTracingShaderGroupCreateInfoKHR
p Ptr RayTracingShaderGroupCreateInfoKHR
-> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) ("data" ::: Ptr ()
forall a. Ptr a
nullPtr)
Ptr RayTracingShaderGroupTypeKHR
-> RayTracingShaderGroupTypeKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RayTracingShaderGroupCreateInfoKHR
p Ptr RayTracingShaderGroupCreateInfoKHR
-> Int -> Ptr RayTracingShaderGroupTypeKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr RayTracingShaderGroupTypeKHR)) (RayTracingShaderGroupTypeKHR
forall a. Zero a => a
zero)
Ptr ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RayTracingShaderGroupCreateInfoKHR
p Ptr RayTracingShaderGroupCreateInfoKHR
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr Word32)) ("bindInfoCount" ::: Word32
forall a. Zero a => a
zero)
Ptr ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RayTracingShaderGroupCreateInfoKHR
p Ptr RayTracingShaderGroupCreateInfoKHR
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr Word32)) ("bindInfoCount" ::: Word32
forall a. Zero a => a
zero)
Ptr ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RayTracingShaderGroupCreateInfoKHR
p Ptr RayTracingShaderGroupCreateInfoKHR
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 28 :: Ptr Word32)) ("bindInfoCount" ::: Word32
forall a. Zero a => a
zero)
Ptr ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RayTracingShaderGroupCreateInfoKHR
p Ptr RayTracingShaderGroupCreateInfoKHR
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr Word32)) ("bindInfoCount" ::: Word32
forall a. Zero a => a
zero)
IO b
f
instance FromCStruct RayTracingShaderGroupCreateInfoKHR where
peekCStruct :: Ptr RayTracingShaderGroupCreateInfoKHR
-> IO RayTracingShaderGroupCreateInfoKHR
peekCStruct p :: Ptr RayTracingShaderGroupCreateInfoKHR
p = do
RayTracingShaderGroupTypeKHR
type' <- Ptr RayTracingShaderGroupTypeKHR -> IO RayTracingShaderGroupTypeKHR
forall a. Storable a => Ptr a -> IO a
peek @RayTracingShaderGroupTypeKHR ((Ptr RayTracingShaderGroupCreateInfoKHR
p Ptr RayTracingShaderGroupCreateInfoKHR
-> Int -> Ptr RayTracingShaderGroupTypeKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr RayTracingShaderGroupTypeKHR))
"bindInfoCount" ::: Word32
generalShader <- Ptr ("bindInfoCount" ::: Word32) -> IO ("bindInfoCount" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr RayTracingShaderGroupCreateInfoKHR
p Ptr RayTracingShaderGroupCreateInfoKHR
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr Word32))
"bindInfoCount" ::: Word32
closestHitShader <- Ptr ("bindInfoCount" ::: Word32) -> IO ("bindInfoCount" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr RayTracingShaderGroupCreateInfoKHR
p Ptr RayTracingShaderGroupCreateInfoKHR
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr Word32))
"bindInfoCount" ::: Word32
anyHitShader <- Ptr ("bindInfoCount" ::: Word32) -> IO ("bindInfoCount" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr RayTracingShaderGroupCreateInfoKHR
p Ptr RayTracingShaderGroupCreateInfoKHR
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 28 :: Ptr Word32))
"bindInfoCount" ::: Word32
intersectionShader <- Ptr ("bindInfoCount" ::: Word32) -> IO ("bindInfoCount" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr RayTracingShaderGroupCreateInfoKHR
p Ptr RayTracingShaderGroupCreateInfoKHR
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr Word32))
"data" ::: Ptr ()
pShaderGroupCaptureReplayHandle <- Ptr ("data" ::: Ptr ()) -> IO ("data" ::: Ptr ())
forall a. Storable a => Ptr a -> IO a
peek @(Ptr ()) ((Ptr RayTracingShaderGroupCreateInfoKHR
p Ptr RayTracingShaderGroupCreateInfoKHR
-> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 40 :: Ptr (Ptr ())))
RayTracingShaderGroupCreateInfoKHR
-> IO RayTracingShaderGroupCreateInfoKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure (RayTracingShaderGroupCreateInfoKHR
-> IO RayTracingShaderGroupCreateInfoKHR)
-> RayTracingShaderGroupCreateInfoKHR
-> IO RayTracingShaderGroupCreateInfoKHR
forall a b. (a -> b) -> a -> b
$ RayTracingShaderGroupTypeKHR
-> ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32)
-> ("data" ::: Ptr ())
-> RayTracingShaderGroupCreateInfoKHR
RayTracingShaderGroupCreateInfoKHR
RayTracingShaderGroupTypeKHR
type' "bindInfoCount" ::: Word32
generalShader "bindInfoCount" ::: Word32
closestHitShader "bindInfoCount" ::: Word32
anyHitShader "bindInfoCount" ::: Word32
intersectionShader "data" ::: Ptr ()
pShaderGroupCaptureReplayHandle
instance Storable RayTracingShaderGroupCreateInfoKHR where
sizeOf :: RayTracingShaderGroupCreateInfoKHR -> Int
sizeOf ~RayTracingShaderGroupCreateInfoKHR
_ = 48
alignment :: RayTracingShaderGroupCreateInfoKHR -> Int
alignment ~RayTracingShaderGroupCreateInfoKHR
_ = 8
peek :: Ptr RayTracingShaderGroupCreateInfoKHR
-> IO RayTracingShaderGroupCreateInfoKHR
peek = Ptr RayTracingShaderGroupCreateInfoKHR
-> IO RayTracingShaderGroupCreateInfoKHR
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr RayTracingShaderGroupCreateInfoKHR
-> RayTracingShaderGroupCreateInfoKHR -> IO ()
poke ptr :: Ptr RayTracingShaderGroupCreateInfoKHR
ptr poked :: RayTracingShaderGroupCreateInfoKHR
poked = Ptr RayTracingShaderGroupCreateInfoKHR
-> RayTracingShaderGroupCreateInfoKHR -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr RayTracingShaderGroupCreateInfoKHR
ptr RayTracingShaderGroupCreateInfoKHR
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero RayTracingShaderGroupCreateInfoKHR where
zero :: RayTracingShaderGroupCreateInfoKHR
zero = RayTracingShaderGroupTypeKHR
-> ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32)
-> ("data" ::: Ptr ())
-> RayTracingShaderGroupCreateInfoKHR
RayTracingShaderGroupCreateInfoKHR
RayTracingShaderGroupTypeKHR
forall a. Zero a => a
zero
"bindInfoCount" ::: Word32
forall a. Zero a => a
zero
"bindInfoCount" ::: Word32
forall a. Zero a => a
zero
"bindInfoCount" ::: Word32
forall a. Zero a => a
zero
"bindInfoCount" ::: Word32
forall a. Zero a => a
zero
"data" ::: Ptr ()
forall a. Zero a => a
zero
data RayTracingPipelineCreateInfoKHR (es :: [Type]) = RayTracingPipelineCreateInfoKHR
{
RayTracingPipelineCreateInfoKHR es -> Chain es
next :: Chain es
,
RayTracingPipelineCreateInfoKHR es -> PipelineCreateFlags
flags :: PipelineCreateFlags
,
RayTracingPipelineCreateInfoKHR es
-> Vector (SomeStruct PipelineShaderStageCreateInfo)
stages :: Vector (SomeStruct PipelineShaderStageCreateInfo)
,
RayTracingPipelineCreateInfoKHR es
-> Vector RayTracingShaderGroupCreateInfoKHR
groups :: Vector RayTracingShaderGroupCreateInfoKHR
,
RayTracingPipelineCreateInfoKHR es -> "bindInfoCount" ::: Word32
maxRecursionDepth :: Word32
,
RayTracingPipelineCreateInfoKHR es -> PipelineLibraryCreateInfoKHR
libraries :: PipelineLibraryCreateInfoKHR
,
RayTracingPipelineCreateInfoKHR es
-> Maybe RayTracingPipelineInterfaceCreateInfoKHR
libraryInterface :: Maybe RayTracingPipelineInterfaceCreateInfoKHR
,
RayTracingPipelineCreateInfoKHR es -> PipelineLayout
layout :: PipelineLayout
,
RayTracingPipelineCreateInfoKHR es -> Pipeline
basePipelineHandle :: Pipeline
,
RayTracingPipelineCreateInfoKHR es -> Int32
basePipelineIndex :: Int32
}
deriving (Typeable)
deriving instance Show (Chain es) => Show (RayTracingPipelineCreateInfoKHR es)
instance Extensible RayTracingPipelineCreateInfoKHR where
extensibleType :: StructureType
extensibleType = StructureType
STRUCTURE_TYPE_RAY_TRACING_PIPELINE_CREATE_INFO_KHR
setNext :: RayTracingPipelineCreateInfoKHR ds
-> Chain es -> RayTracingPipelineCreateInfoKHR es
setNext x :: RayTracingPipelineCreateInfoKHR ds
x next :: Chain es
next = RayTracingPipelineCreateInfoKHR ds
x{$sel:next:RayTracingPipelineCreateInfoKHR :: Chain es
next = Chain es
next}
getNext :: RayTracingPipelineCreateInfoKHR es -> Chain es
getNext RayTracingPipelineCreateInfoKHR{..} = Chain es
next
extends :: forall e b proxy. Typeable e => proxy e -> (Extends RayTracingPipelineCreateInfoKHR e => b) -> Maybe b
extends :: proxy e
-> (Extends RayTracingPipelineCreateInfoKHR e => b) -> Maybe b
extends _ f :: Extends RayTracingPipelineCreateInfoKHR e => b
f
| Just Refl <- (Typeable e, Typeable DeferredOperationInfoKHR) =>
Maybe (e :~: DeferredOperationInfoKHR)
forall k (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @DeferredOperationInfoKHR = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends RayTracingPipelineCreateInfoKHR e => b
f
| Just Refl <- (Typeable e, Typeable PipelineCreationFeedbackCreateInfoEXT) =>
Maybe (e :~: PipelineCreationFeedbackCreateInfoEXT)
forall k (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @PipelineCreationFeedbackCreateInfoEXT = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends RayTracingPipelineCreateInfoKHR e => b
f
| Bool
otherwise = Maybe b
forall a. Maybe a
Nothing
instance (Extendss RayTracingPipelineCreateInfoKHR es, PokeChain es) => ToCStruct (RayTracingPipelineCreateInfoKHR es) where
withCStruct :: RayTracingPipelineCreateInfoKHR es
-> (Ptr (RayTracingPipelineCreateInfoKHR es) -> IO b) -> IO b
withCStruct x :: RayTracingPipelineCreateInfoKHR es
x f :: Ptr (RayTracingPipelineCreateInfoKHR es) -> IO b
f = Int
-> Int
-> (Ptr (RayTracingPipelineCreateInfoKHR es) -> IO b)
-> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 120 8 ((Ptr (RayTracingPipelineCreateInfoKHR es) -> IO b) -> IO b)
-> (Ptr (RayTracingPipelineCreateInfoKHR es) -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \p :: Ptr (RayTracingPipelineCreateInfoKHR es)
p -> Ptr (RayTracingPipelineCreateInfoKHR es)
-> RayTracingPipelineCreateInfoKHR es -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr (RayTracingPipelineCreateInfoKHR es)
p RayTracingPipelineCreateInfoKHR es
x (Ptr (RayTracingPipelineCreateInfoKHR es) -> IO b
f Ptr (RayTracingPipelineCreateInfoKHR es)
p)
pokeCStruct :: Ptr (RayTracingPipelineCreateInfoKHR es)
-> RayTracingPipelineCreateInfoKHR es -> IO b -> IO b
pokeCStruct p :: Ptr (RayTracingPipelineCreateInfoKHR es)
p RayTracingPipelineCreateInfoKHR{..} f :: 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 (RayTracingPipelineCreateInfoKHR es)
p Ptr (RayTracingPipelineCreateInfoKHR es)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_RAY_TRACING_PIPELINE_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 (RayTracingPipelineCreateInfoKHR es)
p Ptr (RayTracingPipelineCreateInfoKHR es)
-> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 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 PipelineCreateFlags -> PipelineCreateFlags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (RayTracingPipelineCreateInfoKHR es)
p Ptr (RayTracingPipelineCreateInfoKHR es)
-> Int -> Ptr PipelineCreateFlags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr PipelineCreateFlags)) (PipelineCreateFlags
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 ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (RayTracingPipelineCreateInfoKHR es)
p Ptr (RayTracingPipelineCreateInfoKHR es)
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr Word32)) ((Int -> "bindInfoCount" ::: Word32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Vector (SomeStruct PipelineShaderStageCreateInfo) -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector (SomeStruct PipelineShaderStageCreateInfo) -> Int)
-> Vector (SomeStruct PipelineShaderStageCreateInfo) -> Int
forall a b. (a -> b) -> a -> b
$ (Vector (SomeStruct PipelineShaderStageCreateInfo)
stages)) :: Word32))
Ptr (PipelineShaderStageCreateInfo Any)
pPStages' <- ((Ptr (PipelineShaderStageCreateInfo Any) -> IO b) -> IO b)
-> ContT b IO (Ptr (PipelineShaderStageCreateInfo Any))
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr (PipelineShaderStageCreateInfo Any) -> IO b) -> IO b)
-> ContT b IO (Ptr (PipelineShaderStageCreateInfo Any)))
-> ((Ptr (PipelineShaderStageCreateInfo Any) -> IO b) -> IO b)
-> ContT b IO (Ptr (PipelineShaderStageCreateInfo Any))
forall a b. (a -> b) -> a -> b
$ Int
-> Int -> (Ptr (PipelineShaderStageCreateInfo Any) -> IO b) -> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned @(PipelineShaderStageCreateInfo _) ((Vector (SomeStruct PipelineShaderStageCreateInfo) -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector (SomeStruct PipelineShaderStageCreateInfo)
stages)) Int -> Int -> Int
forall a. Num a => a -> a -> a
* 48) 8
(Int -> SomeStruct PipelineShaderStageCreateInfo -> ContT b IO ())
-> Vector (SomeStruct PipelineShaderStageCreateInfo)
-> ContT b IO ()
forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\i :: Int
i e :: SomeStruct PipelineShaderStageCreateInfo
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 (SomeStruct PipelineShaderStageCreateInfo)
-> SomeStruct PipelineShaderStageCreateInfo -> IO b -> IO b
forall (a :: [*] -> *) b.
(forall (es :: [*]).
(Extendss a es, PokeChain es) =>
ToCStruct (a es)) =>
Ptr (SomeStruct a) -> SomeStruct a -> IO b -> IO b
pokeSomeCStruct (Ptr (PipelineShaderStageCreateInfo Any)
-> Ptr (SomeStruct PipelineShaderStageCreateInfo)
forall (a :: [*] -> *) (es :: [*]).
Ptr (a es) -> Ptr (SomeStruct a)
forgetExtensions (Ptr (PipelineShaderStageCreateInfo Any)
pPStages' Ptr (PipelineShaderStageCreateInfo Any)
-> Int -> Ptr (PipelineShaderStageCreateInfo _)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (48 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr (PipelineShaderStageCreateInfo _))) (SomeStruct PipelineShaderStageCreateInfo
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 (SomeStruct PipelineShaderStageCreateInfo)
stages)
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 (PipelineShaderStageCreateInfo Any))
-> Ptr (PipelineShaderStageCreateInfo Any) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (RayTracingPipelineCreateInfoKHR es)
p Ptr (RayTracingPipelineCreateInfoKHR es)
-> Int -> Ptr (Ptr (PipelineShaderStageCreateInfo _))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr (Ptr (PipelineShaderStageCreateInfo _)))) (Ptr (PipelineShaderStageCreateInfo Any)
pPStages')
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 ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (RayTracingPipelineCreateInfoKHR es)
p Ptr (RayTracingPipelineCreateInfoKHR es)
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr Word32)) ((Int -> "bindInfoCount" ::: Word32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Vector RayTracingShaderGroupCreateInfoKHR -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector RayTracingShaderGroupCreateInfoKHR -> Int)
-> Vector RayTracingShaderGroupCreateInfoKHR -> Int
forall a b. (a -> b) -> a -> b
$ (Vector RayTracingShaderGroupCreateInfoKHR
groups)) :: Word32))
Ptr RayTracingShaderGroupCreateInfoKHR
pPGroups' <- ((Ptr RayTracingShaderGroupCreateInfoKHR -> IO b) -> IO b)
-> ContT b IO (Ptr RayTracingShaderGroupCreateInfoKHR)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr RayTracingShaderGroupCreateInfoKHR -> IO b) -> IO b)
-> ContT b IO (Ptr RayTracingShaderGroupCreateInfoKHR))
-> ((Ptr RayTracingShaderGroupCreateInfoKHR -> IO b) -> IO b)
-> ContT b IO (Ptr RayTracingShaderGroupCreateInfoKHR)
forall a b. (a -> b) -> a -> b
$ Int
-> Int -> (Ptr RayTracingShaderGroupCreateInfoKHR -> IO b) -> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned @RayTracingShaderGroupCreateInfoKHR ((Vector RayTracingShaderGroupCreateInfoKHR -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector RayTracingShaderGroupCreateInfoKHR
groups)) Int -> Int -> Int
forall a. Num a => a -> a -> a
* 48) 8
(Int -> RayTracingShaderGroupCreateInfoKHR -> ContT b IO ())
-> Vector RayTracingShaderGroupCreateInfoKHR -> ContT b IO ()
forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\i :: Int
i e :: RayTracingShaderGroupCreateInfoKHR
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 RayTracingShaderGroupCreateInfoKHR
-> RayTracingShaderGroupCreateInfoKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct (Ptr RayTracingShaderGroupCreateInfoKHR
pPGroups' Ptr RayTracingShaderGroupCreateInfoKHR
-> Int -> Ptr RayTracingShaderGroupCreateInfoKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (48 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr RayTracingShaderGroupCreateInfoKHR) (RayTracingShaderGroupCreateInfoKHR
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 RayTracingShaderGroupCreateInfoKHR
groups)
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 RayTracingShaderGroupCreateInfoKHR)
-> Ptr RayTracingShaderGroupCreateInfoKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (RayTracingPipelineCreateInfoKHR es)
p Ptr (RayTracingPipelineCreateInfoKHR es)
-> Int -> Ptr (Ptr RayTracingShaderGroupCreateInfoKHR)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 40 :: Ptr (Ptr RayTracingShaderGroupCreateInfoKHR))) (Ptr RayTracingShaderGroupCreateInfoKHR
pPGroups')
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 ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (RayTracingPipelineCreateInfoKHR es)
p Ptr (RayTracingPipelineCreateInfoKHR es)
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 48 :: Ptr Word32)) ("bindInfoCount" ::: Word32
maxRecursionDepth)
((() -> 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 PipelineLibraryCreateInfoKHR
-> PipelineLibraryCreateInfoKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct ((Ptr (RayTracingPipelineCreateInfoKHR es)
p Ptr (RayTracingPipelineCreateInfoKHR es)
-> Int -> Ptr PipelineLibraryCreateInfoKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 56 :: Ptr PipelineLibraryCreateInfoKHR)) (PipelineLibraryCreateInfoKHR
libraries) (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
$ ())
Ptr RayTracingPipelineInterfaceCreateInfoKHR
pLibraryInterface'' <- case (Maybe RayTracingPipelineInterfaceCreateInfoKHR
libraryInterface) of
Nothing -> Ptr RayTracingPipelineInterfaceCreateInfoKHR
-> ContT b IO (Ptr RayTracingPipelineInterfaceCreateInfoKHR)
forall (f :: * -> *) a. Applicative f => a -> f a
pure Ptr RayTracingPipelineInterfaceCreateInfoKHR
forall a. Ptr a
nullPtr
Just j :: RayTracingPipelineInterfaceCreateInfoKHR
j -> ((Ptr RayTracingPipelineInterfaceCreateInfoKHR -> IO b) -> IO b)
-> ContT b IO (Ptr RayTracingPipelineInterfaceCreateInfoKHR)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr RayTracingPipelineInterfaceCreateInfoKHR -> IO b) -> IO b)
-> ContT b IO (Ptr RayTracingPipelineInterfaceCreateInfoKHR))
-> ((Ptr RayTracingPipelineInterfaceCreateInfoKHR -> IO b) -> IO b)
-> ContT b IO (Ptr RayTracingPipelineInterfaceCreateInfoKHR)
forall a b. (a -> b) -> a -> b
$ RayTracingPipelineInterfaceCreateInfoKHR
-> (Ptr RayTracingPipelineInterfaceCreateInfoKHR -> IO b) -> IO b
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (RayTracingPipelineInterfaceCreateInfoKHR
j)
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 RayTracingPipelineInterfaceCreateInfoKHR)
-> Ptr RayTracingPipelineInterfaceCreateInfoKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (RayTracingPipelineCreateInfoKHR es)
p Ptr (RayTracingPipelineCreateInfoKHR es)
-> Int -> Ptr (Ptr RayTracingPipelineInterfaceCreateInfoKHR)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 88 :: Ptr (Ptr RayTracingPipelineInterfaceCreateInfoKHR))) Ptr RayTracingPipelineInterfaceCreateInfoKHR
pLibraryInterface''
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 PipelineLayout -> PipelineLayout -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (RayTracingPipelineCreateInfoKHR es)
p Ptr (RayTracingPipelineCreateInfoKHR es)
-> Int -> Ptr PipelineLayout
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 96 :: Ptr PipelineLayout)) (PipelineLayout
layout)
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
$ ("pPipelines" ::: Ptr Pipeline) -> Pipeline -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (RayTracingPipelineCreateInfoKHR es)
p Ptr (RayTracingPipelineCreateInfoKHR es)
-> Int -> "pPipelines" ::: Ptr Pipeline
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 104 :: Ptr Pipeline)) (Pipeline
basePipelineHandle)
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 Int32 -> Int32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (RayTracingPipelineCreateInfoKHR es)
p Ptr (RayTracingPipelineCreateInfoKHR es) -> Int -> Ptr Int32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 112 :: Ptr Int32)) (Int32
basePipelineIndex)
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 = 120
cStructAlignment :: Int
cStructAlignment = 8
pokeZeroCStruct :: Ptr (RayTracingPipelineCreateInfoKHR es) -> IO b -> IO b
pokeZeroCStruct p :: Ptr (RayTracingPipelineCreateInfoKHR es)
p f :: 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 (RayTracingPipelineCreateInfoKHR es)
p Ptr (RayTracingPipelineCreateInfoKHR es)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_RAY_TRACING_PIPELINE_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 a. PokeChain es => (Ptr (Chain es) -> IO a) -> IO a
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 (RayTracingPipelineCreateInfoKHR es)
p Ptr (RayTracingPipelineCreateInfoKHR es)
-> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) "data" ::: Ptr ()
pNext'
Ptr (PipelineShaderStageCreateInfo Any)
pPStages' <- ((Ptr (PipelineShaderStageCreateInfo Any) -> IO b) -> IO b)
-> ContT b IO (Ptr (PipelineShaderStageCreateInfo Any))
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr (PipelineShaderStageCreateInfo Any) -> IO b) -> IO b)
-> ContT b IO (Ptr (PipelineShaderStageCreateInfo Any)))
-> ((Ptr (PipelineShaderStageCreateInfo Any) -> IO b) -> IO b)
-> ContT b IO (Ptr (PipelineShaderStageCreateInfo Any))
forall a b. (a -> b) -> a -> b
$ Int
-> Int -> (Ptr (PipelineShaderStageCreateInfo Any) -> IO b) -> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned @(PipelineShaderStageCreateInfo _) ((Vector Any -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector Any
forall a. Monoid a => a
mempty)) Int -> Int -> Int
forall a. Num a => a -> a -> a
* 48) 8
(Int -> SomeStruct PipelineShaderStageCreateInfo -> ContT b IO ())
-> Vector (SomeStruct PipelineShaderStageCreateInfo)
-> ContT b IO ()
forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\i :: Int
i e :: SomeStruct PipelineShaderStageCreateInfo
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 (SomeStruct PipelineShaderStageCreateInfo)
-> SomeStruct PipelineShaderStageCreateInfo -> IO b -> IO b
forall (a :: [*] -> *) b.
(forall (es :: [*]).
(Extendss a es, PokeChain es) =>
ToCStruct (a es)) =>
Ptr (SomeStruct a) -> SomeStruct a -> IO b -> IO b
pokeSomeCStruct (Ptr (PipelineShaderStageCreateInfo Any)
-> Ptr (SomeStruct PipelineShaderStageCreateInfo)
forall (a :: [*] -> *) (es :: [*]).
Ptr (a es) -> Ptr (SomeStruct a)
forgetExtensions (Ptr (PipelineShaderStageCreateInfo Any)
pPStages' Ptr (PipelineShaderStageCreateInfo Any)
-> Int -> Ptr (PipelineShaderStageCreateInfo _)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (48 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr (PipelineShaderStageCreateInfo _))) (SomeStruct PipelineShaderStageCreateInfo
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 (SomeStruct PipelineShaderStageCreateInfo)
forall a. Monoid a => a
mempty)
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 (PipelineShaderStageCreateInfo Any))
-> Ptr (PipelineShaderStageCreateInfo Any) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (RayTracingPipelineCreateInfoKHR es)
p Ptr (RayTracingPipelineCreateInfoKHR es)
-> Int -> Ptr (Ptr (PipelineShaderStageCreateInfo _))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr (Ptr (PipelineShaderStageCreateInfo _)))) (Ptr (PipelineShaderStageCreateInfo Any)
pPStages')
Ptr RayTracingShaderGroupCreateInfoKHR
pPGroups' <- ((Ptr RayTracingShaderGroupCreateInfoKHR -> IO b) -> IO b)
-> ContT b IO (Ptr RayTracingShaderGroupCreateInfoKHR)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr RayTracingShaderGroupCreateInfoKHR -> IO b) -> IO b)
-> ContT b IO (Ptr RayTracingShaderGroupCreateInfoKHR))
-> ((Ptr RayTracingShaderGroupCreateInfoKHR -> IO b) -> IO b)
-> ContT b IO (Ptr RayTracingShaderGroupCreateInfoKHR)
forall a b. (a -> b) -> a -> b
$ Int
-> Int -> (Ptr RayTracingShaderGroupCreateInfoKHR -> IO b) -> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned @RayTracingShaderGroupCreateInfoKHR ((Vector Any -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector Any
forall a. Monoid a => a
mempty)) Int -> Int -> Int
forall a. Num a => a -> a -> a
* 48) 8
(Int -> RayTracingShaderGroupCreateInfoKHR -> ContT b IO ())
-> Vector RayTracingShaderGroupCreateInfoKHR -> ContT b IO ()
forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\i :: Int
i e :: RayTracingShaderGroupCreateInfoKHR
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 RayTracingShaderGroupCreateInfoKHR
-> RayTracingShaderGroupCreateInfoKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct (Ptr RayTracingShaderGroupCreateInfoKHR
pPGroups' Ptr RayTracingShaderGroupCreateInfoKHR
-> Int -> Ptr RayTracingShaderGroupCreateInfoKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (48 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr RayTracingShaderGroupCreateInfoKHR) (RayTracingShaderGroupCreateInfoKHR
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 RayTracingShaderGroupCreateInfoKHR
forall a. Monoid a => a
mempty)
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 RayTracingShaderGroupCreateInfoKHR)
-> Ptr RayTracingShaderGroupCreateInfoKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (RayTracingPipelineCreateInfoKHR es)
p Ptr (RayTracingPipelineCreateInfoKHR es)
-> Int -> Ptr (Ptr RayTracingShaderGroupCreateInfoKHR)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 40 :: Ptr (Ptr RayTracingShaderGroupCreateInfoKHR))) (Ptr RayTracingShaderGroupCreateInfoKHR
pPGroups')
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 ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (RayTracingPipelineCreateInfoKHR es)
p Ptr (RayTracingPipelineCreateInfoKHR es)
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 48 :: Ptr Word32)) ("bindInfoCount" ::: Word32
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 PipelineLibraryCreateInfoKHR
-> PipelineLibraryCreateInfoKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct ((Ptr (RayTracingPipelineCreateInfoKHR es)
p Ptr (RayTracingPipelineCreateInfoKHR es)
-> Int -> Ptr PipelineLibraryCreateInfoKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 56 :: Ptr PipelineLibraryCreateInfoKHR)) (PipelineLibraryCreateInfoKHR
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 PipelineLayout -> PipelineLayout -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (RayTracingPipelineCreateInfoKHR es)
p Ptr (RayTracingPipelineCreateInfoKHR es)
-> Int -> Ptr PipelineLayout
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 96 :: Ptr PipelineLayout)) (PipelineLayout
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 Int32 -> Int32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (RayTracingPipelineCreateInfoKHR es)
p Ptr (RayTracingPipelineCreateInfoKHR es) -> Int -> Ptr Int32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 112 :: Ptr Int32)) (Int32
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 RayTracingPipelineCreateInfoKHR es, PeekChain es) => FromCStruct (RayTracingPipelineCreateInfoKHR es) where
peekCStruct :: Ptr (RayTracingPipelineCreateInfoKHR es)
-> IO (RayTracingPipelineCreateInfoKHR es)
peekCStruct p :: Ptr (RayTracingPipelineCreateInfoKHR es)
p = do
"data" ::: Ptr ()
pNext <- Ptr ("data" ::: Ptr ()) -> IO ("data" ::: Ptr ())
forall a. Storable a => Ptr a -> IO a
peek @(Ptr ()) ((Ptr (RayTracingPipelineCreateInfoKHR es)
p Ptr (RayTracingPipelineCreateInfoKHR es)
-> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 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)
PipelineCreateFlags
flags <- Ptr PipelineCreateFlags -> IO PipelineCreateFlags
forall a. Storable a => Ptr a -> IO a
peek @PipelineCreateFlags ((Ptr (RayTracingPipelineCreateInfoKHR es)
p Ptr (RayTracingPipelineCreateInfoKHR es)
-> Int -> Ptr PipelineCreateFlags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr PipelineCreateFlags))
"bindInfoCount" ::: Word32
stageCount <- Ptr ("bindInfoCount" ::: Word32) -> IO ("bindInfoCount" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr (RayTracingPipelineCreateInfoKHR es)
p Ptr (RayTracingPipelineCreateInfoKHR es)
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr Word32))
Ptr (PipelineShaderStageCreateInfo Any)
pStages <- Ptr (Ptr (PipelineShaderStageCreateInfo Any))
-> IO (Ptr (PipelineShaderStageCreateInfo Any))
forall a. Storable a => Ptr a -> IO a
peek @(Ptr (PipelineShaderStageCreateInfo _)) ((Ptr (RayTracingPipelineCreateInfoKHR es)
p Ptr (RayTracingPipelineCreateInfoKHR es)
-> Int -> Ptr (Ptr (PipelineShaderStageCreateInfo a))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr (Ptr (PipelineShaderStageCreateInfo a))))
Vector (SomeStruct PipelineShaderStageCreateInfo)
pStages' <- Int
-> (Int -> IO (SomeStruct PipelineShaderStageCreateInfo))
-> IO (Vector (SomeStruct PipelineShaderStageCreateInfo))
forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
generateM (("bindInfoCount" ::: Word32) -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral "bindInfoCount" ::: Word32
stageCount) (\i :: Int
i -> Ptr (SomeStruct PipelineShaderStageCreateInfo)
-> IO (SomeStruct PipelineShaderStageCreateInfo)
forall (a :: [*] -> *).
(Extensible a,
forall (es :: [*]).
(Extendss a es, PeekChain es) =>
FromCStruct (a es)) =>
Ptr (SomeStruct a) -> IO (SomeStruct a)
peekSomeCStruct (Ptr (PipelineShaderStageCreateInfo Any)
-> Ptr (SomeStruct PipelineShaderStageCreateInfo)
forall (a :: [*] -> *) (es :: [*]).
Ptr (a es) -> Ptr (SomeStruct a)
forgetExtensions ((Ptr (PipelineShaderStageCreateInfo Any)
pStages Ptr (PipelineShaderStageCreateInfo Any)
-> Int -> Ptr (PipelineShaderStageCreateInfo Any)
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (48 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr (PipelineShaderStageCreateInfo _)))))
"bindInfoCount" ::: Word32
groupCount <- Ptr ("bindInfoCount" ::: Word32) -> IO ("bindInfoCount" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr (RayTracingPipelineCreateInfoKHR es)
p Ptr (RayTracingPipelineCreateInfoKHR es)
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr Word32))
Ptr RayTracingShaderGroupCreateInfoKHR
pGroups <- Ptr (Ptr RayTracingShaderGroupCreateInfoKHR)
-> IO (Ptr RayTracingShaderGroupCreateInfoKHR)
forall a. Storable a => Ptr a -> IO a
peek @(Ptr RayTracingShaderGroupCreateInfoKHR) ((Ptr (RayTracingPipelineCreateInfoKHR es)
p Ptr (RayTracingPipelineCreateInfoKHR es)
-> Int -> Ptr (Ptr RayTracingShaderGroupCreateInfoKHR)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 40 :: Ptr (Ptr RayTracingShaderGroupCreateInfoKHR)))
Vector RayTracingShaderGroupCreateInfoKHR
pGroups' <- Int
-> (Int -> IO RayTracingShaderGroupCreateInfoKHR)
-> IO (Vector RayTracingShaderGroupCreateInfoKHR)
forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
generateM (("bindInfoCount" ::: Word32) -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral "bindInfoCount" ::: Word32
groupCount) (\i :: Int
i -> Ptr RayTracingShaderGroupCreateInfoKHR
-> IO RayTracingShaderGroupCreateInfoKHR
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @RayTracingShaderGroupCreateInfoKHR ((Ptr RayTracingShaderGroupCreateInfoKHR
pGroups Ptr RayTracingShaderGroupCreateInfoKHR
-> Int -> Ptr RayTracingShaderGroupCreateInfoKHR
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (48 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr RayTracingShaderGroupCreateInfoKHR)))
"bindInfoCount" ::: Word32
maxRecursionDepth <- Ptr ("bindInfoCount" ::: Word32) -> IO ("bindInfoCount" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr (RayTracingPipelineCreateInfoKHR es)
p Ptr (RayTracingPipelineCreateInfoKHR es)
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 48 :: Ptr Word32))
PipelineLibraryCreateInfoKHR
libraries <- Ptr PipelineLibraryCreateInfoKHR -> IO PipelineLibraryCreateInfoKHR
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @PipelineLibraryCreateInfoKHR ((Ptr (RayTracingPipelineCreateInfoKHR es)
p Ptr (RayTracingPipelineCreateInfoKHR es)
-> Int -> Ptr PipelineLibraryCreateInfoKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 56 :: Ptr PipelineLibraryCreateInfoKHR))
Ptr RayTracingPipelineInterfaceCreateInfoKHR
pLibraryInterface <- Ptr (Ptr RayTracingPipelineInterfaceCreateInfoKHR)
-> IO (Ptr RayTracingPipelineInterfaceCreateInfoKHR)
forall a. Storable a => Ptr a -> IO a
peek @(Ptr RayTracingPipelineInterfaceCreateInfoKHR) ((Ptr (RayTracingPipelineCreateInfoKHR es)
p Ptr (RayTracingPipelineCreateInfoKHR es)
-> Int -> Ptr (Ptr RayTracingPipelineInterfaceCreateInfoKHR)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 88 :: Ptr (Ptr RayTracingPipelineInterfaceCreateInfoKHR)))
Maybe RayTracingPipelineInterfaceCreateInfoKHR
pLibraryInterface' <- (Ptr RayTracingPipelineInterfaceCreateInfoKHR
-> IO RayTracingPipelineInterfaceCreateInfoKHR)
-> Ptr RayTracingPipelineInterfaceCreateInfoKHR
-> IO (Maybe RayTracingPipelineInterfaceCreateInfoKHR)
forall a b. (Ptr a -> IO b) -> Ptr a -> IO (Maybe b)
maybePeek (\j :: Ptr RayTracingPipelineInterfaceCreateInfoKHR
j -> Ptr RayTracingPipelineInterfaceCreateInfoKHR
-> IO RayTracingPipelineInterfaceCreateInfoKHR
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @RayTracingPipelineInterfaceCreateInfoKHR (Ptr RayTracingPipelineInterfaceCreateInfoKHR
j)) Ptr RayTracingPipelineInterfaceCreateInfoKHR
pLibraryInterface
PipelineLayout
layout <- Ptr PipelineLayout -> IO PipelineLayout
forall a. Storable a => Ptr a -> IO a
peek @PipelineLayout ((Ptr (RayTracingPipelineCreateInfoKHR es)
p Ptr (RayTracingPipelineCreateInfoKHR es)
-> Int -> Ptr PipelineLayout
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 96 :: Ptr PipelineLayout))
Pipeline
basePipelineHandle <- ("pPipelines" ::: Ptr Pipeline) -> IO Pipeline
forall a. Storable a => Ptr a -> IO a
peek @Pipeline ((Ptr (RayTracingPipelineCreateInfoKHR es)
p Ptr (RayTracingPipelineCreateInfoKHR es)
-> Int -> "pPipelines" ::: Ptr Pipeline
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 104 :: Ptr Pipeline))
Int32
basePipelineIndex <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek @Int32 ((Ptr (RayTracingPipelineCreateInfoKHR es)
p Ptr (RayTracingPipelineCreateInfoKHR es) -> Int -> Ptr Int32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 112 :: Ptr Int32))
RayTracingPipelineCreateInfoKHR es
-> IO (RayTracingPipelineCreateInfoKHR es)
forall (f :: * -> *) a. Applicative f => a -> f a
pure (RayTracingPipelineCreateInfoKHR es
-> IO (RayTracingPipelineCreateInfoKHR es))
-> RayTracingPipelineCreateInfoKHR es
-> IO (RayTracingPipelineCreateInfoKHR es)
forall a b. (a -> b) -> a -> b
$ Chain es
-> PipelineCreateFlags
-> Vector (SomeStruct PipelineShaderStageCreateInfo)
-> Vector RayTracingShaderGroupCreateInfoKHR
-> ("bindInfoCount" ::: Word32)
-> PipelineLibraryCreateInfoKHR
-> Maybe RayTracingPipelineInterfaceCreateInfoKHR
-> PipelineLayout
-> Pipeline
-> Int32
-> RayTracingPipelineCreateInfoKHR es
forall (es :: [*]).
Chain es
-> PipelineCreateFlags
-> Vector (SomeStruct PipelineShaderStageCreateInfo)
-> Vector RayTracingShaderGroupCreateInfoKHR
-> ("bindInfoCount" ::: Word32)
-> PipelineLibraryCreateInfoKHR
-> Maybe RayTracingPipelineInterfaceCreateInfoKHR
-> PipelineLayout
-> Pipeline
-> Int32
-> RayTracingPipelineCreateInfoKHR es
RayTracingPipelineCreateInfoKHR
Chain es
next PipelineCreateFlags
flags Vector (SomeStruct PipelineShaderStageCreateInfo)
pStages' Vector RayTracingShaderGroupCreateInfoKHR
pGroups' "bindInfoCount" ::: Word32
maxRecursionDepth PipelineLibraryCreateInfoKHR
libraries Maybe RayTracingPipelineInterfaceCreateInfoKHR
pLibraryInterface' PipelineLayout
layout Pipeline
basePipelineHandle Int32
basePipelineIndex
instance es ~ '[] => Zero (RayTracingPipelineCreateInfoKHR es) where
zero :: RayTracingPipelineCreateInfoKHR es
zero = Chain es
-> PipelineCreateFlags
-> Vector (SomeStruct PipelineShaderStageCreateInfo)
-> Vector RayTracingShaderGroupCreateInfoKHR
-> ("bindInfoCount" ::: Word32)
-> PipelineLibraryCreateInfoKHR
-> Maybe RayTracingPipelineInterfaceCreateInfoKHR
-> PipelineLayout
-> Pipeline
-> Int32
-> RayTracingPipelineCreateInfoKHR es
forall (es :: [*]).
Chain es
-> PipelineCreateFlags
-> Vector (SomeStruct PipelineShaderStageCreateInfo)
-> Vector RayTracingShaderGroupCreateInfoKHR
-> ("bindInfoCount" ::: Word32)
-> PipelineLibraryCreateInfoKHR
-> Maybe RayTracingPipelineInterfaceCreateInfoKHR
-> PipelineLayout
-> Pipeline
-> Int32
-> RayTracingPipelineCreateInfoKHR es
RayTracingPipelineCreateInfoKHR
()
PipelineCreateFlags
forall a. Zero a => a
zero
Vector (SomeStruct PipelineShaderStageCreateInfo)
forall a. Monoid a => a
mempty
Vector RayTracingShaderGroupCreateInfoKHR
forall a. Monoid a => a
mempty
"bindInfoCount" ::: Word32
forall a. Zero a => a
zero
PipelineLibraryCreateInfoKHR
forall a. Zero a => a
zero
Maybe RayTracingPipelineInterfaceCreateInfoKHR
forall a. Maybe a
Nothing
PipelineLayout
forall a. Zero a => a
zero
Pipeline
forall a. Zero a => a
zero
Int32
forall a. Zero a => a
zero
data BindAccelerationStructureMemoryInfoKHR = BindAccelerationStructureMemoryInfoKHR
{
BindAccelerationStructureMemoryInfoKHR -> AccelerationStructureKHR
accelerationStructure :: AccelerationStructureKHR
,
BindAccelerationStructureMemoryInfoKHR -> DeviceMemory
memory :: DeviceMemory
,
BindAccelerationStructureMemoryInfoKHR -> "dataSize" ::: Word64
memoryOffset :: DeviceSize
,
BindAccelerationStructureMemoryInfoKHR
-> Vector ("bindInfoCount" ::: Word32)
deviceIndices :: Vector Word32
}
deriving (Typeable)
deriving instance Show BindAccelerationStructureMemoryInfoKHR
instance ToCStruct BindAccelerationStructureMemoryInfoKHR where
withCStruct :: BindAccelerationStructureMemoryInfoKHR
-> (("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoKHR)
-> IO b)
-> IO b
withCStruct x :: BindAccelerationStructureMemoryInfoKHR
x f :: ("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoKHR)
-> IO b
f = Int
-> Int
-> (("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoKHR)
-> IO b)
-> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 56 8 ((("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoKHR)
-> IO b)
-> IO b)
-> (("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoKHR)
-> IO b)
-> IO b
forall a b. (a -> b) -> a -> b
$ \p :: "pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoKHR
p -> ("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoKHR)
-> BindAccelerationStructureMemoryInfoKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoKHR
p BindAccelerationStructureMemoryInfoKHR
x (("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoKHR)
-> IO b
f "pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoKHR
p)
pokeCStruct :: ("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoKHR)
-> BindAccelerationStructureMemoryInfoKHR -> IO b -> IO b
pokeCStruct p :: "pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoKHR
p BindAccelerationStructureMemoryInfoKHR{..} f :: 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 (("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoKHR
p ("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoKHR)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_BIND_ACCELERATION_STRUCTURE_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 (("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoKHR
p ("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoKHR)
-> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 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 (("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoKHR
p ("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoKHR)
-> Int
-> "pAccelerationStructures" ::: Ptr AccelerationStructureKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr AccelerationStructureKHR)) (AccelerationStructureKHR
accelerationStructure)
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 DeviceMemory -> DeviceMemory -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoKHR
p ("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoKHR)
-> Int -> Ptr DeviceMemory
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr DeviceMemory)) (DeviceMemory
memory)
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 ("dataSize" ::: Word64) -> ("dataSize" ::: Word64) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoKHR
p ("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoKHR)
-> Int -> Ptr ("dataSize" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr DeviceSize)) ("dataSize" ::: Word64
memoryOffset)
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 ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoKHR
p ("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoKHR)
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 40 :: Ptr Word32)) ((Int -> "bindInfoCount" ::: Word32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Vector ("bindInfoCount" ::: Word32) -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector ("bindInfoCount" ::: Word32) -> Int)
-> Vector ("bindInfoCount" ::: Word32) -> Int
forall a b. (a -> b) -> a -> b
$ (Vector ("bindInfoCount" ::: Word32)
deviceIndices)) :: Word32))
Ptr ("bindInfoCount" ::: Word32)
pPDeviceIndices' <- ((Ptr ("bindInfoCount" ::: Word32) -> IO b) -> IO b)
-> ContT b IO (Ptr ("bindInfoCount" ::: Word32))
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr ("bindInfoCount" ::: Word32) -> IO b) -> IO b)
-> ContT b IO (Ptr ("bindInfoCount" ::: Word32)))
-> ((Ptr ("bindInfoCount" ::: Word32) -> IO b) -> IO b)
-> ContT b IO (Ptr ("bindInfoCount" ::: Word32))
forall a b. (a -> b) -> a -> b
$ Int -> Int -> (Ptr ("bindInfoCount" ::: Word32) -> IO b) -> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned @Word32 ((Vector ("bindInfoCount" ::: Word32) -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector ("bindInfoCount" ::: Word32)
deviceIndices)) Int -> Int -> Int
forall a. Num a => a -> a -> a
* 4) 4
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 -> ("bindInfoCount" ::: Word32) -> IO ())
-> Vector ("bindInfoCount" ::: Word32) -> IO ()
forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\i :: Int
i e :: "bindInfoCount" ::: Word32
e -> Ptr ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr ("bindInfoCount" ::: Word32)
pPDeviceIndices' Ptr ("bindInfoCount" ::: Word32)
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (4 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr Word32) ("bindInfoCount" ::: Word32
e)) (Vector ("bindInfoCount" ::: Word32)
deviceIndices)
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 ("bindInfoCount" ::: Word32))
-> Ptr ("bindInfoCount" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoKHR
p ("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoKHR)
-> Int -> Ptr (Ptr ("bindInfoCount" ::: Word32))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 48 :: Ptr (Ptr Word32))) (Ptr ("bindInfoCount" ::: Word32)
pPDeviceIndices')
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 = 56
cStructAlignment :: Int
cStructAlignment = 8
pokeZeroCStruct :: ("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoKHR)
-> IO b -> IO b
pokeZeroCStruct p :: "pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoKHR
p f :: 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 (("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoKHR
p ("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoKHR)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_BIND_ACCELERATION_STRUCTURE_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 (("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoKHR
p ("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoKHR)
-> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 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 (("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoKHR
p ("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoKHR)
-> Int
-> "pAccelerationStructures" ::: Ptr AccelerationStructureKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: 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 DeviceMemory -> DeviceMemory -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoKHR
p ("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoKHR)
-> Int -> Ptr DeviceMemory
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr DeviceMemory)) (DeviceMemory
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 ("dataSize" ::: Word64) -> ("dataSize" ::: Word64) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoKHR
p ("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoKHR)
-> Int -> Ptr ("dataSize" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr DeviceSize)) ("dataSize" ::: Word64
forall a. Zero a => a
zero)
Ptr ("bindInfoCount" ::: Word32)
pPDeviceIndices' <- ((Ptr ("bindInfoCount" ::: Word32) -> IO b) -> IO b)
-> ContT b IO (Ptr ("bindInfoCount" ::: Word32))
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr ("bindInfoCount" ::: Word32) -> IO b) -> IO b)
-> ContT b IO (Ptr ("bindInfoCount" ::: Word32)))
-> ((Ptr ("bindInfoCount" ::: Word32) -> IO b) -> IO b)
-> ContT b IO (Ptr ("bindInfoCount" ::: Word32))
forall a b. (a -> b) -> a -> b
$ Int -> Int -> (Ptr ("bindInfoCount" ::: Word32) -> IO b) -> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned @Word32 ((Vector Any -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector Any
forall a. Monoid a => a
mempty)) Int -> Int -> Int
forall a. Num a => a -> a -> a
* 4) 4
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 -> ("bindInfoCount" ::: Word32) -> IO ())
-> Vector ("bindInfoCount" ::: Word32) -> IO ()
forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\i :: Int
i e :: "bindInfoCount" ::: Word32
e -> Ptr ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr ("bindInfoCount" ::: Word32)
pPDeviceIndices' Ptr ("bindInfoCount" ::: Word32)
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (4 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr Word32) ("bindInfoCount" ::: Word32
e)) (Vector ("bindInfoCount" ::: Word32)
forall a. Monoid a => a
mempty)
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 ("bindInfoCount" ::: Word32))
-> Ptr ("bindInfoCount" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoKHR
p ("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoKHR)
-> Int -> Ptr (Ptr ("bindInfoCount" ::: Word32))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 48 :: Ptr (Ptr Word32))) (Ptr ("bindInfoCount" ::: Word32)
pPDeviceIndices')
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 FromCStruct BindAccelerationStructureMemoryInfoKHR where
peekCStruct :: ("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoKHR)
-> IO BindAccelerationStructureMemoryInfoKHR
peekCStruct p :: "pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoKHR
p = do
AccelerationStructureKHR
accelerationStructure <- ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> IO AccelerationStructureKHR
forall a. Storable a => Ptr a -> IO a
peek @AccelerationStructureKHR (("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoKHR
p ("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoKHR)
-> Int
-> "pAccelerationStructures" ::: Ptr AccelerationStructureKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr AccelerationStructureKHR))
DeviceMemory
memory <- Ptr DeviceMemory -> IO DeviceMemory
forall a. Storable a => Ptr a -> IO a
peek @DeviceMemory (("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoKHR
p ("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoKHR)
-> Int -> Ptr DeviceMemory
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr DeviceMemory))
"dataSize" ::: Word64
memoryOffset <- Ptr ("dataSize" ::: Word64) -> IO ("dataSize" ::: Word64)
forall a. Storable a => Ptr a -> IO a
peek @DeviceSize (("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoKHR
p ("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoKHR)
-> Int -> Ptr ("dataSize" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr DeviceSize))
"bindInfoCount" ::: Word32
deviceIndexCount <- Ptr ("bindInfoCount" ::: Word32) -> IO ("bindInfoCount" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 (("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoKHR
p ("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoKHR)
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 40 :: Ptr Word32))
Ptr ("bindInfoCount" ::: Word32)
pDeviceIndices <- Ptr (Ptr ("bindInfoCount" ::: Word32))
-> IO (Ptr ("bindInfoCount" ::: Word32))
forall a. Storable a => Ptr a -> IO a
peek @(Ptr Word32) (("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoKHR
p ("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoKHR)
-> Int -> Ptr (Ptr ("bindInfoCount" ::: Word32))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 48 :: Ptr (Ptr Word32)))
Vector ("bindInfoCount" ::: Word32)
pDeviceIndices' <- Int
-> (Int -> IO ("bindInfoCount" ::: Word32))
-> IO (Vector ("bindInfoCount" ::: Word32))
forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
generateM (("bindInfoCount" ::: Word32) -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral "bindInfoCount" ::: Word32
deviceIndexCount) (\i :: Int
i -> Ptr ("bindInfoCount" ::: Word32) -> IO ("bindInfoCount" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr ("bindInfoCount" ::: Word32)
pDeviceIndices Ptr ("bindInfoCount" ::: Word32)
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (4 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr Word32)))
BindAccelerationStructureMemoryInfoKHR
-> IO BindAccelerationStructureMemoryInfoKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure (BindAccelerationStructureMemoryInfoKHR
-> IO BindAccelerationStructureMemoryInfoKHR)
-> BindAccelerationStructureMemoryInfoKHR
-> IO BindAccelerationStructureMemoryInfoKHR
forall a b. (a -> b) -> a -> b
$ AccelerationStructureKHR
-> DeviceMemory
-> ("dataSize" ::: Word64)
-> Vector ("bindInfoCount" ::: Word32)
-> BindAccelerationStructureMemoryInfoKHR
BindAccelerationStructureMemoryInfoKHR
AccelerationStructureKHR
accelerationStructure DeviceMemory
memory "dataSize" ::: Word64
memoryOffset Vector ("bindInfoCount" ::: Word32)
pDeviceIndices'
instance Zero BindAccelerationStructureMemoryInfoKHR where
zero :: BindAccelerationStructureMemoryInfoKHR
zero = AccelerationStructureKHR
-> DeviceMemory
-> ("dataSize" ::: Word64)
-> Vector ("bindInfoCount" ::: Word32)
-> BindAccelerationStructureMemoryInfoKHR
BindAccelerationStructureMemoryInfoKHR
AccelerationStructureKHR
forall a. Zero a => a
zero
DeviceMemory
forall a. Zero a => a
zero
"dataSize" ::: Word64
forall a. Zero a => a
zero
Vector ("bindInfoCount" ::: Word32)
forall a. Monoid a => a
mempty
data WriteDescriptorSetAccelerationStructureKHR = WriteDescriptorSetAccelerationStructureKHR
{
WriteDescriptorSetAccelerationStructureKHR
-> "accelerationStructures" ::: Vector AccelerationStructureKHR
accelerationStructures :: Vector AccelerationStructureKHR }
deriving (Typeable)
deriving instance Show WriteDescriptorSetAccelerationStructureKHR
instance ToCStruct WriteDescriptorSetAccelerationStructureKHR where
withCStruct :: WriteDescriptorSetAccelerationStructureKHR
-> (Ptr WriteDescriptorSetAccelerationStructureKHR -> IO b) -> IO b
withCStruct x :: WriteDescriptorSetAccelerationStructureKHR
x f :: Ptr WriteDescriptorSetAccelerationStructureKHR -> IO b
f = Int
-> Int
-> (Ptr WriteDescriptorSetAccelerationStructureKHR -> IO b)
-> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 32 8 ((Ptr WriteDescriptorSetAccelerationStructureKHR -> IO b) -> IO b)
-> (Ptr WriteDescriptorSetAccelerationStructureKHR -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \p :: 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 :: Ptr WriteDescriptorSetAccelerationStructureKHR
-> WriteDescriptorSetAccelerationStructureKHR -> IO b -> IO b
pokeCStruct p :: Ptr WriteDescriptorSetAccelerationStructureKHR
p WriteDescriptorSetAccelerationStructureKHR{..} f :: 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` 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` 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 ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr WriteDescriptorSetAccelerationStructureKHR
p Ptr WriteDescriptorSetAccelerationStructureKHR
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Word32)) ((Int -> "bindInfoCount" ::: Word32
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
$ Int
-> Int
-> (("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> IO b)
-> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned @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
* 8) 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_ (\i :: Int
i e :: 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` (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` 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 = 32
cStructAlignment :: Int
cStructAlignment = 8
pokeZeroCStruct :: Ptr WriteDescriptorSetAccelerationStructureKHR -> IO b -> IO b
pokeZeroCStruct p :: Ptr WriteDescriptorSetAccelerationStructureKHR
p f :: 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` 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` 8 :: Ptr (Ptr ()))) ("data" ::: Ptr ()
forall a. Ptr a
nullPtr)
"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
$ Int
-> Int
-> (("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> IO b)
-> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned @AccelerationStructureKHR ((Vector Any -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector Any
forall a. Monoid a => a
mempty)) Int -> Int -> Int
forall a. Num a => a -> a -> a
* 8) 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_ (\i :: Int
i e :: 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` (8 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr AccelerationStructureKHR) (AccelerationStructureKHR
e)) ("accelerationStructures" ::: Vector AccelerationStructureKHR
forall a. Monoid a => a
mempty)
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` 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
instance FromCStruct WriteDescriptorSetAccelerationStructureKHR where
peekCStruct :: Ptr WriteDescriptorSetAccelerationStructureKHR
-> IO WriteDescriptorSetAccelerationStructureKHR
peekCStruct p :: Ptr WriteDescriptorSetAccelerationStructureKHR
p = do
"bindInfoCount" ::: Word32
accelerationStructureCount <- Ptr ("bindInfoCount" ::: Word32) -> IO ("bindInfoCount" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr WriteDescriptorSetAccelerationStructureKHR
p Ptr WriteDescriptorSetAccelerationStructureKHR
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Word32))
"pAccelerationStructures" ::: Ptr AccelerationStructureKHR
pAccelerationStructures <- Ptr ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> IO ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
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` 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 (("bindInfoCount" ::: Word32) -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral "bindInfoCount" ::: Word32
accelerationStructureCount) (\i :: Int
i -> ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> IO AccelerationStructureKHR
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` (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 AccelerationStructureMemoryRequirementsInfoKHR = AccelerationStructureMemoryRequirementsInfoKHR
{
AccelerationStructureMemoryRequirementsInfoKHR
-> AccelerationStructureMemoryRequirementsTypeKHR
type' :: AccelerationStructureMemoryRequirementsTypeKHR
,
AccelerationStructureMemoryRequirementsInfoKHR
-> AccelerationStructureBuildTypeKHR
buildType :: AccelerationStructureBuildTypeKHR
,
AccelerationStructureMemoryRequirementsInfoKHR
-> AccelerationStructureKHR
accelerationStructure :: AccelerationStructureKHR
}
deriving (Typeable)
deriving instance Show AccelerationStructureMemoryRequirementsInfoKHR
instance ToCStruct AccelerationStructureMemoryRequirementsInfoKHR where
withCStruct :: AccelerationStructureMemoryRequirementsInfoKHR
-> (("pInfo"
::: Ptr AccelerationStructureMemoryRequirementsInfoKHR)
-> IO b)
-> IO b
withCStruct x :: AccelerationStructureMemoryRequirementsInfoKHR
x f :: ("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoKHR)
-> IO b
f = Int
-> Int
-> (("pInfo"
::: Ptr AccelerationStructureMemoryRequirementsInfoKHR)
-> IO b)
-> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 32 8 ((("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoKHR)
-> IO b)
-> IO b)
-> (("pInfo"
::: Ptr AccelerationStructureMemoryRequirementsInfoKHR)
-> IO b)
-> IO b
forall a b. (a -> b) -> a -> b
$ \p :: "pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoKHR
p -> ("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoKHR)
-> AccelerationStructureMemoryRequirementsInfoKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoKHR
p AccelerationStructureMemoryRequirementsInfoKHR
x (("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoKHR)
-> IO b
f "pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoKHR
p)
pokeCStruct :: ("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoKHR)
-> AccelerationStructureMemoryRequirementsInfoKHR -> IO b -> IO b
pokeCStruct p :: "pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoKHR
p AccelerationStructureMemoryRequirementsInfoKHR{..} f :: IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoKHR
p ("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoKHR)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_INFO_KHR)
Ptr ("data" ::: Ptr ()) -> ("data" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoKHR
p ("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoKHR)
-> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) ("data" ::: Ptr ()
forall a. Ptr a
nullPtr)
Ptr AccelerationStructureMemoryRequirementsTypeKHR
-> AccelerationStructureMemoryRequirementsTypeKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoKHR
p ("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoKHR)
-> Int -> Ptr AccelerationStructureMemoryRequirementsTypeKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr AccelerationStructureMemoryRequirementsTypeKHR)) (AccelerationStructureMemoryRequirementsTypeKHR
type')
Ptr AccelerationStructureBuildTypeKHR
-> AccelerationStructureBuildTypeKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoKHR
p ("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoKHR)
-> Int -> Ptr AccelerationStructureBuildTypeKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr AccelerationStructureBuildTypeKHR)) (AccelerationStructureBuildTypeKHR
buildType)
("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> AccelerationStructureKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoKHR
p ("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoKHR)
-> Int
-> "pAccelerationStructures" ::: Ptr AccelerationStructureKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr AccelerationStructureKHR)) (AccelerationStructureKHR
accelerationStructure)
IO b
f
cStructSize :: Int
cStructSize = 32
cStructAlignment :: Int
cStructAlignment = 8
pokeZeroCStruct :: ("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoKHR)
-> IO b -> IO b
pokeZeroCStruct p :: "pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoKHR
p f :: IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoKHR
p ("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoKHR)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_INFO_KHR)
Ptr ("data" ::: Ptr ()) -> ("data" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoKHR
p ("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoKHR)
-> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) ("data" ::: Ptr ()
forall a. Ptr a
nullPtr)
Ptr AccelerationStructureMemoryRequirementsTypeKHR
-> AccelerationStructureMemoryRequirementsTypeKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoKHR
p ("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoKHR)
-> Int -> Ptr AccelerationStructureMemoryRequirementsTypeKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr AccelerationStructureMemoryRequirementsTypeKHR)) (AccelerationStructureMemoryRequirementsTypeKHR
forall a. Zero a => a
zero)
Ptr AccelerationStructureBuildTypeKHR
-> AccelerationStructureBuildTypeKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoKHR
p ("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoKHR)
-> Int -> Ptr AccelerationStructureBuildTypeKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr AccelerationStructureBuildTypeKHR)) (AccelerationStructureBuildTypeKHR
forall a. Zero a => a
zero)
("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> AccelerationStructureKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoKHR
p ("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoKHR)
-> Int
-> "pAccelerationStructures" ::: Ptr AccelerationStructureKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr AccelerationStructureKHR)) (AccelerationStructureKHR
forall a. Zero a => a
zero)
IO b
f
instance FromCStruct AccelerationStructureMemoryRequirementsInfoKHR where
peekCStruct :: ("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoKHR)
-> IO AccelerationStructureMemoryRequirementsInfoKHR
peekCStruct p :: "pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoKHR
p = do
AccelerationStructureMemoryRequirementsTypeKHR
type' <- Ptr AccelerationStructureMemoryRequirementsTypeKHR
-> IO AccelerationStructureMemoryRequirementsTypeKHR
forall a. Storable a => Ptr a -> IO a
peek @AccelerationStructureMemoryRequirementsTypeKHR (("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoKHR
p ("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoKHR)
-> Int -> Ptr AccelerationStructureMemoryRequirementsTypeKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr AccelerationStructureMemoryRequirementsTypeKHR))
AccelerationStructureBuildTypeKHR
buildType <- Ptr AccelerationStructureBuildTypeKHR
-> IO AccelerationStructureBuildTypeKHR
forall a. Storable a => Ptr a -> IO a
peek @AccelerationStructureBuildTypeKHR (("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoKHR
p ("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoKHR)
-> Int -> Ptr AccelerationStructureBuildTypeKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr AccelerationStructureBuildTypeKHR))
AccelerationStructureKHR
accelerationStructure <- ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> IO AccelerationStructureKHR
forall a. Storable a => Ptr a -> IO a
peek @AccelerationStructureKHR (("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoKHR
p ("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoKHR)
-> Int
-> "pAccelerationStructures" ::: Ptr AccelerationStructureKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr AccelerationStructureKHR))
AccelerationStructureMemoryRequirementsInfoKHR
-> IO AccelerationStructureMemoryRequirementsInfoKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure (AccelerationStructureMemoryRequirementsInfoKHR
-> IO AccelerationStructureMemoryRequirementsInfoKHR)
-> AccelerationStructureMemoryRequirementsInfoKHR
-> IO AccelerationStructureMemoryRequirementsInfoKHR
forall a b. (a -> b) -> a -> b
$ AccelerationStructureMemoryRequirementsTypeKHR
-> AccelerationStructureBuildTypeKHR
-> AccelerationStructureKHR
-> AccelerationStructureMemoryRequirementsInfoKHR
AccelerationStructureMemoryRequirementsInfoKHR
AccelerationStructureMemoryRequirementsTypeKHR
type' AccelerationStructureBuildTypeKHR
buildType AccelerationStructureKHR
accelerationStructure
instance Storable AccelerationStructureMemoryRequirementsInfoKHR where
sizeOf :: AccelerationStructureMemoryRequirementsInfoKHR -> Int
sizeOf ~AccelerationStructureMemoryRequirementsInfoKHR
_ = 32
alignment :: AccelerationStructureMemoryRequirementsInfoKHR -> Int
alignment ~AccelerationStructureMemoryRequirementsInfoKHR
_ = 8
peek :: ("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoKHR)
-> IO AccelerationStructureMemoryRequirementsInfoKHR
peek = ("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoKHR)
-> IO AccelerationStructureMemoryRequirementsInfoKHR
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: ("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoKHR)
-> AccelerationStructureMemoryRequirementsInfoKHR -> IO ()
poke ptr :: "pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoKHR
ptr poked :: AccelerationStructureMemoryRequirementsInfoKHR
poked = ("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoKHR)
-> AccelerationStructureMemoryRequirementsInfoKHR -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoKHR
ptr AccelerationStructureMemoryRequirementsInfoKHR
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero AccelerationStructureMemoryRequirementsInfoKHR where
zero :: AccelerationStructureMemoryRequirementsInfoKHR
zero = AccelerationStructureMemoryRequirementsTypeKHR
-> AccelerationStructureBuildTypeKHR
-> AccelerationStructureKHR
-> AccelerationStructureMemoryRequirementsInfoKHR
AccelerationStructureMemoryRequirementsInfoKHR
AccelerationStructureMemoryRequirementsTypeKHR
forall a. Zero a => a
zero
AccelerationStructureBuildTypeKHR
forall a. Zero a => a
zero
AccelerationStructureKHR
forall a. Zero a => a
zero
data PhysicalDeviceRayTracingFeaturesKHR = PhysicalDeviceRayTracingFeaturesKHR
{
PhysicalDeviceRayTracingFeaturesKHR -> Bool
rayTracing :: Bool
,
PhysicalDeviceRayTracingFeaturesKHR -> Bool
rayTracingShaderGroupHandleCaptureReplay :: Bool
,
PhysicalDeviceRayTracingFeaturesKHR -> Bool
rayTracingShaderGroupHandleCaptureReplayMixed :: Bool
,
PhysicalDeviceRayTracingFeaturesKHR -> Bool
rayTracingAccelerationStructureCaptureReplay :: Bool
,
PhysicalDeviceRayTracingFeaturesKHR -> Bool
rayTracingIndirectTraceRays :: Bool
,
PhysicalDeviceRayTracingFeaturesKHR -> Bool
rayTracingIndirectAccelerationStructureBuild :: Bool
,
PhysicalDeviceRayTracingFeaturesKHR -> Bool
rayTracingHostAccelerationStructureCommands :: Bool
,
PhysicalDeviceRayTracingFeaturesKHR -> Bool
rayQuery :: Bool
,
PhysicalDeviceRayTracingFeaturesKHR -> Bool
rayTracingPrimitiveCulling :: Bool
}
deriving (Typeable)
deriving instance Show PhysicalDeviceRayTracingFeaturesKHR
instance ToCStruct PhysicalDeviceRayTracingFeaturesKHR where
withCStruct :: PhysicalDeviceRayTracingFeaturesKHR
-> (Ptr PhysicalDeviceRayTracingFeaturesKHR -> IO b) -> IO b
withCStruct x :: PhysicalDeviceRayTracingFeaturesKHR
x f :: Ptr PhysicalDeviceRayTracingFeaturesKHR -> IO b
f = Int
-> Int -> (Ptr PhysicalDeviceRayTracingFeaturesKHR -> IO b) -> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 56 8 ((Ptr PhysicalDeviceRayTracingFeaturesKHR -> IO b) -> IO b)
-> (Ptr PhysicalDeviceRayTracingFeaturesKHR -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \p :: Ptr PhysicalDeviceRayTracingFeaturesKHR
p -> Ptr PhysicalDeviceRayTracingFeaturesKHR
-> PhysicalDeviceRayTracingFeaturesKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceRayTracingFeaturesKHR
p PhysicalDeviceRayTracingFeaturesKHR
x (Ptr PhysicalDeviceRayTracingFeaturesKHR -> IO b
f Ptr PhysicalDeviceRayTracingFeaturesKHR
p)
pokeCStruct :: Ptr PhysicalDeviceRayTracingFeaturesKHR
-> PhysicalDeviceRayTracingFeaturesKHR -> IO b -> IO b
pokeCStruct p :: Ptr PhysicalDeviceRayTracingFeaturesKHR
p PhysicalDeviceRayTracingFeaturesKHR{..} f :: IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingFeaturesKHR
p Ptr PhysicalDeviceRayTracingFeaturesKHR -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_FEATURES_KHR)
Ptr ("data" ::: Ptr ()) -> ("data" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingFeaturesKHR
p Ptr PhysicalDeviceRayTracingFeaturesKHR
-> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) ("data" ::: Ptr ()
forall a. Ptr a
nullPtr)
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingFeaturesKHR
p Ptr PhysicalDeviceRayTracingFeaturesKHR -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
rayTracing))
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingFeaturesKHR
p Ptr PhysicalDeviceRayTracingFeaturesKHR -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
rayTracingShaderGroupHandleCaptureReplay))
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingFeaturesKHR
p Ptr PhysicalDeviceRayTracingFeaturesKHR -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
rayTracingShaderGroupHandleCaptureReplayMixed))
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingFeaturesKHR
p Ptr PhysicalDeviceRayTracingFeaturesKHR -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 28 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
rayTracingAccelerationStructureCaptureReplay))
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingFeaturesKHR
p Ptr PhysicalDeviceRayTracingFeaturesKHR -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
rayTracingIndirectTraceRays))
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingFeaturesKHR
p Ptr PhysicalDeviceRayTracingFeaturesKHR -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 36 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
rayTracingIndirectAccelerationStructureBuild))
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingFeaturesKHR
p Ptr PhysicalDeviceRayTracingFeaturesKHR -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 40 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
rayTracingHostAccelerationStructureCommands))
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingFeaturesKHR
p Ptr PhysicalDeviceRayTracingFeaturesKHR -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 44 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
rayQuery))
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingFeaturesKHR
p Ptr PhysicalDeviceRayTracingFeaturesKHR -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 48 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
rayTracingPrimitiveCulling))
IO b
f
cStructSize :: Int
cStructSize = 56
cStructAlignment :: Int
cStructAlignment = 8
pokeZeroCStruct :: Ptr PhysicalDeviceRayTracingFeaturesKHR -> IO b -> IO b
pokeZeroCStruct p :: Ptr PhysicalDeviceRayTracingFeaturesKHR
p f :: IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingFeaturesKHR
p Ptr PhysicalDeviceRayTracingFeaturesKHR -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_FEATURES_KHR)
Ptr ("data" ::: Ptr ()) -> ("data" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingFeaturesKHR
p Ptr PhysicalDeviceRayTracingFeaturesKHR
-> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) ("data" ::: Ptr ()
forall a. Ptr a
nullPtr)
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingFeaturesKHR
p Ptr PhysicalDeviceRayTracingFeaturesKHR -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 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 PhysicalDeviceRayTracingFeaturesKHR
p Ptr PhysicalDeviceRayTracingFeaturesKHR -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 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 PhysicalDeviceRayTracingFeaturesKHR
p Ptr PhysicalDeviceRayTracingFeaturesKHR -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 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 PhysicalDeviceRayTracingFeaturesKHR
p Ptr PhysicalDeviceRayTracingFeaturesKHR -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 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 PhysicalDeviceRayTracingFeaturesKHR
p Ptr PhysicalDeviceRayTracingFeaturesKHR -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: 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 PhysicalDeviceRayTracingFeaturesKHR
p Ptr PhysicalDeviceRayTracingFeaturesKHR -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 36 :: 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 PhysicalDeviceRayTracingFeaturesKHR
p Ptr PhysicalDeviceRayTracingFeaturesKHR -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 40 :: 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 PhysicalDeviceRayTracingFeaturesKHR
p Ptr PhysicalDeviceRayTracingFeaturesKHR -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 44 :: 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 PhysicalDeviceRayTracingFeaturesKHR
p Ptr PhysicalDeviceRayTracingFeaturesKHR -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 48 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
IO b
f
instance FromCStruct PhysicalDeviceRayTracingFeaturesKHR where
peekCStruct :: Ptr PhysicalDeviceRayTracingFeaturesKHR
-> IO PhysicalDeviceRayTracingFeaturesKHR
peekCStruct p :: Ptr PhysicalDeviceRayTracingFeaturesKHR
p = do
Bool32
rayTracing <- Ptr Bool32 -> IO Bool32
forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceRayTracingFeaturesKHR
p Ptr PhysicalDeviceRayTracingFeaturesKHR -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Bool32))
Bool32
rayTracingShaderGroupHandleCaptureReplay <- Ptr Bool32 -> IO Bool32
forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceRayTracingFeaturesKHR
p Ptr PhysicalDeviceRayTracingFeaturesKHR -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr Bool32))
Bool32
rayTracingShaderGroupHandleCaptureReplayMixed <- Ptr Bool32 -> IO Bool32
forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceRayTracingFeaturesKHR
p Ptr PhysicalDeviceRayTracingFeaturesKHR -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr Bool32))
Bool32
rayTracingAccelerationStructureCaptureReplay <- Ptr Bool32 -> IO Bool32
forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceRayTracingFeaturesKHR
p Ptr PhysicalDeviceRayTracingFeaturesKHR -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 28 :: Ptr Bool32))
Bool32
rayTracingIndirectTraceRays <- Ptr Bool32 -> IO Bool32
forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceRayTracingFeaturesKHR
p Ptr PhysicalDeviceRayTracingFeaturesKHR -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr Bool32))
Bool32
rayTracingIndirectAccelerationStructureBuild <- Ptr Bool32 -> IO Bool32
forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceRayTracingFeaturesKHR
p Ptr PhysicalDeviceRayTracingFeaturesKHR -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 36 :: Ptr Bool32))
Bool32
rayTracingHostAccelerationStructureCommands <- Ptr Bool32 -> IO Bool32
forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceRayTracingFeaturesKHR
p Ptr PhysicalDeviceRayTracingFeaturesKHR -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 40 :: Ptr Bool32))
Bool32
rayQuery <- Ptr Bool32 -> IO Bool32
forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceRayTracingFeaturesKHR
p Ptr PhysicalDeviceRayTracingFeaturesKHR -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 44 :: Ptr Bool32))
Bool32
rayTracingPrimitiveCulling <- Ptr Bool32 -> IO Bool32
forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceRayTracingFeaturesKHR
p Ptr PhysicalDeviceRayTracingFeaturesKHR -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 48 :: Ptr Bool32))
PhysicalDeviceRayTracingFeaturesKHR
-> IO PhysicalDeviceRayTracingFeaturesKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure (PhysicalDeviceRayTracingFeaturesKHR
-> IO PhysicalDeviceRayTracingFeaturesKHR)
-> PhysicalDeviceRayTracingFeaturesKHR
-> IO PhysicalDeviceRayTracingFeaturesKHR
forall a b. (a -> b) -> a -> b
$ Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> PhysicalDeviceRayTracingFeaturesKHR
PhysicalDeviceRayTracingFeaturesKHR
(Bool32 -> Bool
bool32ToBool Bool32
rayTracing) (Bool32 -> Bool
bool32ToBool Bool32
rayTracingShaderGroupHandleCaptureReplay) (Bool32 -> Bool
bool32ToBool Bool32
rayTracingShaderGroupHandleCaptureReplayMixed) (Bool32 -> Bool
bool32ToBool Bool32
rayTracingAccelerationStructureCaptureReplay) (Bool32 -> Bool
bool32ToBool Bool32
rayTracingIndirectTraceRays) (Bool32 -> Bool
bool32ToBool Bool32
rayTracingIndirectAccelerationStructureBuild) (Bool32 -> Bool
bool32ToBool Bool32
rayTracingHostAccelerationStructureCommands) (Bool32 -> Bool
bool32ToBool Bool32
rayQuery) (Bool32 -> Bool
bool32ToBool Bool32
rayTracingPrimitiveCulling)
instance Storable PhysicalDeviceRayTracingFeaturesKHR where
sizeOf :: PhysicalDeviceRayTracingFeaturesKHR -> Int
sizeOf ~PhysicalDeviceRayTracingFeaturesKHR
_ = 56
alignment :: PhysicalDeviceRayTracingFeaturesKHR -> Int
alignment ~PhysicalDeviceRayTracingFeaturesKHR
_ = 8
peek :: Ptr PhysicalDeviceRayTracingFeaturesKHR
-> IO PhysicalDeviceRayTracingFeaturesKHR
peek = Ptr PhysicalDeviceRayTracingFeaturesKHR
-> IO PhysicalDeviceRayTracingFeaturesKHR
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr PhysicalDeviceRayTracingFeaturesKHR
-> PhysicalDeviceRayTracingFeaturesKHR -> IO ()
poke ptr :: Ptr PhysicalDeviceRayTracingFeaturesKHR
ptr poked :: PhysicalDeviceRayTracingFeaturesKHR
poked = Ptr PhysicalDeviceRayTracingFeaturesKHR
-> PhysicalDeviceRayTracingFeaturesKHR -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceRayTracingFeaturesKHR
ptr PhysicalDeviceRayTracingFeaturesKHR
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PhysicalDeviceRayTracingFeaturesKHR where
zero :: PhysicalDeviceRayTracingFeaturesKHR
zero = Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> PhysicalDeviceRayTracingFeaturesKHR
PhysicalDeviceRayTracingFeaturesKHR
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
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 PhysicalDeviceRayTracingPropertiesKHR = PhysicalDeviceRayTracingPropertiesKHR
{
PhysicalDeviceRayTracingPropertiesKHR -> "bindInfoCount" ::: Word32
shaderGroupHandleSize :: Word32
,
PhysicalDeviceRayTracingPropertiesKHR -> "bindInfoCount" ::: Word32
maxRecursionDepth :: Word32
,
PhysicalDeviceRayTracingPropertiesKHR -> "bindInfoCount" ::: Word32
maxShaderGroupStride :: Word32
,
PhysicalDeviceRayTracingPropertiesKHR -> "bindInfoCount" ::: Word32
shaderGroupBaseAlignment :: Word32
,
PhysicalDeviceRayTracingPropertiesKHR -> "dataSize" ::: Word64
maxGeometryCount :: Word64
,
PhysicalDeviceRayTracingPropertiesKHR -> "dataSize" ::: Word64
maxInstanceCount :: Word64
,
PhysicalDeviceRayTracingPropertiesKHR -> "dataSize" ::: Word64
maxPrimitiveCount :: Word64
,
PhysicalDeviceRayTracingPropertiesKHR -> "bindInfoCount" ::: Word32
maxDescriptorSetAccelerationStructures :: Word32
,
PhysicalDeviceRayTracingPropertiesKHR -> "bindInfoCount" ::: Word32
shaderGroupHandleCaptureReplaySize :: Word32
}
deriving (Typeable)
deriving instance Show PhysicalDeviceRayTracingPropertiesKHR
instance ToCStruct PhysicalDeviceRayTracingPropertiesKHR where
withCStruct :: PhysicalDeviceRayTracingPropertiesKHR
-> (Ptr PhysicalDeviceRayTracingPropertiesKHR -> IO b) -> IO b
withCStruct x :: PhysicalDeviceRayTracingPropertiesKHR
x f :: Ptr PhysicalDeviceRayTracingPropertiesKHR -> IO b
f = Int
-> Int
-> (Ptr PhysicalDeviceRayTracingPropertiesKHR -> IO b)
-> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 64 8 ((Ptr PhysicalDeviceRayTracingPropertiesKHR -> IO b) -> IO b)
-> (Ptr PhysicalDeviceRayTracingPropertiesKHR -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \p :: Ptr PhysicalDeviceRayTracingPropertiesKHR
p -> Ptr PhysicalDeviceRayTracingPropertiesKHR
-> PhysicalDeviceRayTracingPropertiesKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceRayTracingPropertiesKHR
p PhysicalDeviceRayTracingPropertiesKHR
x (Ptr PhysicalDeviceRayTracingPropertiesKHR -> IO b
f Ptr PhysicalDeviceRayTracingPropertiesKHR
p)
pokeCStruct :: Ptr PhysicalDeviceRayTracingPropertiesKHR
-> PhysicalDeviceRayTracingPropertiesKHR -> IO b -> IO b
pokeCStruct p :: Ptr PhysicalDeviceRayTracingPropertiesKHR
p PhysicalDeviceRayTracingPropertiesKHR{..} f :: IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPropertiesKHR
p Ptr PhysicalDeviceRayTracingPropertiesKHR
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PROPERTIES_KHR)
Ptr ("data" ::: Ptr ()) -> ("data" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPropertiesKHR
p Ptr PhysicalDeviceRayTracingPropertiesKHR
-> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) ("data" ::: Ptr ()
forall a. Ptr a
nullPtr)
Ptr ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPropertiesKHR
p Ptr PhysicalDeviceRayTracingPropertiesKHR
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Word32)) ("bindInfoCount" ::: Word32
shaderGroupHandleSize)
Ptr ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPropertiesKHR
p Ptr PhysicalDeviceRayTracingPropertiesKHR
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr Word32)) ("bindInfoCount" ::: Word32
maxRecursionDepth)
Ptr ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPropertiesKHR
p Ptr PhysicalDeviceRayTracingPropertiesKHR
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr Word32)) ("bindInfoCount" ::: Word32
maxShaderGroupStride)
Ptr ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPropertiesKHR
p Ptr PhysicalDeviceRayTracingPropertiesKHR
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 28 :: Ptr Word32)) ("bindInfoCount" ::: Word32
shaderGroupBaseAlignment)
Ptr ("dataSize" ::: Word64) -> ("dataSize" ::: Word64) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPropertiesKHR
p Ptr PhysicalDeviceRayTracingPropertiesKHR
-> Int -> Ptr ("dataSize" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr Word64)) ("dataSize" ::: Word64
maxGeometryCount)
Ptr ("dataSize" ::: Word64) -> ("dataSize" ::: Word64) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPropertiesKHR
p Ptr PhysicalDeviceRayTracingPropertiesKHR
-> Int -> Ptr ("dataSize" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 40 :: Ptr Word64)) ("dataSize" ::: Word64
maxInstanceCount)
Ptr ("dataSize" ::: Word64) -> ("dataSize" ::: Word64) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPropertiesKHR
p Ptr PhysicalDeviceRayTracingPropertiesKHR
-> Int -> Ptr ("dataSize" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 48 :: Ptr Word64)) ("dataSize" ::: Word64
maxPrimitiveCount)
Ptr ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPropertiesKHR
p Ptr PhysicalDeviceRayTracingPropertiesKHR
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 56 :: Ptr Word32)) ("bindInfoCount" ::: Word32
maxDescriptorSetAccelerationStructures)
Ptr ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPropertiesKHR
p Ptr PhysicalDeviceRayTracingPropertiesKHR
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 60 :: Ptr Word32)) ("bindInfoCount" ::: Word32
shaderGroupHandleCaptureReplaySize)
IO b
f
cStructSize :: Int
cStructSize = 64
cStructAlignment :: Int
cStructAlignment = 8
pokeZeroCStruct :: Ptr PhysicalDeviceRayTracingPropertiesKHR -> IO b -> IO b
pokeZeroCStruct p :: Ptr PhysicalDeviceRayTracingPropertiesKHR
p f :: IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPropertiesKHR
p Ptr PhysicalDeviceRayTracingPropertiesKHR
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PROPERTIES_KHR)
Ptr ("data" ::: Ptr ()) -> ("data" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPropertiesKHR
p Ptr PhysicalDeviceRayTracingPropertiesKHR
-> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) ("data" ::: Ptr ()
forall a. Ptr a
nullPtr)
Ptr ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPropertiesKHR
p Ptr PhysicalDeviceRayTracingPropertiesKHR
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Word32)) ("bindInfoCount" ::: Word32
forall a. Zero a => a
zero)
Ptr ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPropertiesKHR
p Ptr PhysicalDeviceRayTracingPropertiesKHR
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr Word32)) ("bindInfoCount" ::: Word32
forall a. Zero a => a
zero)
Ptr ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPropertiesKHR
p Ptr PhysicalDeviceRayTracingPropertiesKHR
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr Word32)) ("bindInfoCount" ::: Word32
forall a. Zero a => a
zero)
Ptr ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPropertiesKHR
p Ptr PhysicalDeviceRayTracingPropertiesKHR
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 28 :: Ptr Word32)) ("bindInfoCount" ::: Word32
forall a. Zero a => a
zero)
Ptr ("dataSize" ::: Word64) -> ("dataSize" ::: Word64) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPropertiesKHR
p Ptr PhysicalDeviceRayTracingPropertiesKHR
-> Int -> Ptr ("dataSize" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr Word64)) ("dataSize" ::: Word64
forall a. Zero a => a
zero)
Ptr ("dataSize" ::: Word64) -> ("dataSize" ::: Word64) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPropertiesKHR
p Ptr PhysicalDeviceRayTracingPropertiesKHR
-> Int -> Ptr ("dataSize" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 40 :: Ptr Word64)) ("dataSize" ::: Word64
forall a. Zero a => a
zero)
Ptr ("dataSize" ::: Word64) -> ("dataSize" ::: Word64) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPropertiesKHR
p Ptr PhysicalDeviceRayTracingPropertiesKHR
-> Int -> Ptr ("dataSize" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 48 :: Ptr Word64)) ("dataSize" ::: Word64
forall a. Zero a => a
zero)
Ptr ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPropertiesKHR
p Ptr PhysicalDeviceRayTracingPropertiesKHR
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 56 :: Ptr Word32)) ("bindInfoCount" ::: Word32
forall a. Zero a => a
zero)
Ptr ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPropertiesKHR
p Ptr PhysicalDeviceRayTracingPropertiesKHR
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 60 :: Ptr Word32)) ("bindInfoCount" ::: Word32
forall a. Zero a => a
zero)
IO b
f
instance FromCStruct PhysicalDeviceRayTracingPropertiesKHR where
peekCStruct :: Ptr PhysicalDeviceRayTracingPropertiesKHR
-> IO PhysicalDeviceRayTracingPropertiesKHR
peekCStruct p :: Ptr PhysicalDeviceRayTracingPropertiesKHR
p = do
"bindInfoCount" ::: Word32
shaderGroupHandleSize <- Ptr ("bindInfoCount" ::: Word32) -> IO ("bindInfoCount" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceRayTracingPropertiesKHR
p Ptr PhysicalDeviceRayTracingPropertiesKHR
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Word32))
"bindInfoCount" ::: Word32
maxRecursionDepth <- Ptr ("bindInfoCount" ::: Word32) -> IO ("bindInfoCount" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceRayTracingPropertiesKHR
p Ptr PhysicalDeviceRayTracingPropertiesKHR
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr Word32))
"bindInfoCount" ::: Word32
maxShaderGroupStride <- Ptr ("bindInfoCount" ::: Word32) -> IO ("bindInfoCount" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceRayTracingPropertiesKHR
p Ptr PhysicalDeviceRayTracingPropertiesKHR
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr Word32))
"bindInfoCount" ::: Word32
shaderGroupBaseAlignment <- Ptr ("bindInfoCount" ::: Word32) -> IO ("bindInfoCount" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceRayTracingPropertiesKHR
p Ptr PhysicalDeviceRayTracingPropertiesKHR
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 28 :: Ptr Word32))
"dataSize" ::: Word64
maxGeometryCount <- Ptr ("dataSize" ::: Word64) -> IO ("dataSize" ::: Word64)
forall a. Storable a => Ptr a -> IO a
peek @Word64 ((Ptr PhysicalDeviceRayTracingPropertiesKHR
p Ptr PhysicalDeviceRayTracingPropertiesKHR
-> Int -> Ptr ("dataSize" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr Word64))
"dataSize" ::: Word64
maxInstanceCount <- Ptr ("dataSize" ::: Word64) -> IO ("dataSize" ::: Word64)
forall a. Storable a => Ptr a -> IO a
peek @Word64 ((Ptr PhysicalDeviceRayTracingPropertiesKHR
p Ptr PhysicalDeviceRayTracingPropertiesKHR
-> Int -> Ptr ("dataSize" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 40 :: Ptr Word64))
"dataSize" ::: Word64
maxPrimitiveCount <- Ptr ("dataSize" ::: Word64) -> IO ("dataSize" ::: Word64)
forall a. Storable a => Ptr a -> IO a
peek @Word64 ((Ptr PhysicalDeviceRayTracingPropertiesKHR
p Ptr PhysicalDeviceRayTracingPropertiesKHR
-> Int -> Ptr ("dataSize" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 48 :: Ptr Word64))
"bindInfoCount" ::: Word32
maxDescriptorSetAccelerationStructures <- Ptr ("bindInfoCount" ::: Word32) -> IO ("bindInfoCount" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceRayTracingPropertiesKHR
p Ptr PhysicalDeviceRayTracingPropertiesKHR
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 56 :: Ptr Word32))
"bindInfoCount" ::: Word32
shaderGroupHandleCaptureReplaySize <- Ptr ("bindInfoCount" ::: Word32) -> IO ("bindInfoCount" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceRayTracingPropertiesKHR
p Ptr PhysicalDeviceRayTracingPropertiesKHR
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 60 :: Ptr Word32))
PhysicalDeviceRayTracingPropertiesKHR
-> IO PhysicalDeviceRayTracingPropertiesKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure (PhysicalDeviceRayTracingPropertiesKHR
-> IO PhysicalDeviceRayTracingPropertiesKHR)
-> PhysicalDeviceRayTracingPropertiesKHR
-> IO PhysicalDeviceRayTracingPropertiesKHR
forall a b. (a -> b) -> a -> b
$ ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32)
-> ("dataSize" ::: Word64)
-> ("dataSize" ::: Word64)
-> ("dataSize" ::: Word64)
-> ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32)
-> PhysicalDeviceRayTracingPropertiesKHR
PhysicalDeviceRayTracingPropertiesKHR
"bindInfoCount" ::: Word32
shaderGroupHandleSize "bindInfoCount" ::: Word32
maxRecursionDepth "bindInfoCount" ::: Word32
maxShaderGroupStride "bindInfoCount" ::: Word32
shaderGroupBaseAlignment "dataSize" ::: Word64
maxGeometryCount "dataSize" ::: Word64
maxInstanceCount "dataSize" ::: Word64
maxPrimitiveCount "bindInfoCount" ::: Word32
maxDescriptorSetAccelerationStructures "bindInfoCount" ::: Word32
shaderGroupHandleCaptureReplaySize
instance Storable PhysicalDeviceRayTracingPropertiesKHR where
sizeOf :: PhysicalDeviceRayTracingPropertiesKHR -> Int
sizeOf ~PhysicalDeviceRayTracingPropertiesKHR
_ = 64
alignment :: PhysicalDeviceRayTracingPropertiesKHR -> Int
alignment ~PhysicalDeviceRayTracingPropertiesKHR
_ = 8
peek :: Ptr PhysicalDeviceRayTracingPropertiesKHR
-> IO PhysicalDeviceRayTracingPropertiesKHR
peek = Ptr PhysicalDeviceRayTracingPropertiesKHR
-> IO PhysicalDeviceRayTracingPropertiesKHR
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr PhysicalDeviceRayTracingPropertiesKHR
-> PhysicalDeviceRayTracingPropertiesKHR -> IO ()
poke ptr :: Ptr PhysicalDeviceRayTracingPropertiesKHR
ptr poked :: PhysicalDeviceRayTracingPropertiesKHR
poked = Ptr PhysicalDeviceRayTracingPropertiesKHR
-> PhysicalDeviceRayTracingPropertiesKHR -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceRayTracingPropertiesKHR
ptr PhysicalDeviceRayTracingPropertiesKHR
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PhysicalDeviceRayTracingPropertiesKHR where
zero :: PhysicalDeviceRayTracingPropertiesKHR
zero = ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32)
-> ("dataSize" ::: Word64)
-> ("dataSize" ::: Word64)
-> ("dataSize" ::: Word64)
-> ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32)
-> PhysicalDeviceRayTracingPropertiesKHR
PhysicalDeviceRayTracingPropertiesKHR
"bindInfoCount" ::: Word32
forall a. Zero a => a
zero
"bindInfoCount" ::: Word32
forall a. Zero a => a
zero
"bindInfoCount" ::: Word32
forall a. Zero a => a
zero
"bindInfoCount" ::: Word32
forall a. Zero a => a
zero
"dataSize" ::: Word64
forall a. Zero a => a
zero
"dataSize" ::: Word64
forall a. Zero a => a
zero
"dataSize" ::: Word64
forall a. Zero a => a
zero
"bindInfoCount" ::: Word32
forall a. Zero a => a
zero
"bindInfoCount" ::: Word32
forall a. Zero a => a
zero
data StridedBufferRegionKHR = StridedBufferRegionKHR
{
("raygenShaderBindingTable" ::: StridedBufferRegionKHR) -> Buffer
buffer :: Buffer
,
("raygenShaderBindingTable" ::: StridedBufferRegionKHR)
-> "dataSize" ::: Word64
offset :: DeviceSize
,
("raygenShaderBindingTable" ::: StridedBufferRegionKHR)
-> "dataSize" ::: Word64
stride :: DeviceSize
,
("raygenShaderBindingTable" ::: StridedBufferRegionKHR)
-> "dataSize" ::: Word64
size :: DeviceSize
}
deriving (Typeable)
deriving instance Show StridedBufferRegionKHR
instance ToCStruct StridedBufferRegionKHR where
withCStruct :: ("raygenShaderBindingTable" ::: StridedBufferRegionKHR)
-> (("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> IO b)
-> IO b
withCStruct x :: "raygenShaderBindingTable" ::: StridedBufferRegionKHR
x f :: ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> IO b
f = Int
-> Int
-> (("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> IO b)
-> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 32 8 ((("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> IO b)
-> IO b)
-> (("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> IO b)
-> IO b
forall a b. (a -> b) -> a -> b
$ \p :: "pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR)
p -> ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> ("raygenShaderBindingTable" ::: StridedBufferRegionKHR)
-> IO b
-> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR)
p "raygenShaderBindingTable" ::: StridedBufferRegionKHR
x (("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> IO b
f "pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR)
p)
pokeCStruct :: ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> ("raygenShaderBindingTable" ::: StridedBufferRegionKHR)
-> IO b
-> IO b
pokeCStruct p :: "pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR)
p StridedBufferRegionKHR{..} f :: IO b
f = do
Ptr Buffer -> Buffer -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR)
p ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> Int -> Ptr Buffer
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr Buffer)) (Buffer
buffer)
Ptr ("dataSize" ::: Word64) -> ("dataSize" ::: Word64) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR)
p ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> Int -> Ptr ("dataSize" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr DeviceSize)) ("dataSize" ::: Word64
offset)
Ptr ("dataSize" ::: Word64) -> ("dataSize" ::: Word64) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR)
p ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> Int -> Ptr ("dataSize" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr DeviceSize)) ("dataSize" ::: Word64
stride)
Ptr ("dataSize" ::: Word64) -> ("dataSize" ::: Word64) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR)
p ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> Int -> Ptr ("dataSize" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr DeviceSize)) ("dataSize" ::: Word64
size)
IO b
f
cStructSize :: Int
cStructSize = 32
cStructAlignment :: Int
cStructAlignment = 8
pokeZeroCStruct :: ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> IO b -> IO b
pokeZeroCStruct p :: "pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR)
p f :: IO b
f = do
Ptr ("dataSize" ::: Word64) -> ("dataSize" ::: Word64) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR)
p ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> Int -> Ptr ("dataSize" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr DeviceSize)) ("dataSize" ::: Word64
forall a. Zero a => a
zero)
Ptr ("dataSize" ::: Word64) -> ("dataSize" ::: Word64) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR)
p ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> Int -> Ptr ("dataSize" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr DeviceSize)) ("dataSize" ::: Word64
forall a. Zero a => a
zero)
Ptr ("dataSize" ::: Word64) -> ("dataSize" ::: Word64) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR)
p ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> Int -> Ptr ("dataSize" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr DeviceSize)) ("dataSize" ::: Word64
forall a. Zero a => a
zero)
IO b
f
instance FromCStruct StridedBufferRegionKHR where
peekCStruct :: ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> IO ("raygenShaderBindingTable" ::: StridedBufferRegionKHR)
peekCStruct p :: "pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR)
p = do
Buffer
buffer <- Ptr Buffer -> IO Buffer
forall a. Storable a => Ptr a -> IO a
peek @Buffer (("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR)
p ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> Int -> Ptr Buffer
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr Buffer))
"dataSize" ::: Word64
offset <- Ptr ("dataSize" ::: Word64) -> IO ("dataSize" ::: Word64)
forall a. Storable a => Ptr a -> IO a
peek @DeviceSize (("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR)
p ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> Int -> Ptr ("dataSize" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr DeviceSize))
"dataSize" ::: Word64
stride <- Ptr ("dataSize" ::: Word64) -> IO ("dataSize" ::: Word64)
forall a. Storable a => Ptr a -> IO a
peek @DeviceSize (("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR)
p ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> Int -> Ptr ("dataSize" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr DeviceSize))
"dataSize" ::: Word64
size <- Ptr ("dataSize" ::: Word64) -> IO ("dataSize" ::: Word64)
forall a. Storable a => Ptr a -> IO a
peek @DeviceSize (("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR)
p ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> Int -> Ptr ("dataSize" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr DeviceSize))
("raygenShaderBindingTable" ::: StridedBufferRegionKHR)
-> IO ("raygenShaderBindingTable" ::: StridedBufferRegionKHR)
forall (f :: * -> *) a. Applicative f => a -> f a
pure (("raygenShaderBindingTable" ::: StridedBufferRegionKHR)
-> IO ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> ("raygenShaderBindingTable" ::: StridedBufferRegionKHR)
-> IO ("raygenShaderBindingTable" ::: StridedBufferRegionKHR)
forall a b. (a -> b) -> a -> b
$ Buffer
-> ("dataSize" ::: Word64)
-> ("dataSize" ::: Word64)
-> ("dataSize" ::: Word64)
-> "raygenShaderBindingTable" ::: StridedBufferRegionKHR
StridedBufferRegionKHR
Buffer
buffer "dataSize" ::: Word64
offset "dataSize" ::: Word64
stride "dataSize" ::: Word64
size
instance Storable StridedBufferRegionKHR where
sizeOf :: ("raygenShaderBindingTable" ::: StridedBufferRegionKHR) -> Int
sizeOf ~"raygenShaderBindingTable" ::: StridedBufferRegionKHR
_ = 32
alignment :: ("raygenShaderBindingTable" ::: StridedBufferRegionKHR) -> Int
alignment ~"raygenShaderBindingTable" ::: StridedBufferRegionKHR
_ = 8
peek :: ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> IO ("raygenShaderBindingTable" ::: StridedBufferRegionKHR)
peek = ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> IO ("raygenShaderBindingTable" ::: StridedBufferRegionKHR)
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> ("raygenShaderBindingTable" ::: StridedBufferRegionKHR) -> IO ()
poke ptr :: "pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR)
ptr poked :: "raygenShaderBindingTable" ::: StridedBufferRegionKHR
poked = ("pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR))
-> ("raygenShaderBindingTable" ::: StridedBufferRegionKHR)
-> IO ()
-> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pRaygenShaderBindingTable"
::: Ptr ("raygenShaderBindingTable" ::: StridedBufferRegionKHR)
ptr "raygenShaderBindingTable" ::: StridedBufferRegionKHR
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero StridedBufferRegionKHR where
zero :: "raygenShaderBindingTable" ::: StridedBufferRegionKHR
zero = Buffer
-> ("dataSize" ::: Word64)
-> ("dataSize" ::: Word64)
-> ("dataSize" ::: Word64)
-> "raygenShaderBindingTable" ::: StridedBufferRegionKHR
StridedBufferRegionKHR
Buffer
forall a. Zero a => a
zero
"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 TraceRaysIndirectCommandKHR = TraceRaysIndirectCommandKHR
{
TraceRaysIndirectCommandKHR -> "bindInfoCount" ::: Word32
width :: Word32
,
TraceRaysIndirectCommandKHR -> "bindInfoCount" ::: Word32
height :: Word32
,
TraceRaysIndirectCommandKHR -> "bindInfoCount" ::: Word32
depth :: Word32
}
deriving (Typeable)
deriving instance Show TraceRaysIndirectCommandKHR
instance ToCStruct TraceRaysIndirectCommandKHR where
withCStruct :: TraceRaysIndirectCommandKHR
-> (Ptr TraceRaysIndirectCommandKHR -> IO b) -> IO b
withCStruct x :: TraceRaysIndirectCommandKHR
x f :: Ptr TraceRaysIndirectCommandKHR -> IO b
f = Int -> Int -> (Ptr TraceRaysIndirectCommandKHR -> IO b) -> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 12 4 ((Ptr TraceRaysIndirectCommandKHR -> IO b) -> IO b)
-> (Ptr TraceRaysIndirectCommandKHR -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \p :: Ptr TraceRaysIndirectCommandKHR
p -> Ptr TraceRaysIndirectCommandKHR
-> TraceRaysIndirectCommandKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr TraceRaysIndirectCommandKHR
p TraceRaysIndirectCommandKHR
x (Ptr TraceRaysIndirectCommandKHR -> IO b
f Ptr TraceRaysIndirectCommandKHR
p)
pokeCStruct :: Ptr TraceRaysIndirectCommandKHR
-> TraceRaysIndirectCommandKHR -> IO b -> IO b
pokeCStruct p :: Ptr TraceRaysIndirectCommandKHR
p TraceRaysIndirectCommandKHR{..} f :: IO b
f = do
Ptr ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr TraceRaysIndirectCommandKHR
p Ptr TraceRaysIndirectCommandKHR
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr Word32)) ("bindInfoCount" ::: Word32
width)
Ptr ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr TraceRaysIndirectCommandKHR
p Ptr TraceRaysIndirectCommandKHR
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 4 :: Ptr Word32)) ("bindInfoCount" ::: Word32
height)
Ptr ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr TraceRaysIndirectCommandKHR
p Ptr TraceRaysIndirectCommandKHR
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr Word32)) ("bindInfoCount" ::: Word32
depth)
IO b
f
cStructSize :: Int
cStructSize = 12
cStructAlignment :: Int
cStructAlignment = 4
pokeZeroCStruct :: Ptr TraceRaysIndirectCommandKHR -> IO b -> IO b
pokeZeroCStruct p :: Ptr TraceRaysIndirectCommandKHR
p f :: IO b
f = do
Ptr ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr TraceRaysIndirectCommandKHR
p Ptr TraceRaysIndirectCommandKHR
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr Word32)) ("bindInfoCount" ::: Word32
forall a. Zero a => a
zero)
Ptr ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr TraceRaysIndirectCommandKHR
p Ptr TraceRaysIndirectCommandKHR
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 4 :: Ptr Word32)) ("bindInfoCount" ::: Word32
forall a. Zero a => a
zero)
Ptr ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr TraceRaysIndirectCommandKHR
p Ptr TraceRaysIndirectCommandKHR
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr Word32)) ("bindInfoCount" ::: Word32
forall a. Zero a => a
zero)
IO b
f
instance FromCStruct TraceRaysIndirectCommandKHR where
peekCStruct :: Ptr TraceRaysIndirectCommandKHR -> IO TraceRaysIndirectCommandKHR
peekCStruct p :: Ptr TraceRaysIndirectCommandKHR
p = do
"bindInfoCount" ::: Word32
width <- Ptr ("bindInfoCount" ::: Word32) -> IO ("bindInfoCount" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr TraceRaysIndirectCommandKHR
p Ptr TraceRaysIndirectCommandKHR
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr Word32))
"bindInfoCount" ::: Word32
height <- Ptr ("bindInfoCount" ::: Word32) -> IO ("bindInfoCount" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr TraceRaysIndirectCommandKHR
p Ptr TraceRaysIndirectCommandKHR
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 4 :: Ptr Word32))
"bindInfoCount" ::: Word32
depth <- Ptr ("bindInfoCount" ::: Word32) -> IO ("bindInfoCount" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr TraceRaysIndirectCommandKHR
p Ptr TraceRaysIndirectCommandKHR
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr Word32))
TraceRaysIndirectCommandKHR -> IO TraceRaysIndirectCommandKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure (TraceRaysIndirectCommandKHR -> IO TraceRaysIndirectCommandKHR)
-> TraceRaysIndirectCommandKHR -> IO TraceRaysIndirectCommandKHR
forall a b. (a -> b) -> a -> b
$ ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32)
-> TraceRaysIndirectCommandKHR
TraceRaysIndirectCommandKHR
"bindInfoCount" ::: Word32
width "bindInfoCount" ::: Word32
height "bindInfoCount" ::: Word32
depth
instance Storable TraceRaysIndirectCommandKHR where
sizeOf :: TraceRaysIndirectCommandKHR -> Int
sizeOf ~TraceRaysIndirectCommandKHR
_ = 12
alignment :: TraceRaysIndirectCommandKHR -> Int
alignment ~TraceRaysIndirectCommandKHR
_ = 4
peek :: Ptr TraceRaysIndirectCommandKHR -> IO TraceRaysIndirectCommandKHR
peek = Ptr TraceRaysIndirectCommandKHR -> IO TraceRaysIndirectCommandKHR
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr TraceRaysIndirectCommandKHR
-> TraceRaysIndirectCommandKHR -> IO ()
poke ptr :: Ptr TraceRaysIndirectCommandKHR
ptr poked :: TraceRaysIndirectCommandKHR
poked = Ptr TraceRaysIndirectCommandKHR
-> TraceRaysIndirectCommandKHR -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr TraceRaysIndirectCommandKHR
ptr TraceRaysIndirectCommandKHR
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero TraceRaysIndirectCommandKHR where
zero :: TraceRaysIndirectCommandKHR
zero = ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32)
-> TraceRaysIndirectCommandKHR
TraceRaysIndirectCommandKHR
"bindInfoCount" ::: Word32
forall a. Zero a => a
zero
"bindInfoCount" ::: Word32
forall a. Zero a => a
zero
"bindInfoCount" ::: Word32
forall a. Zero a => a
zero
data AccelerationStructureGeometryTrianglesDataKHR = AccelerationStructureGeometryTrianglesDataKHR
{
AccelerationStructureGeometryTrianglesDataKHR -> Format
vertexFormat :: Format
,
AccelerationStructureGeometryTrianglesDataKHR
-> DeviceOrHostAddressConstKHR
vertexData :: DeviceOrHostAddressConstKHR
,
AccelerationStructureGeometryTrianglesDataKHR
-> "dataSize" ::: Word64
vertexStride :: DeviceSize
,
AccelerationStructureGeometryTrianglesDataKHR -> IndexType
indexType :: IndexType
,
AccelerationStructureGeometryTrianglesDataKHR
-> DeviceOrHostAddressConstKHR
indexData :: DeviceOrHostAddressConstKHR
,
AccelerationStructureGeometryTrianglesDataKHR
-> DeviceOrHostAddressConstKHR
transformData :: DeviceOrHostAddressConstKHR
}
deriving (Typeable)
deriving instance Show AccelerationStructureGeometryTrianglesDataKHR
instance ToCStruct AccelerationStructureGeometryTrianglesDataKHR where
withCStruct :: AccelerationStructureGeometryTrianglesDataKHR
-> (Ptr AccelerationStructureGeometryTrianglesDataKHR -> IO b)
-> IO b
withCStruct x :: AccelerationStructureGeometryTrianglesDataKHR
x f :: Ptr AccelerationStructureGeometryTrianglesDataKHR -> IO b
f = Int
-> Int
-> (Ptr AccelerationStructureGeometryTrianglesDataKHR -> IO b)
-> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 64 8 ((Ptr AccelerationStructureGeometryTrianglesDataKHR -> IO b)
-> IO b)
-> (Ptr AccelerationStructureGeometryTrianglesDataKHR -> IO b)
-> IO b
forall a b. (a -> b) -> a -> b
$ \p :: Ptr AccelerationStructureGeometryTrianglesDataKHR
p -> Ptr AccelerationStructureGeometryTrianglesDataKHR
-> AccelerationStructureGeometryTrianglesDataKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr AccelerationStructureGeometryTrianglesDataKHR
p AccelerationStructureGeometryTrianglesDataKHR
x (Ptr AccelerationStructureGeometryTrianglesDataKHR -> IO b
f Ptr AccelerationStructureGeometryTrianglesDataKHR
p)
pokeCStruct :: Ptr AccelerationStructureGeometryTrianglesDataKHR
-> AccelerationStructureGeometryTrianglesDataKHR -> IO b -> IO b
pokeCStruct p :: Ptr AccelerationStructureGeometryTrianglesDataKHR
p AccelerationStructureGeometryTrianglesDataKHR{..} f :: 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
p Ptr AccelerationStructureGeometryTrianglesDataKHR
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_TRIANGLES_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 AccelerationStructureGeometryTrianglesDataKHR
p Ptr AccelerationStructureGeometryTrianglesDataKHR
-> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 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 Format -> Format -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureGeometryTrianglesDataKHR
p Ptr AccelerationStructureGeometryTrianglesDataKHR
-> Int -> Ptr Format
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 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
p Ptr AccelerationStructureGeometryTrianglesDataKHR
-> Int -> Ptr DeviceOrHostAddressConstKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 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
$ Ptr ("dataSize" ::: Word64) -> ("dataSize" ::: Word64) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureGeometryTrianglesDataKHR
p Ptr AccelerationStructureGeometryTrianglesDataKHR
-> Int -> Ptr ("dataSize" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 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
$ Ptr IndexType -> IndexType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureGeometryTrianglesDataKHR
p Ptr AccelerationStructureGeometryTrianglesDataKHR
-> Int -> Ptr IndexType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 40 :: 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
p Ptr AccelerationStructureGeometryTrianglesDataKHR
-> Int -> Ptr DeviceOrHostAddressConstKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 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
p Ptr AccelerationStructureGeometryTrianglesDataKHR
-> Int -> Ptr DeviceOrHostAddressConstKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 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 = 64
cStructAlignment :: Int
cStructAlignment = 8
pokeZeroCStruct :: Ptr AccelerationStructureGeometryTrianglesDataKHR -> IO b -> IO b
pokeZeroCStruct p :: Ptr AccelerationStructureGeometryTrianglesDataKHR
p f :: 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
p Ptr AccelerationStructureGeometryTrianglesDataKHR
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_TRIANGLES_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 AccelerationStructureGeometryTrianglesDataKHR
p Ptr AccelerationStructureGeometryTrianglesDataKHR
-> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 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 Format -> Format -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureGeometryTrianglesDataKHR
p Ptr AccelerationStructureGeometryTrianglesDataKHR
-> Int -> Ptr Format
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 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
p Ptr AccelerationStructureGeometryTrianglesDataKHR
-> Int -> Ptr DeviceOrHostAddressConstKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 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
$ Ptr ("dataSize" ::: Word64) -> ("dataSize" ::: Word64) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureGeometryTrianglesDataKHR
p Ptr AccelerationStructureGeometryTrianglesDataKHR
-> Int -> Ptr ("dataSize" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 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
$ Ptr IndexType -> IndexType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureGeometryTrianglesDataKHR
p Ptr AccelerationStructureGeometryTrianglesDataKHR
-> Int -> Ptr IndexType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 40 :: Ptr IndexType)) (IndexType
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 AccelerationStructureGeometryTrianglesDataKHR where
zero :: AccelerationStructureGeometryTrianglesDataKHR
zero = Format
-> DeviceOrHostAddressConstKHR
-> ("dataSize" ::: Word64)
-> IndexType
-> DeviceOrHostAddressConstKHR
-> DeviceOrHostAddressConstKHR
-> AccelerationStructureGeometryTrianglesDataKHR
AccelerationStructureGeometryTrianglesDataKHR
Format
forall a. Zero a => a
zero
DeviceOrHostAddressConstKHR
forall a. Zero a => a
zero
"dataSize" ::: Word64
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)
deriving instance Show AccelerationStructureGeometryAabbsDataKHR
instance ToCStruct AccelerationStructureGeometryAabbsDataKHR where
withCStruct :: AccelerationStructureGeometryAabbsDataKHR
-> (Ptr AccelerationStructureGeometryAabbsDataKHR -> IO b) -> IO b
withCStruct x :: AccelerationStructureGeometryAabbsDataKHR
x f :: Ptr AccelerationStructureGeometryAabbsDataKHR -> IO b
f = Int
-> Int
-> (Ptr AccelerationStructureGeometryAabbsDataKHR -> IO b)
-> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 32 8 ((Ptr AccelerationStructureGeometryAabbsDataKHR -> IO b) -> IO b)
-> (Ptr AccelerationStructureGeometryAabbsDataKHR -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \p :: 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 :: Ptr AccelerationStructureGeometryAabbsDataKHR
-> AccelerationStructureGeometryAabbsDataKHR -> IO b -> IO b
pokeCStruct p :: Ptr AccelerationStructureGeometryAabbsDataKHR
p AccelerationStructureGeometryAabbsDataKHR{..} f :: 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` 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` 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` 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
$ Ptr ("dataSize" ::: Word64) -> ("dataSize" ::: Word64) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureGeometryAabbsDataKHR
p Ptr AccelerationStructureGeometryAabbsDataKHR
-> Int -> Ptr ("dataSize" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 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 = 32
cStructAlignment :: Int
cStructAlignment = 8
pokeZeroCStruct :: Ptr AccelerationStructureGeometryAabbsDataKHR -> IO b -> IO b
pokeZeroCStruct p :: Ptr AccelerationStructureGeometryAabbsDataKHR
p f :: 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` 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` 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` 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
$ Ptr ("dataSize" ::: Word64) -> ("dataSize" ::: Word64) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureGeometryAabbsDataKHR
p Ptr AccelerationStructureGeometryAabbsDataKHR
-> Int -> Ptr ("dataSize" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 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)
deriving instance Show AccelerationStructureGeometryInstancesDataKHR
instance ToCStruct AccelerationStructureGeometryInstancesDataKHR where
withCStruct :: AccelerationStructureGeometryInstancesDataKHR
-> (Ptr AccelerationStructureGeometryInstancesDataKHR -> IO b)
-> IO b
withCStruct x :: AccelerationStructureGeometryInstancesDataKHR
x f :: Ptr AccelerationStructureGeometryInstancesDataKHR -> IO b
f = Int
-> Int
-> (Ptr AccelerationStructureGeometryInstancesDataKHR -> IO b)
-> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 32 8 ((Ptr AccelerationStructureGeometryInstancesDataKHR -> IO b)
-> IO b)
-> (Ptr AccelerationStructureGeometryInstancesDataKHR -> IO b)
-> IO b
forall a b. (a -> b) -> a -> b
$ \p :: 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 :: Ptr AccelerationStructureGeometryInstancesDataKHR
-> AccelerationStructureGeometryInstancesDataKHR -> IO b -> IO b
pokeCStruct p :: Ptr AccelerationStructureGeometryInstancesDataKHR
p AccelerationStructureGeometryInstancesDataKHR{..} f :: 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` 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` 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` 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` 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 = 32
cStructAlignment :: Int
cStructAlignment = 8
pokeZeroCStruct :: Ptr AccelerationStructureGeometryInstancesDataKHR -> IO b -> IO b
pokeZeroCStruct p :: Ptr AccelerationStructureGeometryInstancesDataKHR
p f :: 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` 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` 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` 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` 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 -> GeometryFlagsKHR
flags :: GeometryFlagsKHR
}
deriving (Typeable)
deriving instance Show AccelerationStructureGeometryKHR
instance ToCStruct AccelerationStructureGeometryKHR where
withCStruct :: AccelerationStructureGeometryKHR
-> (Ptr AccelerationStructureGeometryKHR -> IO b) -> IO b
withCStruct x :: AccelerationStructureGeometryKHR
x f :: Ptr AccelerationStructureGeometryKHR -> IO b
f = Int
-> Int -> (Ptr AccelerationStructureGeometryKHR -> IO b) -> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 96 8 ((Ptr AccelerationStructureGeometryKHR -> IO b) -> IO b)
-> (Ptr AccelerationStructureGeometryKHR -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \p :: 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 :: Ptr AccelerationStructureGeometryKHR
-> AccelerationStructureGeometryKHR -> IO b -> IO b
pokeCStruct p :: Ptr AccelerationStructureGeometryKHR
p AccelerationStructureGeometryKHR{..} f :: 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` 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` 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` 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` 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 GeometryFlagsKHR -> GeometryFlagsKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureGeometryKHR
p Ptr AccelerationStructureGeometryKHR -> Int -> Ptr GeometryFlagsKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 88 :: Ptr GeometryFlagsKHR)) (GeometryFlagsKHR
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 = 96
cStructAlignment :: Int
cStructAlignment = 8
pokeZeroCStruct :: Ptr AccelerationStructureGeometryKHR -> IO b -> IO b
pokeZeroCStruct p :: Ptr AccelerationStructureGeometryKHR
p f :: 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` 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` 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` 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` 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
-> GeometryFlagsKHR
-> AccelerationStructureGeometryKHR
AccelerationStructureGeometryKHR
GeometryTypeKHR
forall a. Zero a => a
zero
AccelerationStructureGeometryDataKHR
forall a. Zero a => a
zero
GeometryFlagsKHR
forall a. Zero a => a
zero
data AccelerationStructureBuildGeometryInfoKHR (es :: [Type]) = AccelerationStructureBuildGeometryInfoKHR
{
AccelerationStructureBuildGeometryInfoKHR es -> Chain es
next :: Chain es
,
AccelerationStructureBuildGeometryInfoKHR es
-> AccelerationStructureTypeKHR
type' :: AccelerationStructureTypeKHR
,
AccelerationStructureBuildGeometryInfoKHR es
-> BuildAccelerationStructureFlagsKHR
flags :: BuildAccelerationStructureFlagsKHR
,
AccelerationStructureBuildGeometryInfoKHR es -> Bool
update :: Bool
,
AccelerationStructureBuildGeometryInfoKHR es
-> AccelerationStructureKHR
srcAccelerationStructure :: AccelerationStructureKHR
,
AccelerationStructureBuildGeometryInfoKHR es
-> AccelerationStructureKHR
dstAccelerationStructure :: AccelerationStructureKHR
,
AccelerationStructureBuildGeometryInfoKHR es
-> Vector AccelerationStructureGeometryKHR
geometries :: Vector AccelerationStructureGeometryKHR
,
AccelerationStructureBuildGeometryInfoKHR es
-> DeviceOrHostAddressKHR
scratchData :: DeviceOrHostAddressKHR
}
deriving (Typeable)
deriving instance Show (Chain es) => Show (AccelerationStructureBuildGeometryInfoKHR es)
instance Extensible AccelerationStructureBuildGeometryInfoKHR where
extensibleType :: StructureType
extensibleType = StructureType
STRUCTURE_TYPE_ACCELERATION_STRUCTURE_BUILD_GEOMETRY_INFO_KHR
setNext :: AccelerationStructureBuildGeometryInfoKHR ds
-> Chain es -> AccelerationStructureBuildGeometryInfoKHR es
setNext x :: AccelerationStructureBuildGeometryInfoKHR ds
x next :: Chain es
next = AccelerationStructureBuildGeometryInfoKHR ds
x{$sel:next:AccelerationStructureBuildGeometryInfoKHR :: Chain es
next = Chain es
next}
getNext :: AccelerationStructureBuildGeometryInfoKHR es -> Chain es
getNext AccelerationStructureBuildGeometryInfoKHR{..} = Chain es
next
extends :: forall e b proxy. Typeable e => proxy e -> (Extends AccelerationStructureBuildGeometryInfoKHR e => b) -> Maybe b
extends :: proxy e
-> (Extends AccelerationStructureBuildGeometryInfoKHR e => b)
-> Maybe b
extends _ f :: Extends AccelerationStructureBuildGeometryInfoKHR e => b
f
| Just Refl <- (Typeable e, Typeable DeferredOperationInfoKHR) =>
Maybe (e :~: DeferredOperationInfoKHR)
forall k (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @DeferredOperationInfoKHR = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends AccelerationStructureBuildGeometryInfoKHR e => b
f
| Bool
otherwise = Maybe b
forall a. Maybe a
Nothing
instance (Extendss AccelerationStructureBuildGeometryInfoKHR es, PokeChain es) => ToCStruct (AccelerationStructureBuildGeometryInfoKHR es) where
withCStruct :: AccelerationStructureBuildGeometryInfoKHR es
-> (Ptr (AccelerationStructureBuildGeometryInfoKHR es) -> IO b)
-> IO b
withCStruct x :: AccelerationStructureBuildGeometryInfoKHR es
x f :: Ptr (AccelerationStructureBuildGeometryInfoKHR es) -> IO b
f = Int
-> Int
-> (Ptr (AccelerationStructureBuildGeometryInfoKHR es) -> IO b)
-> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 72 8 ((Ptr (AccelerationStructureBuildGeometryInfoKHR es) -> IO b)
-> IO b)
-> (Ptr (AccelerationStructureBuildGeometryInfoKHR es) -> IO b)
-> IO b
forall a b. (a -> b) -> a -> b
$ \p :: Ptr (AccelerationStructureBuildGeometryInfoKHR es)
p -> Ptr (AccelerationStructureBuildGeometryInfoKHR es)
-> AccelerationStructureBuildGeometryInfoKHR es -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr (AccelerationStructureBuildGeometryInfoKHR es)
p AccelerationStructureBuildGeometryInfoKHR es
x (Ptr (AccelerationStructureBuildGeometryInfoKHR es) -> IO b
f Ptr (AccelerationStructureBuildGeometryInfoKHR es)
p)
pokeCStruct :: Ptr (AccelerationStructureBuildGeometryInfoKHR es)
-> AccelerationStructureBuildGeometryInfoKHR es -> IO b -> IO b
pokeCStruct p :: Ptr (AccelerationStructureBuildGeometryInfoKHR es)
p AccelerationStructureBuildGeometryInfoKHR{..} f :: 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 (AccelerationStructureBuildGeometryInfoKHR es)
p Ptr (AccelerationStructureBuildGeometryInfoKHR es)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_ACCELERATION_STRUCTURE_BUILD_GEOMETRY_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 (AccelerationStructureBuildGeometryInfoKHR es)
p Ptr (AccelerationStructureBuildGeometryInfoKHR es)
-> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 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 AccelerationStructureTypeKHR
-> AccelerationStructureTypeKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (AccelerationStructureBuildGeometryInfoKHR es)
p Ptr (AccelerationStructureBuildGeometryInfoKHR es)
-> Int -> Ptr AccelerationStructureTypeKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 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 BuildAccelerationStructureFlagsKHR
-> BuildAccelerationStructureFlagsKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (AccelerationStructureBuildGeometryInfoKHR es)
p Ptr (AccelerationStructureBuildGeometryInfoKHR es)
-> Int -> Ptr BuildAccelerationStructureFlagsKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr BuildAccelerationStructureFlagsKHR)) (BuildAccelerationStructureFlagsKHR
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 Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (AccelerationStructureBuildGeometryInfoKHR es)
p Ptr (AccelerationStructureBuildGeometryInfoKHR es)
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
update))
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 ((Ptr (AccelerationStructureBuildGeometryInfoKHR es)
p Ptr (AccelerationStructureBuildGeometryInfoKHR es)
-> Int
-> "pAccelerationStructures" ::: Ptr AccelerationStructureKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 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 ((Ptr (AccelerationStructureBuildGeometryInfoKHR es)
p Ptr (AccelerationStructureBuildGeometryInfoKHR es)
-> Int
-> "pAccelerationStructures" ::: Ptr AccelerationStructureKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 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
$ Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (AccelerationStructureBuildGeometryInfoKHR es)
p Ptr (AccelerationStructureBuildGeometryInfoKHR es)
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 48 :: Ptr Bool32)) (Bool32
FALSE)
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 ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (AccelerationStructureBuildGeometryInfoKHR es)
p Ptr (AccelerationStructureBuildGeometryInfoKHR es)
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 52 :: Ptr Word32)) ((Int -> "bindInfoCount" ::: Word32
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
pPpGeometries' <- ((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
$ Int
-> Int -> (Ptr AccelerationStructureGeometryKHR -> IO b) -> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned @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
* 96) 8
(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_ (\i :: Int
i e :: 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
pPpGeometries' Ptr AccelerationStructureGeometryKHR
-> Int -> Ptr AccelerationStructureGeometryKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (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)
Ptr (Ptr AccelerationStructureGeometryKHR)
ppGeometries'' <- ((Ptr (Ptr AccelerationStructureGeometryKHR) -> IO b) -> IO b)
-> ContT b IO (Ptr (Ptr AccelerationStructureGeometryKHR))
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr (Ptr AccelerationStructureGeometryKHR) -> IO b) -> IO b)
-> ContT b IO (Ptr (Ptr AccelerationStructureGeometryKHR)))
-> ((Ptr (Ptr AccelerationStructureGeometryKHR) -> IO b) -> IO b)
-> ContT b IO (Ptr (Ptr AccelerationStructureGeometryKHR))
forall a b. (a -> b) -> a -> b
$ Ptr AccelerationStructureGeometryKHR
-> (Ptr (Ptr AccelerationStructureGeometryKHR) -> IO b) -> IO b
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with (Ptr AccelerationStructureGeometryKHR
pPpGeometries')
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 ((Ptr (AccelerationStructureBuildGeometryInfoKHR es)
p Ptr (AccelerationStructureBuildGeometryInfoKHR es)
-> Int -> Ptr (Ptr (Ptr AccelerationStructureGeometryKHR))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 56 :: Ptr (Ptr (Ptr AccelerationStructureGeometryKHR)))) Ptr (Ptr AccelerationStructureGeometryKHR)
ppGeometries''
((() -> 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 ((Ptr (AccelerationStructureBuildGeometryInfoKHR es)
p Ptr (AccelerationStructureBuildGeometryInfoKHR es)
-> Int -> Ptr DeviceOrHostAddressKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 64 :: 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 = 72
cStructAlignment :: Int
cStructAlignment = 8
pokeZeroCStruct :: Ptr (AccelerationStructureBuildGeometryInfoKHR es) -> IO b -> IO b
pokeZeroCStruct p :: Ptr (AccelerationStructureBuildGeometryInfoKHR es)
p f :: 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 (AccelerationStructureBuildGeometryInfoKHR es)
p Ptr (AccelerationStructureBuildGeometryInfoKHR es)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_ACCELERATION_STRUCTURE_BUILD_GEOMETRY_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 a. PokeChain es => (Ptr (Chain es) -> IO a) -> IO a
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 (AccelerationStructureBuildGeometryInfoKHR es)
p Ptr (AccelerationStructureBuildGeometryInfoKHR es)
-> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 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 AccelerationStructureTypeKHR
-> AccelerationStructureTypeKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (AccelerationStructureBuildGeometryInfoKHR es)
p Ptr (AccelerationStructureBuildGeometryInfoKHR es)
-> Int -> Ptr AccelerationStructureTypeKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 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 Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (AccelerationStructureBuildGeometryInfoKHR es)
p Ptr (AccelerationStructureBuildGeometryInfoKHR es)
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
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
$ ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> AccelerationStructureKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (AccelerationStructureBuildGeometryInfoKHR es)
p Ptr (AccelerationStructureBuildGeometryInfoKHR es)
-> Int
-> "pAccelerationStructures" ::: Ptr AccelerationStructureKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 40 :: 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 ((Ptr (AccelerationStructureBuildGeometryInfoKHR es)
p Ptr (AccelerationStructureBuildGeometryInfoKHR es)
-> Int -> Ptr DeviceOrHostAddressKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 64 :: 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 es ~ '[] => Zero (AccelerationStructureBuildGeometryInfoKHR es) where
zero :: AccelerationStructureBuildGeometryInfoKHR es
zero = Chain es
-> AccelerationStructureTypeKHR
-> BuildAccelerationStructureFlagsKHR
-> Bool
-> AccelerationStructureKHR
-> AccelerationStructureKHR
-> Vector AccelerationStructureGeometryKHR
-> DeviceOrHostAddressKHR
-> AccelerationStructureBuildGeometryInfoKHR es
forall (es :: [*]).
Chain es
-> AccelerationStructureTypeKHR
-> BuildAccelerationStructureFlagsKHR
-> Bool
-> AccelerationStructureKHR
-> AccelerationStructureKHR
-> Vector AccelerationStructureGeometryKHR
-> DeviceOrHostAddressKHR
-> AccelerationStructureBuildGeometryInfoKHR es
AccelerationStructureBuildGeometryInfoKHR
()
AccelerationStructureTypeKHR
forall a. Zero a => a
zero
BuildAccelerationStructureFlagsKHR
forall a. Zero a => a
zero
Bool
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 AccelerationStructureBuildOffsetInfoKHR = AccelerationStructureBuildOffsetInfoKHR
{
AccelerationStructureBuildOffsetInfoKHR
-> "bindInfoCount" ::: Word32
primitiveCount :: Word32
,
AccelerationStructureBuildOffsetInfoKHR
-> "bindInfoCount" ::: Word32
primitiveOffset :: Word32
,
AccelerationStructureBuildOffsetInfoKHR
-> "bindInfoCount" ::: Word32
firstVertex :: Word32
,
AccelerationStructureBuildOffsetInfoKHR
-> "bindInfoCount" ::: Word32
transformOffset :: Word32
}
deriving (Typeable)
deriving instance Show AccelerationStructureBuildOffsetInfoKHR
instance ToCStruct AccelerationStructureBuildOffsetInfoKHR where
withCStruct :: AccelerationStructureBuildOffsetInfoKHR
-> (Ptr AccelerationStructureBuildOffsetInfoKHR -> IO b) -> IO b
withCStruct x :: AccelerationStructureBuildOffsetInfoKHR
x f :: Ptr AccelerationStructureBuildOffsetInfoKHR -> IO b
f = Int
-> Int
-> (Ptr AccelerationStructureBuildOffsetInfoKHR -> IO b)
-> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 16 4 ((Ptr AccelerationStructureBuildOffsetInfoKHR -> IO b) -> IO b)
-> (Ptr AccelerationStructureBuildOffsetInfoKHR -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \p :: Ptr AccelerationStructureBuildOffsetInfoKHR
p -> Ptr AccelerationStructureBuildOffsetInfoKHR
-> AccelerationStructureBuildOffsetInfoKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr AccelerationStructureBuildOffsetInfoKHR
p AccelerationStructureBuildOffsetInfoKHR
x (Ptr AccelerationStructureBuildOffsetInfoKHR -> IO b
f Ptr AccelerationStructureBuildOffsetInfoKHR
p)
pokeCStruct :: Ptr AccelerationStructureBuildOffsetInfoKHR
-> AccelerationStructureBuildOffsetInfoKHR -> IO b -> IO b
pokeCStruct p :: Ptr AccelerationStructureBuildOffsetInfoKHR
p AccelerationStructureBuildOffsetInfoKHR{..} f :: IO b
f = do
Ptr ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureBuildOffsetInfoKHR
p Ptr AccelerationStructureBuildOffsetInfoKHR
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr Word32)) ("bindInfoCount" ::: Word32
primitiveCount)
Ptr ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureBuildOffsetInfoKHR
p Ptr AccelerationStructureBuildOffsetInfoKHR
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 4 :: Ptr Word32)) ("bindInfoCount" ::: Word32
primitiveOffset)
Ptr ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureBuildOffsetInfoKHR
p Ptr AccelerationStructureBuildOffsetInfoKHR
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr Word32)) ("bindInfoCount" ::: Word32
firstVertex)
Ptr ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureBuildOffsetInfoKHR
p Ptr AccelerationStructureBuildOffsetInfoKHR
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 12 :: Ptr Word32)) ("bindInfoCount" ::: Word32
transformOffset)
IO b
f
cStructSize :: Int
cStructSize = 16
cStructAlignment :: Int
cStructAlignment = 4
pokeZeroCStruct :: Ptr AccelerationStructureBuildOffsetInfoKHR -> IO b -> IO b
pokeZeroCStruct p :: Ptr AccelerationStructureBuildOffsetInfoKHR
p f :: IO b
f = do
Ptr ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureBuildOffsetInfoKHR
p Ptr AccelerationStructureBuildOffsetInfoKHR
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr Word32)) ("bindInfoCount" ::: Word32
forall a. Zero a => a
zero)
Ptr ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureBuildOffsetInfoKHR
p Ptr AccelerationStructureBuildOffsetInfoKHR
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 4 :: Ptr Word32)) ("bindInfoCount" ::: Word32
forall a. Zero a => a
zero)
IO b
f
instance FromCStruct AccelerationStructureBuildOffsetInfoKHR where
peekCStruct :: Ptr AccelerationStructureBuildOffsetInfoKHR
-> IO AccelerationStructureBuildOffsetInfoKHR
peekCStruct p :: Ptr AccelerationStructureBuildOffsetInfoKHR
p = do
"bindInfoCount" ::: Word32
primitiveCount <- Ptr ("bindInfoCount" ::: Word32) -> IO ("bindInfoCount" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr AccelerationStructureBuildOffsetInfoKHR
p Ptr AccelerationStructureBuildOffsetInfoKHR
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr Word32))
"bindInfoCount" ::: Word32
primitiveOffset <- Ptr ("bindInfoCount" ::: Word32) -> IO ("bindInfoCount" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr AccelerationStructureBuildOffsetInfoKHR
p Ptr AccelerationStructureBuildOffsetInfoKHR
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 4 :: Ptr Word32))
"bindInfoCount" ::: Word32
firstVertex <- Ptr ("bindInfoCount" ::: Word32) -> IO ("bindInfoCount" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr AccelerationStructureBuildOffsetInfoKHR
p Ptr AccelerationStructureBuildOffsetInfoKHR
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr Word32))
"bindInfoCount" ::: Word32
transformOffset <- Ptr ("bindInfoCount" ::: Word32) -> IO ("bindInfoCount" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr AccelerationStructureBuildOffsetInfoKHR
p Ptr AccelerationStructureBuildOffsetInfoKHR
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 12 :: Ptr Word32))
AccelerationStructureBuildOffsetInfoKHR
-> IO AccelerationStructureBuildOffsetInfoKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure (AccelerationStructureBuildOffsetInfoKHR
-> IO AccelerationStructureBuildOffsetInfoKHR)
-> AccelerationStructureBuildOffsetInfoKHR
-> IO AccelerationStructureBuildOffsetInfoKHR
forall a b. (a -> b) -> a -> b
$ ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32)
-> AccelerationStructureBuildOffsetInfoKHR
AccelerationStructureBuildOffsetInfoKHR
"bindInfoCount" ::: Word32
primitiveCount "bindInfoCount" ::: Word32
primitiveOffset "bindInfoCount" ::: Word32
firstVertex "bindInfoCount" ::: Word32
transformOffset
instance Storable AccelerationStructureBuildOffsetInfoKHR where
sizeOf :: AccelerationStructureBuildOffsetInfoKHR -> Int
sizeOf ~AccelerationStructureBuildOffsetInfoKHR
_ = 16
alignment :: AccelerationStructureBuildOffsetInfoKHR -> Int
alignment ~AccelerationStructureBuildOffsetInfoKHR
_ = 4
peek :: Ptr AccelerationStructureBuildOffsetInfoKHR
-> IO AccelerationStructureBuildOffsetInfoKHR
peek = Ptr AccelerationStructureBuildOffsetInfoKHR
-> IO AccelerationStructureBuildOffsetInfoKHR
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr AccelerationStructureBuildOffsetInfoKHR
-> AccelerationStructureBuildOffsetInfoKHR -> IO ()
poke ptr :: Ptr AccelerationStructureBuildOffsetInfoKHR
ptr poked :: AccelerationStructureBuildOffsetInfoKHR
poked = Ptr AccelerationStructureBuildOffsetInfoKHR
-> AccelerationStructureBuildOffsetInfoKHR -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr AccelerationStructureBuildOffsetInfoKHR
ptr AccelerationStructureBuildOffsetInfoKHR
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero AccelerationStructureBuildOffsetInfoKHR where
zero :: AccelerationStructureBuildOffsetInfoKHR
zero = ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32)
-> AccelerationStructureBuildOffsetInfoKHR
AccelerationStructureBuildOffsetInfoKHR
"bindInfoCount" ::: Word32
forall a. Zero a => a
zero
"bindInfoCount" ::: Word32
forall a. Zero a => a
zero
"bindInfoCount" ::: Word32
forall a. Zero a => a
zero
"bindInfoCount" ::: Word32
forall a. Zero a => a
zero
data AccelerationStructureCreateGeometryTypeInfoKHR = AccelerationStructureCreateGeometryTypeInfoKHR
{
AccelerationStructureCreateGeometryTypeInfoKHR -> GeometryTypeKHR
geometryType :: GeometryTypeKHR
,
AccelerationStructureCreateGeometryTypeInfoKHR
-> "bindInfoCount" ::: Word32
maxPrimitiveCount :: Word32
,
AccelerationStructureCreateGeometryTypeInfoKHR -> IndexType
indexType :: IndexType
,
AccelerationStructureCreateGeometryTypeInfoKHR
-> "bindInfoCount" ::: Word32
maxVertexCount :: Word32
,
AccelerationStructureCreateGeometryTypeInfoKHR -> Format
vertexFormat :: Format
,
AccelerationStructureCreateGeometryTypeInfoKHR -> Bool
allowsTransforms :: Bool
}
deriving (Typeable)
deriving instance Show AccelerationStructureCreateGeometryTypeInfoKHR
instance ToCStruct AccelerationStructureCreateGeometryTypeInfoKHR where
withCStruct :: AccelerationStructureCreateGeometryTypeInfoKHR
-> (Ptr AccelerationStructureCreateGeometryTypeInfoKHR -> IO b)
-> IO b
withCStruct x :: AccelerationStructureCreateGeometryTypeInfoKHR
x f :: Ptr AccelerationStructureCreateGeometryTypeInfoKHR -> IO b
f = Int
-> Int
-> (Ptr AccelerationStructureCreateGeometryTypeInfoKHR -> IO b)
-> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 40 8 ((Ptr AccelerationStructureCreateGeometryTypeInfoKHR -> IO b)
-> IO b)
-> (Ptr AccelerationStructureCreateGeometryTypeInfoKHR -> IO b)
-> IO b
forall a b. (a -> b) -> a -> b
$ \p :: Ptr AccelerationStructureCreateGeometryTypeInfoKHR
p -> Ptr AccelerationStructureCreateGeometryTypeInfoKHR
-> AccelerationStructureCreateGeometryTypeInfoKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr AccelerationStructureCreateGeometryTypeInfoKHR
p AccelerationStructureCreateGeometryTypeInfoKHR
x (Ptr AccelerationStructureCreateGeometryTypeInfoKHR -> IO b
f Ptr AccelerationStructureCreateGeometryTypeInfoKHR
p)
pokeCStruct :: Ptr AccelerationStructureCreateGeometryTypeInfoKHR
-> AccelerationStructureCreateGeometryTypeInfoKHR -> IO b -> IO b
pokeCStruct p :: Ptr AccelerationStructureCreateGeometryTypeInfoKHR
p AccelerationStructureCreateGeometryTypeInfoKHR{..} f :: IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureCreateGeometryTypeInfoKHR
p Ptr AccelerationStructureCreateGeometryTypeInfoKHR
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_ACCELERATION_STRUCTURE_CREATE_GEOMETRY_TYPE_INFO_KHR)
Ptr ("data" ::: Ptr ()) -> ("data" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureCreateGeometryTypeInfoKHR
p Ptr AccelerationStructureCreateGeometryTypeInfoKHR
-> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) ("data" ::: Ptr ()
forall a. Ptr a
nullPtr)
Ptr GeometryTypeKHR -> GeometryTypeKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureCreateGeometryTypeInfoKHR
p Ptr AccelerationStructureCreateGeometryTypeInfoKHR
-> Int -> Ptr GeometryTypeKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr GeometryTypeKHR)) (GeometryTypeKHR
geometryType)
Ptr ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureCreateGeometryTypeInfoKHR
p Ptr AccelerationStructureCreateGeometryTypeInfoKHR
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr Word32)) ("bindInfoCount" ::: Word32
maxPrimitiveCount)
Ptr IndexType -> IndexType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureCreateGeometryTypeInfoKHR
p Ptr AccelerationStructureCreateGeometryTypeInfoKHR
-> Int -> Ptr IndexType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr IndexType)) (IndexType
indexType)
Ptr ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureCreateGeometryTypeInfoKHR
p Ptr AccelerationStructureCreateGeometryTypeInfoKHR
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 28 :: Ptr Word32)) ("bindInfoCount" ::: Word32
maxVertexCount)
Ptr Format -> Format -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureCreateGeometryTypeInfoKHR
p Ptr AccelerationStructureCreateGeometryTypeInfoKHR
-> Int -> Ptr Format
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr Format)) (Format
vertexFormat)
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureCreateGeometryTypeInfoKHR
p Ptr AccelerationStructureCreateGeometryTypeInfoKHR
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 36 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
allowsTransforms))
IO b
f
cStructSize :: Int
cStructSize = 40
cStructAlignment :: Int
cStructAlignment = 8
pokeZeroCStruct :: Ptr AccelerationStructureCreateGeometryTypeInfoKHR -> IO b -> IO b
pokeZeroCStruct p :: Ptr AccelerationStructureCreateGeometryTypeInfoKHR
p f :: IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureCreateGeometryTypeInfoKHR
p Ptr AccelerationStructureCreateGeometryTypeInfoKHR
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_ACCELERATION_STRUCTURE_CREATE_GEOMETRY_TYPE_INFO_KHR)
Ptr ("data" ::: Ptr ()) -> ("data" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureCreateGeometryTypeInfoKHR
p Ptr AccelerationStructureCreateGeometryTypeInfoKHR
-> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) ("data" ::: Ptr ()
forall a. Ptr a
nullPtr)
Ptr GeometryTypeKHR -> GeometryTypeKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureCreateGeometryTypeInfoKHR
p Ptr AccelerationStructureCreateGeometryTypeInfoKHR
-> Int -> Ptr GeometryTypeKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr GeometryTypeKHR)) (GeometryTypeKHR
forall a. Zero a => a
zero)
Ptr ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureCreateGeometryTypeInfoKHR
p Ptr AccelerationStructureCreateGeometryTypeInfoKHR
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr Word32)) ("bindInfoCount" ::: Word32
forall a. Zero a => a
zero)
Ptr IndexType -> IndexType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureCreateGeometryTypeInfoKHR
p Ptr AccelerationStructureCreateGeometryTypeInfoKHR
-> Int -> Ptr IndexType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr IndexType)) (IndexType
forall a. Zero a => a
zero)
IO b
f
instance FromCStruct AccelerationStructureCreateGeometryTypeInfoKHR where
peekCStruct :: Ptr AccelerationStructureCreateGeometryTypeInfoKHR
-> IO AccelerationStructureCreateGeometryTypeInfoKHR
peekCStruct p :: Ptr AccelerationStructureCreateGeometryTypeInfoKHR
p = do
GeometryTypeKHR
geometryType <- Ptr GeometryTypeKHR -> IO GeometryTypeKHR
forall a. Storable a => Ptr a -> IO a
peek @GeometryTypeKHR ((Ptr AccelerationStructureCreateGeometryTypeInfoKHR
p Ptr AccelerationStructureCreateGeometryTypeInfoKHR
-> Int -> Ptr GeometryTypeKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr GeometryTypeKHR))
"bindInfoCount" ::: Word32
maxPrimitiveCount <- Ptr ("bindInfoCount" ::: Word32) -> IO ("bindInfoCount" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr AccelerationStructureCreateGeometryTypeInfoKHR
p Ptr AccelerationStructureCreateGeometryTypeInfoKHR
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr Word32))
IndexType
indexType <- Ptr IndexType -> IO IndexType
forall a. Storable a => Ptr a -> IO a
peek @IndexType ((Ptr AccelerationStructureCreateGeometryTypeInfoKHR
p Ptr AccelerationStructureCreateGeometryTypeInfoKHR
-> Int -> Ptr IndexType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr IndexType))
"bindInfoCount" ::: Word32
maxVertexCount <- Ptr ("bindInfoCount" ::: Word32) -> IO ("bindInfoCount" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr AccelerationStructureCreateGeometryTypeInfoKHR
p Ptr AccelerationStructureCreateGeometryTypeInfoKHR
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 28 :: Ptr Word32))
Format
vertexFormat <- Ptr Format -> IO Format
forall a. Storable a => Ptr a -> IO a
peek @Format ((Ptr AccelerationStructureCreateGeometryTypeInfoKHR
p Ptr AccelerationStructureCreateGeometryTypeInfoKHR
-> Int -> Ptr Format
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr Format))
Bool32
allowsTransforms <- Ptr Bool32 -> IO Bool32
forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr AccelerationStructureCreateGeometryTypeInfoKHR
p Ptr AccelerationStructureCreateGeometryTypeInfoKHR
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 36 :: Ptr Bool32))
AccelerationStructureCreateGeometryTypeInfoKHR
-> IO AccelerationStructureCreateGeometryTypeInfoKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure (AccelerationStructureCreateGeometryTypeInfoKHR
-> IO AccelerationStructureCreateGeometryTypeInfoKHR)
-> AccelerationStructureCreateGeometryTypeInfoKHR
-> IO AccelerationStructureCreateGeometryTypeInfoKHR
forall a b. (a -> b) -> a -> b
$ GeometryTypeKHR
-> ("bindInfoCount" ::: Word32)
-> IndexType
-> ("bindInfoCount" ::: Word32)
-> Format
-> Bool
-> AccelerationStructureCreateGeometryTypeInfoKHR
AccelerationStructureCreateGeometryTypeInfoKHR
GeometryTypeKHR
geometryType "bindInfoCount" ::: Word32
maxPrimitiveCount IndexType
indexType "bindInfoCount" ::: Word32
maxVertexCount Format
vertexFormat (Bool32 -> Bool
bool32ToBool Bool32
allowsTransforms)
instance Storable AccelerationStructureCreateGeometryTypeInfoKHR where
sizeOf :: AccelerationStructureCreateGeometryTypeInfoKHR -> Int
sizeOf ~AccelerationStructureCreateGeometryTypeInfoKHR
_ = 40
alignment :: AccelerationStructureCreateGeometryTypeInfoKHR -> Int
alignment ~AccelerationStructureCreateGeometryTypeInfoKHR
_ = 8
peek :: Ptr AccelerationStructureCreateGeometryTypeInfoKHR
-> IO AccelerationStructureCreateGeometryTypeInfoKHR
peek = Ptr AccelerationStructureCreateGeometryTypeInfoKHR
-> IO AccelerationStructureCreateGeometryTypeInfoKHR
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr AccelerationStructureCreateGeometryTypeInfoKHR
-> AccelerationStructureCreateGeometryTypeInfoKHR -> IO ()
poke ptr :: Ptr AccelerationStructureCreateGeometryTypeInfoKHR
ptr poked :: AccelerationStructureCreateGeometryTypeInfoKHR
poked = Ptr AccelerationStructureCreateGeometryTypeInfoKHR
-> AccelerationStructureCreateGeometryTypeInfoKHR -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr AccelerationStructureCreateGeometryTypeInfoKHR
ptr AccelerationStructureCreateGeometryTypeInfoKHR
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero AccelerationStructureCreateGeometryTypeInfoKHR where
zero :: AccelerationStructureCreateGeometryTypeInfoKHR
zero = GeometryTypeKHR
-> ("bindInfoCount" ::: Word32)
-> IndexType
-> ("bindInfoCount" ::: Word32)
-> Format
-> Bool
-> AccelerationStructureCreateGeometryTypeInfoKHR
AccelerationStructureCreateGeometryTypeInfoKHR
GeometryTypeKHR
forall a. Zero a => a
zero
"bindInfoCount" ::: Word32
forall a. Zero a => a
zero
IndexType
forall a. Zero a => a
zero
"bindInfoCount" ::: Word32
forall a. Zero a => a
zero
Format
forall a. Zero a => a
zero
Bool
forall a. Zero a => a
zero
data AccelerationStructureCreateInfoKHR = AccelerationStructureCreateInfoKHR
{
AccelerationStructureCreateInfoKHR -> "dataSize" ::: Word64
compactedSize :: DeviceSize
,
AccelerationStructureCreateInfoKHR -> AccelerationStructureTypeKHR
type' :: AccelerationStructureTypeKHR
,
AccelerationStructureCreateInfoKHR
-> BuildAccelerationStructureFlagsKHR
flags :: BuildAccelerationStructureFlagsKHR
,
AccelerationStructureCreateInfoKHR
-> Vector AccelerationStructureCreateGeometryTypeInfoKHR
geometryInfos :: Vector AccelerationStructureCreateGeometryTypeInfoKHR
,
AccelerationStructureCreateInfoKHR -> "dataSize" ::: Word64
deviceAddress :: DeviceAddress
}
deriving (Typeable)
deriving instance Show AccelerationStructureCreateInfoKHR
instance ToCStruct AccelerationStructureCreateInfoKHR where
withCStruct :: AccelerationStructureCreateInfoKHR
-> (("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoKHR)
-> IO b)
-> IO b
withCStruct x :: AccelerationStructureCreateInfoKHR
x f :: ("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoKHR) -> IO b
f = Int
-> Int
-> (("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoKHR)
-> IO b)
-> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 56 8 ((("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoKHR)
-> IO b)
-> IO b)
-> (("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoKHR)
-> IO b)
-> IO b
forall a b. (a -> b) -> a -> b
$ \p :: "pCreateInfo" ::: Ptr AccelerationStructureCreateInfoKHR
p -> ("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoKHR)
-> AccelerationStructureCreateInfoKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pCreateInfo" ::: Ptr AccelerationStructureCreateInfoKHR
p AccelerationStructureCreateInfoKHR
x (("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoKHR) -> IO b
f "pCreateInfo" ::: Ptr AccelerationStructureCreateInfoKHR
p)
pokeCStruct :: ("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoKHR)
-> AccelerationStructureCreateInfoKHR -> IO b -> IO b
pokeCStruct p :: "pCreateInfo" ::: Ptr AccelerationStructureCreateInfoKHR
p AccelerationStructureCreateInfoKHR{..} f :: 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 (("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoKHR
p ("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoKHR)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_ACCELERATION_STRUCTURE_CREATE_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 (("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoKHR
p ("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoKHR)
-> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 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 ("dataSize" ::: Word64) -> ("dataSize" ::: Word64) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoKHR
p ("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoKHR)
-> Int -> Ptr ("dataSize" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr DeviceSize)) ("dataSize" ::: Word64
compactedSize)
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 (("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoKHR
p ("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoKHR)
-> Int -> Ptr AccelerationStructureTypeKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: 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 BuildAccelerationStructureFlagsKHR
-> BuildAccelerationStructureFlagsKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoKHR
p ("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoKHR)
-> Int -> Ptr BuildAccelerationStructureFlagsKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 28 :: Ptr BuildAccelerationStructureFlagsKHR)) (BuildAccelerationStructureFlagsKHR
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 ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoKHR
p ("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoKHR)
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr Word32)) ((Int -> "bindInfoCount" ::: Word32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Vector AccelerationStructureCreateGeometryTypeInfoKHR -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector AccelerationStructureCreateGeometryTypeInfoKHR -> Int)
-> Vector AccelerationStructureCreateGeometryTypeInfoKHR -> Int
forall a b. (a -> b) -> a -> b
$ (Vector AccelerationStructureCreateGeometryTypeInfoKHR
geometryInfos)) :: Word32))
Ptr AccelerationStructureCreateGeometryTypeInfoKHR
pPGeometryInfos' <- ((Ptr AccelerationStructureCreateGeometryTypeInfoKHR -> IO b)
-> IO b)
-> ContT b IO (Ptr AccelerationStructureCreateGeometryTypeInfoKHR)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr AccelerationStructureCreateGeometryTypeInfoKHR -> IO b)
-> IO b)
-> ContT b IO (Ptr AccelerationStructureCreateGeometryTypeInfoKHR))
-> ((Ptr AccelerationStructureCreateGeometryTypeInfoKHR -> IO b)
-> IO b)
-> ContT b IO (Ptr AccelerationStructureCreateGeometryTypeInfoKHR)
forall a b. (a -> b) -> a -> b
$ Int
-> Int
-> (Ptr AccelerationStructureCreateGeometryTypeInfoKHR -> IO b)
-> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned @AccelerationStructureCreateGeometryTypeInfoKHR ((Vector AccelerationStructureCreateGeometryTypeInfoKHR -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector AccelerationStructureCreateGeometryTypeInfoKHR
geometryInfos)) Int -> Int -> Int
forall a. Num a => a -> a -> a
* 40) 8
(Int
-> AccelerationStructureCreateGeometryTypeInfoKHR -> ContT b IO ())
-> Vector AccelerationStructureCreateGeometryTypeInfoKHR
-> ContT b IO ()
forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\i :: Int
i e :: AccelerationStructureCreateGeometryTypeInfoKHR
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 AccelerationStructureCreateGeometryTypeInfoKHR
-> AccelerationStructureCreateGeometryTypeInfoKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct (Ptr AccelerationStructureCreateGeometryTypeInfoKHR
pPGeometryInfos' Ptr AccelerationStructureCreateGeometryTypeInfoKHR
-> Int -> Ptr AccelerationStructureCreateGeometryTypeInfoKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (40 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr AccelerationStructureCreateGeometryTypeInfoKHR) (AccelerationStructureCreateGeometryTypeInfoKHR
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 AccelerationStructureCreateGeometryTypeInfoKHR
geometryInfos)
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 AccelerationStructureCreateGeometryTypeInfoKHR)
-> Ptr AccelerationStructureCreateGeometryTypeInfoKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoKHR
p ("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoKHR)
-> Int -> Ptr (Ptr AccelerationStructureCreateGeometryTypeInfoKHR)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 40 :: Ptr (Ptr AccelerationStructureCreateGeometryTypeInfoKHR))) (Ptr AccelerationStructureCreateGeometryTypeInfoKHR
pPGeometryInfos')
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 ("dataSize" ::: Word64) -> ("dataSize" ::: Word64) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoKHR
p ("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoKHR)
-> Int -> Ptr ("dataSize" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 48 :: 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 = 56
cStructAlignment :: Int
cStructAlignment = 8
pokeZeroCStruct :: ("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoKHR)
-> IO b -> IO b
pokeZeroCStruct p :: "pCreateInfo" ::: Ptr AccelerationStructureCreateInfoKHR
p f :: 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 (("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoKHR
p ("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoKHR)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_ACCELERATION_STRUCTURE_CREATE_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 (("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoKHR
p ("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoKHR)
-> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 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 ("dataSize" ::: Word64) -> ("dataSize" ::: Word64) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoKHR
p ("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoKHR)
-> Int -> Ptr ("dataSize" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: 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 (("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoKHR
p ("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoKHR)
-> Int -> Ptr AccelerationStructureTypeKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr AccelerationStructureTypeKHR)) (AccelerationStructureTypeKHR
forall a. Zero a => a
zero)
Ptr AccelerationStructureCreateGeometryTypeInfoKHR
pPGeometryInfos' <- ((Ptr AccelerationStructureCreateGeometryTypeInfoKHR -> IO b)
-> IO b)
-> ContT b IO (Ptr AccelerationStructureCreateGeometryTypeInfoKHR)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr AccelerationStructureCreateGeometryTypeInfoKHR -> IO b)
-> IO b)
-> ContT b IO (Ptr AccelerationStructureCreateGeometryTypeInfoKHR))
-> ((Ptr AccelerationStructureCreateGeometryTypeInfoKHR -> IO b)
-> IO b)
-> ContT b IO (Ptr AccelerationStructureCreateGeometryTypeInfoKHR)
forall a b. (a -> b) -> a -> b
$ Int
-> Int
-> (Ptr AccelerationStructureCreateGeometryTypeInfoKHR -> IO b)
-> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned @AccelerationStructureCreateGeometryTypeInfoKHR ((Vector Any -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector Any
forall a. Monoid a => a
mempty)) Int -> Int -> Int
forall a. Num a => a -> a -> a
* 40) 8
(Int
-> AccelerationStructureCreateGeometryTypeInfoKHR -> ContT b IO ())
-> Vector AccelerationStructureCreateGeometryTypeInfoKHR
-> ContT b IO ()
forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\i :: Int
i e :: AccelerationStructureCreateGeometryTypeInfoKHR
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 AccelerationStructureCreateGeometryTypeInfoKHR
-> AccelerationStructureCreateGeometryTypeInfoKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct (Ptr AccelerationStructureCreateGeometryTypeInfoKHR
pPGeometryInfos' Ptr AccelerationStructureCreateGeometryTypeInfoKHR
-> Int -> Ptr AccelerationStructureCreateGeometryTypeInfoKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (40 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr AccelerationStructureCreateGeometryTypeInfoKHR) (AccelerationStructureCreateGeometryTypeInfoKHR
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 AccelerationStructureCreateGeometryTypeInfoKHR
forall a. Monoid a => a
mempty)
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 AccelerationStructureCreateGeometryTypeInfoKHR)
-> Ptr AccelerationStructureCreateGeometryTypeInfoKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoKHR
p ("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoKHR)
-> Int -> Ptr (Ptr AccelerationStructureCreateGeometryTypeInfoKHR)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 40 :: Ptr (Ptr AccelerationStructureCreateGeometryTypeInfoKHR))) (Ptr AccelerationStructureCreateGeometryTypeInfoKHR
pPGeometryInfos')
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 FromCStruct AccelerationStructureCreateInfoKHR where
peekCStruct :: ("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoKHR)
-> IO AccelerationStructureCreateInfoKHR
peekCStruct p :: "pCreateInfo" ::: Ptr AccelerationStructureCreateInfoKHR
p = do
"dataSize" ::: Word64
compactedSize <- Ptr ("dataSize" ::: Word64) -> IO ("dataSize" ::: Word64)
forall a. Storable a => Ptr a -> IO a
peek @DeviceSize (("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoKHR
p ("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoKHR)
-> Int -> Ptr ("dataSize" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr DeviceSize))
AccelerationStructureTypeKHR
type' <- Ptr AccelerationStructureTypeKHR -> IO AccelerationStructureTypeKHR
forall a. Storable a => Ptr a -> IO a
peek @AccelerationStructureTypeKHR (("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoKHR
p ("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoKHR)
-> Int -> Ptr AccelerationStructureTypeKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr AccelerationStructureTypeKHR))
BuildAccelerationStructureFlagsKHR
flags <- Ptr BuildAccelerationStructureFlagsKHR
-> IO BuildAccelerationStructureFlagsKHR
forall a. Storable a => Ptr a -> IO a
peek @BuildAccelerationStructureFlagsKHR (("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoKHR
p ("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoKHR)
-> Int -> Ptr BuildAccelerationStructureFlagsKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 28 :: Ptr BuildAccelerationStructureFlagsKHR))
"bindInfoCount" ::: Word32
maxGeometryCount <- Ptr ("bindInfoCount" ::: Word32) -> IO ("bindInfoCount" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 (("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoKHR
p ("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoKHR)
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr Word32))
Ptr AccelerationStructureCreateGeometryTypeInfoKHR
pGeometryInfos <- Ptr (Ptr AccelerationStructureCreateGeometryTypeInfoKHR)
-> IO (Ptr AccelerationStructureCreateGeometryTypeInfoKHR)
forall a. Storable a => Ptr a -> IO a
peek @(Ptr AccelerationStructureCreateGeometryTypeInfoKHR) (("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoKHR
p ("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoKHR)
-> Int -> Ptr (Ptr AccelerationStructureCreateGeometryTypeInfoKHR)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 40 :: Ptr (Ptr AccelerationStructureCreateGeometryTypeInfoKHR)))
Vector AccelerationStructureCreateGeometryTypeInfoKHR
pGeometryInfos' <- Int
-> (Int -> IO AccelerationStructureCreateGeometryTypeInfoKHR)
-> IO (Vector AccelerationStructureCreateGeometryTypeInfoKHR)
forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
generateM (("bindInfoCount" ::: Word32) -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral "bindInfoCount" ::: Word32
maxGeometryCount) (\i :: Int
i -> Ptr AccelerationStructureCreateGeometryTypeInfoKHR
-> IO AccelerationStructureCreateGeometryTypeInfoKHR
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @AccelerationStructureCreateGeometryTypeInfoKHR ((Ptr AccelerationStructureCreateGeometryTypeInfoKHR
pGeometryInfos Ptr AccelerationStructureCreateGeometryTypeInfoKHR
-> Int -> Ptr AccelerationStructureCreateGeometryTypeInfoKHR
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (40 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr AccelerationStructureCreateGeometryTypeInfoKHR)))
"dataSize" ::: Word64
deviceAddress <- Ptr ("dataSize" ::: Word64) -> IO ("dataSize" ::: Word64)
forall a. Storable a => Ptr a -> IO a
peek @DeviceAddress (("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoKHR
p ("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoKHR)
-> Int -> Ptr ("dataSize" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 48 :: Ptr DeviceAddress))
AccelerationStructureCreateInfoKHR
-> IO AccelerationStructureCreateInfoKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure (AccelerationStructureCreateInfoKHR
-> IO AccelerationStructureCreateInfoKHR)
-> AccelerationStructureCreateInfoKHR
-> IO AccelerationStructureCreateInfoKHR
forall a b. (a -> b) -> a -> b
$ ("dataSize" ::: Word64)
-> AccelerationStructureTypeKHR
-> BuildAccelerationStructureFlagsKHR
-> Vector AccelerationStructureCreateGeometryTypeInfoKHR
-> ("dataSize" ::: Word64)
-> AccelerationStructureCreateInfoKHR
AccelerationStructureCreateInfoKHR
"dataSize" ::: Word64
compactedSize AccelerationStructureTypeKHR
type' BuildAccelerationStructureFlagsKHR
flags Vector AccelerationStructureCreateGeometryTypeInfoKHR
pGeometryInfos' "dataSize" ::: Word64
deviceAddress
instance Zero AccelerationStructureCreateInfoKHR where
zero :: AccelerationStructureCreateInfoKHR
zero = ("dataSize" ::: Word64)
-> AccelerationStructureTypeKHR
-> BuildAccelerationStructureFlagsKHR
-> Vector AccelerationStructureCreateGeometryTypeInfoKHR
-> ("dataSize" ::: Word64)
-> AccelerationStructureCreateInfoKHR
AccelerationStructureCreateInfoKHR
"dataSize" ::: Word64
forall a. Zero a => a
zero
AccelerationStructureTypeKHR
forall a. Zero a => a
zero
BuildAccelerationStructureFlagsKHR
forall a. Zero a => a
zero
Vector AccelerationStructureCreateGeometryTypeInfoKHR
forall a. Monoid a => a
mempty
"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)
deriving instance Show AabbPositionsKHR
instance ToCStruct AabbPositionsKHR where
withCStruct :: AabbPositionsKHR -> (Ptr AabbPositionsKHR -> IO b) -> IO b
withCStruct x :: AabbPositionsKHR
x f :: Ptr AabbPositionsKHR -> IO b
f = Int -> Int -> (Ptr AabbPositionsKHR -> IO b) -> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 24 4 ((Ptr AabbPositionsKHR -> IO b) -> IO b)
-> (Ptr AabbPositionsKHR -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \p :: 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 :: Ptr AabbPositionsKHR -> AabbPositionsKHR -> IO b -> IO b
pokeCStruct p :: Ptr AabbPositionsKHR
p AabbPositionsKHR{..} f :: 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` 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` 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` 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` 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` 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` 20 :: Ptr CFloat)) (Float -> CFloat
CFloat (Float
maxZ))
IO b
f
cStructSize :: Int
cStructSize = 24
cStructAlignment :: Int
cStructAlignment = 4
pokeZeroCStruct :: Ptr AabbPositionsKHR -> IO b -> IO b
pokeZeroCStruct p :: Ptr AabbPositionsKHR
p f :: 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` 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` 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` 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` 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` 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` 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 p :: Ptr AabbPositionsKHR
p = do
CFloat
minX <- Ptr CFloat -> IO CFloat
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` 0 :: Ptr CFloat))
CFloat
minY <- Ptr CFloat -> IO CFloat
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` 4 :: Ptr CFloat))
CFloat
minZ <- Ptr CFloat -> IO CFloat
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` 8 :: Ptr CFloat))
CFloat
maxX <- Ptr CFloat -> IO CFloat
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` 12 :: Ptr CFloat))
CFloat
maxY <- Ptr CFloat -> IO CFloat
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` 16 :: Ptr CFloat))
CFloat
maxZ <- Ptr CFloat -> IO CFloat
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` 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
((\(CFloat a :: Float
a) -> Float
a) CFloat
minX) ((\(CFloat a :: Float
a) -> Float
a) CFloat
minY) ((\(CFloat a :: Float
a) -> Float
a) CFloat
minZ) ((\(CFloat a :: Float
a) -> Float
a) CFloat
maxX) ((\(CFloat a :: Float
a) -> Float
a) CFloat
maxY) ((\(CFloat a :: Float
a) -> Float
a) CFloat
maxZ)
instance Storable AabbPositionsKHR where
sizeOf :: AabbPositionsKHR -> Int
sizeOf ~AabbPositionsKHR
_ = 24
alignment :: AabbPositionsKHR -> Int
alignment ~AabbPositionsKHR
_ = 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 :: Ptr AabbPositionsKHR
ptr poked :: 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), (Float, Float, Float, Float),
(Float, Float, Float, Float))
matrix :: ((Float, Float, Float, Float), (Float, Float, Float, Float), (Float, Float, Float, Float)) }
deriving (Typeable)
deriving instance Show TransformMatrixKHR
instance ToCStruct TransformMatrixKHR where
withCStruct :: TransformMatrixKHR -> (Ptr TransformMatrixKHR -> IO b) -> IO b
withCStruct x :: TransformMatrixKHR
x f :: Ptr TransformMatrixKHR -> IO b
f = Int -> Int -> (Ptr TransformMatrixKHR -> IO b) -> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 48 4 ((Ptr TransformMatrixKHR -> IO b) -> IO b)
-> (Ptr TransformMatrixKHR -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \p :: 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 :: Ptr TransformMatrixKHR -> TransformMatrixKHR -> IO b -> IO b
pokeCStruct p :: Ptr TransformMatrixKHR
p TransformMatrixKHR{..} f :: IO b
f = do
let pMatrix' :: Ptr (FixedArray 4 CFloat)
pMatrix' = Ptr (FixedArray 3 (FixedArray 4 CFloat))
-> Ptr (FixedArray 4 CFloat)
forall a (n :: Nat). Ptr (FixedArray n a) -> Ptr a
lowerArrayPtr ((Ptr TransformMatrixKHR
p Ptr TransformMatrixKHR
-> Int -> Ptr (FixedArray 3 (FixedArray 4 CFloat))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr (FixedArray 3 (FixedArray 4 CFloat))))
case (((Float, Float, Float, Float), (Float, Float, Float, Float),
(Float, Float, Float, Float))
matrix) of
(e0 :: (Float, Float, Float, Float)
e0, e1 :: (Float, Float, Float, Float)
e1, e2 :: (Float, Float, Float, Float)
e2) -> do
let pMatrix0 :: Ptr CFloat
pMatrix0 = Ptr (FixedArray 4 CFloat) -> Ptr CFloat
forall a (n :: Nat). Ptr (FixedArray n a) -> Ptr a
lowerArrayPtr (Ptr (FixedArray 4 CFloat)
pMatrix' :: Ptr (FixedArray 4 CFloat))
case ((Float, Float, Float, Float)
e0) of
(e0' :: Float
e0', e1' :: Float
e1', e2' :: Float
e2', e3 :: Float
e3) -> do
Ptr CFloat -> CFloat -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr CFloat
pMatrix0 :: Ptr CFloat) (Float -> CFloat
CFloat (Float
e0'))
Ptr CFloat -> CFloat -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr CFloat
pMatrix0 Ptr CFloat -> Int -> Ptr CFloat
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 4 :: Ptr CFloat) (Float -> CFloat
CFloat (Float
e1'))
Ptr CFloat -> CFloat -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr CFloat
pMatrix0 Ptr CFloat -> Int -> Ptr CFloat
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr CFloat) (Float -> CFloat
CFloat (Float
e2'))
Ptr CFloat -> CFloat -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr CFloat
pMatrix0 Ptr CFloat -> Int -> Ptr CFloat
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 12 :: Ptr CFloat) (Float -> CFloat
CFloat (Float
e3))
let pMatrix1 :: Ptr CFloat
pMatrix1 = Ptr (FixedArray 4 CFloat) -> Ptr CFloat
forall a (n :: Nat). Ptr (FixedArray n a) -> Ptr a
lowerArrayPtr (Ptr (FixedArray 4 CFloat)
pMatrix' Ptr (FixedArray 4 CFloat) -> Int -> Ptr (FixedArray 4 CFloat)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr (FixedArray 4 CFloat))
case ((Float, Float, Float, Float)
e1) of
(e0' :: Float
e0', e1' :: Float
e1', e2' :: Float
e2', e3 :: Float
e3) -> do
Ptr CFloat -> CFloat -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr CFloat
pMatrix1 :: Ptr CFloat) (Float -> CFloat
CFloat (Float
e0'))
Ptr CFloat -> CFloat -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr CFloat
pMatrix1 Ptr CFloat -> Int -> Ptr CFloat
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 4 :: Ptr CFloat) (Float -> CFloat
CFloat (Float
e1'))
Ptr CFloat -> CFloat -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr CFloat
pMatrix1 Ptr CFloat -> Int -> Ptr CFloat
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr CFloat) (Float -> CFloat
CFloat (Float
e2'))
Ptr CFloat -> CFloat -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr CFloat
pMatrix1 Ptr CFloat -> Int -> Ptr CFloat
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 12 :: Ptr CFloat) (Float -> CFloat
CFloat (Float
e3))
let pMatrix2 :: Ptr CFloat
pMatrix2 = Ptr (FixedArray 4 CFloat) -> Ptr CFloat
forall a (n :: Nat). Ptr (FixedArray n a) -> Ptr a
lowerArrayPtr (Ptr (FixedArray 4 CFloat)
pMatrix' Ptr (FixedArray 4 CFloat) -> Int -> Ptr (FixedArray 4 CFloat)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr (FixedArray 4 CFloat))
case ((Float, Float, Float, Float)
e2) of
(e0' :: Float
e0', e1' :: Float
e1', e2' :: Float
e2', e3 :: Float
e3) -> do
Ptr CFloat -> CFloat -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr CFloat
pMatrix2 :: Ptr CFloat) (Float -> CFloat
CFloat (Float
e0'))
Ptr CFloat -> CFloat -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr CFloat
pMatrix2 Ptr CFloat -> Int -> Ptr CFloat
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 4 :: Ptr CFloat) (Float -> CFloat
CFloat (Float
e1'))
Ptr CFloat -> CFloat -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr CFloat
pMatrix2 Ptr CFloat -> Int -> Ptr CFloat
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr CFloat) (Float -> CFloat
CFloat (Float
e2'))
Ptr CFloat -> CFloat -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr CFloat
pMatrix2 Ptr CFloat -> Int -> Ptr CFloat
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 12 :: Ptr CFloat) (Float -> CFloat
CFloat (Float
e3))
() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure (() -> IO ()) -> () -> IO ()
forall a b. (a -> b) -> a -> b
$ ()
IO b
f
cStructSize :: Int
cStructSize = 48
cStructAlignment :: Int
cStructAlignment = 4
pokeZeroCStruct :: Ptr TransformMatrixKHR -> IO b -> IO b
pokeZeroCStruct p :: Ptr TransformMatrixKHR
p f :: IO b
f = do
let pMatrix' :: Ptr (FixedArray 4 CFloat)
pMatrix' = Ptr (FixedArray 3 (FixedArray 4 CFloat))
-> Ptr (FixedArray 4 CFloat)
forall a (n :: Nat). Ptr (FixedArray n a) -> Ptr a
lowerArrayPtr ((Ptr TransformMatrixKHR
p Ptr TransformMatrixKHR
-> Int -> Ptr (FixedArray 3 (FixedArray 4 CFloat))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr (FixedArray 3 (FixedArray 4 CFloat))))
case (((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, 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))) of
(e0 :: (Float, Float, Float, Float)
e0, e1 :: (Float, Float, Float, Float)
e1, e2 :: (Float, Float, Float, Float)
e2) -> do
let pMatrix0 :: Ptr CFloat
pMatrix0 = Ptr (FixedArray 4 CFloat) -> Ptr CFloat
forall a (n :: Nat). Ptr (FixedArray n a) -> Ptr a
lowerArrayPtr (Ptr (FixedArray 4 CFloat)
pMatrix' :: Ptr (FixedArray 4 CFloat))
case ((Float, Float, Float, Float)
e0) of
(e0' :: Float
e0', e1' :: Float
e1', e2' :: Float
e2', e3 :: Float
e3) -> do
Ptr CFloat -> CFloat -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr CFloat
pMatrix0 :: Ptr CFloat) (Float -> CFloat
CFloat (Float
e0'))
Ptr CFloat -> CFloat -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr CFloat
pMatrix0 Ptr CFloat -> Int -> Ptr CFloat
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 4 :: Ptr CFloat) (Float -> CFloat
CFloat (Float
e1'))
Ptr CFloat -> CFloat -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr CFloat
pMatrix0 Ptr CFloat -> Int -> Ptr CFloat
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr CFloat) (Float -> CFloat
CFloat (Float
e2'))
Ptr CFloat -> CFloat -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr CFloat
pMatrix0 Ptr CFloat -> Int -> Ptr CFloat
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 12 :: Ptr CFloat) (Float -> CFloat
CFloat (Float
e3))
let pMatrix1 :: Ptr CFloat
pMatrix1 = Ptr (FixedArray 4 CFloat) -> Ptr CFloat
forall a (n :: Nat). Ptr (FixedArray n a) -> Ptr a
lowerArrayPtr (Ptr (FixedArray 4 CFloat)
pMatrix' Ptr (FixedArray 4 CFloat) -> Int -> Ptr (FixedArray 4 CFloat)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr (FixedArray 4 CFloat))
case ((Float, Float, Float, Float)
e1) of
(e0' :: Float
e0', e1' :: Float
e1', e2' :: Float
e2', e3 :: Float
e3) -> do
Ptr CFloat -> CFloat -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr CFloat
pMatrix1 :: Ptr CFloat) (Float -> CFloat
CFloat (Float
e0'))
Ptr CFloat -> CFloat -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr CFloat
pMatrix1 Ptr CFloat -> Int -> Ptr CFloat
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 4 :: Ptr CFloat) (Float -> CFloat
CFloat (Float
e1'))
Ptr CFloat -> CFloat -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr CFloat
pMatrix1 Ptr CFloat -> Int -> Ptr CFloat
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr CFloat) (Float -> CFloat
CFloat (Float
e2'))
Ptr CFloat -> CFloat -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr CFloat
pMatrix1 Ptr CFloat -> Int -> Ptr CFloat
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 12 :: Ptr CFloat) (Float -> CFloat
CFloat (Float
e3))
let pMatrix2 :: Ptr CFloat
pMatrix2 = Ptr (FixedArray 4 CFloat) -> Ptr CFloat
forall a (n :: Nat). Ptr (FixedArray n a) -> Ptr a
lowerArrayPtr (Ptr (FixedArray 4 CFloat)
pMatrix' Ptr (FixedArray 4 CFloat) -> Int -> Ptr (FixedArray 4 CFloat)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr (FixedArray 4 CFloat))
case ((Float, Float, Float, Float)
e2) of
(e0' :: Float
e0', e1' :: Float
e1', e2' :: Float
e2', e3 :: Float
e3) -> do
Ptr CFloat -> CFloat -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr CFloat
pMatrix2 :: Ptr CFloat) (Float -> CFloat
CFloat (Float
e0'))
Ptr CFloat -> CFloat -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr CFloat
pMatrix2 Ptr CFloat -> Int -> Ptr CFloat
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 4 :: Ptr CFloat) (Float -> CFloat
CFloat (Float
e1'))
Ptr CFloat -> CFloat -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr CFloat
pMatrix2 Ptr CFloat -> Int -> Ptr CFloat
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr CFloat) (Float -> CFloat
CFloat (Float
e2'))
Ptr CFloat -> CFloat -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr CFloat
pMatrix2 Ptr CFloat -> Int -> Ptr CFloat
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 12 :: Ptr CFloat) (Float -> CFloat
CFloat (Float
e3))
() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure (() -> IO ()) -> () -> IO ()
forall a b. (a -> b) -> a -> b
$ ()
IO b
f
instance FromCStruct TransformMatrixKHR where
peekCStruct :: Ptr TransformMatrixKHR -> IO TransformMatrixKHR
peekCStruct p :: Ptr TransformMatrixKHR
p = do
let pmatrix :: Ptr (FixedArray 4 CFloat)
pmatrix = Ptr (FixedArray 3 (FixedArray 4 CFloat))
-> Ptr (FixedArray 4 CFloat)
forall a (n :: Nat). Ptr (FixedArray n a) -> Ptr a
lowerArrayPtr @(FixedArray 4 CFloat) ((Ptr TransformMatrixKHR
p Ptr TransformMatrixKHR
-> Int -> Ptr (FixedArray 3 (FixedArray 4 CFloat))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr (FixedArray 3 (FixedArray 4 CFloat))))
let pmatrix0 :: Ptr CFloat
pmatrix0 = Ptr (FixedArray 4 CFloat) -> Ptr CFloat
forall a (n :: Nat). Ptr (FixedArray n a) -> Ptr a
lowerArrayPtr @CFloat ((Ptr (FixedArray 4 CFloat)
pmatrix Ptr (FixedArray 4 CFloat) -> Int -> Ptr (FixedArray 4 CFloat)
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` 0 :: Ptr (FixedArray 4 CFloat)))
CFloat
matrix00 <- Ptr CFloat -> IO CFloat
forall a. Storable a => Ptr a -> IO a
peek @CFloat ((Ptr CFloat
pmatrix0 Ptr CFloat -> Int -> Ptr CFloat
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` 0 :: Ptr CFloat))
CFloat
matrix01 <- Ptr CFloat -> IO CFloat
forall a. Storable a => Ptr a -> IO a
peek @CFloat ((Ptr CFloat
pmatrix0 Ptr CFloat -> Int -> Ptr CFloat
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` 4 :: Ptr CFloat))
CFloat
matrix02 <- Ptr CFloat -> IO CFloat
forall a. Storable a => Ptr a -> IO a
peek @CFloat ((Ptr CFloat
pmatrix0 Ptr CFloat -> Int -> Ptr CFloat
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` 8 :: Ptr CFloat))
CFloat
matrix03 <- Ptr CFloat -> IO CFloat
forall a. Storable a => Ptr a -> IO a
peek @CFloat ((Ptr CFloat
pmatrix0 Ptr CFloat -> Int -> Ptr CFloat
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` 12 :: Ptr CFloat))
let pmatrix1 :: Ptr CFloat
pmatrix1 = Ptr (FixedArray 4 CFloat) -> Ptr CFloat
forall a (n :: Nat). Ptr (FixedArray n a) -> Ptr a
lowerArrayPtr @CFloat ((Ptr (FixedArray 4 CFloat)
pmatrix Ptr (FixedArray 4 CFloat) -> Int -> Ptr (FixedArray 4 CFloat)
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` 16 :: Ptr (FixedArray 4 CFloat)))
CFloat
matrix10 <- Ptr CFloat -> IO CFloat
forall a. Storable a => Ptr a -> IO a
peek @CFloat ((Ptr CFloat
pmatrix1 Ptr CFloat -> Int -> Ptr CFloat
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` 0 :: Ptr CFloat))
CFloat
matrix11 <- Ptr CFloat -> IO CFloat
forall a. Storable a => Ptr a -> IO a
peek @CFloat ((Ptr CFloat
pmatrix1 Ptr CFloat -> Int -> Ptr CFloat
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` 4 :: Ptr CFloat))
CFloat
matrix12 <- Ptr CFloat -> IO CFloat
forall a. Storable a => Ptr a -> IO a
peek @CFloat ((Ptr CFloat
pmatrix1 Ptr CFloat -> Int -> Ptr CFloat
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` 8 :: Ptr CFloat))
CFloat
matrix13 <- Ptr CFloat -> IO CFloat
forall a. Storable a => Ptr a -> IO a
peek @CFloat ((Ptr CFloat
pmatrix1 Ptr CFloat -> Int -> Ptr CFloat
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` 12 :: Ptr CFloat))
let pmatrix2 :: Ptr CFloat
pmatrix2 = Ptr (FixedArray 4 CFloat) -> Ptr CFloat
forall a (n :: Nat). Ptr (FixedArray n a) -> Ptr a
lowerArrayPtr @CFloat ((Ptr (FixedArray 4 CFloat)
pmatrix Ptr (FixedArray 4 CFloat) -> Int -> Ptr (FixedArray 4 CFloat)
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` 32 :: Ptr (FixedArray 4 CFloat)))
CFloat
matrix20 <- Ptr CFloat -> IO CFloat
forall a. Storable a => Ptr a -> IO a
peek @CFloat ((Ptr CFloat
pmatrix2 Ptr CFloat -> Int -> Ptr CFloat
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` 0 :: Ptr CFloat))
CFloat
matrix21 <- Ptr CFloat -> IO CFloat
forall a. Storable a => Ptr a -> IO a
peek @CFloat ((Ptr CFloat
pmatrix2 Ptr CFloat -> Int -> Ptr CFloat
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` 4 :: Ptr CFloat))
CFloat
matrix22 <- Ptr CFloat -> IO CFloat
forall a. Storable a => Ptr a -> IO a
peek @CFloat ((Ptr CFloat
pmatrix2 Ptr CFloat -> Int -> Ptr CFloat
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` 8 :: Ptr CFloat))
CFloat
matrix23 <- Ptr CFloat -> IO CFloat
forall a. Storable a => Ptr a -> IO a
peek @CFloat ((Ptr CFloat
pmatrix2 Ptr CFloat -> Int -> Ptr CFloat
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` 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
((((((\(CFloat a :: Float
a) -> Float
a) CFloat
matrix00), ((\(CFloat a :: Float
a) -> Float
a) CFloat
matrix01), ((\(CFloat a :: Float
a) -> Float
a) CFloat
matrix02), ((\(CFloat a :: Float
a) -> Float
a) CFloat
matrix03))), ((((\(CFloat a :: Float
a) -> Float
a) CFloat
matrix10), ((\(CFloat a :: Float
a) -> Float
a) CFloat
matrix11), ((\(CFloat a :: Float
a) -> Float
a) CFloat
matrix12), ((\(CFloat a :: Float
a) -> Float
a) CFloat
matrix13))), ((((\(CFloat a :: Float
a) -> Float
a) CFloat
matrix20), ((\(CFloat a :: Float
a) -> Float
a) CFloat
matrix21), ((\(CFloat a :: Float
a) -> Float
a) CFloat
matrix22), ((\(CFloat a :: Float
a) -> Float
a) CFloat
matrix23)))))
instance Storable TransformMatrixKHR where
sizeOf :: TransformMatrixKHR -> Int
sizeOf ~TransformMatrixKHR
_ = 48
alignment :: TransformMatrixKHR -> Int
alignment ~TransformMatrixKHR
_ = 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 :: Ptr TransformMatrixKHR
ptr poked :: 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
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, 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 AccelerationStructureInstanceKHR = AccelerationStructureInstanceKHR
{
AccelerationStructureInstanceKHR -> TransformMatrixKHR
transform :: TransformMatrixKHR
,
AccelerationStructureInstanceKHR -> "bindInfoCount" ::: Word32
instanceCustomIndex :: Word32
,
AccelerationStructureInstanceKHR -> "bindInfoCount" ::: Word32
mask :: Word32
,
AccelerationStructureInstanceKHR -> "bindInfoCount" ::: Word32
instanceShaderBindingTableRecordOffset :: Word32
,
AccelerationStructureInstanceKHR -> GeometryInstanceFlagsKHR
flags :: GeometryInstanceFlagsKHR
,
AccelerationStructureInstanceKHR -> "dataSize" ::: Word64
accelerationStructureReference :: Word64
}
deriving (Typeable)
deriving instance Show AccelerationStructureInstanceKHR
instance ToCStruct AccelerationStructureInstanceKHR where
withCStruct :: AccelerationStructureInstanceKHR
-> (Ptr AccelerationStructureInstanceKHR -> IO b) -> IO b
withCStruct x :: AccelerationStructureInstanceKHR
x f :: Ptr AccelerationStructureInstanceKHR -> IO b
f = Int
-> Int -> (Ptr AccelerationStructureInstanceKHR -> IO b) -> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 64 8 ((Ptr AccelerationStructureInstanceKHR -> IO b) -> IO b)
-> (Ptr AccelerationStructureInstanceKHR -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \p :: 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 :: Ptr AccelerationStructureInstanceKHR
-> AccelerationStructureInstanceKHR -> IO b -> IO b
pokeCStruct p :: Ptr AccelerationStructureInstanceKHR
p AccelerationStructureInstanceKHR{..} f :: 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 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 TransformMatrixKHR -> TransformMatrixKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct ((Ptr AccelerationStructureInstanceKHR
p Ptr AccelerationStructureInstanceKHR
-> Int -> Ptr TransformMatrixKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr TransformMatrixKHR)) (TransformMatrixKHR
transform) (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 ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureInstanceKHR
p Ptr AccelerationStructureInstanceKHR
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 48 :: Ptr Word32)) (((("bindInfoCount" ::: Word32) -> "bindInfoCount" ::: Word32
forall a b. Coercible a b => a -> b
coerce @_ @Word32 ("bindInfoCount" ::: Word32
mask)) ("bindInfoCount" ::: Word32) -> Int -> "bindInfoCount" ::: Word32
forall a. Bits a => a -> Int -> a
`shiftL` 24) ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32) -> "bindInfoCount" ::: Word32
forall a. Bits a => a -> a -> a
.|. ("bindInfoCount" ::: Word32
instanceCustomIndex))
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 ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureInstanceKHR
p Ptr AccelerationStructureInstanceKHR
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 52 :: Ptr Word32)) (((GeometryInstanceFlagsKHR -> "bindInfoCount" ::: Word32
forall a b. Coercible a b => a -> b
coerce @_ @Word32 (GeometryInstanceFlagsKHR
flags)) ("bindInfoCount" ::: Word32) -> Int -> "bindInfoCount" ::: Word32
forall a. Bits a => a -> Int -> a
`shiftL` 24) ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32) -> "bindInfoCount" ::: Word32
forall a. Bits a => a -> a -> a
.|. ("bindInfoCount" ::: Word32
instanceShaderBindingTableRecordOffset))
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 ("dataSize" ::: Word64) -> ("dataSize" ::: Word64) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureInstanceKHR
p Ptr AccelerationStructureInstanceKHR
-> Int -> Ptr ("dataSize" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 56 :: Ptr Word64)) ("dataSize" ::: Word64
accelerationStructureReference)
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 = 64
cStructAlignment :: Int
cStructAlignment = 8
pokeZeroCStruct :: Ptr AccelerationStructureInstanceKHR -> IO b -> IO b
pokeZeroCStruct p :: Ptr AccelerationStructureInstanceKHR
p f :: 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 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 TransformMatrixKHR -> TransformMatrixKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct ((Ptr AccelerationStructureInstanceKHR
p Ptr AccelerationStructureInstanceKHR
-> Int -> Ptr TransformMatrixKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr TransformMatrixKHR)) (TransformMatrixKHR
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 ("dataSize" ::: Word64) -> ("dataSize" ::: Word64) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureInstanceKHR
p Ptr AccelerationStructureInstanceKHR
-> Int -> Ptr ("dataSize" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 56 :: Ptr Word64)) ("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 FromCStruct AccelerationStructureInstanceKHR where
peekCStruct :: Ptr AccelerationStructureInstanceKHR
-> IO AccelerationStructureInstanceKHR
peekCStruct p :: Ptr AccelerationStructureInstanceKHR
p = do
TransformMatrixKHR
transform <- Ptr TransformMatrixKHR -> IO TransformMatrixKHR
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` 0 :: Ptr TransformMatrixKHR))
"bindInfoCount" ::: Word32
instanceCustomIndex <- Ptr ("bindInfoCount" ::: Word32) -> IO ("bindInfoCount" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr AccelerationStructureInstanceKHR
p Ptr AccelerationStructureInstanceKHR
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 48 :: Ptr Word32))
let instanceCustomIndex' :: "bindInfoCount" ::: Word32
instanceCustomIndex' = (("bindInfoCount" ::: Word32
instanceCustomIndex ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32) -> "bindInfoCount" ::: Word32
forall a. Bits a => a -> a -> a
.&. ("bindInfoCount" ::: Word32) -> "bindInfoCount" ::: Word32
forall a b. Coercible a b => a -> b
coerce @Word32 0xffffff))
"bindInfoCount" ::: Word32
mask <- Ptr ("bindInfoCount" ::: Word32) -> IO ("bindInfoCount" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr AccelerationStructureInstanceKHR
p Ptr AccelerationStructureInstanceKHR
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 48 :: Ptr Word32))
let mask' :: "bindInfoCount" ::: Word32
mask' = (((("bindInfoCount" ::: Word32
mask ("bindInfoCount" ::: Word32) -> Int -> "bindInfoCount" ::: Word32
forall a. Bits a => a -> Int -> a
`shiftR` 24)) ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32) -> "bindInfoCount" ::: Word32
forall a. Bits a => a -> a -> a
.&. ("bindInfoCount" ::: Word32) -> "bindInfoCount" ::: Word32
forall a b. Coercible a b => a -> b
coerce @Word32 0xff))
"bindInfoCount" ::: Word32
instanceShaderBindingTableRecordOffset <- Ptr ("bindInfoCount" ::: Word32) -> IO ("bindInfoCount" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr AccelerationStructureInstanceKHR
p Ptr AccelerationStructureInstanceKHR
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 52 :: Ptr Word32))
let instanceShaderBindingTableRecordOffset' :: "bindInfoCount" ::: Word32
instanceShaderBindingTableRecordOffset' = (("bindInfoCount" ::: Word32
instanceShaderBindingTableRecordOffset ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32) -> "bindInfoCount" ::: Word32
forall a. Bits a => a -> a -> a
.&. ("bindInfoCount" ::: Word32) -> "bindInfoCount" ::: Word32
forall a b. Coercible a b => a -> b
coerce @Word32 0xffffff))
GeometryInstanceFlagsKHR
flags <- Ptr GeometryInstanceFlagsKHR -> IO GeometryInstanceFlagsKHR
forall a. Storable a => Ptr a -> IO a
peek @GeometryInstanceFlagsKHR ((Ptr AccelerationStructureInstanceKHR
p Ptr AccelerationStructureInstanceKHR
-> Int -> Ptr GeometryInstanceFlagsKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 52 :: Ptr GeometryInstanceFlagsKHR))
let flags' :: GeometryInstanceFlagsKHR
flags' = ((((GeometryInstanceFlagsKHR
flags GeometryInstanceFlagsKHR -> Int -> GeometryInstanceFlagsKHR
forall a. Bits a => a -> Int -> a
`shiftR` 24)) GeometryInstanceFlagsKHR
-> GeometryInstanceFlagsKHR -> GeometryInstanceFlagsKHR
forall a. Bits a => a -> a -> a
.&. ("bindInfoCount" ::: Word32) -> GeometryInstanceFlagsKHR
forall a b. Coercible a b => a -> b
coerce @Word32 0xff))
"dataSize" ::: Word64
accelerationStructureReference <- Ptr ("dataSize" ::: Word64) -> IO ("dataSize" ::: Word64)
forall a. Storable a => Ptr a -> IO a
peek @Word64 ((Ptr AccelerationStructureInstanceKHR
p Ptr AccelerationStructureInstanceKHR
-> Int -> Ptr ("dataSize" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 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
-> ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32)
-> GeometryInstanceFlagsKHR
-> ("dataSize" ::: Word64)
-> AccelerationStructureInstanceKHR
AccelerationStructureInstanceKHR
TransformMatrixKHR
transform "bindInfoCount" ::: Word32
instanceCustomIndex' "bindInfoCount" ::: Word32
mask' "bindInfoCount" ::: Word32
instanceShaderBindingTableRecordOffset' GeometryInstanceFlagsKHR
flags' "dataSize" ::: Word64
accelerationStructureReference
instance Zero AccelerationStructureInstanceKHR where
zero :: AccelerationStructureInstanceKHR
zero = TransformMatrixKHR
-> ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32)
-> GeometryInstanceFlagsKHR
-> ("dataSize" ::: Word64)
-> AccelerationStructureInstanceKHR
AccelerationStructureInstanceKHR
TransformMatrixKHR
forall a. Zero a => a
zero
"bindInfoCount" ::: Word32
forall a. Zero a => a
zero
"bindInfoCount" ::: Word32
forall a. Zero a => a
zero
"bindInfoCount" ::: Word32
forall a. Zero a => a
zero
GeometryInstanceFlagsKHR
forall a. Zero a => a
zero
"dataSize" ::: Word64
forall a. Zero a => a
zero
data AccelerationStructureDeviceAddressInfoKHR = AccelerationStructureDeviceAddressInfoKHR
{
AccelerationStructureDeviceAddressInfoKHR
-> AccelerationStructureKHR
accelerationStructure :: AccelerationStructureKHR }
deriving (Typeable)
deriving instance Show AccelerationStructureDeviceAddressInfoKHR
instance ToCStruct AccelerationStructureDeviceAddressInfoKHR where
withCStruct :: AccelerationStructureDeviceAddressInfoKHR
-> (("pInfo" ::: Ptr AccelerationStructureDeviceAddressInfoKHR)
-> IO b)
-> IO b
withCStruct x :: AccelerationStructureDeviceAddressInfoKHR
x f :: ("pInfo" ::: Ptr AccelerationStructureDeviceAddressInfoKHR) -> IO b
f = Int
-> Int
-> (("pInfo" ::: Ptr AccelerationStructureDeviceAddressInfoKHR)
-> IO b)
-> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 24 8 ((("pInfo" ::: Ptr AccelerationStructureDeviceAddressInfoKHR)
-> IO b)
-> IO b)
-> (("pInfo" ::: Ptr AccelerationStructureDeviceAddressInfoKHR)
-> IO b)
-> IO b
forall a b. (a -> b) -> a -> b
$ \p :: "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 :: ("pInfo" ::: Ptr AccelerationStructureDeviceAddressInfoKHR)
-> AccelerationStructureDeviceAddressInfoKHR -> IO b -> IO b
pokeCStruct p :: "pInfo" ::: Ptr AccelerationStructureDeviceAddressInfoKHR
p AccelerationStructureDeviceAddressInfoKHR{..} f :: 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` 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` 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` 16 :: Ptr AccelerationStructureKHR)) (AccelerationStructureKHR
accelerationStructure)
IO b
f
cStructSize :: Int
cStructSize = 24
cStructAlignment :: Int
cStructAlignment = 8
pokeZeroCStruct :: ("pInfo" ::: Ptr AccelerationStructureDeviceAddressInfoKHR)
-> IO b -> IO b
pokeZeroCStruct p :: "pInfo" ::: Ptr AccelerationStructureDeviceAddressInfoKHR
p f :: 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` 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` 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` 16 :: Ptr AccelerationStructureKHR)) (AccelerationStructureKHR
forall a. Zero a => a
zero)
IO b
f
instance FromCStruct AccelerationStructureDeviceAddressInfoKHR where
peekCStruct :: ("pInfo" ::: Ptr AccelerationStructureDeviceAddressInfoKHR)
-> IO AccelerationStructureDeviceAddressInfoKHR
peekCStruct p :: "pInfo" ::: Ptr AccelerationStructureDeviceAddressInfoKHR
p = do
AccelerationStructureKHR
accelerationStructure <- ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> IO AccelerationStructureKHR
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` 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
_ = 24
alignment :: AccelerationStructureDeviceAddressInfoKHR -> Int
alignment ~AccelerationStructureDeviceAddressInfoKHR
_ = 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 ptr :: "pInfo" ::: Ptr AccelerationStructureDeviceAddressInfoKHR
ptr poked :: 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 AccelerationStructureVersionKHR = AccelerationStructureVersionKHR
{
AccelerationStructureVersionKHR -> ByteString
versionData :: ByteString }
deriving (Typeable)
deriving instance Show AccelerationStructureVersionKHR
instance ToCStruct AccelerationStructureVersionKHR where
withCStruct :: AccelerationStructureVersionKHR
-> (Ptr AccelerationStructureVersionKHR -> IO b) -> IO b
withCStruct x :: AccelerationStructureVersionKHR
x f :: Ptr AccelerationStructureVersionKHR -> IO b
f = Int -> Int -> (Ptr AccelerationStructureVersionKHR -> IO b) -> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 24 8 ((Ptr AccelerationStructureVersionKHR -> IO b) -> IO b)
-> (Ptr AccelerationStructureVersionKHR -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \p :: Ptr AccelerationStructureVersionKHR
p -> Ptr AccelerationStructureVersionKHR
-> AccelerationStructureVersionKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr AccelerationStructureVersionKHR
p AccelerationStructureVersionKHR
x (Ptr AccelerationStructureVersionKHR -> IO b
f Ptr AccelerationStructureVersionKHR
p)
pokeCStruct :: Ptr AccelerationStructureVersionKHR
-> AccelerationStructureVersionKHR -> IO b -> IO b
pokeCStruct p :: Ptr AccelerationStructureVersionKHR
p AccelerationStructureVersionKHR{..} f :: 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 AccelerationStructureVersionKHR
p Ptr AccelerationStructureVersionKHR -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_ACCELERATION_STRUCTURE_VERSION_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 AccelerationStructureVersionKHR
p Ptr AccelerationStructureVersionKHR
-> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 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
== 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 "" "AccelerationStructureVersionKHR::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 (Ptr CChar -> Ptr Word8
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 ((Ptr AccelerationStructureVersionKHR
p Ptr AccelerationStructureVersionKHR -> Int -> Ptr (Ptr Word8)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 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 = 24
cStructAlignment :: Int
cStructAlignment = 8
pokeZeroCStruct :: Ptr AccelerationStructureVersionKHR -> IO b -> IO b
pokeZeroCStruct p :: Ptr AccelerationStructureVersionKHR
p f :: IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureVersionKHR
p Ptr AccelerationStructureVersionKHR -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_ACCELERATION_STRUCTURE_VERSION_KHR)
Ptr ("data" ::: Ptr ()) -> ("data" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr AccelerationStructureVersionKHR
p Ptr AccelerationStructureVersionKHR
-> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) ("data" ::: Ptr ()
forall a. Ptr a
nullPtr)
IO b
f
instance FromCStruct AccelerationStructureVersionKHR where
peekCStruct :: Ptr AccelerationStructureVersionKHR
-> IO AccelerationStructureVersionKHR
peekCStruct p :: Ptr AccelerationStructureVersionKHR
p = do
Ptr Word8
versionData <- Ptr (Ptr Word8) -> IO (Ptr Word8)
forall a. Storable a => Ptr a -> IO a
peek @(Ptr Word8) ((Ptr AccelerationStructureVersionKHR
p Ptr AccelerationStructureVersionKHR -> Int -> Ptr (Ptr Word8)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr (Ptr Word8)))
ByteString
versionData' <- CStringLen -> IO ByteString
packCStringLen (Ptr Word8 -> Ptr CChar
forall a b. Ptr a -> Ptr b
castPtr @Word8 @CChar Ptr Word8
versionData, 2 Int -> Int -> Int
forall a. Num a => a -> a -> a
* Int
forall a. Integral a => a
UUID_SIZE)
AccelerationStructureVersionKHR
-> IO AccelerationStructureVersionKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure (AccelerationStructureVersionKHR
-> IO AccelerationStructureVersionKHR)
-> AccelerationStructureVersionKHR
-> IO AccelerationStructureVersionKHR
forall a b. (a -> b) -> a -> b
$ ByteString -> AccelerationStructureVersionKHR
AccelerationStructureVersionKHR
ByteString
versionData'
instance Zero AccelerationStructureVersionKHR where
zero :: AccelerationStructureVersionKHR
zero = ByteString -> AccelerationStructureVersionKHR
AccelerationStructureVersionKHR
ByteString
forall a. Monoid a => a
mempty
data CopyAccelerationStructureInfoKHR (es :: [Type]) = CopyAccelerationStructureInfoKHR
{
CopyAccelerationStructureInfoKHR es -> Chain es
next :: Chain es
,
CopyAccelerationStructureInfoKHR es -> AccelerationStructureKHR
src :: AccelerationStructureKHR
,
CopyAccelerationStructureInfoKHR es -> AccelerationStructureKHR
dst :: AccelerationStructureKHR
,
CopyAccelerationStructureInfoKHR es
-> CopyAccelerationStructureModeKHR
mode :: CopyAccelerationStructureModeKHR
}
deriving (Typeable)
deriving instance Show (Chain es) => Show (CopyAccelerationStructureInfoKHR es)
instance Extensible CopyAccelerationStructureInfoKHR where
extensibleType :: StructureType
extensibleType = StructureType
STRUCTURE_TYPE_COPY_ACCELERATION_STRUCTURE_INFO_KHR
setNext :: CopyAccelerationStructureInfoKHR ds
-> Chain es -> CopyAccelerationStructureInfoKHR es
setNext x :: CopyAccelerationStructureInfoKHR ds
x next :: Chain es
next = CopyAccelerationStructureInfoKHR ds
x{$sel:next:CopyAccelerationStructureInfoKHR :: Chain es
next = Chain es
next}
getNext :: CopyAccelerationStructureInfoKHR es -> Chain es
getNext CopyAccelerationStructureInfoKHR{..} = Chain es
next
extends :: forall e b proxy. Typeable e => proxy e -> (Extends CopyAccelerationStructureInfoKHR e => b) -> Maybe b
extends :: proxy e
-> (Extends CopyAccelerationStructureInfoKHR e => b) -> Maybe b
extends _ f :: Extends CopyAccelerationStructureInfoKHR e => b
f
| Just Refl <- (Typeable e, Typeable DeferredOperationInfoKHR) =>
Maybe (e :~: DeferredOperationInfoKHR)
forall k (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @DeferredOperationInfoKHR = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends CopyAccelerationStructureInfoKHR e => b
f
| Bool
otherwise = Maybe b
forall a. Maybe a
Nothing
instance (Extendss CopyAccelerationStructureInfoKHR es, PokeChain es) => ToCStruct (CopyAccelerationStructureInfoKHR es) where
withCStruct :: CopyAccelerationStructureInfoKHR es
-> (Ptr (CopyAccelerationStructureInfoKHR es) -> IO b) -> IO b
withCStruct x :: CopyAccelerationStructureInfoKHR es
x f :: Ptr (CopyAccelerationStructureInfoKHR es) -> IO b
f = Int
-> Int
-> (Ptr (CopyAccelerationStructureInfoKHR es) -> IO b)
-> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 40 8 ((Ptr (CopyAccelerationStructureInfoKHR es) -> IO b) -> IO b)
-> (Ptr (CopyAccelerationStructureInfoKHR es) -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \p :: Ptr (CopyAccelerationStructureInfoKHR es)
p -> Ptr (CopyAccelerationStructureInfoKHR es)
-> CopyAccelerationStructureInfoKHR es -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr (CopyAccelerationStructureInfoKHR es)
p CopyAccelerationStructureInfoKHR es
x (Ptr (CopyAccelerationStructureInfoKHR es) -> IO b
f Ptr (CopyAccelerationStructureInfoKHR es)
p)
pokeCStruct :: Ptr (CopyAccelerationStructureInfoKHR es)
-> CopyAccelerationStructureInfoKHR es -> IO b -> IO b
pokeCStruct p :: Ptr (CopyAccelerationStructureInfoKHR es)
p CopyAccelerationStructureInfoKHR{..} f :: 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 (CopyAccelerationStructureInfoKHR es)
p Ptr (CopyAccelerationStructureInfoKHR es)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_COPY_ACCELERATION_STRUCTURE_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 (CopyAccelerationStructureInfoKHR es)
p Ptr (CopyAccelerationStructureInfoKHR es)
-> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 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
$ ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> AccelerationStructureKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (CopyAccelerationStructureInfoKHR es)
p Ptr (CopyAccelerationStructureInfoKHR es)
-> Int
-> "pAccelerationStructures" ::: Ptr AccelerationStructureKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr AccelerationStructureKHR)) (AccelerationStructureKHR
src)
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 ((Ptr (CopyAccelerationStructureInfoKHR es)
p Ptr (CopyAccelerationStructureInfoKHR es)
-> Int
-> "pAccelerationStructures" ::: Ptr AccelerationStructureKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 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 ((Ptr (CopyAccelerationStructureInfoKHR es)
p Ptr (CopyAccelerationStructureInfoKHR es)
-> Int -> Ptr CopyAccelerationStructureModeKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 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 = 40
cStructAlignment :: Int
cStructAlignment = 8
pokeZeroCStruct :: Ptr (CopyAccelerationStructureInfoKHR es) -> IO b -> IO b
pokeZeroCStruct p :: Ptr (CopyAccelerationStructureInfoKHR es)
p f :: 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 (CopyAccelerationStructureInfoKHR es)
p Ptr (CopyAccelerationStructureInfoKHR es)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_COPY_ACCELERATION_STRUCTURE_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 a. PokeChain es => (Ptr (Chain es) -> IO a) -> IO a
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 (CopyAccelerationStructureInfoKHR es)
p Ptr (CopyAccelerationStructureInfoKHR es)
-> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 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
$ ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> AccelerationStructureKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (CopyAccelerationStructureInfoKHR es)
p Ptr (CopyAccelerationStructureInfoKHR es)
-> Int
-> "pAccelerationStructures" ::: Ptr AccelerationStructureKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: 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
$ ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> AccelerationStructureKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (CopyAccelerationStructureInfoKHR es)
p Ptr (CopyAccelerationStructureInfoKHR es)
-> Int
-> "pAccelerationStructures" ::: Ptr AccelerationStructureKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 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 ((Ptr (CopyAccelerationStructureInfoKHR es)
p Ptr (CopyAccelerationStructureInfoKHR es)
-> Int -> Ptr CopyAccelerationStructureModeKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 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 (Extendss CopyAccelerationStructureInfoKHR es, PeekChain es) => FromCStruct (CopyAccelerationStructureInfoKHR es) where
peekCStruct :: Ptr (CopyAccelerationStructureInfoKHR es)
-> IO (CopyAccelerationStructureInfoKHR es)
peekCStruct p :: Ptr (CopyAccelerationStructureInfoKHR es)
p = do
"data" ::: Ptr ()
pNext <- Ptr ("data" ::: Ptr ()) -> IO ("data" ::: Ptr ())
forall a. Storable a => Ptr a -> IO a
peek @(Ptr ()) ((Ptr (CopyAccelerationStructureInfoKHR es)
p Ptr (CopyAccelerationStructureInfoKHR es)
-> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 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)
AccelerationStructureKHR
src <- ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> IO AccelerationStructureKHR
forall a. Storable a => Ptr a -> IO a
peek @AccelerationStructureKHR ((Ptr (CopyAccelerationStructureInfoKHR es)
p Ptr (CopyAccelerationStructureInfoKHR es)
-> Int
-> "pAccelerationStructures" ::: Ptr AccelerationStructureKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr AccelerationStructureKHR))
AccelerationStructureKHR
dst <- ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> IO AccelerationStructureKHR
forall a. Storable a => Ptr a -> IO a
peek @AccelerationStructureKHR ((Ptr (CopyAccelerationStructureInfoKHR es)
p Ptr (CopyAccelerationStructureInfoKHR es)
-> Int
-> "pAccelerationStructures" ::: Ptr AccelerationStructureKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr AccelerationStructureKHR))
CopyAccelerationStructureModeKHR
mode <- Ptr CopyAccelerationStructureModeKHR
-> IO CopyAccelerationStructureModeKHR
forall a. Storable a => Ptr a -> IO a
peek @CopyAccelerationStructureModeKHR ((Ptr (CopyAccelerationStructureInfoKHR es)
p Ptr (CopyAccelerationStructureInfoKHR es)
-> Int -> Ptr CopyAccelerationStructureModeKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr CopyAccelerationStructureModeKHR))
CopyAccelerationStructureInfoKHR es
-> IO (CopyAccelerationStructureInfoKHR es)
forall (f :: * -> *) a. Applicative f => a -> f a
pure (CopyAccelerationStructureInfoKHR es
-> IO (CopyAccelerationStructureInfoKHR es))
-> CopyAccelerationStructureInfoKHR es
-> IO (CopyAccelerationStructureInfoKHR es)
forall a b. (a -> b) -> a -> b
$ Chain es
-> AccelerationStructureKHR
-> AccelerationStructureKHR
-> CopyAccelerationStructureModeKHR
-> CopyAccelerationStructureInfoKHR es
forall (es :: [*]).
Chain es
-> AccelerationStructureKHR
-> AccelerationStructureKHR
-> CopyAccelerationStructureModeKHR
-> CopyAccelerationStructureInfoKHR es
CopyAccelerationStructureInfoKHR
Chain es
next AccelerationStructureKHR
src AccelerationStructureKHR
dst CopyAccelerationStructureModeKHR
mode
instance es ~ '[] => Zero (CopyAccelerationStructureInfoKHR es) where
zero :: CopyAccelerationStructureInfoKHR es
zero = Chain es
-> AccelerationStructureKHR
-> AccelerationStructureKHR
-> CopyAccelerationStructureModeKHR
-> CopyAccelerationStructureInfoKHR es
forall (es :: [*]).
Chain es
-> AccelerationStructureKHR
-> AccelerationStructureKHR
-> CopyAccelerationStructureModeKHR
-> CopyAccelerationStructureInfoKHR es
CopyAccelerationStructureInfoKHR
()
AccelerationStructureKHR
forall a. Zero a => a
zero
AccelerationStructureKHR
forall a. Zero a => a
zero
CopyAccelerationStructureModeKHR
forall a. Zero a => a
zero
data CopyAccelerationStructureToMemoryInfoKHR (es :: [Type]) = CopyAccelerationStructureToMemoryInfoKHR
{
CopyAccelerationStructureToMemoryInfoKHR es -> Chain es
next :: Chain es
,
CopyAccelerationStructureToMemoryInfoKHR es
-> AccelerationStructureKHR
src :: AccelerationStructureKHR
,
CopyAccelerationStructureToMemoryInfoKHR es
-> DeviceOrHostAddressKHR
dst :: DeviceOrHostAddressKHR
,
CopyAccelerationStructureToMemoryInfoKHR es
-> CopyAccelerationStructureModeKHR
mode :: CopyAccelerationStructureModeKHR
}
deriving (Typeable)
deriving instance Show (Chain es) => Show (CopyAccelerationStructureToMemoryInfoKHR es)
instance Extensible CopyAccelerationStructureToMemoryInfoKHR where
extensibleType :: StructureType
extensibleType = StructureType
STRUCTURE_TYPE_COPY_ACCELERATION_STRUCTURE_TO_MEMORY_INFO_KHR
setNext :: CopyAccelerationStructureToMemoryInfoKHR ds
-> Chain es -> CopyAccelerationStructureToMemoryInfoKHR es
setNext x :: CopyAccelerationStructureToMemoryInfoKHR ds
x next :: Chain es
next = CopyAccelerationStructureToMemoryInfoKHR ds
x{$sel:next:CopyAccelerationStructureToMemoryInfoKHR :: Chain es
next = Chain es
next}
getNext :: CopyAccelerationStructureToMemoryInfoKHR es -> Chain es
getNext CopyAccelerationStructureToMemoryInfoKHR{..} = Chain es
next
extends :: forall e b proxy. Typeable e => proxy e -> (Extends CopyAccelerationStructureToMemoryInfoKHR e => b) -> Maybe b
extends :: proxy e
-> (Extends CopyAccelerationStructureToMemoryInfoKHR e => b)
-> Maybe b
extends _ f :: Extends CopyAccelerationStructureToMemoryInfoKHR e => b
f
| Just Refl <- (Typeable e, Typeable DeferredOperationInfoKHR) =>
Maybe (e :~: DeferredOperationInfoKHR)
forall k (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @DeferredOperationInfoKHR = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends CopyAccelerationStructureToMemoryInfoKHR e => b
f
| Bool
otherwise = Maybe b
forall a. Maybe a
Nothing
instance (Extendss CopyAccelerationStructureToMemoryInfoKHR es, PokeChain es) => ToCStruct (CopyAccelerationStructureToMemoryInfoKHR es) where
withCStruct :: CopyAccelerationStructureToMemoryInfoKHR es
-> (Ptr (CopyAccelerationStructureToMemoryInfoKHR es) -> IO b)
-> IO b
withCStruct x :: CopyAccelerationStructureToMemoryInfoKHR es
x f :: Ptr (CopyAccelerationStructureToMemoryInfoKHR es) -> IO b
f = Int
-> Int
-> (Ptr (CopyAccelerationStructureToMemoryInfoKHR es) -> IO b)
-> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 40 8 ((Ptr (CopyAccelerationStructureToMemoryInfoKHR es) -> IO b)
-> IO b)
-> (Ptr (CopyAccelerationStructureToMemoryInfoKHR es) -> IO b)
-> IO b
forall a b. (a -> b) -> a -> b
$ \p :: Ptr (CopyAccelerationStructureToMemoryInfoKHR es)
p -> Ptr (CopyAccelerationStructureToMemoryInfoKHR es)
-> CopyAccelerationStructureToMemoryInfoKHR es -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr (CopyAccelerationStructureToMemoryInfoKHR es)
p CopyAccelerationStructureToMemoryInfoKHR es
x (Ptr (CopyAccelerationStructureToMemoryInfoKHR es) -> IO b
f Ptr (CopyAccelerationStructureToMemoryInfoKHR es)
p)
pokeCStruct :: Ptr (CopyAccelerationStructureToMemoryInfoKHR es)
-> CopyAccelerationStructureToMemoryInfoKHR es -> IO b -> IO b
pokeCStruct p :: Ptr (CopyAccelerationStructureToMemoryInfoKHR es)
p CopyAccelerationStructureToMemoryInfoKHR{..} f :: 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 (CopyAccelerationStructureToMemoryInfoKHR es)
p Ptr (CopyAccelerationStructureToMemoryInfoKHR es)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_COPY_ACCELERATION_STRUCTURE_TO_MEMORY_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 (CopyAccelerationStructureToMemoryInfoKHR es)
p Ptr (CopyAccelerationStructureToMemoryInfoKHR es)
-> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 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
$ ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> AccelerationStructureKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (CopyAccelerationStructureToMemoryInfoKHR es)
p Ptr (CopyAccelerationStructureToMemoryInfoKHR es)
-> Int
-> "pAccelerationStructures" ::: Ptr AccelerationStructureKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 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 ((Ptr (CopyAccelerationStructureToMemoryInfoKHR es)
p Ptr (CopyAccelerationStructureToMemoryInfoKHR es)
-> Int -> Ptr DeviceOrHostAddressKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 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 ((Ptr (CopyAccelerationStructureToMemoryInfoKHR es)
p Ptr (CopyAccelerationStructureToMemoryInfoKHR es)
-> Int -> Ptr CopyAccelerationStructureModeKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 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 = 40
cStructAlignment :: Int
cStructAlignment = 8
pokeZeroCStruct :: Ptr (CopyAccelerationStructureToMemoryInfoKHR es) -> IO b -> IO b
pokeZeroCStruct p :: Ptr (CopyAccelerationStructureToMemoryInfoKHR es)
p f :: 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 (CopyAccelerationStructureToMemoryInfoKHR es)
p Ptr (CopyAccelerationStructureToMemoryInfoKHR es)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_COPY_ACCELERATION_STRUCTURE_TO_MEMORY_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 a. PokeChain es => (Ptr (Chain es) -> IO a) -> IO a
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 (CopyAccelerationStructureToMemoryInfoKHR es)
p Ptr (CopyAccelerationStructureToMemoryInfoKHR es)
-> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 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
$ ("pAccelerationStructures" ::: Ptr AccelerationStructureKHR)
-> AccelerationStructureKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (CopyAccelerationStructureToMemoryInfoKHR es)
p Ptr (CopyAccelerationStructureToMemoryInfoKHR es)
-> Int
-> "pAccelerationStructures" ::: Ptr AccelerationStructureKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 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 ((Ptr (CopyAccelerationStructureToMemoryInfoKHR es)
p Ptr (CopyAccelerationStructureToMemoryInfoKHR es)
-> Int -> Ptr DeviceOrHostAddressKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 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 ((Ptr (CopyAccelerationStructureToMemoryInfoKHR es)
p Ptr (CopyAccelerationStructureToMemoryInfoKHR es)
-> Int -> Ptr CopyAccelerationStructureModeKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 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 es ~ '[] => Zero (CopyAccelerationStructureToMemoryInfoKHR es) where
zero :: CopyAccelerationStructureToMemoryInfoKHR es
zero = Chain es
-> AccelerationStructureKHR
-> DeviceOrHostAddressKHR
-> CopyAccelerationStructureModeKHR
-> CopyAccelerationStructureToMemoryInfoKHR es
forall (es :: [*]).
Chain es
-> AccelerationStructureKHR
-> DeviceOrHostAddressKHR
-> CopyAccelerationStructureModeKHR
-> CopyAccelerationStructureToMemoryInfoKHR es
CopyAccelerationStructureToMemoryInfoKHR
()
AccelerationStructureKHR
forall a. Zero a => a
zero
DeviceOrHostAddressKHR
forall a. Zero a => a
zero
CopyAccelerationStructureModeKHR
forall a. Zero a => a
zero
data CopyMemoryToAccelerationStructureInfoKHR (es :: [Type]) = CopyMemoryToAccelerationStructureInfoKHR
{
CopyMemoryToAccelerationStructureInfoKHR es -> Chain es
next :: Chain es
,
CopyMemoryToAccelerationStructureInfoKHR es
-> DeviceOrHostAddressConstKHR
src :: DeviceOrHostAddressConstKHR
,
CopyMemoryToAccelerationStructureInfoKHR es
-> AccelerationStructureKHR
dst :: AccelerationStructureKHR
,
CopyMemoryToAccelerationStructureInfoKHR es
-> CopyAccelerationStructureModeKHR
mode :: CopyAccelerationStructureModeKHR
}
deriving (Typeable)
deriving instance Show (Chain es) => Show (CopyMemoryToAccelerationStructureInfoKHR es)
instance Extensible CopyMemoryToAccelerationStructureInfoKHR where
extensibleType :: StructureType
extensibleType = StructureType
STRUCTURE_TYPE_COPY_MEMORY_TO_ACCELERATION_STRUCTURE_INFO_KHR
setNext :: CopyMemoryToAccelerationStructureInfoKHR ds
-> Chain es -> CopyMemoryToAccelerationStructureInfoKHR es
setNext x :: CopyMemoryToAccelerationStructureInfoKHR ds
x next :: Chain es
next = CopyMemoryToAccelerationStructureInfoKHR ds
x{$sel:next:CopyMemoryToAccelerationStructureInfoKHR :: Chain es
next = Chain es
next}
getNext :: CopyMemoryToAccelerationStructureInfoKHR es -> Chain es
getNext CopyMemoryToAccelerationStructureInfoKHR{..} = Chain es
next
extends :: forall e b proxy. Typeable e => proxy e -> (Extends CopyMemoryToAccelerationStructureInfoKHR e => b) -> Maybe b
extends :: proxy e
-> (Extends CopyMemoryToAccelerationStructureInfoKHR e => b)
-> Maybe b
extends _ f :: Extends CopyMemoryToAccelerationStructureInfoKHR e => b
f
| Just Refl <- (Typeable e, Typeable DeferredOperationInfoKHR) =>
Maybe (e :~: DeferredOperationInfoKHR)
forall k (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @DeferredOperationInfoKHR = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends CopyMemoryToAccelerationStructureInfoKHR e => b
f
| Bool
otherwise = Maybe b
forall a. Maybe a
Nothing
instance (Extendss CopyMemoryToAccelerationStructureInfoKHR es, PokeChain es) => ToCStruct (CopyMemoryToAccelerationStructureInfoKHR es) where
withCStruct :: CopyMemoryToAccelerationStructureInfoKHR es
-> (Ptr (CopyMemoryToAccelerationStructureInfoKHR es) -> IO b)
-> IO b
withCStruct x :: CopyMemoryToAccelerationStructureInfoKHR es
x f :: Ptr (CopyMemoryToAccelerationStructureInfoKHR es) -> IO b
f = Int
-> Int
-> (Ptr (CopyMemoryToAccelerationStructureInfoKHR es) -> IO b)
-> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 40 8 ((Ptr (CopyMemoryToAccelerationStructureInfoKHR es) -> IO b)
-> IO b)
-> (Ptr (CopyMemoryToAccelerationStructureInfoKHR es) -> IO b)
-> IO b
forall a b. (a -> b) -> a -> b
$ \p :: Ptr (CopyMemoryToAccelerationStructureInfoKHR es)
p -> Ptr (CopyMemoryToAccelerationStructureInfoKHR es)
-> CopyMemoryToAccelerationStructureInfoKHR es -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr (CopyMemoryToAccelerationStructureInfoKHR es)
p CopyMemoryToAccelerationStructureInfoKHR es
x (Ptr (CopyMemoryToAccelerationStructureInfoKHR es) -> IO b
f Ptr (CopyMemoryToAccelerationStructureInfoKHR es)
p)
pokeCStruct :: Ptr (CopyMemoryToAccelerationStructureInfoKHR es)
-> CopyMemoryToAccelerationStructureInfoKHR es -> IO b -> IO b
pokeCStruct p :: Ptr (CopyMemoryToAccelerationStructureInfoKHR es)
p CopyMemoryToAccelerationStructureInfoKHR{..} f :: 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 (CopyMemoryToAccelerationStructureInfoKHR es)
p Ptr (CopyMemoryToAccelerationStructureInfoKHR es)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_COPY_MEMORY_TO_ACCELERATION_STRUCTURE_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 (CopyMemoryToAccelerationStructureInfoKHR es)
p Ptr (CopyMemoryToAccelerationStructureInfoKHR es)
-> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) "data" ::: Ptr ()
pNext''
((() -> 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 (CopyMemoryToAccelerationStructureInfoKHR es)
p Ptr (CopyMemoryToAccelerationStructureInfoKHR es)
-> Int -> Ptr DeviceOrHostAddressConstKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 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 ((Ptr (CopyMemoryToAccelerationStructureInfoKHR es)
p Ptr (CopyMemoryToAccelerationStructureInfoKHR es)
-> Int
-> "pAccelerationStructures" ::: Ptr AccelerationStructureKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 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 ((Ptr (CopyMemoryToAccelerationStructureInfoKHR es)
p Ptr (CopyMemoryToAccelerationStructureInfoKHR es)
-> Int -> Ptr CopyAccelerationStructureModeKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 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 = 40
cStructAlignment :: Int
cStructAlignment = 8
pokeZeroCStruct :: Ptr (CopyMemoryToAccelerationStructureInfoKHR es) -> IO b -> IO b
pokeZeroCStruct p :: Ptr (CopyMemoryToAccelerationStructureInfoKHR es)
p f :: 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 (CopyMemoryToAccelerationStructureInfoKHR es)
p Ptr (CopyMemoryToAccelerationStructureInfoKHR es)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_COPY_MEMORY_TO_ACCELERATION_STRUCTURE_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 a. PokeChain es => (Ptr (Chain es) -> IO a) -> IO a
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 (CopyMemoryToAccelerationStructureInfoKHR es)
p Ptr (CopyMemoryToAccelerationStructureInfoKHR es)
-> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) "data" ::: Ptr ()
pNext'
((() -> 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 (CopyMemoryToAccelerationStructureInfoKHR es)
p Ptr (CopyMemoryToAccelerationStructureInfoKHR es)
-> Int -> Ptr DeviceOrHostAddressConstKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 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 ((Ptr (CopyMemoryToAccelerationStructureInfoKHR es)
p Ptr (CopyMemoryToAccelerationStructureInfoKHR es)
-> Int
-> "pAccelerationStructures" ::: Ptr AccelerationStructureKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 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 ((Ptr (CopyMemoryToAccelerationStructureInfoKHR es)
p Ptr (CopyMemoryToAccelerationStructureInfoKHR es)
-> Int -> Ptr CopyAccelerationStructureModeKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 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 es ~ '[] => Zero (CopyMemoryToAccelerationStructureInfoKHR es) where
zero :: CopyMemoryToAccelerationStructureInfoKHR es
zero = Chain es
-> DeviceOrHostAddressConstKHR
-> AccelerationStructureKHR
-> CopyAccelerationStructureModeKHR
-> CopyMemoryToAccelerationStructureInfoKHR es
forall (es :: [*]).
Chain es
-> DeviceOrHostAddressConstKHR
-> AccelerationStructureKHR
-> CopyAccelerationStructureModeKHR
-> CopyMemoryToAccelerationStructureInfoKHR es
CopyMemoryToAccelerationStructureInfoKHR
()
DeviceOrHostAddressConstKHR
forall a. Zero a => a
zero
AccelerationStructureKHR
forall a. Zero a => a
zero
CopyAccelerationStructureModeKHR
forall a. Zero a => a
zero
data RayTracingPipelineInterfaceCreateInfoKHR = RayTracingPipelineInterfaceCreateInfoKHR
{
RayTracingPipelineInterfaceCreateInfoKHR
-> "bindInfoCount" ::: Word32
maxPayloadSize :: Word32
,
RayTracingPipelineInterfaceCreateInfoKHR
-> "bindInfoCount" ::: Word32
maxAttributeSize :: Word32
,
RayTracingPipelineInterfaceCreateInfoKHR
-> "bindInfoCount" ::: Word32
maxCallableSize :: Word32
}
deriving (Typeable)
deriving instance Show RayTracingPipelineInterfaceCreateInfoKHR
instance ToCStruct RayTracingPipelineInterfaceCreateInfoKHR where
withCStruct :: RayTracingPipelineInterfaceCreateInfoKHR
-> (Ptr RayTracingPipelineInterfaceCreateInfoKHR -> IO b) -> IO b
withCStruct x :: RayTracingPipelineInterfaceCreateInfoKHR
x f :: Ptr RayTracingPipelineInterfaceCreateInfoKHR -> IO b
f = Int
-> Int
-> (Ptr RayTracingPipelineInterfaceCreateInfoKHR -> IO b)
-> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 32 8 ((Ptr RayTracingPipelineInterfaceCreateInfoKHR -> IO b) -> IO b)
-> (Ptr RayTracingPipelineInterfaceCreateInfoKHR -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \p :: Ptr RayTracingPipelineInterfaceCreateInfoKHR
p -> Ptr RayTracingPipelineInterfaceCreateInfoKHR
-> RayTracingPipelineInterfaceCreateInfoKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr RayTracingPipelineInterfaceCreateInfoKHR
p RayTracingPipelineInterfaceCreateInfoKHR
x (Ptr RayTracingPipelineInterfaceCreateInfoKHR -> IO b
f Ptr RayTracingPipelineInterfaceCreateInfoKHR
p)
pokeCStruct :: Ptr RayTracingPipelineInterfaceCreateInfoKHR
-> RayTracingPipelineInterfaceCreateInfoKHR -> IO b -> IO b
pokeCStruct p :: Ptr RayTracingPipelineInterfaceCreateInfoKHR
p RayTracingPipelineInterfaceCreateInfoKHR{..} f :: IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RayTracingPipelineInterfaceCreateInfoKHR
p Ptr RayTracingPipelineInterfaceCreateInfoKHR
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_RAY_TRACING_PIPELINE_INTERFACE_CREATE_INFO_KHR)
Ptr ("data" ::: Ptr ()) -> ("data" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RayTracingPipelineInterfaceCreateInfoKHR
p Ptr RayTracingPipelineInterfaceCreateInfoKHR
-> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) ("data" ::: Ptr ()
forall a. Ptr a
nullPtr)
Ptr ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RayTracingPipelineInterfaceCreateInfoKHR
p Ptr RayTracingPipelineInterfaceCreateInfoKHR
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Word32)) ("bindInfoCount" ::: Word32
maxPayloadSize)
Ptr ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RayTracingPipelineInterfaceCreateInfoKHR
p Ptr RayTracingPipelineInterfaceCreateInfoKHR
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr Word32)) ("bindInfoCount" ::: Word32
maxAttributeSize)
Ptr ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RayTracingPipelineInterfaceCreateInfoKHR
p Ptr RayTracingPipelineInterfaceCreateInfoKHR
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr Word32)) ("bindInfoCount" ::: Word32
maxCallableSize)
IO b
f
cStructSize :: Int
cStructSize = 32
cStructAlignment :: Int
cStructAlignment = 8
pokeZeroCStruct :: Ptr RayTracingPipelineInterfaceCreateInfoKHR -> IO b -> IO b
pokeZeroCStruct p :: Ptr RayTracingPipelineInterfaceCreateInfoKHR
p f :: IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RayTracingPipelineInterfaceCreateInfoKHR
p Ptr RayTracingPipelineInterfaceCreateInfoKHR
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_RAY_TRACING_PIPELINE_INTERFACE_CREATE_INFO_KHR)
Ptr ("data" ::: Ptr ()) -> ("data" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RayTracingPipelineInterfaceCreateInfoKHR
p Ptr RayTracingPipelineInterfaceCreateInfoKHR
-> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) ("data" ::: Ptr ()
forall a. Ptr a
nullPtr)
Ptr ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RayTracingPipelineInterfaceCreateInfoKHR
p Ptr RayTracingPipelineInterfaceCreateInfoKHR
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Word32)) ("bindInfoCount" ::: Word32
forall a. Zero a => a
zero)
Ptr ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RayTracingPipelineInterfaceCreateInfoKHR
p Ptr RayTracingPipelineInterfaceCreateInfoKHR
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr Word32)) ("bindInfoCount" ::: Word32
forall a. Zero a => a
zero)
Ptr ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RayTracingPipelineInterfaceCreateInfoKHR
p Ptr RayTracingPipelineInterfaceCreateInfoKHR
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr Word32)) ("bindInfoCount" ::: Word32
forall a. Zero a => a
zero)
IO b
f
instance FromCStruct RayTracingPipelineInterfaceCreateInfoKHR where
peekCStruct :: Ptr RayTracingPipelineInterfaceCreateInfoKHR
-> IO RayTracingPipelineInterfaceCreateInfoKHR
peekCStruct p :: Ptr RayTracingPipelineInterfaceCreateInfoKHR
p = do
"bindInfoCount" ::: Word32
maxPayloadSize <- Ptr ("bindInfoCount" ::: Word32) -> IO ("bindInfoCount" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr RayTracingPipelineInterfaceCreateInfoKHR
p Ptr RayTracingPipelineInterfaceCreateInfoKHR
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Word32))
"bindInfoCount" ::: Word32
maxAttributeSize <- Ptr ("bindInfoCount" ::: Word32) -> IO ("bindInfoCount" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr RayTracingPipelineInterfaceCreateInfoKHR
p Ptr RayTracingPipelineInterfaceCreateInfoKHR
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr Word32))
"bindInfoCount" ::: Word32
maxCallableSize <- Ptr ("bindInfoCount" ::: Word32) -> IO ("bindInfoCount" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr RayTracingPipelineInterfaceCreateInfoKHR
p Ptr RayTracingPipelineInterfaceCreateInfoKHR
-> Int -> Ptr ("bindInfoCount" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr Word32))
RayTracingPipelineInterfaceCreateInfoKHR
-> IO RayTracingPipelineInterfaceCreateInfoKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure (RayTracingPipelineInterfaceCreateInfoKHR
-> IO RayTracingPipelineInterfaceCreateInfoKHR)
-> RayTracingPipelineInterfaceCreateInfoKHR
-> IO RayTracingPipelineInterfaceCreateInfoKHR
forall a b. (a -> b) -> a -> b
$ ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32)
-> RayTracingPipelineInterfaceCreateInfoKHR
RayTracingPipelineInterfaceCreateInfoKHR
"bindInfoCount" ::: Word32
maxPayloadSize "bindInfoCount" ::: Word32
maxAttributeSize "bindInfoCount" ::: Word32
maxCallableSize
instance Storable RayTracingPipelineInterfaceCreateInfoKHR where
sizeOf :: RayTracingPipelineInterfaceCreateInfoKHR -> Int
sizeOf ~RayTracingPipelineInterfaceCreateInfoKHR
_ = 32
alignment :: RayTracingPipelineInterfaceCreateInfoKHR -> Int
alignment ~RayTracingPipelineInterfaceCreateInfoKHR
_ = 8
peek :: Ptr RayTracingPipelineInterfaceCreateInfoKHR
-> IO RayTracingPipelineInterfaceCreateInfoKHR
peek = Ptr RayTracingPipelineInterfaceCreateInfoKHR
-> IO RayTracingPipelineInterfaceCreateInfoKHR
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr RayTracingPipelineInterfaceCreateInfoKHR
-> RayTracingPipelineInterfaceCreateInfoKHR -> IO ()
poke ptr :: Ptr RayTracingPipelineInterfaceCreateInfoKHR
ptr poked :: RayTracingPipelineInterfaceCreateInfoKHR
poked = Ptr RayTracingPipelineInterfaceCreateInfoKHR
-> RayTracingPipelineInterfaceCreateInfoKHR -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr RayTracingPipelineInterfaceCreateInfoKHR
ptr RayTracingPipelineInterfaceCreateInfoKHR
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero RayTracingPipelineInterfaceCreateInfoKHR where
zero :: RayTracingPipelineInterfaceCreateInfoKHR
zero = ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32)
-> ("bindInfoCount" ::: Word32)
-> RayTracingPipelineInterfaceCreateInfoKHR
RayTracingPipelineInterfaceCreateInfoKHR
"bindInfoCount" ::: Word32
forall a. Zero a => a
zero
"bindInfoCount" ::: Word32
forall a. Zero a => a
zero
"bindInfoCount" ::: Word32
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 :: DeviceOrHostAddressKHR
-> (Ptr DeviceOrHostAddressKHR -> IO b) -> IO b
withCStruct x :: DeviceOrHostAddressKHR
x f :: Ptr DeviceOrHostAddressKHR -> IO b
f = Int -> Int -> (Ptr DeviceOrHostAddressKHR -> IO b) -> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 8 8 ((Ptr DeviceOrHostAddressKHR -> IO b) -> IO b)
-> (Ptr DeviceOrHostAddressKHR -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \p :: 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 :: Ptr DeviceOrHostAddressKHR
-> DeviceOrHostAddressKHR -> IO a -> IO a
pokeCStruct p :: 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 v :: "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
$ Ptr ("dataSize" ::: Word64) -> ("dataSize" ::: Word64) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr DeviceOrHostAddressKHR -> Ptr ("dataSize" ::: Word64)
forall a b. Ptr a -> Ptr b
castPtr @_ @DeviceAddress Ptr DeviceOrHostAddressKHR
p) ("dataSize" ::: Word64
v)
HostAddress v :: "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 (Ptr DeviceOrHostAddressKHR -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Ptr b
castPtr @_ @(Ptr ()) Ptr DeviceOrHostAddressKHR
p) ("data" ::: Ptr ()
v)
pokeZeroCStruct :: Ptr DeviceOrHostAddressKHR -> IO b -> IO b
pokeZeroCStruct :: Ptr DeviceOrHostAddressKHR -> IO b -> IO b
pokeZeroCStruct _ f :: IO b
f = IO b
f
cStructSize :: Int
cStructSize = 8
cStructAlignment :: Int
cStructAlignment = 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 :: DeviceOrHostAddressConstKHR
-> (Ptr DeviceOrHostAddressConstKHR -> IO b) -> IO b
withCStruct x :: DeviceOrHostAddressConstKHR
x f :: Ptr DeviceOrHostAddressConstKHR -> IO b
f = Int -> Int -> (Ptr DeviceOrHostAddressConstKHR -> IO b) -> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 8 8 ((Ptr DeviceOrHostAddressConstKHR -> IO b) -> IO b)
-> (Ptr DeviceOrHostAddressConstKHR -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \p :: 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 :: Ptr DeviceOrHostAddressConstKHR
-> DeviceOrHostAddressConstKHR -> IO a -> IO a
pokeCStruct p :: 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 v :: "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
$ Ptr ("dataSize" ::: Word64) -> ("dataSize" ::: Word64) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr DeviceOrHostAddressConstKHR -> Ptr ("dataSize" ::: Word64)
forall a b. Ptr a -> Ptr b
castPtr @_ @DeviceAddress Ptr DeviceOrHostAddressConstKHR
p) ("dataSize" ::: Word64
v)
HostAddressConst v :: "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 (Ptr DeviceOrHostAddressConstKHR -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Ptr b
castPtr @_ @(Ptr ()) Ptr DeviceOrHostAddressConstKHR
p) ("data" ::: Ptr ()
v)
pokeZeroCStruct :: Ptr DeviceOrHostAddressConstKHR -> IO b -> IO b
pokeZeroCStruct :: Ptr DeviceOrHostAddressConstKHR -> IO b -> IO b
pokeZeroCStruct _ f :: IO b
f = IO b
f
cStructSize :: Int
cStructSize = 8
cStructAlignment :: Int
cStructAlignment = 8
instance Zero DeviceOrHostAddressConstKHR where
zero :: DeviceOrHostAddressConstKHR
zero = ("dataSize" ::: Word64) -> DeviceOrHostAddressConstKHR
DeviceAddressConst "dataSize" ::: Word64
forall a. Zero a => a
zero
data AccelerationStructureGeometryDataKHR
= Triangles 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 :: AccelerationStructureGeometryDataKHR
-> (Ptr AccelerationStructureGeometryDataKHR -> IO b) -> IO b
withCStruct x :: AccelerationStructureGeometryDataKHR
x f :: Ptr AccelerationStructureGeometryDataKHR -> IO b
f = Int
-> Int
-> (Ptr AccelerationStructureGeometryDataKHR -> IO b)
-> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 64 8 ((Ptr AccelerationStructureGeometryDataKHR -> IO b) -> IO b)
-> (Ptr AccelerationStructureGeometryDataKHR -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \p :: 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 :: Ptr AccelerationStructureGeometryDataKHR
-> AccelerationStructureGeometryDataKHR -> IO a -> IO a
pokeCStruct p :: 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 v :: 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 AccelerationStructureGeometryTrianglesDataKHR
-> AccelerationStructureGeometryTrianglesDataKHR -> IO a -> IO a
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct (Ptr AccelerationStructureGeometryDataKHR
-> Ptr AccelerationStructureGeometryTrianglesDataKHR
forall a b. Ptr a -> Ptr b
castPtr @_ @AccelerationStructureGeometryTrianglesDataKHR Ptr AccelerationStructureGeometryDataKHR
p) (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 v :: 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 (Ptr AccelerationStructureGeometryDataKHR
-> Ptr AccelerationStructureGeometryAabbsDataKHR
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 v :: 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 (Ptr AccelerationStructureGeometryDataKHR
-> Ptr AccelerationStructureGeometryInstancesDataKHR
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 :: Ptr AccelerationStructureGeometryDataKHR -> IO b -> IO b
pokeZeroCStruct _ f :: IO b
f = IO b
f
cStructSize :: Int
cStructSize = 64
cStructAlignment :: Int
cStructAlignment = 8
instance Zero AccelerationStructureGeometryDataKHR where
zero :: AccelerationStructureGeometryDataKHR
zero = AccelerationStructureGeometryTrianglesDataKHR
-> AccelerationStructureGeometryDataKHR
Triangles AccelerationStructureGeometryTrianglesDataKHR
forall a. Zero a => a
zero
newtype GeometryInstanceFlagBitsKHR = GeometryInstanceFlagBitsKHR Flags
deriving newtype (GeometryInstanceFlagsKHR -> GeometryInstanceFlagsKHR -> Bool
(GeometryInstanceFlagsKHR -> GeometryInstanceFlagsKHR -> Bool)
-> (GeometryInstanceFlagsKHR -> GeometryInstanceFlagsKHR -> Bool)
-> Eq GeometryInstanceFlagsKHR
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GeometryInstanceFlagsKHR -> GeometryInstanceFlagsKHR -> Bool
$c/= :: GeometryInstanceFlagsKHR -> GeometryInstanceFlagsKHR -> Bool
== :: GeometryInstanceFlagsKHR -> GeometryInstanceFlagsKHR -> Bool
$c== :: GeometryInstanceFlagsKHR -> GeometryInstanceFlagsKHR -> Bool
Eq, Eq GeometryInstanceFlagsKHR
Eq GeometryInstanceFlagsKHR =>
(GeometryInstanceFlagsKHR -> GeometryInstanceFlagsKHR -> Ordering)
-> (GeometryInstanceFlagsKHR -> GeometryInstanceFlagsKHR -> Bool)
-> (GeometryInstanceFlagsKHR -> GeometryInstanceFlagsKHR -> Bool)
-> (GeometryInstanceFlagsKHR -> GeometryInstanceFlagsKHR -> Bool)
-> (GeometryInstanceFlagsKHR -> GeometryInstanceFlagsKHR -> Bool)
-> (GeometryInstanceFlagsKHR
-> GeometryInstanceFlagsKHR -> GeometryInstanceFlagsKHR)
-> (GeometryInstanceFlagsKHR
-> GeometryInstanceFlagsKHR -> GeometryInstanceFlagsKHR)
-> Ord GeometryInstanceFlagsKHR
GeometryInstanceFlagsKHR -> GeometryInstanceFlagsKHR -> Bool
GeometryInstanceFlagsKHR -> GeometryInstanceFlagsKHR -> Ordering
GeometryInstanceFlagsKHR
-> GeometryInstanceFlagsKHR -> GeometryInstanceFlagsKHR
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 :: GeometryInstanceFlagsKHR
-> GeometryInstanceFlagsKHR -> GeometryInstanceFlagsKHR
$cmin :: GeometryInstanceFlagsKHR
-> GeometryInstanceFlagsKHR -> GeometryInstanceFlagsKHR
max :: GeometryInstanceFlagsKHR
-> GeometryInstanceFlagsKHR -> GeometryInstanceFlagsKHR
$cmax :: GeometryInstanceFlagsKHR
-> GeometryInstanceFlagsKHR -> GeometryInstanceFlagsKHR
>= :: GeometryInstanceFlagsKHR -> GeometryInstanceFlagsKHR -> Bool
$c>= :: GeometryInstanceFlagsKHR -> GeometryInstanceFlagsKHR -> Bool
> :: GeometryInstanceFlagsKHR -> GeometryInstanceFlagsKHR -> Bool
$c> :: GeometryInstanceFlagsKHR -> GeometryInstanceFlagsKHR -> Bool
<= :: GeometryInstanceFlagsKHR -> GeometryInstanceFlagsKHR -> Bool
$c<= :: GeometryInstanceFlagsKHR -> GeometryInstanceFlagsKHR -> Bool
< :: GeometryInstanceFlagsKHR -> GeometryInstanceFlagsKHR -> Bool
$c< :: GeometryInstanceFlagsKHR -> GeometryInstanceFlagsKHR -> Bool
compare :: GeometryInstanceFlagsKHR -> GeometryInstanceFlagsKHR -> Ordering
$ccompare :: GeometryInstanceFlagsKHR -> GeometryInstanceFlagsKHR -> Ordering
$cp1Ord :: Eq GeometryInstanceFlagsKHR
Ord, Ptr b -> Int -> IO GeometryInstanceFlagsKHR
Ptr b -> Int -> GeometryInstanceFlagsKHR -> IO ()
Ptr GeometryInstanceFlagsKHR -> IO GeometryInstanceFlagsKHR
Ptr GeometryInstanceFlagsKHR -> Int -> IO GeometryInstanceFlagsKHR
Ptr GeometryInstanceFlagsKHR
-> Int -> GeometryInstanceFlagsKHR -> IO ()
Ptr GeometryInstanceFlagsKHR -> GeometryInstanceFlagsKHR -> IO ()
GeometryInstanceFlagsKHR -> Int
(GeometryInstanceFlagsKHR -> Int)
-> (GeometryInstanceFlagsKHR -> Int)
-> (Ptr GeometryInstanceFlagsKHR
-> Int -> IO GeometryInstanceFlagsKHR)
-> (Ptr GeometryInstanceFlagsKHR
-> Int -> GeometryInstanceFlagsKHR -> IO ())
-> (forall b. Ptr b -> Int -> IO GeometryInstanceFlagsKHR)
-> (forall b. Ptr b -> Int -> GeometryInstanceFlagsKHR -> IO ())
-> (Ptr GeometryInstanceFlagsKHR -> IO GeometryInstanceFlagsKHR)
-> (Ptr GeometryInstanceFlagsKHR
-> GeometryInstanceFlagsKHR -> IO ())
-> Storable GeometryInstanceFlagsKHR
forall b. Ptr b -> Int -> IO GeometryInstanceFlagsKHR
forall b. Ptr b -> Int -> GeometryInstanceFlagsKHR -> 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 GeometryInstanceFlagsKHR -> GeometryInstanceFlagsKHR -> IO ()
$cpoke :: Ptr GeometryInstanceFlagsKHR -> GeometryInstanceFlagsKHR -> IO ()
peek :: Ptr GeometryInstanceFlagsKHR -> IO GeometryInstanceFlagsKHR
$cpeek :: Ptr GeometryInstanceFlagsKHR -> IO GeometryInstanceFlagsKHR
pokeByteOff :: Ptr b -> Int -> GeometryInstanceFlagsKHR -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> GeometryInstanceFlagsKHR -> IO ()
peekByteOff :: Ptr b -> Int -> IO GeometryInstanceFlagsKHR
$cpeekByteOff :: forall b. Ptr b -> Int -> IO GeometryInstanceFlagsKHR
pokeElemOff :: Ptr GeometryInstanceFlagsKHR
-> Int -> GeometryInstanceFlagsKHR -> IO ()
$cpokeElemOff :: Ptr GeometryInstanceFlagsKHR
-> Int -> GeometryInstanceFlagsKHR -> IO ()
peekElemOff :: Ptr GeometryInstanceFlagsKHR -> Int -> IO GeometryInstanceFlagsKHR
$cpeekElemOff :: Ptr GeometryInstanceFlagsKHR -> Int -> IO GeometryInstanceFlagsKHR
alignment :: GeometryInstanceFlagsKHR -> Int
$calignment :: GeometryInstanceFlagsKHR -> Int
sizeOf :: GeometryInstanceFlagsKHR -> Int
$csizeOf :: GeometryInstanceFlagsKHR -> Int
Storable, GeometryInstanceFlagsKHR
GeometryInstanceFlagsKHR -> Zero GeometryInstanceFlagsKHR
forall a. a -> Zero a
zero :: GeometryInstanceFlagsKHR
$czero :: GeometryInstanceFlagsKHR
Zero, Eq GeometryInstanceFlagsKHR
GeometryInstanceFlagsKHR
Eq GeometryInstanceFlagsKHR =>
(GeometryInstanceFlagsKHR
-> GeometryInstanceFlagsKHR -> GeometryInstanceFlagsKHR)
-> (GeometryInstanceFlagsKHR
-> GeometryInstanceFlagsKHR -> GeometryInstanceFlagsKHR)
-> (GeometryInstanceFlagsKHR
-> GeometryInstanceFlagsKHR -> GeometryInstanceFlagsKHR)
-> (GeometryInstanceFlagsKHR -> GeometryInstanceFlagsKHR)
-> (GeometryInstanceFlagsKHR -> Int -> GeometryInstanceFlagsKHR)
-> (GeometryInstanceFlagsKHR -> Int -> GeometryInstanceFlagsKHR)
-> GeometryInstanceFlagsKHR
-> (Int -> GeometryInstanceFlagsKHR)
-> (GeometryInstanceFlagsKHR -> Int -> GeometryInstanceFlagsKHR)
-> (GeometryInstanceFlagsKHR -> Int -> GeometryInstanceFlagsKHR)
-> (GeometryInstanceFlagsKHR -> Int -> GeometryInstanceFlagsKHR)
-> (GeometryInstanceFlagsKHR -> Int -> Bool)
-> (GeometryInstanceFlagsKHR -> Maybe Int)
-> (GeometryInstanceFlagsKHR -> Int)
-> (GeometryInstanceFlagsKHR -> Bool)
-> (GeometryInstanceFlagsKHR -> Int -> GeometryInstanceFlagsKHR)
-> (GeometryInstanceFlagsKHR -> Int -> GeometryInstanceFlagsKHR)
-> (GeometryInstanceFlagsKHR -> Int -> GeometryInstanceFlagsKHR)
-> (GeometryInstanceFlagsKHR -> Int -> GeometryInstanceFlagsKHR)
-> (GeometryInstanceFlagsKHR -> Int -> GeometryInstanceFlagsKHR)
-> (GeometryInstanceFlagsKHR -> Int -> GeometryInstanceFlagsKHR)
-> (GeometryInstanceFlagsKHR -> Int)
-> Bits GeometryInstanceFlagsKHR
Int -> GeometryInstanceFlagsKHR
GeometryInstanceFlagsKHR -> Bool
GeometryInstanceFlagsKHR -> Int
GeometryInstanceFlagsKHR -> Maybe Int
GeometryInstanceFlagsKHR -> GeometryInstanceFlagsKHR
GeometryInstanceFlagsKHR -> Int -> Bool
GeometryInstanceFlagsKHR -> Int -> GeometryInstanceFlagsKHR
GeometryInstanceFlagsKHR
-> GeometryInstanceFlagsKHR -> GeometryInstanceFlagsKHR
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 :: GeometryInstanceFlagsKHR -> Int
$cpopCount :: GeometryInstanceFlagsKHR -> Int
rotateR :: GeometryInstanceFlagsKHR -> Int -> GeometryInstanceFlagsKHR
$crotateR :: GeometryInstanceFlagsKHR -> Int -> GeometryInstanceFlagsKHR
rotateL :: GeometryInstanceFlagsKHR -> Int -> GeometryInstanceFlagsKHR
$crotateL :: GeometryInstanceFlagsKHR -> Int -> GeometryInstanceFlagsKHR
unsafeShiftR :: GeometryInstanceFlagsKHR -> Int -> GeometryInstanceFlagsKHR
$cunsafeShiftR :: GeometryInstanceFlagsKHR -> Int -> GeometryInstanceFlagsKHR
shiftR :: GeometryInstanceFlagsKHR -> Int -> GeometryInstanceFlagsKHR
$cshiftR :: GeometryInstanceFlagsKHR -> Int -> GeometryInstanceFlagsKHR
unsafeShiftL :: GeometryInstanceFlagsKHR -> Int -> GeometryInstanceFlagsKHR
$cunsafeShiftL :: GeometryInstanceFlagsKHR -> Int -> GeometryInstanceFlagsKHR
shiftL :: GeometryInstanceFlagsKHR -> Int -> GeometryInstanceFlagsKHR
$cshiftL :: GeometryInstanceFlagsKHR -> Int -> GeometryInstanceFlagsKHR
isSigned :: GeometryInstanceFlagsKHR -> Bool
$cisSigned :: GeometryInstanceFlagsKHR -> Bool
bitSize :: GeometryInstanceFlagsKHR -> Int
$cbitSize :: GeometryInstanceFlagsKHR -> Int
bitSizeMaybe :: GeometryInstanceFlagsKHR -> Maybe Int
$cbitSizeMaybe :: GeometryInstanceFlagsKHR -> Maybe Int
testBit :: GeometryInstanceFlagsKHR -> Int -> Bool
$ctestBit :: GeometryInstanceFlagsKHR -> Int -> Bool
complementBit :: GeometryInstanceFlagsKHR -> Int -> GeometryInstanceFlagsKHR
$ccomplementBit :: GeometryInstanceFlagsKHR -> Int -> GeometryInstanceFlagsKHR
clearBit :: GeometryInstanceFlagsKHR -> Int -> GeometryInstanceFlagsKHR
$cclearBit :: GeometryInstanceFlagsKHR -> Int -> GeometryInstanceFlagsKHR
setBit :: GeometryInstanceFlagsKHR -> Int -> GeometryInstanceFlagsKHR
$csetBit :: GeometryInstanceFlagsKHR -> Int -> GeometryInstanceFlagsKHR
bit :: Int -> GeometryInstanceFlagsKHR
$cbit :: Int -> GeometryInstanceFlagsKHR
zeroBits :: GeometryInstanceFlagsKHR
$czeroBits :: GeometryInstanceFlagsKHR
rotate :: GeometryInstanceFlagsKHR -> Int -> GeometryInstanceFlagsKHR
$crotate :: GeometryInstanceFlagsKHR -> Int -> GeometryInstanceFlagsKHR
shift :: GeometryInstanceFlagsKHR -> Int -> GeometryInstanceFlagsKHR
$cshift :: GeometryInstanceFlagsKHR -> Int -> GeometryInstanceFlagsKHR
complement :: GeometryInstanceFlagsKHR -> GeometryInstanceFlagsKHR
$ccomplement :: GeometryInstanceFlagsKHR -> GeometryInstanceFlagsKHR
xor :: GeometryInstanceFlagsKHR
-> GeometryInstanceFlagsKHR -> GeometryInstanceFlagsKHR
$cxor :: GeometryInstanceFlagsKHR
-> GeometryInstanceFlagsKHR -> GeometryInstanceFlagsKHR
.|. :: GeometryInstanceFlagsKHR
-> GeometryInstanceFlagsKHR -> GeometryInstanceFlagsKHR
$c.|. :: GeometryInstanceFlagsKHR
-> GeometryInstanceFlagsKHR -> GeometryInstanceFlagsKHR
.&. :: GeometryInstanceFlagsKHR
-> GeometryInstanceFlagsKHR -> GeometryInstanceFlagsKHR
$c.&. :: GeometryInstanceFlagsKHR
-> GeometryInstanceFlagsKHR -> GeometryInstanceFlagsKHR
$cp1Bits :: Eq GeometryInstanceFlagsKHR
Bits)
pattern $bGEOMETRY_INSTANCE_TRIANGLE_FACING_CULL_DISABLE_BIT_KHR :: GeometryInstanceFlagsKHR
$mGEOMETRY_INSTANCE_TRIANGLE_FACING_CULL_DISABLE_BIT_KHR :: forall r.
GeometryInstanceFlagsKHR -> (Void# -> r) -> (Void# -> r) -> r
GEOMETRY_INSTANCE_TRIANGLE_FACING_CULL_DISABLE_BIT_KHR = GeometryInstanceFlagBitsKHR 0x00000001
pattern $bGEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_KHR :: GeometryInstanceFlagsKHR
$mGEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_KHR :: forall r.
GeometryInstanceFlagsKHR -> (Void# -> r) -> (Void# -> r) -> r
GEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_KHR = GeometryInstanceFlagBitsKHR 0x00000002
pattern $bGEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_KHR :: GeometryInstanceFlagsKHR
$mGEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_KHR :: forall r.
GeometryInstanceFlagsKHR -> (Void# -> r) -> (Void# -> r) -> r
GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_KHR = GeometryInstanceFlagBitsKHR 0x00000004
pattern $bGEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_KHR :: GeometryInstanceFlagsKHR
$mGEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_KHR :: forall r.
GeometryInstanceFlagsKHR -> (Void# -> r) -> (Void# -> r) -> r
GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_KHR = GeometryInstanceFlagBitsKHR 0x00000008
type GeometryInstanceFlagsKHR = GeometryInstanceFlagBitsKHR
instance Show GeometryInstanceFlagBitsKHR where
showsPrec :: Int -> GeometryInstanceFlagsKHR -> ShowS
showsPrec p :: Int
p = \case
GEOMETRY_INSTANCE_TRIANGLE_FACING_CULL_DISABLE_BIT_KHR -> String -> ShowS
showString "GEOMETRY_INSTANCE_TRIANGLE_FACING_CULL_DISABLE_BIT_KHR"
GEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_KHR -> String -> ShowS
showString "GEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_KHR"
GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_KHR -> String -> ShowS
showString "GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_KHR"
GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_KHR -> String -> ShowS
showString "GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_KHR"
GeometryInstanceFlagBitsKHR x :: "bindInfoCount" ::: Word32
x -> Bool -> ShowS -> ShowS
showParen (Int
p Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
>= 11) (String -> ShowS
showString "GeometryInstanceFlagBitsKHR 0x" ShowS -> ShowS -> ShowS
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ("bindInfoCount" ::: Word32) -> ShowS
forall a. (Integral a, Show a) => a -> ShowS
showHex "bindInfoCount" ::: Word32
x)
instance Read GeometryInstanceFlagBitsKHR where
readPrec :: ReadPrec GeometryInstanceFlagsKHR
readPrec = ReadPrec GeometryInstanceFlagsKHR
-> ReadPrec GeometryInstanceFlagsKHR
forall a. ReadPrec a -> ReadPrec a
parens ([(String, ReadPrec GeometryInstanceFlagsKHR)]
-> ReadPrec GeometryInstanceFlagsKHR
forall a. [(String, ReadPrec a)] -> ReadPrec a
choose [("GEOMETRY_INSTANCE_TRIANGLE_FACING_CULL_DISABLE_BIT_KHR", GeometryInstanceFlagsKHR -> ReadPrec GeometryInstanceFlagsKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure GeometryInstanceFlagsKHR
GEOMETRY_INSTANCE_TRIANGLE_FACING_CULL_DISABLE_BIT_KHR)
, ("GEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_KHR", GeometryInstanceFlagsKHR -> ReadPrec GeometryInstanceFlagsKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure GeometryInstanceFlagsKHR
GEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_KHR)
, ("GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_KHR", GeometryInstanceFlagsKHR -> ReadPrec GeometryInstanceFlagsKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure GeometryInstanceFlagsKHR
GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_KHR)
, ("GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_KHR", GeometryInstanceFlagsKHR -> ReadPrec GeometryInstanceFlagsKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure GeometryInstanceFlagsKHR
GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_KHR)]
ReadPrec GeometryInstanceFlagsKHR
-> ReadPrec GeometryInstanceFlagsKHR
-> ReadPrec GeometryInstanceFlagsKHR
forall a. ReadPrec a -> ReadPrec a -> ReadPrec a
+++
Int
-> ReadPrec GeometryInstanceFlagsKHR
-> ReadPrec GeometryInstanceFlagsKHR
forall a. Int -> ReadPrec a -> ReadPrec a
prec 10 (do
Lexeme -> ReadPrec ()
expectP (String -> Lexeme
Ident "GeometryInstanceFlagBitsKHR")
"bindInfoCount" ::: Word32
v <- ReadPrec ("bindInfoCount" ::: Word32)
-> ReadPrec ("bindInfoCount" ::: Word32)
forall a. ReadPrec a -> ReadPrec a
step ReadPrec ("bindInfoCount" ::: Word32)
forall a. Read a => ReadPrec a
readPrec
GeometryInstanceFlagsKHR -> ReadPrec GeometryInstanceFlagsKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure (("bindInfoCount" ::: Word32) -> GeometryInstanceFlagsKHR
GeometryInstanceFlagBitsKHR "bindInfoCount" ::: Word32
v)))
newtype GeometryFlagBitsKHR = GeometryFlagBitsKHR Flags
deriving newtype (GeometryFlagsKHR -> GeometryFlagsKHR -> Bool
(GeometryFlagsKHR -> GeometryFlagsKHR -> Bool)
-> (GeometryFlagsKHR -> GeometryFlagsKHR -> Bool)
-> Eq GeometryFlagsKHR
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GeometryFlagsKHR -> GeometryFlagsKHR -> Bool
$c/= :: GeometryFlagsKHR -> GeometryFlagsKHR -> Bool
== :: GeometryFlagsKHR -> GeometryFlagsKHR -> Bool
$c== :: GeometryFlagsKHR -> GeometryFlagsKHR -> Bool
Eq, Eq GeometryFlagsKHR
Eq GeometryFlagsKHR =>
(GeometryFlagsKHR -> GeometryFlagsKHR -> Ordering)
-> (GeometryFlagsKHR -> GeometryFlagsKHR -> Bool)
-> (GeometryFlagsKHR -> GeometryFlagsKHR -> Bool)
-> (GeometryFlagsKHR -> GeometryFlagsKHR -> Bool)
-> (GeometryFlagsKHR -> GeometryFlagsKHR -> Bool)
-> (GeometryFlagsKHR -> GeometryFlagsKHR -> GeometryFlagsKHR)
-> (GeometryFlagsKHR -> GeometryFlagsKHR -> GeometryFlagsKHR)
-> Ord GeometryFlagsKHR
GeometryFlagsKHR -> GeometryFlagsKHR -> Bool
GeometryFlagsKHR -> GeometryFlagsKHR -> Ordering
GeometryFlagsKHR -> GeometryFlagsKHR -> GeometryFlagsKHR
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 :: GeometryFlagsKHR -> GeometryFlagsKHR -> GeometryFlagsKHR
$cmin :: GeometryFlagsKHR -> GeometryFlagsKHR -> GeometryFlagsKHR
max :: GeometryFlagsKHR -> GeometryFlagsKHR -> GeometryFlagsKHR
$cmax :: GeometryFlagsKHR -> GeometryFlagsKHR -> GeometryFlagsKHR
>= :: GeometryFlagsKHR -> GeometryFlagsKHR -> Bool
$c>= :: GeometryFlagsKHR -> GeometryFlagsKHR -> Bool
> :: GeometryFlagsKHR -> GeometryFlagsKHR -> Bool
$c> :: GeometryFlagsKHR -> GeometryFlagsKHR -> Bool
<= :: GeometryFlagsKHR -> GeometryFlagsKHR -> Bool
$c<= :: GeometryFlagsKHR -> GeometryFlagsKHR -> Bool
< :: GeometryFlagsKHR -> GeometryFlagsKHR -> Bool
$c< :: GeometryFlagsKHR -> GeometryFlagsKHR -> Bool
compare :: GeometryFlagsKHR -> GeometryFlagsKHR -> Ordering
$ccompare :: GeometryFlagsKHR -> GeometryFlagsKHR -> Ordering
$cp1Ord :: Eq GeometryFlagsKHR
Ord, Ptr b -> Int -> IO GeometryFlagsKHR
Ptr b -> Int -> GeometryFlagsKHR -> IO ()
Ptr GeometryFlagsKHR -> IO GeometryFlagsKHR
Ptr GeometryFlagsKHR -> Int -> IO GeometryFlagsKHR
Ptr GeometryFlagsKHR -> Int -> GeometryFlagsKHR -> IO ()
Ptr GeometryFlagsKHR -> GeometryFlagsKHR -> IO ()
GeometryFlagsKHR -> Int
(GeometryFlagsKHR -> Int)
-> (GeometryFlagsKHR -> Int)
-> (Ptr GeometryFlagsKHR -> Int -> IO GeometryFlagsKHR)
-> (Ptr GeometryFlagsKHR -> Int -> GeometryFlagsKHR -> IO ())
-> (forall b. Ptr b -> Int -> IO GeometryFlagsKHR)
-> (forall b. Ptr b -> Int -> GeometryFlagsKHR -> IO ())
-> (Ptr GeometryFlagsKHR -> IO GeometryFlagsKHR)
-> (Ptr GeometryFlagsKHR -> GeometryFlagsKHR -> IO ())
-> Storable GeometryFlagsKHR
forall b. Ptr b -> Int -> IO GeometryFlagsKHR
forall b. Ptr b -> Int -> GeometryFlagsKHR -> 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 GeometryFlagsKHR -> GeometryFlagsKHR -> IO ()
$cpoke :: Ptr GeometryFlagsKHR -> GeometryFlagsKHR -> IO ()
peek :: Ptr GeometryFlagsKHR -> IO GeometryFlagsKHR
$cpeek :: Ptr GeometryFlagsKHR -> IO GeometryFlagsKHR
pokeByteOff :: Ptr b -> Int -> GeometryFlagsKHR -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> GeometryFlagsKHR -> IO ()
peekByteOff :: Ptr b -> Int -> IO GeometryFlagsKHR
$cpeekByteOff :: forall b. Ptr b -> Int -> IO GeometryFlagsKHR
pokeElemOff :: Ptr GeometryFlagsKHR -> Int -> GeometryFlagsKHR -> IO ()
$cpokeElemOff :: Ptr GeometryFlagsKHR -> Int -> GeometryFlagsKHR -> IO ()
peekElemOff :: Ptr GeometryFlagsKHR -> Int -> IO GeometryFlagsKHR
$cpeekElemOff :: Ptr GeometryFlagsKHR -> Int -> IO GeometryFlagsKHR
alignment :: GeometryFlagsKHR -> Int
$calignment :: GeometryFlagsKHR -> Int
sizeOf :: GeometryFlagsKHR -> Int
$csizeOf :: GeometryFlagsKHR -> Int
Storable, GeometryFlagsKHR
GeometryFlagsKHR -> Zero GeometryFlagsKHR
forall a. a -> Zero a
zero :: GeometryFlagsKHR
$czero :: GeometryFlagsKHR
Zero, Eq GeometryFlagsKHR
GeometryFlagsKHR
Eq GeometryFlagsKHR =>
(GeometryFlagsKHR -> GeometryFlagsKHR -> GeometryFlagsKHR)
-> (GeometryFlagsKHR -> GeometryFlagsKHR -> GeometryFlagsKHR)
-> (GeometryFlagsKHR -> GeometryFlagsKHR -> GeometryFlagsKHR)
-> (GeometryFlagsKHR -> GeometryFlagsKHR)
-> (GeometryFlagsKHR -> Int -> GeometryFlagsKHR)
-> (GeometryFlagsKHR -> Int -> GeometryFlagsKHR)
-> GeometryFlagsKHR
-> (Int -> GeometryFlagsKHR)
-> (GeometryFlagsKHR -> Int -> GeometryFlagsKHR)
-> (GeometryFlagsKHR -> Int -> GeometryFlagsKHR)
-> (GeometryFlagsKHR -> Int -> GeometryFlagsKHR)
-> (GeometryFlagsKHR -> Int -> Bool)
-> (GeometryFlagsKHR -> Maybe Int)
-> (GeometryFlagsKHR -> Int)
-> (GeometryFlagsKHR -> Bool)
-> (GeometryFlagsKHR -> Int -> GeometryFlagsKHR)
-> (GeometryFlagsKHR -> Int -> GeometryFlagsKHR)
-> (GeometryFlagsKHR -> Int -> GeometryFlagsKHR)
-> (GeometryFlagsKHR -> Int -> GeometryFlagsKHR)
-> (GeometryFlagsKHR -> Int -> GeometryFlagsKHR)
-> (GeometryFlagsKHR -> Int -> GeometryFlagsKHR)
-> (GeometryFlagsKHR -> Int)
-> Bits GeometryFlagsKHR
Int -> GeometryFlagsKHR
GeometryFlagsKHR -> Bool
GeometryFlagsKHR -> Int
GeometryFlagsKHR -> Maybe Int
GeometryFlagsKHR -> GeometryFlagsKHR
GeometryFlagsKHR -> Int -> Bool
GeometryFlagsKHR -> Int -> GeometryFlagsKHR
GeometryFlagsKHR -> GeometryFlagsKHR -> GeometryFlagsKHR
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 :: GeometryFlagsKHR -> Int
$cpopCount :: GeometryFlagsKHR -> Int
rotateR :: GeometryFlagsKHR -> Int -> GeometryFlagsKHR
$crotateR :: GeometryFlagsKHR -> Int -> GeometryFlagsKHR
rotateL :: GeometryFlagsKHR -> Int -> GeometryFlagsKHR
$crotateL :: GeometryFlagsKHR -> Int -> GeometryFlagsKHR
unsafeShiftR :: GeometryFlagsKHR -> Int -> GeometryFlagsKHR
$cunsafeShiftR :: GeometryFlagsKHR -> Int -> GeometryFlagsKHR
shiftR :: GeometryFlagsKHR -> Int -> GeometryFlagsKHR
$cshiftR :: GeometryFlagsKHR -> Int -> GeometryFlagsKHR
unsafeShiftL :: GeometryFlagsKHR -> Int -> GeometryFlagsKHR
$cunsafeShiftL :: GeometryFlagsKHR -> Int -> GeometryFlagsKHR
shiftL :: GeometryFlagsKHR -> Int -> GeometryFlagsKHR
$cshiftL :: GeometryFlagsKHR -> Int -> GeometryFlagsKHR
isSigned :: GeometryFlagsKHR -> Bool
$cisSigned :: GeometryFlagsKHR -> Bool
bitSize :: GeometryFlagsKHR -> Int
$cbitSize :: GeometryFlagsKHR -> Int
bitSizeMaybe :: GeometryFlagsKHR -> Maybe Int
$cbitSizeMaybe :: GeometryFlagsKHR -> Maybe Int
testBit :: GeometryFlagsKHR -> Int -> Bool
$ctestBit :: GeometryFlagsKHR -> Int -> Bool
complementBit :: GeometryFlagsKHR -> Int -> GeometryFlagsKHR
$ccomplementBit :: GeometryFlagsKHR -> Int -> GeometryFlagsKHR
clearBit :: GeometryFlagsKHR -> Int -> GeometryFlagsKHR
$cclearBit :: GeometryFlagsKHR -> Int -> GeometryFlagsKHR
setBit :: GeometryFlagsKHR -> Int -> GeometryFlagsKHR
$csetBit :: GeometryFlagsKHR -> Int -> GeometryFlagsKHR
bit :: Int -> GeometryFlagsKHR
$cbit :: Int -> GeometryFlagsKHR
zeroBits :: GeometryFlagsKHR
$czeroBits :: GeometryFlagsKHR
rotate :: GeometryFlagsKHR -> Int -> GeometryFlagsKHR
$crotate :: GeometryFlagsKHR -> Int -> GeometryFlagsKHR
shift :: GeometryFlagsKHR -> Int -> GeometryFlagsKHR
$cshift :: GeometryFlagsKHR -> Int -> GeometryFlagsKHR
complement :: GeometryFlagsKHR -> GeometryFlagsKHR
$ccomplement :: GeometryFlagsKHR -> GeometryFlagsKHR
xor :: GeometryFlagsKHR -> GeometryFlagsKHR -> GeometryFlagsKHR
$cxor :: GeometryFlagsKHR -> GeometryFlagsKHR -> GeometryFlagsKHR
.|. :: GeometryFlagsKHR -> GeometryFlagsKHR -> GeometryFlagsKHR
$c.|. :: GeometryFlagsKHR -> GeometryFlagsKHR -> GeometryFlagsKHR
.&. :: GeometryFlagsKHR -> GeometryFlagsKHR -> GeometryFlagsKHR
$c.&. :: GeometryFlagsKHR -> GeometryFlagsKHR -> GeometryFlagsKHR
$cp1Bits :: Eq GeometryFlagsKHR
Bits)
pattern $bGEOMETRY_OPAQUE_BIT_KHR :: GeometryFlagsKHR
$mGEOMETRY_OPAQUE_BIT_KHR :: forall r. GeometryFlagsKHR -> (Void# -> r) -> (Void# -> r) -> r
GEOMETRY_OPAQUE_BIT_KHR = GeometryFlagBitsKHR 0x00000001
pattern $bGEOMETRY_NO_DUPLICATE_ANY_HIT_INVOCATION_BIT_KHR :: GeometryFlagsKHR
$mGEOMETRY_NO_DUPLICATE_ANY_HIT_INVOCATION_BIT_KHR :: forall r. GeometryFlagsKHR -> (Void# -> r) -> (Void# -> r) -> r
GEOMETRY_NO_DUPLICATE_ANY_HIT_INVOCATION_BIT_KHR = GeometryFlagBitsKHR 0x00000002
type GeometryFlagsKHR = GeometryFlagBitsKHR
instance Show GeometryFlagBitsKHR where
showsPrec :: Int -> GeometryFlagsKHR -> ShowS
showsPrec p :: Int
p = \case
GEOMETRY_OPAQUE_BIT_KHR -> String -> ShowS
showString "GEOMETRY_OPAQUE_BIT_KHR"
GEOMETRY_NO_DUPLICATE_ANY_HIT_INVOCATION_BIT_KHR -> String -> ShowS
showString "GEOMETRY_NO_DUPLICATE_ANY_HIT_INVOCATION_BIT_KHR"
GeometryFlagBitsKHR x :: "bindInfoCount" ::: Word32
x -> Bool -> ShowS -> ShowS
showParen (Int
p Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
>= 11) (String -> ShowS
showString "GeometryFlagBitsKHR 0x" ShowS -> ShowS -> ShowS
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ("bindInfoCount" ::: Word32) -> ShowS
forall a. (Integral a, Show a) => a -> ShowS
showHex "bindInfoCount" ::: Word32
x)
instance Read GeometryFlagBitsKHR where
readPrec :: ReadPrec GeometryFlagsKHR
readPrec = ReadPrec GeometryFlagsKHR -> ReadPrec GeometryFlagsKHR
forall a. ReadPrec a -> ReadPrec a
parens ([(String, ReadPrec GeometryFlagsKHR)] -> ReadPrec GeometryFlagsKHR
forall a. [(String, ReadPrec a)] -> ReadPrec a
choose [("GEOMETRY_OPAQUE_BIT_KHR", GeometryFlagsKHR -> ReadPrec GeometryFlagsKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure GeometryFlagsKHR
GEOMETRY_OPAQUE_BIT_KHR)
, ("GEOMETRY_NO_DUPLICATE_ANY_HIT_INVOCATION_BIT_KHR", GeometryFlagsKHR -> ReadPrec GeometryFlagsKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure GeometryFlagsKHR
GEOMETRY_NO_DUPLICATE_ANY_HIT_INVOCATION_BIT_KHR)]
ReadPrec GeometryFlagsKHR
-> ReadPrec GeometryFlagsKHR -> ReadPrec GeometryFlagsKHR
forall a. ReadPrec a -> ReadPrec a -> ReadPrec a
+++
Int -> ReadPrec GeometryFlagsKHR -> ReadPrec GeometryFlagsKHR
forall a. Int -> ReadPrec a -> ReadPrec a
prec 10 (do
Lexeme -> ReadPrec ()
expectP (String -> Lexeme
Ident "GeometryFlagBitsKHR")
"bindInfoCount" ::: Word32
v <- ReadPrec ("bindInfoCount" ::: Word32)
-> ReadPrec ("bindInfoCount" ::: Word32)
forall a. ReadPrec a -> ReadPrec a
step ReadPrec ("bindInfoCount" ::: Word32)
forall a. Read a => ReadPrec a
readPrec
GeometryFlagsKHR -> ReadPrec GeometryFlagsKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure (("bindInfoCount" ::: Word32) -> GeometryFlagsKHR
GeometryFlagBitsKHR "bindInfoCount" ::: Word32
v)))
newtype BuildAccelerationStructureFlagBitsKHR = BuildAccelerationStructureFlagBitsKHR Flags
deriving newtype (BuildAccelerationStructureFlagsKHR
-> BuildAccelerationStructureFlagsKHR -> Bool
(BuildAccelerationStructureFlagsKHR
-> BuildAccelerationStructureFlagsKHR -> Bool)
-> (BuildAccelerationStructureFlagsKHR
-> BuildAccelerationStructureFlagsKHR -> Bool)
-> Eq BuildAccelerationStructureFlagsKHR
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BuildAccelerationStructureFlagsKHR
-> BuildAccelerationStructureFlagsKHR -> Bool
$c/= :: BuildAccelerationStructureFlagsKHR
-> BuildAccelerationStructureFlagsKHR -> Bool
== :: BuildAccelerationStructureFlagsKHR
-> BuildAccelerationStructureFlagsKHR -> Bool
$c== :: BuildAccelerationStructureFlagsKHR
-> BuildAccelerationStructureFlagsKHR -> Bool
Eq, Eq BuildAccelerationStructureFlagsKHR
Eq BuildAccelerationStructureFlagsKHR =>
(BuildAccelerationStructureFlagsKHR
-> BuildAccelerationStructureFlagsKHR -> Ordering)
-> (BuildAccelerationStructureFlagsKHR
-> BuildAccelerationStructureFlagsKHR -> Bool)
-> (BuildAccelerationStructureFlagsKHR
-> BuildAccelerationStructureFlagsKHR -> Bool)
-> (BuildAccelerationStructureFlagsKHR
-> BuildAccelerationStructureFlagsKHR -> Bool)
-> (BuildAccelerationStructureFlagsKHR
-> BuildAccelerationStructureFlagsKHR -> Bool)
-> (BuildAccelerationStructureFlagsKHR
-> BuildAccelerationStructureFlagsKHR
-> BuildAccelerationStructureFlagsKHR)
-> (BuildAccelerationStructureFlagsKHR
-> BuildAccelerationStructureFlagsKHR
-> BuildAccelerationStructureFlagsKHR)
-> Ord BuildAccelerationStructureFlagsKHR
BuildAccelerationStructureFlagsKHR
-> BuildAccelerationStructureFlagsKHR -> Bool
BuildAccelerationStructureFlagsKHR
-> BuildAccelerationStructureFlagsKHR -> Ordering
BuildAccelerationStructureFlagsKHR
-> BuildAccelerationStructureFlagsKHR
-> BuildAccelerationStructureFlagsKHR
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 :: BuildAccelerationStructureFlagsKHR
-> BuildAccelerationStructureFlagsKHR
-> BuildAccelerationStructureFlagsKHR
$cmin :: BuildAccelerationStructureFlagsKHR
-> BuildAccelerationStructureFlagsKHR
-> BuildAccelerationStructureFlagsKHR
max :: BuildAccelerationStructureFlagsKHR
-> BuildAccelerationStructureFlagsKHR
-> BuildAccelerationStructureFlagsKHR
$cmax :: BuildAccelerationStructureFlagsKHR
-> BuildAccelerationStructureFlagsKHR
-> BuildAccelerationStructureFlagsKHR
>= :: BuildAccelerationStructureFlagsKHR
-> BuildAccelerationStructureFlagsKHR -> Bool
$c>= :: BuildAccelerationStructureFlagsKHR
-> BuildAccelerationStructureFlagsKHR -> Bool
> :: BuildAccelerationStructureFlagsKHR
-> BuildAccelerationStructureFlagsKHR -> Bool
$c> :: BuildAccelerationStructureFlagsKHR
-> BuildAccelerationStructureFlagsKHR -> Bool
<= :: BuildAccelerationStructureFlagsKHR
-> BuildAccelerationStructureFlagsKHR -> Bool
$c<= :: BuildAccelerationStructureFlagsKHR
-> BuildAccelerationStructureFlagsKHR -> Bool
< :: BuildAccelerationStructureFlagsKHR
-> BuildAccelerationStructureFlagsKHR -> Bool
$c< :: BuildAccelerationStructureFlagsKHR
-> BuildAccelerationStructureFlagsKHR -> Bool
compare :: BuildAccelerationStructureFlagsKHR
-> BuildAccelerationStructureFlagsKHR -> Ordering
$ccompare :: BuildAccelerationStructureFlagsKHR
-> BuildAccelerationStructureFlagsKHR -> Ordering
$cp1Ord :: Eq BuildAccelerationStructureFlagsKHR
Ord, Ptr b -> Int -> IO BuildAccelerationStructureFlagsKHR
Ptr b -> Int -> BuildAccelerationStructureFlagsKHR -> IO ()
Ptr BuildAccelerationStructureFlagsKHR
-> IO BuildAccelerationStructureFlagsKHR
Ptr BuildAccelerationStructureFlagsKHR
-> Int -> IO BuildAccelerationStructureFlagsKHR
Ptr BuildAccelerationStructureFlagsKHR
-> Int -> BuildAccelerationStructureFlagsKHR -> IO ()
Ptr BuildAccelerationStructureFlagsKHR
-> BuildAccelerationStructureFlagsKHR -> IO ()
BuildAccelerationStructureFlagsKHR -> Int
(BuildAccelerationStructureFlagsKHR -> Int)
-> (BuildAccelerationStructureFlagsKHR -> Int)
-> (Ptr BuildAccelerationStructureFlagsKHR
-> Int -> IO BuildAccelerationStructureFlagsKHR)
-> (Ptr BuildAccelerationStructureFlagsKHR
-> Int -> BuildAccelerationStructureFlagsKHR -> IO ())
-> (forall b.
Ptr b -> Int -> IO BuildAccelerationStructureFlagsKHR)
-> (forall b.
Ptr b -> Int -> BuildAccelerationStructureFlagsKHR -> IO ())
-> (Ptr BuildAccelerationStructureFlagsKHR
-> IO BuildAccelerationStructureFlagsKHR)
-> (Ptr BuildAccelerationStructureFlagsKHR
-> BuildAccelerationStructureFlagsKHR -> IO ())
-> Storable BuildAccelerationStructureFlagsKHR
forall b. Ptr b -> Int -> IO BuildAccelerationStructureFlagsKHR
forall b.
Ptr b -> Int -> BuildAccelerationStructureFlagsKHR -> 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 BuildAccelerationStructureFlagsKHR
-> BuildAccelerationStructureFlagsKHR -> IO ()
$cpoke :: Ptr BuildAccelerationStructureFlagsKHR
-> BuildAccelerationStructureFlagsKHR -> IO ()
peek :: Ptr BuildAccelerationStructureFlagsKHR
-> IO BuildAccelerationStructureFlagsKHR
$cpeek :: Ptr BuildAccelerationStructureFlagsKHR
-> IO BuildAccelerationStructureFlagsKHR
pokeByteOff :: Ptr b -> Int -> BuildAccelerationStructureFlagsKHR -> IO ()
$cpokeByteOff :: forall b.
Ptr b -> Int -> BuildAccelerationStructureFlagsKHR -> IO ()
peekByteOff :: Ptr b -> Int -> IO BuildAccelerationStructureFlagsKHR
$cpeekByteOff :: forall b. Ptr b -> Int -> IO BuildAccelerationStructureFlagsKHR
pokeElemOff :: Ptr BuildAccelerationStructureFlagsKHR
-> Int -> BuildAccelerationStructureFlagsKHR -> IO ()
$cpokeElemOff :: Ptr BuildAccelerationStructureFlagsKHR
-> Int -> BuildAccelerationStructureFlagsKHR -> IO ()
peekElemOff :: Ptr BuildAccelerationStructureFlagsKHR
-> Int -> IO BuildAccelerationStructureFlagsKHR
$cpeekElemOff :: Ptr BuildAccelerationStructureFlagsKHR
-> Int -> IO BuildAccelerationStructureFlagsKHR
alignment :: BuildAccelerationStructureFlagsKHR -> Int
$calignment :: BuildAccelerationStructureFlagsKHR -> Int
sizeOf :: BuildAccelerationStructureFlagsKHR -> Int
$csizeOf :: BuildAccelerationStructureFlagsKHR -> Int
Storable, BuildAccelerationStructureFlagsKHR
BuildAccelerationStructureFlagsKHR
-> Zero BuildAccelerationStructureFlagsKHR
forall a. a -> Zero a
zero :: BuildAccelerationStructureFlagsKHR
$czero :: BuildAccelerationStructureFlagsKHR
Zero, Eq BuildAccelerationStructureFlagsKHR
BuildAccelerationStructureFlagsKHR
Eq BuildAccelerationStructureFlagsKHR =>
(BuildAccelerationStructureFlagsKHR
-> BuildAccelerationStructureFlagsKHR
-> BuildAccelerationStructureFlagsKHR)
-> (BuildAccelerationStructureFlagsKHR
-> BuildAccelerationStructureFlagsKHR
-> BuildAccelerationStructureFlagsKHR)
-> (BuildAccelerationStructureFlagsKHR
-> BuildAccelerationStructureFlagsKHR
-> BuildAccelerationStructureFlagsKHR)
-> (BuildAccelerationStructureFlagsKHR
-> BuildAccelerationStructureFlagsKHR)
-> (BuildAccelerationStructureFlagsKHR
-> Int -> BuildAccelerationStructureFlagsKHR)
-> (BuildAccelerationStructureFlagsKHR
-> Int -> BuildAccelerationStructureFlagsKHR)
-> BuildAccelerationStructureFlagsKHR
-> (Int -> BuildAccelerationStructureFlagsKHR)
-> (BuildAccelerationStructureFlagsKHR
-> Int -> BuildAccelerationStructureFlagsKHR)
-> (BuildAccelerationStructureFlagsKHR
-> Int -> BuildAccelerationStructureFlagsKHR)
-> (BuildAccelerationStructureFlagsKHR
-> Int -> BuildAccelerationStructureFlagsKHR)
-> (BuildAccelerationStructureFlagsKHR -> Int -> Bool)
-> (BuildAccelerationStructureFlagsKHR -> Maybe Int)
-> (BuildAccelerationStructureFlagsKHR -> Int)
-> (BuildAccelerationStructureFlagsKHR -> Bool)
-> (BuildAccelerationStructureFlagsKHR
-> Int -> BuildAccelerationStructureFlagsKHR)
-> (BuildAccelerationStructureFlagsKHR
-> Int -> BuildAccelerationStructureFlagsKHR)
-> (BuildAccelerationStructureFlagsKHR
-> Int -> BuildAccelerationStructureFlagsKHR)
-> (BuildAccelerationStructureFlagsKHR
-> Int -> BuildAccelerationStructureFlagsKHR)
-> (BuildAccelerationStructureFlagsKHR
-> Int -> BuildAccelerationStructureFlagsKHR)
-> (BuildAccelerationStructureFlagsKHR
-> Int -> BuildAccelerationStructureFlagsKHR)
-> (BuildAccelerationStructureFlagsKHR -> Int)
-> Bits BuildAccelerationStructureFlagsKHR
Int -> BuildAccelerationStructureFlagsKHR
BuildAccelerationStructureFlagsKHR -> Bool
BuildAccelerationStructureFlagsKHR -> Int
BuildAccelerationStructureFlagsKHR -> Maybe Int
BuildAccelerationStructureFlagsKHR
-> BuildAccelerationStructureFlagsKHR
BuildAccelerationStructureFlagsKHR -> Int -> Bool
BuildAccelerationStructureFlagsKHR
-> Int -> BuildAccelerationStructureFlagsKHR
BuildAccelerationStructureFlagsKHR
-> BuildAccelerationStructureFlagsKHR
-> BuildAccelerationStructureFlagsKHR
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 :: BuildAccelerationStructureFlagsKHR -> Int
$cpopCount :: BuildAccelerationStructureFlagsKHR -> Int
rotateR :: BuildAccelerationStructureFlagsKHR
-> Int -> BuildAccelerationStructureFlagsKHR
$crotateR :: BuildAccelerationStructureFlagsKHR
-> Int -> BuildAccelerationStructureFlagsKHR
rotateL :: BuildAccelerationStructureFlagsKHR
-> Int -> BuildAccelerationStructureFlagsKHR
$crotateL :: BuildAccelerationStructureFlagsKHR
-> Int -> BuildAccelerationStructureFlagsKHR
unsafeShiftR :: BuildAccelerationStructureFlagsKHR
-> Int -> BuildAccelerationStructureFlagsKHR
$cunsafeShiftR :: BuildAccelerationStructureFlagsKHR
-> Int -> BuildAccelerationStructureFlagsKHR
shiftR :: BuildAccelerationStructureFlagsKHR
-> Int -> BuildAccelerationStructureFlagsKHR
$cshiftR :: BuildAccelerationStructureFlagsKHR
-> Int -> BuildAccelerationStructureFlagsKHR
unsafeShiftL :: BuildAccelerationStructureFlagsKHR
-> Int -> BuildAccelerationStructureFlagsKHR
$cunsafeShiftL :: BuildAccelerationStructureFlagsKHR
-> Int -> BuildAccelerationStructureFlagsKHR
shiftL :: BuildAccelerationStructureFlagsKHR
-> Int -> BuildAccelerationStructureFlagsKHR
$cshiftL :: BuildAccelerationStructureFlagsKHR
-> Int -> BuildAccelerationStructureFlagsKHR
isSigned :: BuildAccelerationStructureFlagsKHR -> Bool
$cisSigned :: BuildAccelerationStructureFlagsKHR -> Bool
bitSize :: BuildAccelerationStructureFlagsKHR -> Int
$cbitSize :: BuildAccelerationStructureFlagsKHR -> Int
bitSizeMaybe :: BuildAccelerationStructureFlagsKHR -> Maybe Int
$cbitSizeMaybe :: BuildAccelerationStructureFlagsKHR -> Maybe Int
testBit :: BuildAccelerationStructureFlagsKHR -> Int -> Bool
$ctestBit :: BuildAccelerationStructureFlagsKHR -> Int -> Bool
complementBit :: BuildAccelerationStructureFlagsKHR
-> Int -> BuildAccelerationStructureFlagsKHR
$ccomplementBit :: BuildAccelerationStructureFlagsKHR
-> Int -> BuildAccelerationStructureFlagsKHR
clearBit :: BuildAccelerationStructureFlagsKHR
-> Int -> BuildAccelerationStructureFlagsKHR
$cclearBit :: BuildAccelerationStructureFlagsKHR
-> Int -> BuildAccelerationStructureFlagsKHR
setBit :: BuildAccelerationStructureFlagsKHR
-> Int -> BuildAccelerationStructureFlagsKHR
$csetBit :: BuildAccelerationStructureFlagsKHR
-> Int -> BuildAccelerationStructureFlagsKHR
bit :: Int -> BuildAccelerationStructureFlagsKHR
$cbit :: Int -> BuildAccelerationStructureFlagsKHR
zeroBits :: BuildAccelerationStructureFlagsKHR
$czeroBits :: BuildAccelerationStructureFlagsKHR
rotate :: BuildAccelerationStructureFlagsKHR
-> Int -> BuildAccelerationStructureFlagsKHR
$crotate :: BuildAccelerationStructureFlagsKHR
-> Int -> BuildAccelerationStructureFlagsKHR
shift :: BuildAccelerationStructureFlagsKHR
-> Int -> BuildAccelerationStructureFlagsKHR
$cshift :: BuildAccelerationStructureFlagsKHR
-> Int -> BuildAccelerationStructureFlagsKHR
complement :: BuildAccelerationStructureFlagsKHR
-> BuildAccelerationStructureFlagsKHR
$ccomplement :: BuildAccelerationStructureFlagsKHR
-> BuildAccelerationStructureFlagsKHR
xor :: BuildAccelerationStructureFlagsKHR
-> BuildAccelerationStructureFlagsKHR
-> BuildAccelerationStructureFlagsKHR
$cxor :: BuildAccelerationStructureFlagsKHR
-> BuildAccelerationStructureFlagsKHR
-> BuildAccelerationStructureFlagsKHR
.|. :: BuildAccelerationStructureFlagsKHR
-> BuildAccelerationStructureFlagsKHR
-> BuildAccelerationStructureFlagsKHR
$c.|. :: BuildAccelerationStructureFlagsKHR
-> BuildAccelerationStructureFlagsKHR
-> BuildAccelerationStructureFlagsKHR
.&. :: BuildAccelerationStructureFlagsKHR
-> BuildAccelerationStructureFlagsKHR
-> BuildAccelerationStructureFlagsKHR
$c.&. :: BuildAccelerationStructureFlagsKHR
-> BuildAccelerationStructureFlagsKHR
-> BuildAccelerationStructureFlagsKHR
$cp1Bits :: Eq BuildAccelerationStructureFlagsKHR
Bits)
pattern $bBUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_KHR :: BuildAccelerationStructureFlagsKHR
$mBUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_KHR :: forall r.
BuildAccelerationStructureFlagsKHR
-> (Void# -> r) -> (Void# -> r) -> r
BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_KHR = BuildAccelerationStructureFlagBitsKHR 0x00000001
pattern $bBUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_KHR :: BuildAccelerationStructureFlagsKHR
$mBUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_KHR :: forall r.
BuildAccelerationStructureFlagsKHR
-> (Void# -> r) -> (Void# -> r) -> r
BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_KHR = BuildAccelerationStructureFlagBitsKHR 0x00000002
pattern $bBUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_KHR :: BuildAccelerationStructureFlagsKHR
$mBUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_KHR :: forall r.
BuildAccelerationStructureFlagsKHR
-> (Void# -> r) -> (Void# -> r) -> r
BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_KHR = BuildAccelerationStructureFlagBitsKHR 0x00000004
pattern $bBUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_KHR :: BuildAccelerationStructureFlagsKHR
$mBUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_KHR :: forall r.
BuildAccelerationStructureFlagsKHR
-> (Void# -> r) -> (Void# -> r) -> r
BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_KHR = BuildAccelerationStructureFlagBitsKHR 0x00000008
pattern $bBUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_KHR :: BuildAccelerationStructureFlagsKHR
$mBUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_KHR :: forall r.
BuildAccelerationStructureFlagsKHR
-> (Void# -> r) -> (Void# -> r) -> r
BUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_KHR = BuildAccelerationStructureFlagBitsKHR 0x00000010
type BuildAccelerationStructureFlagsKHR = BuildAccelerationStructureFlagBitsKHR
instance Show BuildAccelerationStructureFlagBitsKHR where
showsPrec :: Int -> BuildAccelerationStructureFlagsKHR -> ShowS
showsPrec p :: Int
p = \case
BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_KHR -> String -> ShowS
showString "BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_KHR"
BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_KHR -> String -> ShowS
showString "BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_KHR"
BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_KHR -> String -> ShowS
showString "BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_KHR"
BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_KHR -> String -> ShowS
showString "BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_KHR"
BUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_KHR -> String -> ShowS
showString "BUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_KHR"
BuildAccelerationStructureFlagBitsKHR x :: "bindInfoCount" ::: Word32
x -> Bool -> ShowS -> ShowS
showParen (Int
p Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
>= 11) (String -> ShowS
showString "BuildAccelerationStructureFlagBitsKHR 0x" ShowS -> ShowS -> ShowS
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ("bindInfoCount" ::: Word32) -> ShowS
forall a. (Integral a, Show a) => a -> ShowS
showHex "bindInfoCount" ::: Word32
x)
instance Read BuildAccelerationStructureFlagBitsKHR where
readPrec :: ReadPrec BuildAccelerationStructureFlagsKHR
readPrec = ReadPrec BuildAccelerationStructureFlagsKHR
-> ReadPrec BuildAccelerationStructureFlagsKHR
forall a. ReadPrec a -> ReadPrec a
parens ([(String, ReadPrec BuildAccelerationStructureFlagsKHR)]
-> ReadPrec BuildAccelerationStructureFlagsKHR
forall a. [(String, ReadPrec a)] -> ReadPrec a
choose [("BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_KHR", BuildAccelerationStructureFlagsKHR
-> ReadPrec BuildAccelerationStructureFlagsKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure BuildAccelerationStructureFlagsKHR
BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_KHR)
, ("BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_KHR", BuildAccelerationStructureFlagsKHR
-> ReadPrec BuildAccelerationStructureFlagsKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure BuildAccelerationStructureFlagsKHR
BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_KHR)
, ("BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_KHR", BuildAccelerationStructureFlagsKHR
-> ReadPrec BuildAccelerationStructureFlagsKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure BuildAccelerationStructureFlagsKHR
BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_KHR)
, ("BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_KHR", BuildAccelerationStructureFlagsKHR
-> ReadPrec BuildAccelerationStructureFlagsKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure BuildAccelerationStructureFlagsKHR
BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_KHR)
, ("BUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_KHR", BuildAccelerationStructureFlagsKHR
-> ReadPrec BuildAccelerationStructureFlagsKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure BuildAccelerationStructureFlagsKHR
BUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_KHR)]
ReadPrec BuildAccelerationStructureFlagsKHR
-> ReadPrec BuildAccelerationStructureFlagsKHR
-> ReadPrec BuildAccelerationStructureFlagsKHR
forall a. ReadPrec a -> ReadPrec a -> ReadPrec a
+++
Int
-> ReadPrec BuildAccelerationStructureFlagsKHR
-> ReadPrec BuildAccelerationStructureFlagsKHR
forall a. Int -> ReadPrec a -> ReadPrec a
prec 10 (do
Lexeme -> ReadPrec ()
expectP (String -> Lexeme
Ident "BuildAccelerationStructureFlagBitsKHR")
"bindInfoCount" ::: Word32
v <- ReadPrec ("bindInfoCount" ::: Word32)
-> ReadPrec ("bindInfoCount" ::: Word32)
forall a. ReadPrec a -> ReadPrec a
step ReadPrec ("bindInfoCount" ::: Word32)
forall a. Read a => ReadPrec a
readPrec
BuildAccelerationStructureFlagsKHR
-> ReadPrec BuildAccelerationStructureFlagsKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure (("bindInfoCount" ::: Word32) -> BuildAccelerationStructureFlagsKHR
BuildAccelerationStructureFlagBitsKHR "bindInfoCount" ::: Word32
v)))
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
$cp1Ord :: Eq CopyAccelerationStructureModeKHR
Ord, Ptr b -> Int -> IO CopyAccelerationStructureModeKHR
Ptr b -> Int -> CopyAccelerationStructureModeKHR -> IO ()
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 :: Ptr b -> Int -> CopyAccelerationStructureModeKHR -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> CopyAccelerationStructureModeKHR -> IO ()
peekByteOff :: 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 #-}
instance Show CopyAccelerationStructureModeKHR where
showsPrec :: Int -> CopyAccelerationStructureModeKHR -> ShowS
showsPrec p :: Int
p = \case
COPY_ACCELERATION_STRUCTURE_MODE_CLONE_KHR -> String -> ShowS
showString "COPY_ACCELERATION_STRUCTURE_MODE_CLONE_KHR"
COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_KHR -> String -> ShowS
showString "COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_KHR"
COPY_ACCELERATION_STRUCTURE_MODE_SERIALIZE_KHR -> String -> ShowS
showString "COPY_ACCELERATION_STRUCTURE_MODE_SERIALIZE_KHR"
COPY_ACCELERATION_STRUCTURE_MODE_DESERIALIZE_KHR -> String -> ShowS
showString "COPY_ACCELERATION_STRUCTURE_MODE_DESERIALIZE_KHR"
CopyAccelerationStructureModeKHR x :: Int32
x -> Bool -> ShowS -> ShowS
showParen (Int
p Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
>= 11) (String -> ShowS
showString "CopyAccelerationStructureModeKHR " ShowS -> ShowS -> ShowS
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Int -> Int32 -> ShowS
forall a. Show a => Int -> a -> ShowS
showsPrec 11 Int32
x)
instance Read CopyAccelerationStructureModeKHR where
readPrec :: ReadPrec CopyAccelerationStructureModeKHR
readPrec = ReadPrec CopyAccelerationStructureModeKHR
-> ReadPrec CopyAccelerationStructureModeKHR
forall a. ReadPrec a -> ReadPrec a
parens ([(String, ReadPrec CopyAccelerationStructureModeKHR)]
-> ReadPrec CopyAccelerationStructureModeKHR
forall a. [(String, ReadPrec a)] -> ReadPrec a
choose [("COPY_ACCELERATION_STRUCTURE_MODE_CLONE_KHR", CopyAccelerationStructureModeKHR
-> ReadPrec CopyAccelerationStructureModeKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure CopyAccelerationStructureModeKHR
COPY_ACCELERATION_STRUCTURE_MODE_CLONE_KHR)
, ("COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_KHR", CopyAccelerationStructureModeKHR
-> ReadPrec CopyAccelerationStructureModeKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure CopyAccelerationStructureModeKHR
COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_KHR)
, ("COPY_ACCELERATION_STRUCTURE_MODE_SERIALIZE_KHR", CopyAccelerationStructureModeKHR
-> ReadPrec CopyAccelerationStructureModeKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure CopyAccelerationStructureModeKHR
COPY_ACCELERATION_STRUCTURE_MODE_SERIALIZE_KHR)
, ("COPY_ACCELERATION_STRUCTURE_MODE_DESERIALIZE_KHR", CopyAccelerationStructureModeKHR
-> ReadPrec CopyAccelerationStructureModeKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure CopyAccelerationStructureModeKHR
COPY_ACCELERATION_STRUCTURE_MODE_DESERIALIZE_KHR)]
ReadPrec CopyAccelerationStructureModeKHR
-> ReadPrec CopyAccelerationStructureModeKHR
-> ReadPrec CopyAccelerationStructureModeKHR
forall a. ReadPrec a -> ReadPrec a -> ReadPrec a
+++
Int
-> ReadPrec CopyAccelerationStructureModeKHR
-> ReadPrec CopyAccelerationStructureModeKHR
forall a. Int -> ReadPrec a -> ReadPrec a
prec 10 (do
Lexeme -> ReadPrec ()
expectP (String -> Lexeme
Ident "CopyAccelerationStructureModeKHR")
Int32
v <- ReadPrec Int32 -> ReadPrec Int32
forall a. ReadPrec a -> ReadPrec a
step ReadPrec Int32
forall a. Read a => ReadPrec a
readPrec
CopyAccelerationStructureModeKHR
-> ReadPrec CopyAccelerationStructureModeKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Int32 -> CopyAccelerationStructureModeKHR
CopyAccelerationStructureModeKHR Int32
v)))
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
$cp1Ord :: Eq AccelerationStructureTypeKHR
Ord, Ptr b -> Int -> IO AccelerationStructureTypeKHR
Ptr b -> Int -> AccelerationStructureTypeKHR -> IO ()
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 :: Ptr b -> Int -> AccelerationStructureTypeKHR -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> AccelerationStructureTypeKHR -> IO ()
peekByteOff :: 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
{-# complete ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_KHR,
ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_KHR :: AccelerationStructureTypeKHR #-}
instance Show AccelerationStructureTypeKHR where
showsPrec :: Int -> AccelerationStructureTypeKHR -> ShowS
showsPrec p :: Int
p = \case
ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_KHR -> String -> ShowS
showString "ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_KHR"
ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_KHR -> String -> ShowS
showString "ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_KHR"
AccelerationStructureTypeKHR x :: Int32
x -> Bool -> ShowS -> ShowS
showParen (Int
p Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
>= 11) (String -> ShowS
showString "AccelerationStructureTypeKHR " ShowS -> ShowS -> ShowS
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Int -> Int32 -> ShowS
forall a. Show a => Int -> a -> ShowS
showsPrec 11 Int32
x)
instance Read AccelerationStructureTypeKHR where
readPrec :: ReadPrec AccelerationStructureTypeKHR
readPrec = ReadPrec AccelerationStructureTypeKHR
-> ReadPrec AccelerationStructureTypeKHR
forall a. ReadPrec a -> ReadPrec a
parens ([(String, ReadPrec AccelerationStructureTypeKHR)]
-> ReadPrec AccelerationStructureTypeKHR
forall a. [(String, ReadPrec a)] -> ReadPrec a
choose [("ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_KHR", AccelerationStructureTypeKHR
-> ReadPrec AccelerationStructureTypeKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure AccelerationStructureTypeKHR
ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_KHR)
, ("ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_KHR", AccelerationStructureTypeKHR
-> ReadPrec AccelerationStructureTypeKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure AccelerationStructureTypeKHR
ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_KHR)]
ReadPrec AccelerationStructureTypeKHR
-> ReadPrec AccelerationStructureTypeKHR
-> ReadPrec AccelerationStructureTypeKHR
forall a. ReadPrec a -> ReadPrec a -> ReadPrec a
+++
Int
-> ReadPrec AccelerationStructureTypeKHR
-> ReadPrec AccelerationStructureTypeKHR
forall a. Int -> ReadPrec a -> ReadPrec a
prec 10 (do
Lexeme -> ReadPrec ()
expectP (String -> Lexeme
Ident "AccelerationStructureTypeKHR")
Int32
v <- ReadPrec Int32 -> ReadPrec Int32
forall a. ReadPrec a -> ReadPrec a
step ReadPrec Int32
forall a. Read a => ReadPrec a
readPrec
AccelerationStructureTypeKHR
-> ReadPrec AccelerationStructureTypeKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Int32 -> AccelerationStructureTypeKHR
AccelerationStructureTypeKHR Int32
v)))
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
$cp1Ord :: Eq GeometryTypeKHR
Ord, Ptr b -> Int -> IO GeometryTypeKHR
Ptr b -> Int -> GeometryTypeKHR -> IO ()
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 :: Ptr b -> Int -> GeometryTypeKHR -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> GeometryTypeKHR -> IO ()
peekByteOff :: 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 1000150000
{-# complete GEOMETRY_TYPE_TRIANGLES_KHR,
GEOMETRY_TYPE_AABBS_KHR,
GEOMETRY_TYPE_INSTANCES_KHR :: GeometryTypeKHR #-}
instance Show GeometryTypeKHR where
showsPrec :: Int -> GeometryTypeKHR -> ShowS
showsPrec p :: Int
p = \case
GEOMETRY_TYPE_TRIANGLES_KHR -> String -> ShowS
showString "GEOMETRY_TYPE_TRIANGLES_KHR"
GEOMETRY_TYPE_AABBS_KHR -> String -> ShowS
showString "GEOMETRY_TYPE_AABBS_KHR"
GEOMETRY_TYPE_INSTANCES_KHR -> String -> ShowS
showString "GEOMETRY_TYPE_INSTANCES_KHR"
GeometryTypeKHR x :: Int32
x -> Bool -> ShowS -> ShowS
showParen (Int
p Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
>= 11) (String -> ShowS
showString "GeometryTypeKHR " ShowS -> ShowS -> ShowS
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Int -> Int32 -> ShowS
forall a. Show a => Int -> a -> ShowS
showsPrec 11 Int32
x)
instance Read GeometryTypeKHR where
readPrec :: ReadPrec GeometryTypeKHR
readPrec = ReadPrec GeometryTypeKHR -> ReadPrec GeometryTypeKHR
forall a. ReadPrec a -> ReadPrec a
parens ([(String, ReadPrec GeometryTypeKHR)] -> ReadPrec GeometryTypeKHR
forall a. [(String, ReadPrec a)] -> ReadPrec a
choose [("GEOMETRY_TYPE_TRIANGLES_KHR", GeometryTypeKHR -> ReadPrec GeometryTypeKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure GeometryTypeKHR
GEOMETRY_TYPE_TRIANGLES_KHR)
, ("GEOMETRY_TYPE_AABBS_KHR", GeometryTypeKHR -> ReadPrec GeometryTypeKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure GeometryTypeKHR
GEOMETRY_TYPE_AABBS_KHR)
, ("GEOMETRY_TYPE_INSTANCES_KHR", GeometryTypeKHR -> ReadPrec GeometryTypeKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure GeometryTypeKHR
GEOMETRY_TYPE_INSTANCES_KHR)]
ReadPrec GeometryTypeKHR
-> ReadPrec GeometryTypeKHR -> ReadPrec GeometryTypeKHR
forall a. ReadPrec a -> ReadPrec a -> ReadPrec a
+++
Int -> ReadPrec GeometryTypeKHR -> ReadPrec GeometryTypeKHR
forall a. Int -> ReadPrec a -> ReadPrec a
prec 10 (do
Lexeme -> ReadPrec ()
expectP (String -> Lexeme
Ident "GeometryTypeKHR")
Int32
v <- ReadPrec Int32 -> ReadPrec Int32
forall a. ReadPrec a -> ReadPrec a
step ReadPrec Int32
forall a. Read a => ReadPrec a
readPrec
GeometryTypeKHR -> ReadPrec GeometryTypeKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Int32 -> GeometryTypeKHR
GeometryTypeKHR Int32
v)))
newtype AccelerationStructureMemoryRequirementsTypeKHR = AccelerationStructureMemoryRequirementsTypeKHR Int32
deriving newtype (AccelerationStructureMemoryRequirementsTypeKHR
-> AccelerationStructureMemoryRequirementsTypeKHR -> Bool
(AccelerationStructureMemoryRequirementsTypeKHR
-> AccelerationStructureMemoryRequirementsTypeKHR -> Bool)
-> (AccelerationStructureMemoryRequirementsTypeKHR
-> AccelerationStructureMemoryRequirementsTypeKHR -> Bool)
-> Eq AccelerationStructureMemoryRequirementsTypeKHR
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AccelerationStructureMemoryRequirementsTypeKHR
-> AccelerationStructureMemoryRequirementsTypeKHR -> Bool
$c/= :: AccelerationStructureMemoryRequirementsTypeKHR
-> AccelerationStructureMemoryRequirementsTypeKHR -> Bool
== :: AccelerationStructureMemoryRequirementsTypeKHR
-> AccelerationStructureMemoryRequirementsTypeKHR -> Bool
$c== :: AccelerationStructureMemoryRequirementsTypeKHR
-> AccelerationStructureMemoryRequirementsTypeKHR -> Bool
Eq, Eq AccelerationStructureMemoryRequirementsTypeKHR
Eq AccelerationStructureMemoryRequirementsTypeKHR =>
(AccelerationStructureMemoryRequirementsTypeKHR
-> AccelerationStructureMemoryRequirementsTypeKHR -> Ordering)
-> (AccelerationStructureMemoryRequirementsTypeKHR
-> AccelerationStructureMemoryRequirementsTypeKHR -> Bool)
-> (AccelerationStructureMemoryRequirementsTypeKHR
-> AccelerationStructureMemoryRequirementsTypeKHR -> Bool)
-> (AccelerationStructureMemoryRequirementsTypeKHR
-> AccelerationStructureMemoryRequirementsTypeKHR -> Bool)
-> (AccelerationStructureMemoryRequirementsTypeKHR
-> AccelerationStructureMemoryRequirementsTypeKHR -> Bool)
-> (AccelerationStructureMemoryRequirementsTypeKHR
-> AccelerationStructureMemoryRequirementsTypeKHR
-> AccelerationStructureMemoryRequirementsTypeKHR)
-> (AccelerationStructureMemoryRequirementsTypeKHR
-> AccelerationStructureMemoryRequirementsTypeKHR
-> AccelerationStructureMemoryRequirementsTypeKHR)
-> Ord AccelerationStructureMemoryRequirementsTypeKHR
AccelerationStructureMemoryRequirementsTypeKHR
-> AccelerationStructureMemoryRequirementsTypeKHR -> Bool
AccelerationStructureMemoryRequirementsTypeKHR
-> AccelerationStructureMemoryRequirementsTypeKHR -> Ordering
AccelerationStructureMemoryRequirementsTypeKHR
-> AccelerationStructureMemoryRequirementsTypeKHR
-> AccelerationStructureMemoryRequirementsTypeKHR
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 :: AccelerationStructureMemoryRequirementsTypeKHR
-> AccelerationStructureMemoryRequirementsTypeKHR
-> AccelerationStructureMemoryRequirementsTypeKHR
$cmin :: AccelerationStructureMemoryRequirementsTypeKHR
-> AccelerationStructureMemoryRequirementsTypeKHR
-> AccelerationStructureMemoryRequirementsTypeKHR
max :: AccelerationStructureMemoryRequirementsTypeKHR
-> AccelerationStructureMemoryRequirementsTypeKHR
-> AccelerationStructureMemoryRequirementsTypeKHR
$cmax :: AccelerationStructureMemoryRequirementsTypeKHR
-> AccelerationStructureMemoryRequirementsTypeKHR
-> AccelerationStructureMemoryRequirementsTypeKHR
>= :: AccelerationStructureMemoryRequirementsTypeKHR
-> AccelerationStructureMemoryRequirementsTypeKHR -> Bool
$c>= :: AccelerationStructureMemoryRequirementsTypeKHR
-> AccelerationStructureMemoryRequirementsTypeKHR -> Bool
> :: AccelerationStructureMemoryRequirementsTypeKHR
-> AccelerationStructureMemoryRequirementsTypeKHR -> Bool
$c> :: AccelerationStructureMemoryRequirementsTypeKHR
-> AccelerationStructureMemoryRequirementsTypeKHR -> Bool
<= :: AccelerationStructureMemoryRequirementsTypeKHR
-> AccelerationStructureMemoryRequirementsTypeKHR -> Bool
$c<= :: AccelerationStructureMemoryRequirementsTypeKHR
-> AccelerationStructureMemoryRequirementsTypeKHR -> Bool
< :: AccelerationStructureMemoryRequirementsTypeKHR
-> AccelerationStructureMemoryRequirementsTypeKHR -> Bool
$c< :: AccelerationStructureMemoryRequirementsTypeKHR
-> AccelerationStructureMemoryRequirementsTypeKHR -> Bool
compare :: AccelerationStructureMemoryRequirementsTypeKHR
-> AccelerationStructureMemoryRequirementsTypeKHR -> Ordering
$ccompare :: AccelerationStructureMemoryRequirementsTypeKHR
-> AccelerationStructureMemoryRequirementsTypeKHR -> Ordering
$cp1Ord :: Eq AccelerationStructureMemoryRequirementsTypeKHR
Ord, Ptr b -> Int -> IO AccelerationStructureMemoryRequirementsTypeKHR
Ptr b
-> Int -> AccelerationStructureMemoryRequirementsTypeKHR -> IO ()
Ptr AccelerationStructureMemoryRequirementsTypeKHR
-> IO AccelerationStructureMemoryRequirementsTypeKHR
Ptr AccelerationStructureMemoryRequirementsTypeKHR
-> Int -> IO AccelerationStructureMemoryRequirementsTypeKHR
Ptr AccelerationStructureMemoryRequirementsTypeKHR
-> Int -> AccelerationStructureMemoryRequirementsTypeKHR -> IO ()
Ptr AccelerationStructureMemoryRequirementsTypeKHR
-> AccelerationStructureMemoryRequirementsTypeKHR -> IO ()
AccelerationStructureMemoryRequirementsTypeKHR -> Int
(AccelerationStructureMemoryRequirementsTypeKHR -> Int)
-> (AccelerationStructureMemoryRequirementsTypeKHR -> Int)
-> (Ptr AccelerationStructureMemoryRequirementsTypeKHR
-> Int -> IO AccelerationStructureMemoryRequirementsTypeKHR)
-> (Ptr AccelerationStructureMemoryRequirementsTypeKHR
-> Int -> AccelerationStructureMemoryRequirementsTypeKHR -> IO ())
-> (forall b.
Ptr b -> Int -> IO AccelerationStructureMemoryRequirementsTypeKHR)
-> (forall b.
Ptr b
-> Int -> AccelerationStructureMemoryRequirementsTypeKHR -> IO ())
-> (Ptr AccelerationStructureMemoryRequirementsTypeKHR
-> IO AccelerationStructureMemoryRequirementsTypeKHR)
-> (Ptr AccelerationStructureMemoryRequirementsTypeKHR
-> AccelerationStructureMemoryRequirementsTypeKHR -> IO ())
-> Storable AccelerationStructureMemoryRequirementsTypeKHR
forall b.
Ptr b -> Int -> IO AccelerationStructureMemoryRequirementsTypeKHR
forall b.
Ptr b
-> Int -> AccelerationStructureMemoryRequirementsTypeKHR -> 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 AccelerationStructureMemoryRequirementsTypeKHR
-> AccelerationStructureMemoryRequirementsTypeKHR -> IO ()
$cpoke :: Ptr AccelerationStructureMemoryRequirementsTypeKHR
-> AccelerationStructureMemoryRequirementsTypeKHR -> IO ()
peek :: Ptr AccelerationStructureMemoryRequirementsTypeKHR
-> IO AccelerationStructureMemoryRequirementsTypeKHR
$cpeek :: Ptr AccelerationStructureMemoryRequirementsTypeKHR
-> IO AccelerationStructureMemoryRequirementsTypeKHR
pokeByteOff :: Ptr b
-> Int -> AccelerationStructureMemoryRequirementsTypeKHR -> IO ()
$cpokeByteOff :: forall b.
Ptr b
-> Int -> AccelerationStructureMemoryRequirementsTypeKHR -> IO ()
peekByteOff :: Ptr b -> Int -> IO AccelerationStructureMemoryRequirementsTypeKHR
$cpeekByteOff :: forall b.
Ptr b -> Int -> IO AccelerationStructureMemoryRequirementsTypeKHR
pokeElemOff :: Ptr AccelerationStructureMemoryRequirementsTypeKHR
-> Int -> AccelerationStructureMemoryRequirementsTypeKHR -> IO ()
$cpokeElemOff :: Ptr AccelerationStructureMemoryRequirementsTypeKHR
-> Int -> AccelerationStructureMemoryRequirementsTypeKHR -> IO ()
peekElemOff :: Ptr AccelerationStructureMemoryRequirementsTypeKHR
-> Int -> IO AccelerationStructureMemoryRequirementsTypeKHR
$cpeekElemOff :: Ptr AccelerationStructureMemoryRequirementsTypeKHR
-> Int -> IO AccelerationStructureMemoryRequirementsTypeKHR
alignment :: AccelerationStructureMemoryRequirementsTypeKHR -> Int
$calignment :: AccelerationStructureMemoryRequirementsTypeKHR -> Int
sizeOf :: AccelerationStructureMemoryRequirementsTypeKHR -> Int
$csizeOf :: AccelerationStructureMemoryRequirementsTypeKHR -> Int
Storable, AccelerationStructureMemoryRequirementsTypeKHR
AccelerationStructureMemoryRequirementsTypeKHR
-> Zero AccelerationStructureMemoryRequirementsTypeKHR
forall a. a -> Zero a
zero :: AccelerationStructureMemoryRequirementsTypeKHR
$czero :: AccelerationStructureMemoryRequirementsTypeKHR
Zero)
pattern $bACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_OBJECT_KHR :: AccelerationStructureMemoryRequirementsTypeKHR
$mACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_OBJECT_KHR :: forall r.
AccelerationStructureMemoryRequirementsTypeKHR
-> (Void# -> r) -> (Void# -> r) -> r
ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_OBJECT_KHR = AccelerationStructureMemoryRequirementsTypeKHR 0
pattern $bACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_BUILD_SCRATCH_KHR :: AccelerationStructureMemoryRequirementsTypeKHR
$mACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_BUILD_SCRATCH_KHR :: forall r.
AccelerationStructureMemoryRequirementsTypeKHR
-> (Void# -> r) -> (Void# -> r) -> r
ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_BUILD_SCRATCH_KHR = AccelerationStructureMemoryRequirementsTypeKHR 1
pattern $bACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_UPDATE_SCRATCH_KHR :: AccelerationStructureMemoryRequirementsTypeKHR
$mACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_UPDATE_SCRATCH_KHR :: forall r.
AccelerationStructureMemoryRequirementsTypeKHR
-> (Void# -> r) -> (Void# -> r) -> r
ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_UPDATE_SCRATCH_KHR = AccelerationStructureMemoryRequirementsTypeKHR 2
{-# complete ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_OBJECT_KHR,
ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_BUILD_SCRATCH_KHR,
ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_UPDATE_SCRATCH_KHR :: AccelerationStructureMemoryRequirementsTypeKHR #-}
instance Show AccelerationStructureMemoryRequirementsTypeKHR where
showsPrec :: Int -> AccelerationStructureMemoryRequirementsTypeKHR -> ShowS
showsPrec p :: Int
p = \case
ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_OBJECT_KHR -> String -> ShowS
showString "ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_OBJECT_KHR"
ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_BUILD_SCRATCH_KHR -> String -> ShowS
showString "ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_BUILD_SCRATCH_KHR"
ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_UPDATE_SCRATCH_KHR -> String -> ShowS
showString "ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_UPDATE_SCRATCH_KHR"
AccelerationStructureMemoryRequirementsTypeKHR x :: Int32
x -> Bool -> ShowS -> ShowS
showParen (Int
p Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
>= 11) (String -> ShowS
showString "AccelerationStructureMemoryRequirementsTypeKHR " ShowS -> ShowS -> ShowS
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Int -> Int32 -> ShowS
forall a. Show a => Int -> a -> ShowS
showsPrec 11 Int32
x)
instance Read AccelerationStructureMemoryRequirementsTypeKHR where
readPrec :: ReadPrec AccelerationStructureMemoryRequirementsTypeKHR
readPrec = ReadPrec AccelerationStructureMemoryRequirementsTypeKHR
-> ReadPrec AccelerationStructureMemoryRequirementsTypeKHR
forall a. ReadPrec a -> ReadPrec a
parens ([(String, ReadPrec AccelerationStructureMemoryRequirementsTypeKHR)]
-> ReadPrec AccelerationStructureMemoryRequirementsTypeKHR
forall a. [(String, ReadPrec a)] -> ReadPrec a
choose [("ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_OBJECT_KHR", AccelerationStructureMemoryRequirementsTypeKHR
-> ReadPrec AccelerationStructureMemoryRequirementsTypeKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure AccelerationStructureMemoryRequirementsTypeKHR
ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_OBJECT_KHR)
, ("ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_BUILD_SCRATCH_KHR", AccelerationStructureMemoryRequirementsTypeKHR
-> ReadPrec AccelerationStructureMemoryRequirementsTypeKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure AccelerationStructureMemoryRequirementsTypeKHR
ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_BUILD_SCRATCH_KHR)
, ("ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_UPDATE_SCRATCH_KHR", AccelerationStructureMemoryRequirementsTypeKHR
-> ReadPrec AccelerationStructureMemoryRequirementsTypeKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure AccelerationStructureMemoryRequirementsTypeKHR
ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_UPDATE_SCRATCH_KHR)]
ReadPrec AccelerationStructureMemoryRequirementsTypeKHR
-> ReadPrec AccelerationStructureMemoryRequirementsTypeKHR
-> ReadPrec AccelerationStructureMemoryRequirementsTypeKHR
forall a. ReadPrec a -> ReadPrec a -> ReadPrec a
+++
Int
-> ReadPrec AccelerationStructureMemoryRequirementsTypeKHR
-> ReadPrec AccelerationStructureMemoryRequirementsTypeKHR
forall a. Int -> ReadPrec a -> ReadPrec a
prec 10 (do
Lexeme -> ReadPrec ()
expectP (String -> Lexeme
Ident "AccelerationStructureMemoryRequirementsTypeKHR")
Int32
v <- ReadPrec Int32 -> ReadPrec Int32
forall a. ReadPrec a -> ReadPrec a
step ReadPrec Int32
forall a. Read a => ReadPrec a
readPrec
AccelerationStructureMemoryRequirementsTypeKHR
-> ReadPrec AccelerationStructureMemoryRequirementsTypeKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Int32 -> AccelerationStructureMemoryRequirementsTypeKHR
AccelerationStructureMemoryRequirementsTypeKHR Int32
v)))
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
$cp1Ord :: Eq AccelerationStructureBuildTypeKHR
Ord, Ptr b -> Int -> IO AccelerationStructureBuildTypeKHR
Ptr b -> Int -> AccelerationStructureBuildTypeKHR -> IO ()
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 :: Ptr b -> Int -> AccelerationStructureBuildTypeKHR -> IO ()
$cpokeByteOff :: forall b.
Ptr b -> Int -> AccelerationStructureBuildTypeKHR -> IO ()
peekByteOff :: 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 #-}
instance Show AccelerationStructureBuildTypeKHR where
showsPrec :: Int -> AccelerationStructureBuildTypeKHR -> ShowS
showsPrec p :: Int
p = \case
ACCELERATION_STRUCTURE_BUILD_TYPE_HOST_KHR -> String -> ShowS
showString "ACCELERATION_STRUCTURE_BUILD_TYPE_HOST_KHR"
ACCELERATION_STRUCTURE_BUILD_TYPE_DEVICE_KHR -> String -> ShowS
showString "ACCELERATION_STRUCTURE_BUILD_TYPE_DEVICE_KHR"
ACCELERATION_STRUCTURE_BUILD_TYPE_HOST_OR_DEVICE_KHR -> String -> ShowS
showString "ACCELERATION_STRUCTURE_BUILD_TYPE_HOST_OR_DEVICE_KHR"
AccelerationStructureBuildTypeKHR x :: Int32
x -> Bool -> ShowS -> ShowS
showParen (Int
p Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
>= 11) (String -> ShowS
showString "AccelerationStructureBuildTypeKHR " ShowS -> ShowS -> ShowS
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Int -> Int32 -> ShowS
forall a. Show a => Int -> a -> ShowS
showsPrec 11 Int32
x)
instance Read AccelerationStructureBuildTypeKHR where
readPrec :: ReadPrec AccelerationStructureBuildTypeKHR
readPrec = ReadPrec AccelerationStructureBuildTypeKHR
-> ReadPrec AccelerationStructureBuildTypeKHR
forall a. ReadPrec a -> ReadPrec a
parens ([(String, ReadPrec AccelerationStructureBuildTypeKHR)]
-> ReadPrec AccelerationStructureBuildTypeKHR
forall a. [(String, ReadPrec a)] -> ReadPrec a
choose [("ACCELERATION_STRUCTURE_BUILD_TYPE_HOST_KHR", AccelerationStructureBuildTypeKHR
-> ReadPrec AccelerationStructureBuildTypeKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure AccelerationStructureBuildTypeKHR
ACCELERATION_STRUCTURE_BUILD_TYPE_HOST_KHR)
, ("ACCELERATION_STRUCTURE_BUILD_TYPE_DEVICE_KHR", AccelerationStructureBuildTypeKHR
-> ReadPrec AccelerationStructureBuildTypeKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure AccelerationStructureBuildTypeKHR
ACCELERATION_STRUCTURE_BUILD_TYPE_DEVICE_KHR)
, ("ACCELERATION_STRUCTURE_BUILD_TYPE_HOST_OR_DEVICE_KHR", AccelerationStructureBuildTypeKHR
-> ReadPrec AccelerationStructureBuildTypeKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure AccelerationStructureBuildTypeKHR
ACCELERATION_STRUCTURE_BUILD_TYPE_HOST_OR_DEVICE_KHR)]
ReadPrec AccelerationStructureBuildTypeKHR
-> ReadPrec AccelerationStructureBuildTypeKHR
-> ReadPrec AccelerationStructureBuildTypeKHR
forall a. ReadPrec a -> ReadPrec a -> ReadPrec a
+++
Int
-> ReadPrec AccelerationStructureBuildTypeKHR
-> ReadPrec AccelerationStructureBuildTypeKHR
forall a. Int -> ReadPrec a -> ReadPrec a
prec 10 (do
Lexeme -> ReadPrec ()
expectP (String -> Lexeme
Ident "AccelerationStructureBuildTypeKHR")
Int32
v <- ReadPrec Int32 -> ReadPrec Int32
forall a. ReadPrec a -> ReadPrec a
step ReadPrec Int32
forall a. Read a => ReadPrec a
readPrec
AccelerationStructureBuildTypeKHR
-> ReadPrec AccelerationStructureBuildTypeKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Int32 -> AccelerationStructureBuildTypeKHR
AccelerationStructureBuildTypeKHR Int32
v)))
newtype RayTracingShaderGroupTypeKHR = RayTracingShaderGroupTypeKHR Int32
deriving newtype (RayTracingShaderGroupTypeKHR
-> RayTracingShaderGroupTypeKHR -> Bool
(RayTracingShaderGroupTypeKHR
-> RayTracingShaderGroupTypeKHR -> Bool)
-> (RayTracingShaderGroupTypeKHR
-> RayTracingShaderGroupTypeKHR -> Bool)
-> Eq RayTracingShaderGroupTypeKHR
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RayTracingShaderGroupTypeKHR
-> RayTracingShaderGroupTypeKHR -> Bool
$c/= :: RayTracingShaderGroupTypeKHR
-> RayTracingShaderGroupTypeKHR -> Bool
== :: RayTracingShaderGroupTypeKHR
-> RayTracingShaderGroupTypeKHR -> Bool
$c== :: RayTracingShaderGroupTypeKHR
-> RayTracingShaderGroupTypeKHR -> Bool
Eq, Eq RayTracingShaderGroupTypeKHR
Eq RayTracingShaderGroupTypeKHR =>
(RayTracingShaderGroupTypeKHR
-> RayTracingShaderGroupTypeKHR -> Ordering)
-> (RayTracingShaderGroupTypeKHR
-> RayTracingShaderGroupTypeKHR -> Bool)
-> (RayTracingShaderGroupTypeKHR
-> RayTracingShaderGroupTypeKHR -> Bool)
-> (RayTracingShaderGroupTypeKHR
-> RayTracingShaderGroupTypeKHR -> Bool)
-> (RayTracingShaderGroupTypeKHR
-> RayTracingShaderGroupTypeKHR -> Bool)
-> (RayTracingShaderGroupTypeKHR
-> RayTracingShaderGroupTypeKHR -> RayTracingShaderGroupTypeKHR)
-> (RayTracingShaderGroupTypeKHR
-> RayTracingShaderGroupTypeKHR -> RayTracingShaderGroupTypeKHR)
-> Ord RayTracingShaderGroupTypeKHR
RayTracingShaderGroupTypeKHR
-> RayTracingShaderGroupTypeKHR -> Bool
RayTracingShaderGroupTypeKHR
-> RayTracingShaderGroupTypeKHR -> Ordering
RayTracingShaderGroupTypeKHR
-> RayTracingShaderGroupTypeKHR -> RayTracingShaderGroupTypeKHR
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 :: RayTracingShaderGroupTypeKHR
-> RayTracingShaderGroupTypeKHR -> RayTracingShaderGroupTypeKHR
$cmin :: RayTracingShaderGroupTypeKHR
-> RayTracingShaderGroupTypeKHR -> RayTracingShaderGroupTypeKHR
max :: RayTracingShaderGroupTypeKHR
-> RayTracingShaderGroupTypeKHR -> RayTracingShaderGroupTypeKHR
$cmax :: RayTracingShaderGroupTypeKHR
-> RayTracingShaderGroupTypeKHR -> RayTracingShaderGroupTypeKHR
>= :: RayTracingShaderGroupTypeKHR
-> RayTracingShaderGroupTypeKHR -> Bool
$c>= :: RayTracingShaderGroupTypeKHR
-> RayTracingShaderGroupTypeKHR -> Bool
> :: RayTracingShaderGroupTypeKHR
-> RayTracingShaderGroupTypeKHR -> Bool
$c> :: RayTracingShaderGroupTypeKHR
-> RayTracingShaderGroupTypeKHR -> Bool
<= :: RayTracingShaderGroupTypeKHR
-> RayTracingShaderGroupTypeKHR -> Bool
$c<= :: RayTracingShaderGroupTypeKHR
-> RayTracingShaderGroupTypeKHR -> Bool
< :: RayTracingShaderGroupTypeKHR
-> RayTracingShaderGroupTypeKHR -> Bool
$c< :: RayTracingShaderGroupTypeKHR
-> RayTracingShaderGroupTypeKHR -> Bool
compare :: RayTracingShaderGroupTypeKHR
-> RayTracingShaderGroupTypeKHR -> Ordering
$ccompare :: RayTracingShaderGroupTypeKHR
-> RayTracingShaderGroupTypeKHR -> Ordering
$cp1Ord :: Eq RayTracingShaderGroupTypeKHR
Ord, Ptr b -> Int -> IO RayTracingShaderGroupTypeKHR
Ptr b -> Int -> RayTracingShaderGroupTypeKHR -> IO ()
Ptr RayTracingShaderGroupTypeKHR -> IO RayTracingShaderGroupTypeKHR
Ptr RayTracingShaderGroupTypeKHR
-> Int -> IO RayTracingShaderGroupTypeKHR
Ptr RayTracingShaderGroupTypeKHR
-> Int -> RayTracingShaderGroupTypeKHR -> IO ()
Ptr RayTracingShaderGroupTypeKHR
-> RayTracingShaderGroupTypeKHR -> IO ()
RayTracingShaderGroupTypeKHR -> Int
(RayTracingShaderGroupTypeKHR -> Int)
-> (RayTracingShaderGroupTypeKHR -> Int)
-> (Ptr RayTracingShaderGroupTypeKHR
-> Int -> IO RayTracingShaderGroupTypeKHR)
-> (Ptr RayTracingShaderGroupTypeKHR
-> Int -> RayTracingShaderGroupTypeKHR -> IO ())
-> (forall b. Ptr b -> Int -> IO RayTracingShaderGroupTypeKHR)
-> (forall b.
Ptr b -> Int -> RayTracingShaderGroupTypeKHR -> IO ())
-> (Ptr RayTracingShaderGroupTypeKHR
-> IO RayTracingShaderGroupTypeKHR)
-> (Ptr RayTracingShaderGroupTypeKHR
-> RayTracingShaderGroupTypeKHR -> IO ())
-> Storable RayTracingShaderGroupTypeKHR
forall b. Ptr b -> Int -> IO RayTracingShaderGroupTypeKHR
forall b. Ptr b -> Int -> RayTracingShaderGroupTypeKHR -> 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 RayTracingShaderGroupTypeKHR
-> RayTracingShaderGroupTypeKHR -> IO ()
$cpoke :: Ptr RayTracingShaderGroupTypeKHR
-> RayTracingShaderGroupTypeKHR -> IO ()
peek :: Ptr RayTracingShaderGroupTypeKHR -> IO RayTracingShaderGroupTypeKHR
$cpeek :: Ptr RayTracingShaderGroupTypeKHR -> IO RayTracingShaderGroupTypeKHR
pokeByteOff :: Ptr b -> Int -> RayTracingShaderGroupTypeKHR -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> RayTracingShaderGroupTypeKHR -> IO ()
peekByteOff :: Ptr b -> Int -> IO RayTracingShaderGroupTypeKHR
$cpeekByteOff :: forall b. Ptr b -> Int -> IO RayTracingShaderGroupTypeKHR
pokeElemOff :: Ptr RayTracingShaderGroupTypeKHR
-> Int -> RayTracingShaderGroupTypeKHR -> IO ()
$cpokeElemOff :: Ptr RayTracingShaderGroupTypeKHR
-> Int -> RayTracingShaderGroupTypeKHR -> IO ()
peekElemOff :: Ptr RayTracingShaderGroupTypeKHR
-> Int -> IO RayTracingShaderGroupTypeKHR
$cpeekElemOff :: Ptr RayTracingShaderGroupTypeKHR
-> Int -> IO RayTracingShaderGroupTypeKHR
alignment :: RayTracingShaderGroupTypeKHR -> Int
$calignment :: RayTracingShaderGroupTypeKHR -> Int
sizeOf :: RayTracingShaderGroupTypeKHR -> Int
$csizeOf :: RayTracingShaderGroupTypeKHR -> Int
Storable, RayTracingShaderGroupTypeKHR
RayTracingShaderGroupTypeKHR -> Zero RayTracingShaderGroupTypeKHR
forall a. a -> Zero a
zero :: RayTracingShaderGroupTypeKHR
$czero :: RayTracingShaderGroupTypeKHR
Zero)
pattern $bRAY_TRACING_SHADER_GROUP_TYPE_GENERAL_KHR :: RayTracingShaderGroupTypeKHR
$mRAY_TRACING_SHADER_GROUP_TYPE_GENERAL_KHR :: forall r.
RayTracingShaderGroupTypeKHR -> (Void# -> r) -> (Void# -> r) -> r
RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_KHR = RayTracingShaderGroupTypeKHR 0
pattern $bRAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR :: RayTracingShaderGroupTypeKHR
$mRAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR :: forall r.
RayTracingShaderGroupTypeKHR -> (Void# -> r) -> (Void# -> r) -> r
RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR = RayTracingShaderGroupTypeKHR 1
pattern $bRAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR :: RayTracingShaderGroupTypeKHR
$mRAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR :: forall r.
RayTracingShaderGroupTypeKHR -> (Void# -> r) -> (Void# -> r) -> r
RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR = RayTracingShaderGroupTypeKHR 2
{-# complete RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_KHR,
RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR,
RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR :: RayTracingShaderGroupTypeKHR #-}
instance Show RayTracingShaderGroupTypeKHR where
showsPrec :: Int -> RayTracingShaderGroupTypeKHR -> ShowS
showsPrec p :: Int
p = \case
RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_KHR -> String -> ShowS
showString "RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_KHR"
RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR -> String -> ShowS
showString "RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR"
RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR -> String -> ShowS
showString "RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR"
RayTracingShaderGroupTypeKHR x :: Int32
x -> Bool -> ShowS -> ShowS
showParen (Int
p Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
>= 11) (String -> ShowS
showString "RayTracingShaderGroupTypeKHR " ShowS -> ShowS -> ShowS
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Int -> Int32 -> ShowS
forall a. Show a => Int -> a -> ShowS
showsPrec 11 Int32
x)
instance Read RayTracingShaderGroupTypeKHR where
readPrec :: ReadPrec RayTracingShaderGroupTypeKHR
readPrec = ReadPrec RayTracingShaderGroupTypeKHR
-> ReadPrec RayTracingShaderGroupTypeKHR
forall a. ReadPrec a -> ReadPrec a
parens ([(String, ReadPrec RayTracingShaderGroupTypeKHR)]
-> ReadPrec RayTracingShaderGroupTypeKHR
forall a. [(String, ReadPrec a)] -> ReadPrec a
choose [("RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_KHR", RayTracingShaderGroupTypeKHR
-> ReadPrec RayTracingShaderGroupTypeKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure RayTracingShaderGroupTypeKHR
RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_KHR)
, ("RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR", RayTracingShaderGroupTypeKHR
-> ReadPrec RayTracingShaderGroupTypeKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure RayTracingShaderGroupTypeKHR
RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR)
, ("RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR", RayTracingShaderGroupTypeKHR
-> ReadPrec RayTracingShaderGroupTypeKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure RayTracingShaderGroupTypeKHR
RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR)]
ReadPrec RayTracingShaderGroupTypeKHR
-> ReadPrec RayTracingShaderGroupTypeKHR
-> ReadPrec RayTracingShaderGroupTypeKHR
forall a. ReadPrec a -> ReadPrec a -> ReadPrec a
+++
Int
-> ReadPrec RayTracingShaderGroupTypeKHR
-> ReadPrec RayTracingShaderGroupTypeKHR
forall a. Int -> ReadPrec a -> ReadPrec a
prec 10 (do
Lexeme -> ReadPrec ()
expectP (String -> Lexeme
Ident "RayTracingShaderGroupTypeKHR")
Int32
v <- ReadPrec Int32 -> ReadPrec Int32
forall a. ReadPrec a -> ReadPrec a
step ReadPrec Int32
forall a. Read a => ReadPrec a
readPrec
RayTracingShaderGroupTypeKHR
-> ReadPrec RayTracingShaderGroupTypeKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Int32 -> RayTracingShaderGroupTypeKHR
RayTracingShaderGroupTypeKHR Int32
v)))
type KHR_RAY_TRACING_SPEC_VERSION = 8
pattern KHR_RAY_TRACING_SPEC_VERSION :: forall a . Integral a => a
pattern $bKHR_RAY_TRACING_SPEC_VERSION :: a
$mKHR_RAY_TRACING_SPEC_VERSION :: forall r a. Integral a => a -> (Void# -> r) -> (Void# -> r) -> r
KHR_RAY_TRACING_SPEC_VERSION = 8
type KHR_RAY_TRACING_EXTENSION_NAME = "VK_KHR_ray_tracing"
pattern KHR_RAY_TRACING_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $bKHR_RAY_TRACING_EXTENSION_NAME :: a
$mKHR_RAY_TRACING_EXTENSION_NAME :: forall r a.
(Eq a, IsString a) =>
a -> (Void# -> r) -> (Void# -> r) -> r
KHR_RAY_TRACING_EXTENSION_NAME = "VK_KHR_ray_tracing"