{-# language CPP #-}
module Vulkan.Extensions.VK_KHR_ray_tracing_pipeline ( cmdTraceRaysKHR
, getRayTracingShaderGroupHandlesKHR
, getRayTracingCaptureReplayShaderGroupHandlesKHR
, createRayTracingPipelinesKHR
, withRayTracingPipelinesKHR
, cmdTraceRaysIndirectKHR
, getRayTracingShaderGroupStackSizeKHR
, cmdSetRayTracingPipelineStackSizeKHR
, RayTracingShaderGroupCreateInfoKHR(..)
, RayTracingPipelineCreateInfoKHR(..)
, PhysicalDeviceRayTracingPipelineFeaturesKHR(..)
, PhysicalDeviceRayTracingPipelinePropertiesKHR(..)
, StridedDeviceAddressRegionKHR(..)
, TraceRaysIndirectCommandKHR(..)
, RayTracingPipelineInterfaceCreateInfoKHR(..)
, 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
, ..
)
, ShaderGroupShaderKHR( SHADER_GROUP_SHADER_GENERAL_KHR
, SHADER_GROUP_SHADER_CLOSEST_HIT_KHR
, SHADER_GROUP_SHADER_ANY_HIT_KHR
, SHADER_GROUP_SHADER_INTERSECTION_KHR
, ..
)
, KHR_RAY_TRACING_PIPELINE_SPEC_VERSION
, pattern KHR_RAY_TRACING_PIPELINE_SPEC_VERSION
, KHR_RAY_TRACING_PIPELINE_EXTENSION_NAME
, pattern KHR_RAY_TRACING_PIPELINE_EXTENSION_NAME
, DeferredOperationKHR(..)
, PipelineLibraryCreateInfoKHR(..)
, SHADER_UNUSED_KHR
, pattern SHADER_UNUSED_KHR
) where
import Vulkan.Internal.Utils (enumReadPrec)
import Vulkan.Internal.Utils (enumShowsPrec)
import Vulkan.Internal.Utils (traceAroundEvent)
import Control.Exception.Base (bracket)
import Control.Monad (unless)
import Control.Monad.IO.Class (liftIO)
import Data.Foldable (traverse_)
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 GHC.Base (when)
import GHC.IO (throwIO)
import GHC.Ptr (castPtr)
import GHC.Ptr (nullFunPtr)
import Foreign.Ptr (nullPtr)
import Foreign.Ptr (plusPtr)
import GHC.Show (showsPrec)
import Control.Monad.Trans.Class (lift)
import Control.Monad.Trans.Cont (evalContT)
import Data.Vector (generateM)
import qualified Data.Vector (imapM_)
import qualified Data.Vector (length)
import Foreign.C.Types (CSize(..))
import Vulkan.CStruct (FromCStruct)
import Vulkan.CStruct (FromCStruct(..))
import Vulkan.CStruct (ToCStruct)
import Vulkan.CStruct (ToCStruct(..))
import Vulkan.Zero (Zero)
import Vulkan.Zero (Zero(..))
import Control.Monad.IO.Class (MonadIO)
import Data.String (IsString)
import Data.Type.Equality ((:~:)(Refl))
import Data.Typeable (Typeable)
import Foreign.C.Types (CSize)
import Foreign.C.Types (CSize(CSize))
import Foreign.Storable (Storable)
import Foreign.Storable (Storable(peek))
import Foreign.Storable (Storable(poke))
import qualified Foreign.Storable (Storable(..))
import GHC.Generics (Generic)
import GHC.IO.Exception (IOErrorType(..))
import GHC.IO.Exception (IOException(..))
import Data.Int (Int32)
import Foreign.Ptr (FunPtr)
import Foreign.Ptr (Ptr)
import GHC.Read (Read(readPrec))
import GHC.Show (Show(showsPrec))
import Data.Word (Word32)
import Data.Word (Word64)
import Data.Kind (Type)
import Control.Monad.Trans.Cont (ContT(..))
import Data.Vector (Vector)
import Vulkan.CStruct.Utils (advancePtrBytes)
import Vulkan.Core10.FundamentalTypes (bool32ToBool)
import Vulkan.Core10.FundamentalTypes (boolToBool32)
import Vulkan.Core10.Pipeline (destroyPipeline)
import Vulkan.CStruct.Extends (forgetExtensions)
import Vulkan.CStruct.Extends (peekSomeCStruct)
import Vulkan.CStruct.Extends (pokeSomeCStruct)
import Vulkan.NamedType ((:::))
import Vulkan.Core10.AllocationCallbacks (AllocationCallbacks)
import Vulkan.Core10.FundamentalTypes (Bool32)
import Vulkan.CStruct.Extends (Chain)
import Vulkan.Core10.Handles (CommandBuffer)
import Vulkan.Core10.Handles (CommandBuffer(..))
import Vulkan.Core10.Handles (CommandBuffer_T)
import Vulkan.Extensions.Handles (DeferredOperationKHR)
import Vulkan.Extensions.Handles (DeferredOperationKHR(..))
import Vulkan.Core10.Handles (Device)
import Vulkan.Core10.Handles (Device(..))
import Vulkan.Core10.FundamentalTypes (DeviceAddress)
import Vulkan.Dynamic (DeviceCmds(pVkCmdSetRayTracingPipelineStackSizeKHR))
import Vulkan.Dynamic (DeviceCmds(pVkCmdTraceRaysIndirectKHR))
import Vulkan.Dynamic (DeviceCmds(pVkCmdTraceRaysKHR))
import Vulkan.Dynamic (DeviceCmds(pVkCreateRayTracingPipelinesKHR))
import Vulkan.Dynamic (DeviceCmds(pVkGetRayTracingCaptureReplayShaderGroupHandlesKHR))
import Vulkan.Dynamic (DeviceCmds(pVkGetRayTracingShaderGroupHandlesKHR))
import Vulkan.Dynamic (DeviceCmds(pVkGetRayTracingShaderGroupStackSizeKHR))
import Vulkan.Core10.FundamentalTypes (DeviceSize)
import Vulkan.Core10.Handles (Device_T)
import Vulkan.CStruct.Extends (Extends)
import Vulkan.CStruct.Extends (Extendss)
import Vulkan.CStruct.Extends (Extensible(..))
import Vulkan.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.Pipeline (PipelineDynamicStateCreateInfo)
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.Enums.Result (Result)
import Vulkan.Core10.Enums.Result (Result(..))
import Vulkan.CStruct.Extends (SomeStruct)
import Vulkan.Core10.Enums.StructureType (StructureType)
import Vulkan.Exception (VulkanException(..))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_FEATURES_KHR))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_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.Result (Result(SUCCESS))
import Vulkan.Extensions.Handles (DeferredOperationKHR(..))
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" mkVkCmdTraceRaysKHR
:: FunPtr (Ptr CommandBuffer_T -> Ptr StridedDeviceAddressRegionKHR -> Ptr StridedDeviceAddressRegionKHR -> Ptr StridedDeviceAddressRegionKHR -> Ptr StridedDeviceAddressRegionKHR -> Word32 -> Word32 -> Word32 -> IO ()) -> Ptr CommandBuffer_T -> Ptr StridedDeviceAddressRegionKHR -> Ptr StridedDeviceAddressRegionKHR -> Ptr StridedDeviceAddressRegionKHR -> Ptr StridedDeviceAddressRegionKHR -> Word32 -> Word32 -> Word32 -> IO ()
cmdTraceRaysKHR :: forall io
. (MonadIO io)
=>
CommandBuffer
->
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
->
("missShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
->
("hitShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
->
("callableShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
->
("width" ::: Word32)
->
("height" ::: Word32)
->
("depth" ::: Word32)
-> io ()
cmdTraceRaysKHR :: CommandBuffer
-> ("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
-> ("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
-> ("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
-> ("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
-> ("width" ::: Word32)
-> ("width" ::: Word32)
-> ("width" ::: Word32)
-> io ()
cmdTraceRaysKHR commandBuffer :: CommandBuffer
commandBuffer raygenShaderBindingTable :: "raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR
raygenShaderBindingTable missShaderBindingTable :: "raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR
missShaderBindingTable hitShaderBindingTable :: "raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR
hitShaderBindingTable callableShaderBindingTable :: "raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR
callableShaderBindingTable width :: "width" ::: Word32
width height :: "width" ::: Word32
height depth :: "width" ::: 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" ::: StridedDeviceAddressRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("width" ::: Word32)
-> ("width" ::: Word32)
-> ("width" ::: Word32)
-> IO ())
vkCmdTraceRaysKHRPtr = DeviceCmds
-> FunPtr
(Ptr CommandBuffer_T
-> ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("width" ::: Word32)
-> ("width" ::: Word32)
-> ("width" ::: 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" ::: StridedDeviceAddressRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("width" ::: Word32)
-> ("width" ::: Word32)
-> ("width" ::: Word32)
-> IO ())
vkCmdTraceRaysKHRPtr FunPtr
(Ptr CommandBuffer_T
-> ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("width" ::: Word32)
-> ("width" ::: Word32)
-> ("width" ::: Word32)
-> IO ())
-> FunPtr
(Ptr CommandBuffer_T
-> ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("width" ::: Word32)
-> ("width" ::: Word32)
-> ("width" ::: Word32)
-> IO ())
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr CommandBuffer_T
-> ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("width" ::: Word32)
-> ("width" ::: Word32)
-> ("width" ::: 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" ::: StridedDeviceAddressRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("width" ::: Word32)
-> ("width" ::: Word32)
-> ("width" ::: Word32)
-> IO ()
vkCmdTraceRaysKHR' = FunPtr
(Ptr CommandBuffer_T
-> ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("width" ::: Word32)
-> ("width" ::: Word32)
-> ("width" ::: Word32)
-> IO ())
-> Ptr CommandBuffer_T
-> ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("width" ::: Word32)
-> ("width" ::: Word32)
-> ("width" ::: Word32)
-> IO ()
mkVkCmdTraceRaysKHR FunPtr
(Ptr CommandBuffer_T
-> ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("width" ::: Word32)
-> ("width" ::: Word32)
-> ("width" ::: Word32)
-> IO ())
vkCmdTraceRaysKHRPtr
"pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
pRaygenShaderBindingTable <- ((("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> IO ())
-> IO ())
-> ContT
()
IO
("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> IO ())
-> IO ())
-> ContT
()
IO
("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)))
-> ((("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> IO ())
-> IO ())
-> ContT
()
IO
("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
forall a b. (a -> b) -> a -> b
$ ("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
-> (("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> IO ())
-> IO ()
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct ("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR
raygenShaderBindingTable)
"pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
pMissShaderBindingTable <- ((("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> IO ())
-> IO ())
-> ContT
()
IO
("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> IO ())
-> IO ())
-> ContT
()
IO
("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)))
-> ((("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> IO ())
-> IO ())
-> ContT
()
IO
("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
forall a b. (a -> b) -> a -> b
$ ("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
-> (("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> IO ())
-> IO ()
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct ("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR
missShaderBindingTable)
"pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
pHitShaderBindingTable <- ((("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> IO ())
-> IO ())
-> ContT
()
IO
("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> IO ())
-> IO ())
-> ContT
()
IO
("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)))
-> ((("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> IO ())
-> IO ())
-> ContT
()
IO
("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
forall a b. (a -> b) -> a -> b
$ ("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
-> (("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> IO ())
-> IO ()
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct ("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR
hitShaderBindingTable)
"pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
pCallableShaderBindingTable <- ((("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> IO ())
-> IO ())
-> ContT
()
IO
("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> IO ())
-> IO ())
-> ContT
()
IO
("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)))
-> ((("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> IO ())
-> IO ())
-> ContT
()
IO
("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
forall a b. (a -> b) -> a -> b
$ ("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
-> (("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> IO ())
-> IO ()
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct ("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR
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
$ String -> IO () -> IO ()
forall a. String -> IO a -> IO a
traceAroundEvent "vkCmdTraceRaysKHR" (Ptr CommandBuffer_T
-> ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("width" ::: Word32)
-> ("width" ::: Word32)
-> ("width" ::: Word32)
-> IO ()
vkCmdTraceRaysKHR' (CommandBuffer -> Ptr CommandBuffer_T
commandBufferHandle (CommandBuffer
commandBuffer)) "pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
pRaygenShaderBindingTable "pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
pMissShaderBindingTable "pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
pHitShaderBindingTable "pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
pCallableShaderBindingTable ("width" ::: Word32
width) ("width" ::: Word32
height) ("width" ::: 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
-> ("width" ::: Word32)
-> ("width" ::: Word32)
-> ("dataSize" ::: Word64)
-> ("data" ::: Ptr ())
-> io ()
getRayTracingShaderGroupHandlesKHR device :: Device
device pipeline :: Pipeline
pipeline firstGroup :: "width" ::: Word32
firstGroup groupCount :: "width" ::: 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
-> ("width" ::: Word32)
-> ("width" ::: Word32)
-> ("dataSize" ::: CSize)
-> ("data" ::: Ptr ())
-> IO Result)
vkGetRayTracingShaderGroupHandlesKHRPtr = DeviceCmds
-> FunPtr
(Ptr Device_T
-> Pipeline
-> ("width" ::: Word32)
-> ("width" ::: 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
-> ("width" ::: Word32)
-> ("width" ::: Word32)
-> ("dataSize" ::: CSize)
-> ("data" ::: Ptr ())
-> IO Result)
vkGetRayTracingShaderGroupHandlesKHRPtr FunPtr
(Ptr Device_T
-> Pipeline
-> ("width" ::: Word32)
-> ("width" ::: Word32)
-> ("dataSize" ::: CSize)
-> ("data" ::: Ptr ())
-> IO Result)
-> FunPtr
(Ptr Device_T
-> Pipeline
-> ("width" ::: Word32)
-> ("width" ::: Word32)
-> ("dataSize" ::: CSize)
-> ("data" ::: Ptr ())
-> IO Result)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr Device_T
-> Pipeline
-> ("width" ::: Word32)
-> ("width" ::: 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
-> ("width" ::: Word32)
-> ("width" ::: Word32)
-> ("dataSize" ::: CSize)
-> ("data" ::: Ptr ())
-> IO Result
vkGetRayTracingShaderGroupHandlesKHR' = FunPtr
(Ptr Device_T
-> Pipeline
-> ("width" ::: Word32)
-> ("width" ::: Word32)
-> ("dataSize" ::: CSize)
-> ("data" ::: Ptr ())
-> IO Result)
-> Ptr Device_T
-> Pipeline
-> ("width" ::: Word32)
-> ("width" ::: Word32)
-> ("dataSize" ::: CSize)
-> ("data" ::: Ptr ())
-> IO Result
mkVkGetRayTracingShaderGroupHandlesKHR FunPtr
(Ptr Device_T
-> Pipeline
-> ("width" ::: Word32)
-> ("width" ::: Word32)
-> ("dataSize" ::: CSize)
-> ("data" ::: Ptr ())
-> IO Result)
vkGetRayTracingShaderGroupHandlesKHRPtr
Result
r <- String -> IO Result -> IO Result
forall a. String -> IO a -> IO a
traceAroundEvent "vkGetRayTracingShaderGroupHandlesKHR" (Ptr Device_T
-> Pipeline
-> ("width" ::: Word32)
-> ("width" ::: Word32)
-> ("dataSize" ::: CSize)
-> ("data" ::: Ptr ())
-> IO Result
vkGetRayTracingShaderGroupHandlesKHR' (Device -> Ptr Device_T
deviceHandle (Device
device)) (Pipeline
pipeline) ("width" ::: Word32
firstGroup) ("width" ::: 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
-> ("width" ::: Word32)
-> ("width" ::: Word32)
-> ("dataSize" ::: Word64)
-> ("data" ::: Ptr ())
-> io ()
getRayTracingCaptureReplayShaderGroupHandlesKHR device :: Device
device pipeline :: Pipeline
pipeline firstGroup :: "width" ::: Word32
firstGroup groupCount :: "width" ::: 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
-> ("width" ::: Word32)
-> ("width" ::: Word32)
-> ("dataSize" ::: CSize)
-> ("data" ::: Ptr ())
-> IO Result)
vkGetRayTracingCaptureReplayShaderGroupHandlesKHRPtr = DeviceCmds
-> FunPtr
(Ptr Device_T
-> Pipeline
-> ("width" ::: Word32)
-> ("width" ::: 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
-> ("width" ::: Word32)
-> ("width" ::: Word32)
-> ("dataSize" ::: CSize)
-> ("data" ::: Ptr ())
-> IO Result)
vkGetRayTracingCaptureReplayShaderGroupHandlesKHRPtr FunPtr
(Ptr Device_T
-> Pipeline
-> ("width" ::: Word32)
-> ("width" ::: Word32)
-> ("dataSize" ::: CSize)
-> ("data" ::: Ptr ())
-> IO Result)
-> FunPtr
(Ptr Device_T
-> Pipeline
-> ("width" ::: Word32)
-> ("width" ::: Word32)
-> ("dataSize" ::: CSize)
-> ("data" ::: Ptr ())
-> IO Result)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr Device_T
-> Pipeline
-> ("width" ::: Word32)
-> ("width" ::: 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
-> ("width" ::: Word32)
-> ("width" ::: Word32)
-> ("dataSize" ::: CSize)
-> ("data" ::: Ptr ())
-> IO Result
vkGetRayTracingCaptureReplayShaderGroupHandlesKHR' = FunPtr
(Ptr Device_T
-> Pipeline
-> ("width" ::: Word32)
-> ("width" ::: Word32)
-> ("dataSize" ::: CSize)
-> ("data" ::: Ptr ())
-> IO Result)
-> Ptr Device_T
-> Pipeline
-> ("width" ::: Word32)
-> ("width" ::: Word32)
-> ("dataSize" ::: CSize)
-> ("data" ::: Ptr ())
-> IO Result
mkVkGetRayTracingCaptureReplayShaderGroupHandlesKHR FunPtr
(Ptr Device_T
-> Pipeline
-> ("width" ::: Word32)
-> ("width" ::: Word32)
-> ("dataSize" ::: CSize)
-> ("data" ::: Ptr ())
-> IO Result)
vkGetRayTracingCaptureReplayShaderGroupHandlesKHRPtr
Result
r <- String -> IO Result -> IO Result
forall a. String -> IO a -> IO a
traceAroundEvent "vkGetRayTracingCaptureReplayShaderGroupHandlesKHR" (Ptr Device_T
-> Pipeline
-> ("width" ::: Word32)
-> ("width" ::: Word32)
-> ("dataSize" ::: CSize)
-> ("data" ::: Ptr ())
-> IO Result
vkGetRayTracingCaptureReplayShaderGroupHandlesKHR' (Device -> Ptr Device_T
deviceHandle (Device
device)) (Pipeline
pipeline) ("width" ::: Word32
firstGroup) ("width" ::: 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 -> DeferredOperationKHR -> PipelineCache -> Word32 -> Ptr (SomeStruct RayTracingPipelineCreateInfoKHR) -> Ptr AllocationCallbacks -> Ptr Pipeline -> IO Result) -> Ptr Device_T -> DeferredOperationKHR -> PipelineCache -> Word32 -> Ptr (SomeStruct RayTracingPipelineCreateInfoKHR) -> Ptr AllocationCallbacks -> Ptr Pipeline -> IO Result
createRayTracingPipelinesKHR :: forall io
. (MonadIO io)
=>
Device
->
DeferredOperationKHR
->
PipelineCache
->
("createInfos" ::: Vector (SomeStruct RayTracingPipelineCreateInfoKHR))
->
("allocator" ::: Maybe AllocationCallbacks)
-> io (Result, ("pipelines" ::: Vector Pipeline))
createRayTracingPipelinesKHR :: Device
-> DeferredOperationKHR
-> PipelineCache
-> ("createInfos"
::: Vector (SomeStruct RayTracingPipelineCreateInfoKHR))
-> ("allocator" ::: Maybe AllocationCallbacks)
-> io (Result, "pipelines" ::: Vector Pipeline)
createRayTracingPipelinesKHR device :: Device
device deferredOperation :: DeferredOperationKHR
deferredOperation 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
-> DeferredOperationKHR
-> PipelineCache
-> ("width" ::: Word32)
-> ("pCreateInfos"
::: Ptr (SomeStruct RayTracingPipelineCreateInfoKHR))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pPipelines" ::: Ptr Pipeline)
-> IO Result)
vkCreateRayTracingPipelinesKHRPtr = DeviceCmds
-> FunPtr
(Ptr Device_T
-> DeferredOperationKHR
-> PipelineCache
-> ("width" ::: Word32)
-> ("pCreateInfos"
::: Ptr (SomeStruct RayTracingPipelineCreateInfoKHR))
-> ("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
-> DeferredOperationKHR
-> PipelineCache
-> ("width" ::: Word32)
-> ("pCreateInfos"
::: Ptr (SomeStruct RayTracingPipelineCreateInfoKHR))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pPipelines" ::: Ptr Pipeline)
-> IO Result)
vkCreateRayTracingPipelinesKHRPtr FunPtr
(Ptr Device_T
-> DeferredOperationKHR
-> PipelineCache
-> ("width" ::: Word32)
-> ("pCreateInfos"
::: Ptr (SomeStruct RayTracingPipelineCreateInfoKHR))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pPipelines" ::: Ptr Pipeline)
-> IO Result)
-> FunPtr
(Ptr Device_T
-> DeferredOperationKHR
-> PipelineCache
-> ("width" ::: Word32)
-> ("pCreateInfos"
::: Ptr (SomeStruct RayTracingPipelineCreateInfoKHR))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pPipelines" ::: Ptr Pipeline)
-> IO Result)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr Device_T
-> DeferredOperationKHR
-> PipelineCache
-> ("width" ::: Word32)
-> ("pCreateInfos"
::: Ptr (SomeStruct RayTracingPipelineCreateInfoKHR))
-> ("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
-> DeferredOperationKHR
-> PipelineCache
-> ("width" ::: Word32)
-> ("pCreateInfos"
::: Ptr (SomeStruct RayTracingPipelineCreateInfoKHR))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pPipelines" ::: Ptr Pipeline)
-> IO Result
vkCreateRayTracingPipelinesKHR' = FunPtr
(Ptr Device_T
-> DeferredOperationKHR
-> PipelineCache
-> ("width" ::: Word32)
-> ("pCreateInfos"
::: Ptr (SomeStruct RayTracingPipelineCreateInfoKHR))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pPipelines" ::: Ptr Pipeline)
-> IO Result)
-> Ptr Device_T
-> DeferredOperationKHR
-> PipelineCache
-> ("width" ::: Word32)
-> ("pCreateInfos"
::: Ptr (SomeStruct RayTracingPipelineCreateInfoKHR))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pPipelines" ::: Ptr Pipeline)
-> IO Result
mkVkCreateRayTracingPipelinesKHR FunPtr
(Ptr Device_T
-> DeferredOperationKHR
-> PipelineCache
-> ("width" ::: Word32)
-> ("pCreateInfos"
::: Ptr (SomeStruct RayTracingPipelineCreateInfoKHR))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pPipelines" ::: Ptr Pipeline)
-> IO Result)
vkCreateRayTracingPipelinesKHRPtr
Ptr (RayTracingPipelineCreateInfoKHR Any)
pPCreateInfos <- ((Ptr (RayTracingPipelineCreateInfoKHR Any)
-> IO (Result, "pipelines" ::: Vector Pipeline))
-> IO (Result, "pipelines" ::: Vector Pipeline))
-> ContT
(Result, "pipelines" ::: Vector Pipeline)
IO
(Ptr (RayTracingPipelineCreateInfoKHR Any))
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr (RayTracingPipelineCreateInfoKHR Any)
-> IO (Result, "pipelines" ::: Vector Pipeline))
-> IO (Result, "pipelines" ::: Vector Pipeline))
-> ContT
(Result, "pipelines" ::: Vector Pipeline)
IO
(Ptr (RayTracingPipelineCreateInfoKHR Any)))
-> ((Ptr (RayTracingPipelineCreateInfoKHR Any)
-> IO (Result, "pipelines" ::: Vector Pipeline))
-> IO (Result, "pipelines" ::: Vector Pipeline))
-> ContT
(Result, "pipelines" ::: Vector Pipeline)
IO
(Ptr (RayTracingPipelineCreateInfoKHR Any))
forall a b. (a -> b) -> a -> b
$ Int
-> Int
-> (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
* 104) 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
$ ("pCreateInfos"
::: 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 (Ptr (RayTracingPipelineCreateInfoKHR Any)
-> "pCreateInfos"
::: Ptr (SomeStruct RayTracingPipelineCreateInfoKHR)
forall (a :: [*] -> *) (es :: [*]).
Ptr (a es) -> Ptr (SomeStruct a)
forgetExtensions (Ptr (RayTracingPipelineCreateInfoKHR Any)
pPCreateInfos Ptr (RayTracingPipelineCreateInfoKHR Any)
-> Int -> Ptr (RayTracingPipelineCreateInfoKHR _)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (104 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 ((("width" ::: Word32) -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral ((Int -> "width" ::: 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
$ String -> IO Result -> IO Result
forall a. String -> IO a -> IO a
traceAroundEvent "vkCreateRayTracingPipelinesKHR" (Ptr Device_T
-> DeferredOperationKHR
-> PipelineCache
-> ("width" ::: Word32)
-> ("pCreateInfos"
::: Ptr (SomeStruct RayTracingPipelineCreateInfoKHR))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pPipelines" ::: Ptr Pipeline)
-> IO Result
vkCreateRayTracingPipelinesKHR' (Device -> Ptr Device_T
deviceHandle (Device
device)) (DeferredOperationKHR
deferredOperation) (PipelineCache
pipelineCache) ((Int -> "width" ::: 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)) (Ptr (RayTracingPipelineCreateInfoKHR Any)
-> "pCreateInfos"
::: Ptr (SomeStruct RayTracingPipelineCreateInfoKHR)
forall (a :: [*] -> *) (es :: [*]).
Ptr (a es) -> Ptr (SomeStruct a)
forgetExtensions (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 (("width" ::: Word32) -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral ((Int -> "width" ::: 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)
withRayTracingPipelinesKHR :: forall io r . MonadIO io => Device -> DeferredOperationKHR -> PipelineCache -> Vector (SomeStruct RayTracingPipelineCreateInfoKHR) -> Maybe AllocationCallbacks -> (io (Result, Vector Pipeline) -> ((Result, Vector Pipeline) -> io ()) -> r) -> r
withRayTracingPipelinesKHR :: Device
-> DeferredOperationKHR
-> PipelineCache
-> ("createInfos"
::: Vector (SomeStruct RayTracingPipelineCreateInfoKHR))
-> ("allocator" ::: Maybe AllocationCallbacks)
-> (io (Result, "pipelines" ::: Vector Pipeline)
-> ((Result, "pipelines" ::: Vector Pipeline) -> io ()) -> r)
-> r
withRayTracingPipelinesKHR device :: Device
device deferredOperation :: DeferredOperationKHR
deferredOperation pipelineCache :: PipelineCache
pipelineCache pCreateInfos :: "createInfos"
::: Vector (SomeStruct RayTracingPipelineCreateInfoKHR)
pCreateInfos pAllocator :: "allocator" ::: Maybe AllocationCallbacks
pAllocator b :: io (Result, "pipelines" ::: Vector Pipeline)
-> ((Result, "pipelines" ::: Vector Pipeline) -> io ()) -> r
b =
io (Result, "pipelines" ::: Vector Pipeline)
-> ((Result, "pipelines" ::: Vector Pipeline) -> io ()) -> r
b (Device
-> DeferredOperationKHR
-> PipelineCache
-> ("createInfos"
::: Vector (SomeStruct RayTracingPipelineCreateInfoKHR))
-> ("allocator" ::: Maybe AllocationCallbacks)
-> io (Result, "pipelines" ::: Vector Pipeline)
forall (io :: * -> *).
MonadIO io =>
Device
-> DeferredOperationKHR
-> PipelineCache
-> ("createInfos"
::: Vector (SomeStruct RayTracingPipelineCreateInfoKHR))
-> ("allocator" ::: Maybe AllocationCallbacks)
-> io (Result, "pipelines" ::: Vector Pipeline)
createRayTracingPipelinesKHR Device
device DeferredOperationKHR
deferredOperation PipelineCache
pipelineCache "createInfos"
::: Vector (SomeStruct RayTracingPipelineCreateInfoKHR)
pCreateInfos "allocator" ::: Maybe AllocationCallbacks
pAllocator)
(\(_, o1 :: "pipelines" ::: Vector Pipeline
o1) -> (Pipeline -> io ()) -> ("pipelines" ::: Vector Pipeline) -> io ()
forall (t :: * -> *) (f :: * -> *) a b.
(Foldable t, Applicative f) =>
(a -> f b) -> t a -> f ()
traverse_ (\o1Elem :: Pipeline
o1Elem -> Device
-> Pipeline -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()
forall (io :: * -> *).
MonadIO io =>
Device
-> Pipeline -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()
destroyPipeline Device
device Pipeline
o1Elem "allocator" ::: Maybe AllocationCallbacks
pAllocator) "pipelines" ::: Vector Pipeline
o1)
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkCmdTraceRaysIndirectKHR
:: FunPtr (Ptr CommandBuffer_T -> Ptr StridedDeviceAddressRegionKHR -> Ptr StridedDeviceAddressRegionKHR -> Ptr StridedDeviceAddressRegionKHR -> Ptr StridedDeviceAddressRegionKHR -> DeviceAddress -> IO ()) -> Ptr CommandBuffer_T -> Ptr StridedDeviceAddressRegionKHR -> Ptr StridedDeviceAddressRegionKHR -> Ptr StridedDeviceAddressRegionKHR -> Ptr StridedDeviceAddressRegionKHR -> DeviceAddress -> IO ()
cmdTraceRaysIndirectKHR :: forall io
. (MonadIO io)
=>
CommandBuffer
->
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
->
("missShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
->
("hitShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
->
("callableShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
->
("indirectDeviceAddress" ::: DeviceAddress)
-> io ()
cmdTraceRaysIndirectKHR :: CommandBuffer
-> ("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
-> ("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
-> ("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
-> ("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
-> ("dataSize" ::: Word64)
-> io ()
cmdTraceRaysIndirectKHR commandBuffer :: CommandBuffer
commandBuffer raygenShaderBindingTable :: "raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR
raygenShaderBindingTable missShaderBindingTable :: "raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR
missShaderBindingTable hitShaderBindingTable :: "raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR
hitShaderBindingTable callableShaderBindingTable :: "raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR
callableShaderBindingTable indirectDeviceAddress :: "dataSize" ::: Word64
indirectDeviceAddress = 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" ::: StridedDeviceAddressRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("dataSize" ::: Word64)
-> IO ())
vkCmdTraceRaysIndirectKHRPtr = DeviceCmds
-> FunPtr
(Ptr CommandBuffer_T
-> ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("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" ::: StridedDeviceAddressRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("dataSize" ::: Word64)
-> IO ())
vkCmdTraceRaysIndirectKHRPtr FunPtr
(Ptr CommandBuffer_T
-> ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("dataSize" ::: Word64)
-> IO ())
-> FunPtr
(Ptr CommandBuffer_T
-> ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("dataSize" ::: Word64)
-> IO ())
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr CommandBuffer_T
-> ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("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" ::: StridedDeviceAddressRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("dataSize" ::: Word64)
-> IO ()
vkCmdTraceRaysIndirectKHR' = FunPtr
(Ptr CommandBuffer_T
-> ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("dataSize" ::: Word64)
-> IO ())
-> Ptr CommandBuffer_T
-> ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("dataSize" ::: Word64)
-> IO ()
mkVkCmdTraceRaysIndirectKHR FunPtr
(Ptr CommandBuffer_T
-> ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("dataSize" ::: Word64)
-> IO ())
vkCmdTraceRaysIndirectKHRPtr
"pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
pRaygenShaderBindingTable <- ((("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> IO ())
-> IO ())
-> ContT
()
IO
("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> IO ())
-> IO ())
-> ContT
()
IO
("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)))
-> ((("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> IO ())
-> IO ())
-> ContT
()
IO
("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
forall a b. (a -> b) -> a -> b
$ ("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
-> (("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> IO ())
-> IO ()
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct ("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR
raygenShaderBindingTable)
"pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
pMissShaderBindingTable <- ((("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> IO ())
-> IO ())
-> ContT
()
IO
("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> IO ())
-> IO ())
-> ContT
()
IO
("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)))
-> ((("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> IO ())
-> IO ())
-> ContT
()
IO
("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
forall a b. (a -> b) -> a -> b
$ ("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
-> (("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> IO ())
-> IO ()
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct ("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR
missShaderBindingTable)
"pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
pHitShaderBindingTable <- ((("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> IO ())
-> IO ())
-> ContT
()
IO
("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> IO ())
-> IO ())
-> ContT
()
IO
("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)))
-> ((("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> IO ())
-> IO ())
-> ContT
()
IO
("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
forall a b. (a -> b) -> a -> b
$ ("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
-> (("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> IO ())
-> IO ()
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct ("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR
hitShaderBindingTable)
"pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
pCallableShaderBindingTable <- ((("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> IO ())
-> IO ())
-> ContT
()
IO
("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> IO ())
-> IO ())
-> ContT
()
IO
("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)))
-> ((("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> IO ())
-> IO ())
-> ContT
()
IO
("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
forall a b. (a -> b) -> a -> b
$ ("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
-> (("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> IO ())
-> IO ()
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct ("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR
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
$ String -> IO () -> IO ()
forall a. String -> IO a -> IO a
traceAroundEvent "vkCmdTraceRaysIndirectKHR" (Ptr CommandBuffer_T
-> ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("dataSize" ::: Word64)
-> IO ()
vkCmdTraceRaysIndirectKHR' (CommandBuffer -> Ptr CommandBuffer_T
commandBufferHandle (CommandBuffer
commandBuffer)) "pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
pRaygenShaderBindingTable "pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
pMissShaderBindingTable "pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
pHitShaderBindingTable "pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
pCallableShaderBindingTable ("dataSize" ::: Word64
indirectDeviceAddress))
() -> 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" mkVkGetRayTracingShaderGroupStackSizeKHR
:: FunPtr (Ptr Device_T -> Pipeline -> Word32 -> ShaderGroupShaderKHR -> IO DeviceSize) -> Ptr Device_T -> Pipeline -> Word32 -> ShaderGroupShaderKHR -> IO DeviceSize
getRayTracingShaderGroupStackSizeKHR :: forall io
. (MonadIO io)
=>
Device
->
Pipeline
->
("group" ::: Word32)
->
ShaderGroupShaderKHR
-> io (DeviceSize)
getRayTracingShaderGroupStackSizeKHR :: Device
-> Pipeline
-> ("width" ::: Word32)
-> ShaderGroupShaderKHR
-> io ("dataSize" ::: Word64)
getRayTracingShaderGroupStackSizeKHR device :: Device
device pipeline :: Pipeline
pipeline group :: "width" ::: Word32
group groupShader :: ShaderGroupShaderKHR
groupShader = IO ("dataSize" ::: Word64) -> io ("dataSize" ::: Word64)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO ("dataSize" ::: Word64) -> io ("dataSize" ::: Word64))
-> IO ("dataSize" ::: Word64) -> io ("dataSize" ::: Word64)
forall a b. (a -> b) -> a -> b
$ do
let vkGetRayTracingShaderGroupStackSizeKHRPtr :: FunPtr
(Ptr Device_T
-> Pipeline
-> ("width" ::: Word32)
-> ShaderGroupShaderKHR
-> IO ("dataSize" ::: Word64))
vkGetRayTracingShaderGroupStackSizeKHRPtr = DeviceCmds
-> FunPtr
(Ptr Device_T
-> Pipeline
-> ("width" ::: Word32)
-> ShaderGroupShaderKHR
-> IO ("dataSize" ::: Word64))
pVkGetRayTracingShaderGroupStackSizeKHR (Device -> DeviceCmds
deviceCmds (Device
device :: Device))
Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr Device_T
-> Pipeline
-> ("width" ::: Word32)
-> ShaderGroupShaderKHR
-> IO ("dataSize" ::: Word64))
vkGetRayTracingShaderGroupStackSizeKHRPtr FunPtr
(Ptr Device_T
-> Pipeline
-> ("width" ::: Word32)
-> ShaderGroupShaderKHR
-> IO ("dataSize" ::: Word64))
-> FunPtr
(Ptr Device_T
-> Pipeline
-> ("width" ::: Word32)
-> ShaderGroupShaderKHR
-> IO ("dataSize" ::: Word64))
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr Device_T
-> Pipeline
-> ("width" ::: Word32)
-> ShaderGroupShaderKHR
-> 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 vkGetRayTracingShaderGroupStackSizeKHR is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let vkGetRayTracingShaderGroupStackSizeKHR' :: Ptr Device_T
-> Pipeline
-> ("width" ::: Word32)
-> ShaderGroupShaderKHR
-> IO ("dataSize" ::: Word64)
vkGetRayTracingShaderGroupStackSizeKHR' = FunPtr
(Ptr Device_T
-> Pipeline
-> ("width" ::: Word32)
-> ShaderGroupShaderKHR
-> IO ("dataSize" ::: Word64))
-> Ptr Device_T
-> Pipeline
-> ("width" ::: Word32)
-> ShaderGroupShaderKHR
-> IO ("dataSize" ::: Word64)
mkVkGetRayTracingShaderGroupStackSizeKHR FunPtr
(Ptr Device_T
-> Pipeline
-> ("width" ::: Word32)
-> ShaderGroupShaderKHR
-> IO ("dataSize" ::: Word64))
vkGetRayTracingShaderGroupStackSizeKHRPtr
"dataSize" ::: Word64
r <- String -> IO ("dataSize" ::: Word64) -> IO ("dataSize" ::: Word64)
forall a. String -> IO a -> IO a
traceAroundEvent "vkGetRayTracingShaderGroupStackSizeKHR" (Ptr Device_T
-> Pipeline
-> ("width" ::: Word32)
-> ShaderGroupShaderKHR
-> IO ("dataSize" ::: Word64)
vkGetRayTracingShaderGroupStackSizeKHR' (Device -> Ptr Device_T
deviceHandle (Device
device)) (Pipeline
pipeline) ("width" ::: Word32
group) (ShaderGroupShaderKHR
groupShader))
("dataSize" ::: Word64) -> IO ("dataSize" ::: Word64)
forall (f :: * -> *) a. Applicative f => a -> f a
pure (("dataSize" ::: Word64) -> IO ("dataSize" ::: Word64))
-> ("dataSize" ::: Word64) -> IO ("dataSize" ::: Word64)
forall a b. (a -> b) -> a -> b
$ ("dataSize" ::: Word64
r)
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkCmdSetRayTracingPipelineStackSizeKHR
:: FunPtr (Ptr CommandBuffer_T -> Word32 -> IO ()) -> Ptr CommandBuffer_T -> Word32 -> IO ()
cmdSetRayTracingPipelineStackSizeKHR :: forall io
. (MonadIO io)
=>
CommandBuffer
->
("pipelineStackSize" ::: Word32)
-> io ()
cmdSetRayTracingPipelineStackSizeKHR :: CommandBuffer -> ("width" ::: Word32) -> io ()
cmdSetRayTracingPipelineStackSizeKHR commandBuffer :: CommandBuffer
commandBuffer pipelineStackSize :: "width" ::: Word32
pipelineStackSize = 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 vkCmdSetRayTracingPipelineStackSizeKHRPtr :: FunPtr (Ptr CommandBuffer_T -> ("width" ::: Word32) -> IO ())
vkCmdSetRayTracingPipelineStackSizeKHRPtr = DeviceCmds
-> FunPtr (Ptr CommandBuffer_T -> ("width" ::: Word32) -> IO ())
pVkCmdSetRayTracingPipelineStackSizeKHR (CommandBuffer -> DeviceCmds
deviceCmds (CommandBuffer
commandBuffer :: CommandBuffer))
Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr (Ptr CommandBuffer_T -> ("width" ::: Word32) -> IO ())
vkCmdSetRayTracingPipelineStackSizeKHRPtr FunPtr (Ptr CommandBuffer_T -> ("width" ::: Word32) -> IO ())
-> FunPtr (Ptr CommandBuffer_T -> ("width" ::: Word32) -> IO ())
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr (Ptr CommandBuffer_T -> ("width" ::: 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 vkCmdSetRayTracingPipelineStackSizeKHR is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let vkCmdSetRayTracingPipelineStackSizeKHR' :: Ptr CommandBuffer_T -> ("width" ::: Word32) -> IO ()
vkCmdSetRayTracingPipelineStackSizeKHR' = FunPtr (Ptr CommandBuffer_T -> ("width" ::: Word32) -> IO ())
-> Ptr CommandBuffer_T -> ("width" ::: Word32) -> IO ()
mkVkCmdSetRayTracingPipelineStackSizeKHR FunPtr (Ptr CommandBuffer_T -> ("width" ::: Word32) -> IO ())
vkCmdSetRayTracingPipelineStackSizeKHRPtr
String -> IO () -> IO ()
forall a. String -> IO a -> IO a
traceAroundEvent "vkCmdSetRayTracingPipelineStackSizeKHR" (Ptr CommandBuffer_T -> ("width" ::: Word32) -> IO ()
vkCmdSetRayTracingPipelineStackSizeKHR' (CommandBuffer -> Ptr CommandBuffer_T
commandBufferHandle (CommandBuffer
commandBuffer)) ("width" ::: Word32
pipelineStackSize))
() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure (() -> IO ()) -> () -> IO ()
forall a b. (a -> b) -> a -> b
$ ()
data RayTracingShaderGroupCreateInfoKHR = RayTracingShaderGroupCreateInfoKHR
{
RayTracingShaderGroupCreateInfoKHR -> RayTracingShaderGroupTypeKHR
type' :: RayTracingShaderGroupTypeKHR
,
RayTracingShaderGroupCreateInfoKHR -> "width" ::: Word32
generalShader :: Word32
,
RayTracingShaderGroupCreateInfoKHR -> "width" ::: Word32
closestHitShader :: Word32
,
RayTracingShaderGroupCreateInfoKHR -> "width" ::: Word32
anyHitShader :: Word32
,
RayTracingShaderGroupCreateInfoKHR -> "width" ::: Word32
intersectionShader :: Word32
,
RayTracingShaderGroupCreateInfoKHR -> "data" ::: Ptr ()
shaderGroupCaptureReplayHandle :: Ptr ()
}
deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (RayTracingShaderGroupCreateInfoKHR)
#endif
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 ("width" ::: Word32) -> ("width" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RayTracingShaderGroupCreateInfoKHR
p Ptr RayTracingShaderGroupCreateInfoKHR
-> Int -> Ptr ("width" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr Word32)) ("width" ::: Word32
generalShader)
Ptr ("width" ::: Word32) -> ("width" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RayTracingShaderGroupCreateInfoKHR
p Ptr RayTracingShaderGroupCreateInfoKHR
-> Int -> Ptr ("width" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr Word32)) ("width" ::: Word32
closestHitShader)
Ptr ("width" ::: Word32) -> ("width" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RayTracingShaderGroupCreateInfoKHR
p Ptr RayTracingShaderGroupCreateInfoKHR
-> Int -> Ptr ("width" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 28 :: Ptr Word32)) ("width" ::: Word32
anyHitShader)
Ptr ("width" ::: Word32) -> ("width" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RayTracingShaderGroupCreateInfoKHR
p Ptr RayTracingShaderGroupCreateInfoKHR
-> Int -> Ptr ("width" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr Word32)) ("width" ::: 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 ("width" ::: Word32) -> ("width" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RayTracingShaderGroupCreateInfoKHR
p Ptr RayTracingShaderGroupCreateInfoKHR
-> Int -> Ptr ("width" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr Word32)) ("width" ::: Word32
forall a. Zero a => a
zero)
Ptr ("width" ::: Word32) -> ("width" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RayTracingShaderGroupCreateInfoKHR
p Ptr RayTracingShaderGroupCreateInfoKHR
-> Int -> Ptr ("width" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr Word32)) ("width" ::: Word32
forall a. Zero a => a
zero)
Ptr ("width" ::: Word32) -> ("width" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RayTracingShaderGroupCreateInfoKHR
p Ptr RayTracingShaderGroupCreateInfoKHR
-> Int -> Ptr ("width" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 28 :: Ptr Word32)) ("width" ::: Word32
forall a. Zero a => a
zero)
Ptr ("width" ::: Word32) -> ("width" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RayTracingShaderGroupCreateInfoKHR
p Ptr RayTracingShaderGroupCreateInfoKHR
-> Int -> Ptr ("width" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr Word32)) ("width" ::: 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))
"width" ::: Word32
generalShader <- Ptr ("width" ::: Word32) -> IO ("width" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr RayTracingShaderGroupCreateInfoKHR
p Ptr RayTracingShaderGroupCreateInfoKHR
-> Int -> Ptr ("width" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr Word32))
"width" ::: Word32
closestHitShader <- Ptr ("width" ::: Word32) -> IO ("width" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr RayTracingShaderGroupCreateInfoKHR
p Ptr RayTracingShaderGroupCreateInfoKHR
-> Int -> Ptr ("width" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr Word32))
"width" ::: Word32
anyHitShader <- Ptr ("width" ::: Word32) -> IO ("width" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr RayTracingShaderGroupCreateInfoKHR
p Ptr RayTracingShaderGroupCreateInfoKHR
-> Int -> Ptr ("width" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 28 :: Ptr Word32))
"width" ::: Word32
intersectionShader <- Ptr ("width" ::: Word32) -> IO ("width" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr RayTracingShaderGroupCreateInfoKHR
p Ptr RayTracingShaderGroupCreateInfoKHR
-> Int -> Ptr ("width" ::: 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
-> ("width" ::: Word32)
-> ("width" ::: Word32)
-> ("width" ::: Word32)
-> ("width" ::: Word32)
-> ("data" ::: Ptr ())
-> RayTracingShaderGroupCreateInfoKHR
RayTracingShaderGroupCreateInfoKHR
RayTracingShaderGroupTypeKHR
type' "width" ::: Word32
generalShader "width" ::: Word32
closestHitShader "width" ::: Word32
anyHitShader "width" ::: 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
-> ("width" ::: Word32)
-> ("width" ::: Word32)
-> ("width" ::: Word32)
-> ("width" ::: Word32)
-> ("data" ::: Ptr ())
-> RayTracingShaderGroupCreateInfoKHR
RayTracingShaderGroupCreateInfoKHR
RayTracingShaderGroupTypeKHR
forall a. Zero a => a
zero
"width" ::: Word32
forall a. Zero a => a
zero
"width" ::: Word32
forall a. Zero a => a
zero
"width" ::: Word32
forall a. Zero a => a
zero
"width" ::: 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 -> "width" ::: Word32
maxPipelineRayRecursionDepth :: Word32
,
RayTracingPipelineCreateInfoKHR es
-> Maybe PipelineLibraryCreateInfoKHR
libraryInfo :: Maybe PipelineLibraryCreateInfoKHR
,
RayTracingPipelineCreateInfoKHR es
-> Maybe RayTracingPipelineInterfaceCreateInfoKHR
libraryInterface :: Maybe RayTracingPipelineInterfaceCreateInfoKHR
,
RayTracingPipelineCreateInfoKHR es
-> Maybe PipelineDynamicStateCreateInfo
dynamicState :: Maybe PipelineDynamicStateCreateInfo
,
RayTracingPipelineCreateInfoKHR es -> PipelineLayout
layout :: PipelineLayout
,
RayTracingPipelineCreateInfoKHR es -> Pipeline
basePipelineHandle :: Pipeline
,
RayTracingPipelineCreateInfoKHR es -> Int32
basePipelineIndex :: Int32
}
deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (RayTracingPipelineCreateInfoKHR (es :: [Type]))
#endif
deriving instance Show (Chain es) => Show (RayTracingPipelineCreateInfoKHR es)
instance Extensible RayTracingPipelineCreateInfoKHR where
extensibleTypeName :: String
extensibleTypeName = "RayTracingPipelineCreateInfoKHR"
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 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 104 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 ("width" ::: Word32) -> ("width" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (RayTracingPipelineCreateInfoKHR es)
p Ptr (RayTracingPipelineCreateInfoKHR es)
-> Int -> Ptr ("width" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr Word32)) ((Int -> "width" ::: 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 ("width" ::: Word32) -> ("width" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (RayTracingPipelineCreateInfoKHR es)
p Ptr (RayTracingPipelineCreateInfoKHR es)
-> Int -> Ptr ("width" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr Word32)) ((Int -> "width" ::: 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
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 -> RayTracingShaderGroupCreateInfoKHR -> IO ())
-> Vector RayTracingShaderGroupCreateInfoKHR -> IO ()
forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\i :: Int
i e :: RayTracingShaderGroupCreateInfoKHR
e -> Ptr RayTracingShaderGroupCreateInfoKHR
-> RayTracingShaderGroupCreateInfoKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (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)) (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 ("width" ::: Word32) -> ("width" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (RayTracingPipelineCreateInfoKHR es)
p Ptr (RayTracingPipelineCreateInfoKHR es)
-> Int -> Ptr ("width" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 48 :: Ptr Word32)) ("width" ::: Word32
maxPipelineRayRecursionDepth)
Ptr PipelineLibraryCreateInfoKHR
pLibraryInfo'' <- case (Maybe PipelineLibraryCreateInfoKHR
libraryInfo) of
Nothing -> Ptr PipelineLibraryCreateInfoKHR
-> ContT b IO (Ptr PipelineLibraryCreateInfoKHR)
forall (f :: * -> *) a. Applicative f => a -> f a
pure Ptr PipelineLibraryCreateInfoKHR
forall a. Ptr a
nullPtr
Just j :: PipelineLibraryCreateInfoKHR
j -> ((Ptr PipelineLibraryCreateInfoKHR -> IO b) -> IO b)
-> ContT b IO (Ptr PipelineLibraryCreateInfoKHR)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr PipelineLibraryCreateInfoKHR -> IO b) -> IO b)
-> ContT b IO (Ptr PipelineLibraryCreateInfoKHR))
-> ((Ptr PipelineLibraryCreateInfoKHR -> IO b) -> IO b)
-> ContT b IO (Ptr PipelineLibraryCreateInfoKHR)
forall a b. (a -> b) -> a -> b
$ PipelineLibraryCreateInfoKHR
-> (Ptr PipelineLibraryCreateInfoKHR -> IO b) -> IO b
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (PipelineLibraryCreateInfoKHR
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 PipelineLibraryCreateInfoKHR)
-> Ptr PipelineLibraryCreateInfoKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (RayTracingPipelineCreateInfoKHR es)
p Ptr (RayTracingPipelineCreateInfoKHR es)
-> Int -> Ptr (Ptr PipelineLibraryCreateInfoKHR)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 56 :: Ptr (Ptr PipelineLibraryCreateInfoKHR))) Ptr PipelineLibraryCreateInfoKHR
pLibraryInfo''
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` 64 :: Ptr (Ptr RayTracingPipelineInterfaceCreateInfoKHR))) Ptr RayTracingPipelineInterfaceCreateInfoKHR
pLibraryInterface''
Ptr PipelineDynamicStateCreateInfo
pDynamicState'' <- case (Maybe PipelineDynamicStateCreateInfo
dynamicState) of
Nothing -> Ptr PipelineDynamicStateCreateInfo
-> ContT b IO (Ptr PipelineDynamicStateCreateInfo)
forall (f :: * -> *) a. Applicative f => a -> f a
pure Ptr PipelineDynamicStateCreateInfo
forall a. Ptr a
nullPtr
Just j :: PipelineDynamicStateCreateInfo
j -> ((Ptr PipelineDynamicStateCreateInfo -> IO b) -> IO b)
-> ContT b IO (Ptr PipelineDynamicStateCreateInfo)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr PipelineDynamicStateCreateInfo -> IO b) -> IO b)
-> ContT b IO (Ptr PipelineDynamicStateCreateInfo))
-> ((Ptr PipelineDynamicStateCreateInfo -> IO b) -> IO b)
-> ContT b IO (Ptr PipelineDynamicStateCreateInfo)
forall a b. (a -> b) -> a -> b
$ PipelineDynamicStateCreateInfo
-> (Ptr PipelineDynamicStateCreateInfo -> IO b) -> IO b
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (PipelineDynamicStateCreateInfo
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 PipelineDynamicStateCreateInfo)
-> Ptr PipelineDynamicStateCreateInfo -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (RayTracingPipelineCreateInfoKHR es)
p Ptr (RayTracingPipelineCreateInfoKHR es)
-> Int -> Ptr (Ptr PipelineDynamicStateCreateInfo)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 72 :: Ptr (Ptr PipelineDynamicStateCreateInfo))) Ptr PipelineDynamicStateCreateInfo
pDynamicState''
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` 80 :: 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` 88 :: 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` 96 :: 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 = 104
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
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 -> RayTracingShaderGroupCreateInfoKHR -> IO ())
-> Vector RayTracingShaderGroupCreateInfoKHR -> IO ()
forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\i :: Int
i e :: RayTracingShaderGroupCreateInfoKHR
e -> Ptr RayTracingShaderGroupCreateInfoKHR
-> RayTracingShaderGroupCreateInfoKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (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)) (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 ("width" ::: Word32) -> ("width" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (RayTracingPipelineCreateInfoKHR es)
p Ptr (RayTracingPipelineCreateInfoKHR es)
-> Int -> Ptr ("width" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 48 :: Ptr Word32)) ("width" ::: Word32
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 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` 80 :: 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` 96 :: 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))
"width" ::: Word32
stageCount <- Ptr ("width" ::: Word32) -> IO ("width" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr (RayTracingPipelineCreateInfoKHR es)
p Ptr (RayTracingPipelineCreateInfoKHR es)
-> Int -> Ptr ("width" ::: 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 _))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr (Ptr (PipelineShaderStageCreateInfo _))))
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 (("width" ::: Word32) -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral "width" ::: 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 _)))))
"width" ::: Word32
groupCount <- Ptr ("width" ::: Word32) -> IO ("width" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr (RayTracingPipelineCreateInfoKHR es)
p Ptr (RayTracingPipelineCreateInfoKHR es)
-> Int -> Ptr ("width" ::: 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 (("width" ::: Word32) -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral "width" ::: 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)))
"width" ::: Word32
maxPipelineRayRecursionDepth <- Ptr ("width" ::: Word32) -> IO ("width" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr (RayTracingPipelineCreateInfoKHR es)
p Ptr (RayTracingPipelineCreateInfoKHR es)
-> Int -> Ptr ("width" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 48 :: Ptr Word32))
Ptr PipelineLibraryCreateInfoKHR
pLibraryInfo <- Ptr (Ptr PipelineLibraryCreateInfoKHR)
-> IO (Ptr PipelineLibraryCreateInfoKHR)
forall a. Storable a => Ptr a -> IO a
peek @(Ptr PipelineLibraryCreateInfoKHR) ((Ptr (RayTracingPipelineCreateInfoKHR es)
p Ptr (RayTracingPipelineCreateInfoKHR es)
-> Int -> Ptr (Ptr PipelineLibraryCreateInfoKHR)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 56 :: Ptr (Ptr PipelineLibraryCreateInfoKHR)))
Maybe PipelineLibraryCreateInfoKHR
pLibraryInfo' <- (Ptr PipelineLibraryCreateInfoKHR
-> IO PipelineLibraryCreateInfoKHR)
-> Ptr PipelineLibraryCreateInfoKHR
-> IO (Maybe PipelineLibraryCreateInfoKHR)
forall a b. (Ptr a -> IO b) -> Ptr a -> IO (Maybe b)
maybePeek (\j :: Ptr PipelineLibraryCreateInfoKHR
j -> Ptr PipelineLibraryCreateInfoKHR -> IO PipelineLibraryCreateInfoKHR
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @PipelineLibraryCreateInfoKHR (Ptr PipelineLibraryCreateInfoKHR
j)) Ptr PipelineLibraryCreateInfoKHR
pLibraryInfo
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` 64 :: 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
Ptr PipelineDynamicStateCreateInfo
pDynamicState <- Ptr (Ptr PipelineDynamicStateCreateInfo)
-> IO (Ptr PipelineDynamicStateCreateInfo)
forall a. Storable a => Ptr a -> IO a
peek @(Ptr PipelineDynamicStateCreateInfo) ((Ptr (RayTracingPipelineCreateInfoKHR es)
p Ptr (RayTracingPipelineCreateInfoKHR es)
-> Int -> Ptr (Ptr PipelineDynamicStateCreateInfo)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 72 :: Ptr (Ptr PipelineDynamicStateCreateInfo)))
Maybe PipelineDynamicStateCreateInfo
pDynamicState' <- (Ptr PipelineDynamicStateCreateInfo
-> IO PipelineDynamicStateCreateInfo)
-> Ptr PipelineDynamicStateCreateInfo
-> IO (Maybe PipelineDynamicStateCreateInfo)
forall a b. (Ptr a -> IO b) -> Ptr a -> IO (Maybe b)
maybePeek (\j :: Ptr PipelineDynamicStateCreateInfo
j -> Ptr PipelineDynamicStateCreateInfo
-> IO PipelineDynamicStateCreateInfo
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @PipelineDynamicStateCreateInfo (Ptr PipelineDynamicStateCreateInfo
j)) Ptr PipelineDynamicStateCreateInfo
pDynamicState
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` 80 :: 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` 88 :: 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` 96 :: 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
-> ("width" ::: Word32)
-> Maybe PipelineLibraryCreateInfoKHR
-> Maybe RayTracingPipelineInterfaceCreateInfoKHR
-> Maybe PipelineDynamicStateCreateInfo
-> PipelineLayout
-> Pipeline
-> Int32
-> RayTracingPipelineCreateInfoKHR es
forall (es :: [*]).
Chain es
-> PipelineCreateFlags
-> Vector (SomeStruct PipelineShaderStageCreateInfo)
-> Vector RayTracingShaderGroupCreateInfoKHR
-> ("width" ::: Word32)
-> Maybe PipelineLibraryCreateInfoKHR
-> Maybe RayTracingPipelineInterfaceCreateInfoKHR
-> Maybe PipelineDynamicStateCreateInfo
-> PipelineLayout
-> Pipeline
-> Int32
-> RayTracingPipelineCreateInfoKHR es
RayTracingPipelineCreateInfoKHR
Chain es
next PipelineCreateFlags
flags Vector (SomeStruct PipelineShaderStageCreateInfo)
pStages' Vector RayTracingShaderGroupCreateInfoKHR
pGroups' "width" ::: Word32
maxPipelineRayRecursionDepth Maybe PipelineLibraryCreateInfoKHR
pLibraryInfo' Maybe RayTracingPipelineInterfaceCreateInfoKHR
pLibraryInterface' Maybe PipelineDynamicStateCreateInfo
pDynamicState' PipelineLayout
layout Pipeline
basePipelineHandle Int32
basePipelineIndex
instance es ~ '[] => Zero (RayTracingPipelineCreateInfoKHR es) where
zero :: RayTracingPipelineCreateInfoKHR es
zero = Chain es
-> PipelineCreateFlags
-> Vector (SomeStruct PipelineShaderStageCreateInfo)
-> Vector RayTracingShaderGroupCreateInfoKHR
-> ("width" ::: Word32)
-> Maybe PipelineLibraryCreateInfoKHR
-> Maybe RayTracingPipelineInterfaceCreateInfoKHR
-> Maybe PipelineDynamicStateCreateInfo
-> PipelineLayout
-> Pipeline
-> Int32
-> RayTracingPipelineCreateInfoKHR es
forall (es :: [*]).
Chain es
-> PipelineCreateFlags
-> Vector (SomeStruct PipelineShaderStageCreateInfo)
-> Vector RayTracingShaderGroupCreateInfoKHR
-> ("width" ::: Word32)
-> Maybe PipelineLibraryCreateInfoKHR
-> Maybe RayTracingPipelineInterfaceCreateInfoKHR
-> Maybe PipelineDynamicStateCreateInfo
-> 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
"width" ::: Word32
forall a. Zero a => a
zero
Maybe PipelineLibraryCreateInfoKHR
forall a. Maybe a
Nothing
Maybe RayTracingPipelineInterfaceCreateInfoKHR
forall a. Maybe a
Nothing
Maybe PipelineDynamicStateCreateInfo
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 PhysicalDeviceRayTracingPipelineFeaturesKHR = PhysicalDeviceRayTracingPipelineFeaturesKHR
{
PhysicalDeviceRayTracingPipelineFeaturesKHR -> Bool
rayTracingPipeline :: Bool
,
PhysicalDeviceRayTracingPipelineFeaturesKHR -> Bool
rayTracingPipelineShaderGroupHandleCaptureReplay :: Bool
,
PhysicalDeviceRayTracingPipelineFeaturesKHR -> Bool
rayTracingPipelineShaderGroupHandleCaptureReplayMixed :: Bool
,
PhysicalDeviceRayTracingPipelineFeaturesKHR -> Bool
rayTracingPipelineTraceRaysIndirect :: Bool
,
PhysicalDeviceRayTracingPipelineFeaturesKHR -> Bool
rayTraversalPrimitiveCulling :: Bool
}
deriving (Typeable, PhysicalDeviceRayTracingPipelineFeaturesKHR
-> PhysicalDeviceRayTracingPipelineFeaturesKHR -> Bool
(PhysicalDeviceRayTracingPipelineFeaturesKHR
-> PhysicalDeviceRayTracingPipelineFeaturesKHR -> Bool)
-> (PhysicalDeviceRayTracingPipelineFeaturesKHR
-> PhysicalDeviceRayTracingPipelineFeaturesKHR -> Bool)
-> Eq PhysicalDeviceRayTracingPipelineFeaturesKHR
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PhysicalDeviceRayTracingPipelineFeaturesKHR
-> PhysicalDeviceRayTracingPipelineFeaturesKHR -> Bool
$c/= :: PhysicalDeviceRayTracingPipelineFeaturesKHR
-> PhysicalDeviceRayTracingPipelineFeaturesKHR -> Bool
== :: PhysicalDeviceRayTracingPipelineFeaturesKHR
-> PhysicalDeviceRayTracingPipelineFeaturesKHR -> Bool
$c== :: PhysicalDeviceRayTracingPipelineFeaturesKHR
-> PhysicalDeviceRayTracingPipelineFeaturesKHR -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceRayTracingPipelineFeaturesKHR)
#endif
deriving instance Show PhysicalDeviceRayTracingPipelineFeaturesKHR
instance ToCStruct PhysicalDeviceRayTracingPipelineFeaturesKHR where
withCStruct :: PhysicalDeviceRayTracingPipelineFeaturesKHR
-> (Ptr PhysicalDeviceRayTracingPipelineFeaturesKHR -> IO b)
-> IO b
withCStruct x :: PhysicalDeviceRayTracingPipelineFeaturesKHR
x f :: Ptr PhysicalDeviceRayTracingPipelineFeaturesKHR -> IO b
f = Int
-> Int
-> (Ptr PhysicalDeviceRayTracingPipelineFeaturesKHR -> IO b)
-> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 40 8 ((Ptr PhysicalDeviceRayTracingPipelineFeaturesKHR -> IO b) -> IO b)
-> (Ptr PhysicalDeviceRayTracingPipelineFeaturesKHR -> IO b)
-> IO b
forall a b. (a -> b) -> a -> b
$ \p :: Ptr PhysicalDeviceRayTracingPipelineFeaturesKHR
p -> Ptr PhysicalDeviceRayTracingPipelineFeaturesKHR
-> PhysicalDeviceRayTracingPipelineFeaturesKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceRayTracingPipelineFeaturesKHR
p PhysicalDeviceRayTracingPipelineFeaturesKHR
x (Ptr PhysicalDeviceRayTracingPipelineFeaturesKHR -> IO b
f Ptr PhysicalDeviceRayTracingPipelineFeaturesKHR
p)
pokeCStruct :: Ptr PhysicalDeviceRayTracingPipelineFeaturesKHR
-> PhysicalDeviceRayTracingPipelineFeaturesKHR -> IO b -> IO b
pokeCStruct p :: Ptr PhysicalDeviceRayTracingPipelineFeaturesKHR
p PhysicalDeviceRayTracingPipelineFeaturesKHR{..} f :: IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPipelineFeaturesKHR
p Ptr PhysicalDeviceRayTracingPipelineFeaturesKHR
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_FEATURES_KHR)
Ptr ("data" ::: Ptr ()) -> ("data" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPipelineFeaturesKHR
p Ptr PhysicalDeviceRayTracingPipelineFeaturesKHR
-> 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 PhysicalDeviceRayTracingPipelineFeaturesKHR
p Ptr PhysicalDeviceRayTracingPipelineFeaturesKHR
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
rayTracingPipeline))
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPipelineFeaturesKHR
p Ptr PhysicalDeviceRayTracingPipelineFeaturesKHR
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
rayTracingPipelineShaderGroupHandleCaptureReplay))
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPipelineFeaturesKHR
p Ptr PhysicalDeviceRayTracingPipelineFeaturesKHR
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
rayTracingPipelineShaderGroupHandleCaptureReplayMixed))
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPipelineFeaturesKHR
p Ptr PhysicalDeviceRayTracingPipelineFeaturesKHR
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 28 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
rayTracingPipelineTraceRaysIndirect))
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPipelineFeaturesKHR
p Ptr PhysicalDeviceRayTracingPipelineFeaturesKHR
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
rayTraversalPrimitiveCulling))
IO b
f
cStructSize :: Int
cStructSize = 40
cStructAlignment :: Int
cStructAlignment = 8
pokeZeroCStruct :: Ptr PhysicalDeviceRayTracingPipelineFeaturesKHR -> IO b -> IO b
pokeZeroCStruct p :: Ptr PhysicalDeviceRayTracingPipelineFeaturesKHR
p f :: IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPipelineFeaturesKHR
p Ptr PhysicalDeviceRayTracingPipelineFeaturesKHR
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_FEATURES_KHR)
Ptr ("data" ::: Ptr ()) -> ("data" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPipelineFeaturesKHR
p Ptr PhysicalDeviceRayTracingPipelineFeaturesKHR
-> 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 PhysicalDeviceRayTracingPipelineFeaturesKHR
p Ptr PhysicalDeviceRayTracingPipelineFeaturesKHR
-> 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 PhysicalDeviceRayTracingPipelineFeaturesKHR
p Ptr PhysicalDeviceRayTracingPipelineFeaturesKHR
-> 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 PhysicalDeviceRayTracingPipelineFeaturesKHR
p Ptr PhysicalDeviceRayTracingPipelineFeaturesKHR
-> 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 PhysicalDeviceRayTracingPipelineFeaturesKHR
p Ptr PhysicalDeviceRayTracingPipelineFeaturesKHR
-> 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 PhysicalDeviceRayTracingPipelineFeaturesKHR
p Ptr PhysicalDeviceRayTracingPipelineFeaturesKHR
-> 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))
IO b
f
instance FromCStruct PhysicalDeviceRayTracingPipelineFeaturesKHR where
peekCStruct :: Ptr PhysicalDeviceRayTracingPipelineFeaturesKHR
-> IO PhysicalDeviceRayTracingPipelineFeaturesKHR
peekCStruct p :: Ptr PhysicalDeviceRayTracingPipelineFeaturesKHR
p = do
Bool32
rayTracingPipeline <- Ptr Bool32 -> IO Bool32
forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceRayTracingPipelineFeaturesKHR
p Ptr PhysicalDeviceRayTracingPipelineFeaturesKHR
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Bool32))
Bool32
rayTracingPipelineShaderGroupHandleCaptureReplay <- Ptr Bool32 -> IO Bool32
forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceRayTracingPipelineFeaturesKHR
p Ptr PhysicalDeviceRayTracingPipelineFeaturesKHR
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr Bool32))
Bool32
rayTracingPipelineShaderGroupHandleCaptureReplayMixed <- Ptr Bool32 -> IO Bool32
forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceRayTracingPipelineFeaturesKHR
p Ptr PhysicalDeviceRayTracingPipelineFeaturesKHR
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr Bool32))
Bool32
rayTracingPipelineTraceRaysIndirect <- Ptr Bool32 -> IO Bool32
forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceRayTracingPipelineFeaturesKHR
p Ptr PhysicalDeviceRayTracingPipelineFeaturesKHR
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 28 :: Ptr Bool32))
Bool32
rayTraversalPrimitiveCulling <- Ptr Bool32 -> IO Bool32
forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceRayTracingPipelineFeaturesKHR
p Ptr PhysicalDeviceRayTracingPipelineFeaturesKHR
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr Bool32))
PhysicalDeviceRayTracingPipelineFeaturesKHR
-> IO PhysicalDeviceRayTracingPipelineFeaturesKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure (PhysicalDeviceRayTracingPipelineFeaturesKHR
-> IO PhysicalDeviceRayTracingPipelineFeaturesKHR)
-> PhysicalDeviceRayTracingPipelineFeaturesKHR
-> IO PhysicalDeviceRayTracingPipelineFeaturesKHR
forall a b. (a -> b) -> a -> b
$ Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> PhysicalDeviceRayTracingPipelineFeaturesKHR
PhysicalDeviceRayTracingPipelineFeaturesKHR
(Bool32 -> Bool
bool32ToBool Bool32
rayTracingPipeline) (Bool32 -> Bool
bool32ToBool Bool32
rayTracingPipelineShaderGroupHandleCaptureReplay) (Bool32 -> Bool
bool32ToBool Bool32
rayTracingPipelineShaderGroupHandleCaptureReplayMixed) (Bool32 -> Bool
bool32ToBool Bool32
rayTracingPipelineTraceRaysIndirect) (Bool32 -> Bool
bool32ToBool Bool32
rayTraversalPrimitiveCulling)
instance Storable PhysicalDeviceRayTracingPipelineFeaturesKHR where
sizeOf :: PhysicalDeviceRayTracingPipelineFeaturesKHR -> Int
sizeOf ~PhysicalDeviceRayTracingPipelineFeaturesKHR
_ = 40
alignment :: PhysicalDeviceRayTracingPipelineFeaturesKHR -> Int
alignment ~PhysicalDeviceRayTracingPipelineFeaturesKHR
_ = 8
peek :: Ptr PhysicalDeviceRayTracingPipelineFeaturesKHR
-> IO PhysicalDeviceRayTracingPipelineFeaturesKHR
peek = Ptr PhysicalDeviceRayTracingPipelineFeaturesKHR
-> IO PhysicalDeviceRayTracingPipelineFeaturesKHR
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr PhysicalDeviceRayTracingPipelineFeaturesKHR
-> PhysicalDeviceRayTracingPipelineFeaturesKHR -> IO ()
poke ptr :: Ptr PhysicalDeviceRayTracingPipelineFeaturesKHR
ptr poked :: PhysicalDeviceRayTracingPipelineFeaturesKHR
poked = Ptr PhysicalDeviceRayTracingPipelineFeaturesKHR
-> PhysicalDeviceRayTracingPipelineFeaturesKHR -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceRayTracingPipelineFeaturesKHR
ptr PhysicalDeviceRayTracingPipelineFeaturesKHR
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PhysicalDeviceRayTracingPipelineFeaturesKHR where
zero :: PhysicalDeviceRayTracingPipelineFeaturesKHR
zero = Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> PhysicalDeviceRayTracingPipelineFeaturesKHR
PhysicalDeviceRayTracingPipelineFeaturesKHR
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 PhysicalDeviceRayTracingPipelinePropertiesKHR = PhysicalDeviceRayTracingPipelinePropertiesKHR
{
PhysicalDeviceRayTracingPipelinePropertiesKHR -> "width" ::: Word32
shaderGroupHandleSize :: Word32
,
PhysicalDeviceRayTracingPipelinePropertiesKHR -> "width" ::: Word32
maxRayRecursionDepth :: Word32
,
PhysicalDeviceRayTracingPipelinePropertiesKHR -> "width" ::: Word32
maxShaderGroupStride :: Word32
,
PhysicalDeviceRayTracingPipelinePropertiesKHR -> "width" ::: Word32
shaderGroupBaseAlignment :: Word32
,
PhysicalDeviceRayTracingPipelinePropertiesKHR -> "width" ::: Word32
shaderGroupHandleCaptureReplaySize :: Word32
,
PhysicalDeviceRayTracingPipelinePropertiesKHR -> "width" ::: Word32
maxRayDispatchInvocationCount :: Word32
,
PhysicalDeviceRayTracingPipelinePropertiesKHR -> "width" ::: Word32
shaderGroupHandleAlignment :: Word32
,
PhysicalDeviceRayTracingPipelinePropertiesKHR -> "width" ::: Word32
maxRayHitAttributeSize :: Word32
}
deriving (Typeable, PhysicalDeviceRayTracingPipelinePropertiesKHR
-> PhysicalDeviceRayTracingPipelinePropertiesKHR -> Bool
(PhysicalDeviceRayTracingPipelinePropertiesKHR
-> PhysicalDeviceRayTracingPipelinePropertiesKHR -> Bool)
-> (PhysicalDeviceRayTracingPipelinePropertiesKHR
-> PhysicalDeviceRayTracingPipelinePropertiesKHR -> Bool)
-> Eq PhysicalDeviceRayTracingPipelinePropertiesKHR
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PhysicalDeviceRayTracingPipelinePropertiesKHR
-> PhysicalDeviceRayTracingPipelinePropertiesKHR -> Bool
$c/= :: PhysicalDeviceRayTracingPipelinePropertiesKHR
-> PhysicalDeviceRayTracingPipelinePropertiesKHR -> Bool
== :: PhysicalDeviceRayTracingPipelinePropertiesKHR
-> PhysicalDeviceRayTracingPipelinePropertiesKHR -> Bool
$c== :: PhysicalDeviceRayTracingPipelinePropertiesKHR
-> PhysicalDeviceRayTracingPipelinePropertiesKHR -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceRayTracingPipelinePropertiesKHR)
#endif
deriving instance Show PhysicalDeviceRayTracingPipelinePropertiesKHR
instance ToCStruct PhysicalDeviceRayTracingPipelinePropertiesKHR where
withCStruct :: PhysicalDeviceRayTracingPipelinePropertiesKHR
-> (Ptr PhysicalDeviceRayTracingPipelinePropertiesKHR -> IO b)
-> IO b
withCStruct x :: PhysicalDeviceRayTracingPipelinePropertiesKHR
x f :: Ptr PhysicalDeviceRayTracingPipelinePropertiesKHR -> IO b
f = Int
-> Int
-> (Ptr PhysicalDeviceRayTracingPipelinePropertiesKHR -> IO b)
-> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 48 8 ((Ptr PhysicalDeviceRayTracingPipelinePropertiesKHR -> IO b)
-> IO b)
-> (Ptr PhysicalDeviceRayTracingPipelinePropertiesKHR -> IO b)
-> IO b
forall a b. (a -> b) -> a -> b
$ \p :: Ptr PhysicalDeviceRayTracingPipelinePropertiesKHR
p -> Ptr PhysicalDeviceRayTracingPipelinePropertiesKHR
-> PhysicalDeviceRayTracingPipelinePropertiesKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceRayTracingPipelinePropertiesKHR
p PhysicalDeviceRayTracingPipelinePropertiesKHR
x (Ptr PhysicalDeviceRayTracingPipelinePropertiesKHR -> IO b
f Ptr PhysicalDeviceRayTracingPipelinePropertiesKHR
p)
pokeCStruct :: Ptr PhysicalDeviceRayTracingPipelinePropertiesKHR
-> PhysicalDeviceRayTracingPipelinePropertiesKHR -> IO b -> IO b
pokeCStruct p :: Ptr PhysicalDeviceRayTracingPipelinePropertiesKHR
p PhysicalDeviceRayTracingPipelinePropertiesKHR{..} f :: IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPipelinePropertiesKHR
p Ptr PhysicalDeviceRayTracingPipelinePropertiesKHR
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_PROPERTIES_KHR)
Ptr ("data" ::: Ptr ()) -> ("data" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPipelinePropertiesKHR
p Ptr PhysicalDeviceRayTracingPipelinePropertiesKHR
-> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) ("data" ::: Ptr ()
forall a. Ptr a
nullPtr)
Ptr ("width" ::: Word32) -> ("width" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPipelinePropertiesKHR
p Ptr PhysicalDeviceRayTracingPipelinePropertiesKHR
-> Int -> Ptr ("width" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Word32)) ("width" ::: Word32
shaderGroupHandleSize)
Ptr ("width" ::: Word32) -> ("width" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPipelinePropertiesKHR
p Ptr PhysicalDeviceRayTracingPipelinePropertiesKHR
-> Int -> Ptr ("width" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr Word32)) ("width" ::: Word32
maxRayRecursionDepth)
Ptr ("width" ::: Word32) -> ("width" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPipelinePropertiesKHR
p Ptr PhysicalDeviceRayTracingPipelinePropertiesKHR
-> Int -> Ptr ("width" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr Word32)) ("width" ::: Word32
maxShaderGroupStride)
Ptr ("width" ::: Word32) -> ("width" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPipelinePropertiesKHR
p Ptr PhysicalDeviceRayTracingPipelinePropertiesKHR
-> Int -> Ptr ("width" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 28 :: Ptr Word32)) ("width" ::: Word32
shaderGroupBaseAlignment)
Ptr ("width" ::: Word32) -> ("width" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPipelinePropertiesKHR
p Ptr PhysicalDeviceRayTracingPipelinePropertiesKHR
-> Int -> Ptr ("width" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr Word32)) ("width" ::: Word32
shaderGroupHandleCaptureReplaySize)
Ptr ("width" ::: Word32) -> ("width" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPipelinePropertiesKHR
p Ptr PhysicalDeviceRayTracingPipelinePropertiesKHR
-> Int -> Ptr ("width" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 36 :: Ptr Word32)) ("width" ::: Word32
maxRayDispatchInvocationCount)
Ptr ("width" ::: Word32) -> ("width" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPipelinePropertiesKHR
p Ptr PhysicalDeviceRayTracingPipelinePropertiesKHR
-> Int -> Ptr ("width" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 40 :: Ptr Word32)) ("width" ::: Word32
shaderGroupHandleAlignment)
Ptr ("width" ::: Word32) -> ("width" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPipelinePropertiesKHR
p Ptr PhysicalDeviceRayTracingPipelinePropertiesKHR
-> Int -> Ptr ("width" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 44 :: Ptr Word32)) ("width" ::: Word32
maxRayHitAttributeSize)
IO b
f
cStructSize :: Int
cStructSize = 48
cStructAlignment :: Int
cStructAlignment = 8
pokeZeroCStruct :: Ptr PhysicalDeviceRayTracingPipelinePropertiesKHR -> IO b -> IO b
pokeZeroCStruct p :: Ptr PhysicalDeviceRayTracingPipelinePropertiesKHR
p f :: IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPipelinePropertiesKHR
p Ptr PhysicalDeviceRayTracingPipelinePropertiesKHR
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_PROPERTIES_KHR)
Ptr ("data" ::: Ptr ()) -> ("data" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPipelinePropertiesKHR
p Ptr PhysicalDeviceRayTracingPipelinePropertiesKHR
-> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) ("data" ::: Ptr ()
forall a. Ptr a
nullPtr)
Ptr ("width" ::: Word32) -> ("width" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPipelinePropertiesKHR
p Ptr PhysicalDeviceRayTracingPipelinePropertiesKHR
-> Int -> Ptr ("width" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Word32)) ("width" ::: Word32
forall a. Zero a => a
zero)
Ptr ("width" ::: Word32) -> ("width" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPipelinePropertiesKHR
p Ptr PhysicalDeviceRayTracingPipelinePropertiesKHR
-> Int -> Ptr ("width" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr Word32)) ("width" ::: Word32
forall a. Zero a => a
zero)
Ptr ("width" ::: Word32) -> ("width" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPipelinePropertiesKHR
p Ptr PhysicalDeviceRayTracingPipelinePropertiesKHR
-> Int -> Ptr ("width" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr Word32)) ("width" ::: Word32
forall a. Zero a => a
zero)
Ptr ("width" ::: Word32) -> ("width" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPipelinePropertiesKHR
p Ptr PhysicalDeviceRayTracingPipelinePropertiesKHR
-> Int -> Ptr ("width" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 28 :: Ptr Word32)) ("width" ::: Word32
forall a. Zero a => a
zero)
Ptr ("width" ::: Word32) -> ("width" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPipelinePropertiesKHR
p Ptr PhysicalDeviceRayTracingPipelinePropertiesKHR
-> Int -> Ptr ("width" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr Word32)) ("width" ::: Word32
forall a. Zero a => a
zero)
Ptr ("width" ::: Word32) -> ("width" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPipelinePropertiesKHR
p Ptr PhysicalDeviceRayTracingPipelinePropertiesKHR
-> Int -> Ptr ("width" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 36 :: Ptr Word32)) ("width" ::: Word32
forall a. Zero a => a
zero)
Ptr ("width" ::: Word32) -> ("width" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPipelinePropertiesKHR
p Ptr PhysicalDeviceRayTracingPipelinePropertiesKHR
-> Int -> Ptr ("width" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 40 :: Ptr Word32)) ("width" ::: Word32
forall a. Zero a => a
zero)
Ptr ("width" ::: Word32) -> ("width" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPipelinePropertiesKHR
p Ptr PhysicalDeviceRayTracingPipelinePropertiesKHR
-> Int -> Ptr ("width" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 44 :: Ptr Word32)) ("width" ::: Word32
forall a. Zero a => a
zero)
IO b
f
instance FromCStruct PhysicalDeviceRayTracingPipelinePropertiesKHR where
peekCStruct :: Ptr PhysicalDeviceRayTracingPipelinePropertiesKHR
-> IO PhysicalDeviceRayTracingPipelinePropertiesKHR
peekCStruct p :: Ptr PhysicalDeviceRayTracingPipelinePropertiesKHR
p = do
"width" ::: Word32
shaderGroupHandleSize <- Ptr ("width" ::: Word32) -> IO ("width" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceRayTracingPipelinePropertiesKHR
p Ptr PhysicalDeviceRayTracingPipelinePropertiesKHR
-> Int -> Ptr ("width" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Word32))
"width" ::: Word32
maxRayRecursionDepth <- Ptr ("width" ::: Word32) -> IO ("width" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceRayTracingPipelinePropertiesKHR
p Ptr PhysicalDeviceRayTracingPipelinePropertiesKHR
-> Int -> Ptr ("width" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr Word32))
"width" ::: Word32
maxShaderGroupStride <- Ptr ("width" ::: Word32) -> IO ("width" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceRayTracingPipelinePropertiesKHR
p Ptr PhysicalDeviceRayTracingPipelinePropertiesKHR
-> Int -> Ptr ("width" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr Word32))
"width" ::: Word32
shaderGroupBaseAlignment <- Ptr ("width" ::: Word32) -> IO ("width" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceRayTracingPipelinePropertiesKHR
p Ptr PhysicalDeviceRayTracingPipelinePropertiesKHR
-> Int -> Ptr ("width" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 28 :: Ptr Word32))
"width" ::: Word32
shaderGroupHandleCaptureReplaySize <- Ptr ("width" ::: Word32) -> IO ("width" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceRayTracingPipelinePropertiesKHR
p Ptr PhysicalDeviceRayTracingPipelinePropertiesKHR
-> Int -> Ptr ("width" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr Word32))
"width" ::: Word32
maxRayDispatchInvocationCount <- Ptr ("width" ::: Word32) -> IO ("width" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceRayTracingPipelinePropertiesKHR
p Ptr PhysicalDeviceRayTracingPipelinePropertiesKHR
-> Int -> Ptr ("width" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 36 :: Ptr Word32))
"width" ::: Word32
shaderGroupHandleAlignment <- Ptr ("width" ::: Word32) -> IO ("width" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceRayTracingPipelinePropertiesKHR
p Ptr PhysicalDeviceRayTracingPipelinePropertiesKHR
-> Int -> Ptr ("width" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 40 :: Ptr Word32))
"width" ::: Word32
maxRayHitAttributeSize <- Ptr ("width" ::: Word32) -> IO ("width" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceRayTracingPipelinePropertiesKHR
p Ptr PhysicalDeviceRayTracingPipelinePropertiesKHR
-> Int -> Ptr ("width" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 44 :: Ptr Word32))
PhysicalDeviceRayTracingPipelinePropertiesKHR
-> IO PhysicalDeviceRayTracingPipelinePropertiesKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure (PhysicalDeviceRayTracingPipelinePropertiesKHR
-> IO PhysicalDeviceRayTracingPipelinePropertiesKHR)
-> PhysicalDeviceRayTracingPipelinePropertiesKHR
-> IO PhysicalDeviceRayTracingPipelinePropertiesKHR
forall a b. (a -> b) -> a -> b
$ ("width" ::: Word32)
-> ("width" ::: Word32)
-> ("width" ::: Word32)
-> ("width" ::: Word32)
-> ("width" ::: Word32)
-> ("width" ::: Word32)
-> ("width" ::: Word32)
-> ("width" ::: Word32)
-> PhysicalDeviceRayTracingPipelinePropertiesKHR
PhysicalDeviceRayTracingPipelinePropertiesKHR
"width" ::: Word32
shaderGroupHandleSize "width" ::: Word32
maxRayRecursionDepth "width" ::: Word32
maxShaderGroupStride "width" ::: Word32
shaderGroupBaseAlignment "width" ::: Word32
shaderGroupHandleCaptureReplaySize "width" ::: Word32
maxRayDispatchInvocationCount "width" ::: Word32
shaderGroupHandleAlignment "width" ::: Word32
maxRayHitAttributeSize
instance Storable PhysicalDeviceRayTracingPipelinePropertiesKHR where
sizeOf :: PhysicalDeviceRayTracingPipelinePropertiesKHR -> Int
sizeOf ~PhysicalDeviceRayTracingPipelinePropertiesKHR
_ = 48
alignment :: PhysicalDeviceRayTracingPipelinePropertiesKHR -> Int
alignment ~PhysicalDeviceRayTracingPipelinePropertiesKHR
_ = 8
peek :: Ptr PhysicalDeviceRayTracingPipelinePropertiesKHR
-> IO PhysicalDeviceRayTracingPipelinePropertiesKHR
peek = Ptr PhysicalDeviceRayTracingPipelinePropertiesKHR
-> IO PhysicalDeviceRayTracingPipelinePropertiesKHR
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr PhysicalDeviceRayTracingPipelinePropertiesKHR
-> PhysicalDeviceRayTracingPipelinePropertiesKHR -> IO ()
poke ptr :: Ptr PhysicalDeviceRayTracingPipelinePropertiesKHR
ptr poked :: PhysicalDeviceRayTracingPipelinePropertiesKHR
poked = Ptr PhysicalDeviceRayTracingPipelinePropertiesKHR
-> PhysicalDeviceRayTracingPipelinePropertiesKHR -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceRayTracingPipelinePropertiesKHR
ptr PhysicalDeviceRayTracingPipelinePropertiesKHR
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PhysicalDeviceRayTracingPipelinePropertiesKHR where
zero :: PhysicalDeviceRayTracingPipelinePropertiesKHR
zero = ("width" ::: Word32)
-> ("width" ::: Word32)
-> ("width" ::: Word32)
-> ("width" ::: Word32)
-> ("width" ::: Word32)
-> ("width" ::: Word32)
-> ("width" ::: Word32)
-> ("width" ::: Word32)
-> PhysicalDeviceRayTracingPipelinePropertiesKHR
PhysicalDeviceRayTracingPipelinePropertiesKHR
"width" ::: Word32
forall a. Zero a => a
zero
"width" ::: Word32
forall a. Zero a => a
zero
"width" ::: Word32
forall a. Zero a => a
zero
"width" ::: Word32
forall a. Zero a => a
zero
"width" ::: Word32
forall a. Zero a => a
zero
"width" ::: Word32
forall a. Zero a => a
zero
"width" ::: Word32
forall a. Zero a => a
zero
"width" ::: Word32
forall a. Zero a => a
zero
data StridedDeviceAddressRegionKHR = StridedDeviceAddressRegionKHR
{
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
-> "dataSize" ::: Word64
deviceAddress :: DeviceAddress
,
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
-> "dataSize" ::: Word64
stride :: DeviceSize
,
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
-> "dataSize" ::: Word64
size :: DeviceSize
}
deriving (Typeable, ("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
-> ("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
-> Bool
(("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
-> ("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
-> Bool)
-> (("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
-> ("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
-> Bool)
-> Eq
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
-> ("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
-> Bool
$c/= :: ("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
-> ("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
-> Bool
== :: ("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
-> ("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
-> Bool
$c== :: ("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
-> ("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
-> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (StridedDeviceAddressRegionKHR)
#endif
deriving instance Show StridedDeviceAddressRegionKHR
instance ToCStruct StridedDeviceAddressRegionKHR where
withCStruct :: ("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
-> (("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> IO b)
-> IO b
withCStruct x :: "raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR
x f :: ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> IO b
f = Int
-> Int
-> (("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> IO b)
-> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 24 8 ((("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> IO b)
-> IO b)
-> (("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> IO b)
-> IO b
forall a b. (a -> b) -> a -> b
$ \p :: "pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
p -> ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
-> IO b
-> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
p "raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR
x (("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> IO b
f "pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
p)
pokeCStruct :: ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
-> IO b
-> IO b
pokeCStruct p :: "pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
p StridedDeviceAddressRegionKHR{..} f :: IO b
f = do
Ptr ("dataSize" ::: Word64) -> ("dataSize" ::: Word64) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
p ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> Int -> Ptr ("dataSize" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr DeviceAddress)) ("dataSize" ::: Word64
deviceAddress)
Ptr ("dataSize" ::: Word64) -> ("dataSize" ::: Word64) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
p ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> Int -> Ptr ("dataSize" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr DeviceSize)) ("dataSize" ::: Word64
stride)
Ptr ("dataSize" ::: Word64) -> ("dataSize" ::: Word64) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
p ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> Int -> Ptr ("dataSize" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr DeviceSize)) ("dataSize" ::: Word64
size)
IO b
f
cStructSize :: Int
cStructSize = 24
cStructAlignment :: Int
cStructAlignment = 8
pokeZeroCStruct :: ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> IO b -> IO b
pokeZeroCStruct p :: "pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
p f :: IO b
f = do
Ptr ("dataSize" ::: Word64) -> ("dataSize" ::: Word64) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
p ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> 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" ::: StridedDeviceAddressRegionKHR)
p ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> 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 b
f
instance FromCStruct StridedDeviceAddressRegionKHR where
peekCStruct :: ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> IO
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
peekCStruct p :: "pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
p = do
"dataSize" ::: Word64
deviceAddress <- Ptr ("dataSize" ::: Word64) -> IO ("dataSize" ::: Word64)
forall a. Storable a => Ptr a -> IO a
peek @DeviceAddress (("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
p ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> Int -> Ptr ("dataSize" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr DeviceAddress))
"dataSize" ::: Word64
stride <- Ptr ("dataSize" ::: Word64) -> IO ("dataSize" ::: Word64)
forall a. Storable a => Ptr a -> IO a
peek @DeviceSize (("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
p ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> Int -> Ptr ("dataSize" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr DeviceSize))
"dataSize" ::: Word64
size <- Ptr ("dataSize" ::: Word64) -> IO ("dataSize" ::: Word64)
forall a. Storable a => Ptr a -> IO a
peek @DeviceSize (("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
p ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> Int -> Ptr ("dataSize" ::: Word64)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr DeviceSize))
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
-> IO
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
forall (f :: * -> *) a. Applicative f => a -> f a
pure (("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
-> IO
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
-> IO
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
forall a b. (a -> b) -> a -> b
$ ("dataSize" ::: Word64)
-> ("dataSize" ::: Word64)
-> ("dataSize" ::: Word64)
-> "raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR
StridedDeviceAddressRegionKHR
"dataSize" ::: Word64
deviceAddress "dataSize" ::: Word64
stride "dataSize" ::: Word64
size
instance Storable StridedDeviceAddressRegionKHR where
sizeOf :: ("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
-> Int
sizeOf ~"raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR
_ = 24
alignment :: ("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
-> Int
alignment ~"raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR
_ = 8
peek :: ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> IO
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
peek = ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> IO
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
-> IO ()
poke ptr :: "pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
ptr poked :: "raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR
poked = ("pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR))
-> ("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
-> IO ()
-> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pRaygenShaderBindingTable"
::: Ptr
("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)
ptr "raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero StridedDeviceAddressRegionKHR where
zero :: "raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR
zero = ("dataSize" ::: Word64)
-> ("dataSize" ::: Word64)
-> ("dataSize" ::: Word64)
-> "raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR
StridedDeviceAddressRegionKHR
"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 -> "width" ::: Word32
width :: Word32
,
TraceRaysIndirectCommandKHR -> "width" ::: Word32
height :: Word32
,
TraceRaysIndirectCommandKHR -> "width" ::: Word32
depth :: Word32
}
deriving (Typeable, TraceRaysIndirectCommandKHR -> TraceRaysIndirectCommandKHR -> Bool
(TraceRaysIndirectCommandKHR
-> TraceRaysIndirectCommandKHR -> Bool)
-> (TraceRaysIndirectCommandKHR
-> TraceRaysIndirectCommandKHR -> Bool)
-> Eq TraceRaysIndirectCommandKHR
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TraceRaysIndirectCommandKHR -> TraceRaysIndirectCommandKHR -> Bool
$c/= :: TraceRaysIndirectCommandKHR -> TraceRaysIndirectCommandKHR -> Bool
== :: TraceRaysIndirectCommandKHR -> TraceRaysIndirectCommandKHR -> Bool
$c== :: TraceRaysIndirectCommandKHR -> TraceRaysIndirectCommandKHR -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (TraceRaysIndirectCommandKHR)
#endif
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 ("width" ::: Word32) -> ("width" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr TraceRaysIndirectCommandKHR
p Ptr TraceRaysIndirectCommandKHR -> Int -> Ptr ("width" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr Word32)) ("width" ::: Word32
width)
Ptr ("width" ::: Word32) -> ("width" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr TraceRaysIndirectCommandKHR
p Ptr TraceRaysIndirectCommandKHR -> Int -> Ptr ("width" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 4 :: Ptr Word32)) ("width" ::: Word32
height)
Ptr ("width" ::: Word32) -> ("width" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr TraceRaysIndirectCommandKHR
p Ptr TraceRaysIndirectCommandKHR -> Int -> Ptr ("width" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr Word32)) ("width" ::: 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 ("width" ::: Word32) -> ("width" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr TraceRaysIndirectCommandKHR
p Ptr TraceRaysIndirectCommandKHR -> Int -> Ptr ("width" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr Word32)) ("width" ::: Word32
forall a. Zero a => a
zero)
Ptr ("width" ::: Word32) -> ("width" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr TraceRaysIndirectCommandKHR
p Ptr TraceRaysIndirectCommandKHR -> Int -> Ptr ("width" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 4 :: Ptr Word32)) ("width" ::: Word32
forall a. Zero a => a
zero)
Ptr ("width" ::: Word32) -> ("width" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr TraceRaysIndirectCommandKHR
p Ptr TraceRaysIndirectCommandKHR -> Int -> Ptr ("width" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr Word32)) ("width" ::: 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
"width" ::: Word32
width <- Ptr ("width" ::: Word32) -> IO ("width" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr TraceRaysIndirectCommandKHR
p Ptr TraceRaysIndirectCommandKHR -> Int -> Ptr ("width" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr Word32))
"width" ::: Word32
height <- Ptr ("width" ::: Word32) -> IO ("width" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr TraceRaysIndirectCommandKHR
p Ptr TraceRaysIndirectCommandKHR -> Int -> Ptr ("width" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 4 :: Ptr Word32))
"width" ::: Word32
depth <- Ptr ("width" ::: Word32) -> IO ("width" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr TraceRaysIndirectCommandKHR
p Ptr TraceRaysIndirectCommandKHR -> Int -> Ptr ("width" ::: 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
$ ("width" ::: Word32)
-> ("width" ::: Word32)
-> ("width" ::: Word32)
-> TraceRaysIndirectCommandKHR
TraceRaysIndirectCommandKHR
"width" ::: Word32
width "width" ::: Word32
height "width" ::: 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 = ("width" ::: Word32)
-> ("width" ::: Word32)
-> ("width" ::: Word32)
-> TraceRaysIndirectCommandKHR
TraceRaysIndirectCommandKHR
"width" ::: Word32
forall a. Zero a => a
zero
"width" ::: Word32
forall a. Zero a => a
zero
"width" ::: Word32
forall a. Zero a => a
zero
data RayTracingPipelineInterfaceCreateInfoKHR = RayTracingPipelineInterfaceCreateInfoKHR
{
RayTracingPipelineInterfaceCreateInfoKHR -> "width" ::: Word32
maxPipelineRayPayloadSize :: Word32
,
RayTracingPipelineInterfaceCreateInfoKHR -> "width" ::: Word32
maxPipelineRayHitAttributeSize :: Word32
}
deriving (Typeable, RayTracingPipelineInterfaceCreateInfoKHR
-> RayTracingPipelineInterfaceCreateInfoKHR -> Bool
(RayTracingPipelineInterfaceCreateInfoKHR
-> RayTracingPipelineInterfaceCreateInfoKHR -> Bool)
-> (RayTracingPipelineInterfaceCreateInfoKHR
-> RayTracingPipelineInterfaceCreateInfoKHR -> Bool)
-> Eq RayTracingPipelineInterfaceCreateInfoKHR
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RayTracingPipelineInterfaceCreateInfoKHR
-> RayTracingPipelineInterfaceCreateInfoKHR -> Bool
$c/= :: RayTracingPipelineInterfaceCreateInfoKHR
-> RayTracingPipelineInterfaceCreateInfoKHR -> Bool
== :: RayTracingPipelineInterfaceCreateInfoKHR
-> RayTracingPipelineInterfaceCreateInfoKHR -> Bool
$c== :: RayTracingPipelineInterfaceCreateInfoKHR
-> RayTracingPipelineInterfaceCreateInfoKHR -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (RayTracingPipelineInterfaceCreateInfoKHR)
#endif
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 24 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 ("width" ::: Word32) -> ("width" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RayTracingPipelineInterfaceCreateInfoKHR
p Ptr RayTracingPipelineInterfaceCreateInfoKHR
-> Int -> Ptr ("width" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Word32)) ("width" ::: Word32
maxPipelineRayPayloadSize)
Ptr ("width" ::: Word32) -> ("width" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RayTracingPipelineInterfaceCreateInfoKHR
p Ptr RayTracingPipelineInterfaceCreateInfoKHR
-> Int -> Ptr ("width" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr Word32)) ("width" ::: Word32
maxPipelineRayHitAttributeSize)
IO b
f
cStructSize :: Int
cStructSize = 24
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 ("width" ::: Word32) -> ("width" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RayTracingPipelineInterfaceCreateInfoKHR
p Ptr RayTracingPipelineInterfaceCreateInfoKHR
-> Int -> Ptr ("width" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Word32)) ("width" ::: Word32
forall a. Zero a => a
zero)
Ptr ("width" ::: Word32) -> ("width" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RayTracingPipelineInterfaceCreateInfoKHR
p Ptr RayTracingPipelineInterfaceCreateInfoKHR
-> Int -> Ptr ("width" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr Word32)) ("width" ::: 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
"width" ::: Word32
maxPipelineRayPayloadSize <- Ptr ("width" ::: Word32) -> IO ("width" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr RayTracingPipelineInterfaceCreateInfoKHR
p Ptr RayTracingPipelineInterfaceCreateInfoKHR
-> Int -> Ptr ("width" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Word32))
"width" ::: Word32
maxPipelineRayHitAttributeSize <- Ptr ("width" ::: Word32) -> IO ("width" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr RayTracingPipelineInterfaceCreateInfoKHR
p Ptr RayTracingPipelineInterfaceCreateInfoKHR
-> Int -> Ptr ("width" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: 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
$ ("width" ::: Word32)
-> ("width" ::: Word32) -> RayTracingPipelineInterfaceCreateInfoKHR
RayTracingPipelineInterfaceCreateInfoKHR
"width" ::: Word32
maxPipelineRayPayloadSize "width" ::: Word32
maxPipelineRayHitAttributeSize
instance Storable RayTracingPipelineInterfaceCreateInfoKHR where
sizeOf :: RayTracingPipelineInterfaceCreateInfoKHR -> Int
sizeOf ~RayTracingPipelineInterfaceCreateInfoKHR
_ = 24
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 = ("width" ::: Word32)
-> ("width" ::: Word32) -> RayTracingPipelineInterfaceCreateInfoKHR
RayTracingPipelineInterfaceCreateInfoKHR
"width" ::: Word32
forall a. Zero a => a
zero
"width" ::: Word32
forall a. Zero a => a
zero
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 #-}
conNameRayTracingShaderGroupTypeKHR :: String
conNameRayTracingShaderGroupTypeKHR :: String
conNameRayTracingShaderGroupTypeKHR = "RayTracingShaderGroupTypeKHR"
enumPrefixRayTracingShaderGroupTypeKHR :: String
enumPrefixRayTracingShaderGroupTypeKHR :: String
enumPrefixRayTracingShaderGroupTypeKHR = "RAY_TRACING_SHADER_GROUP_TYPE_"
showTableRayTracingShaderGroupTypeKHR :: [(RayTracingShaderGroupTypeKHR, String)]
showTableRayTracingShaderGroupTypeKHR :: [(RayTracingShaderGroupTypeKHR, String)]
showTableRayTracingShaderGroupTypeKHR =
[ (RayTracingShaderGroupTypeKHR
RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_KHR , "GENERAL_KHR")
, (RayTracingShaderGroupTypeKHR
RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR , "TRIANGLES_HIT_GROUP_KHR")
, (RayTracingShaderGroupTypeKHR
RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR, "PROCEDURAL_HIT_GROUP_KHR")
]
instance Show RayTracingShaderGroupTypeKHR where
showsPrec :: Int -> RayTracingShaderGroupTypeKHR -> ShowS
showsPrec = String
-> [(RayTracingShaderGroupTypeKHR, String)]
-> String
-> (RayTracingShaderGroupTypeKHR -> Int32)
-> (Int32 -> ShowS)
-> Int
-> RayTracingShaderGroupTypeKHR
-> ShowS
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec String
enumPrefixRayTracingShaderGroupTypeKHR
[(RayTracingShaderGroupTypeKHR, String)]
showTableRayTracingShaderGroupTypeKHR
String
conNameRayTracingShaderGroupTypeKHR
(\(RayTracingShaderGroupTypeKHR x :: Int32
x) -> Int32
x)
(Int -> Int32 -> ShowS
forall a. Show a => Int -> a -> ShowS
showsPrec 11)
instance Read RayTracingShaderGroupTypeKHR where
readPrec :: ReadPrec RayTracingShaderGroupTypeKHR
readPrec = String
-> [(RayTracingShaderGroupTypeKHR, String)]
-> String
-> (Int32 -> RayTracingShaderGroupTypeKHR)
-> ReadPrec RayTracingShaderGroupTypeKHR
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec String
enumPrefixRayTracingShaderGroupTypeKHR
[(RayTracingShaderGroupTypeKHR, String)]
showTableRayTracingShaderGroupTypeKHR
String
conNameRayTracingShaderGroupTypeKHR
Int32 -> RayTracingShaderGroupTypeKHR
RayTracingShaderGroupTypeKHR
newtype ShaderGroupShaderKHR = ShaderGroupShaderKHR Int32
deriving newtype (ShaderGroupShaderKHR -> ShaderGroupShaderKHR -> Bool
(ShaderGroupShaderKHR -> ShaderGroupShaderKHR -> Bool)
-> (ShaderGroupShaderKHR -> ShaderGroupShaderKHR -> Bool)
-> Eq ShaderGroupShaderKHR
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ShaderGroupShaderKHR -> ShaderGroupShaderKHR -> Bool
$c/= :: ShaderGroupShaderKHR -> ShaderGroupShaderKHR -> Bool
== :: ShaderGroupShaderKHR -> ShaderGroupShaderKHR -> Bool
$c== :: ShaderGroupShaderKHR -> ShaderGroupShaderKHR -> Bool
Eq, Eq ShaderGroupShaderKHR
Eq ShaderGroupShaderKHR =>
(ShaderGroupShaderKHR -> ShaderGroupShaderKHR -> Ordering)
-> (ShaderGroupShaderKHR -> ShaderGroupShaderKHR -> Bool)
-> (ShaderGroupShaderKHR -> ShaderGroupShaderKHR -> Bool)
-> (ShaderGroupShaderKHR -> ShaderGroupShaderKHR -> Bool)
-> (ShaderGroupShaderKHR -> ShaderGroupShaderKHR -> Bool)
-> (ShaderGroupShaderKHR
-> ShaderGroupShaderKHR -> ShaderGroupShaderKHR)
-> (ShaderGroupShaderKHR
-> ShaderGroupShaderKHR -> ShaderGroupShaderKHR)
-> Ord ShaderGroupShaderKHR
ShaderGroupShaderKHR -> ShaderGroupShaderKHR -> Bool
ShaderGroupShaderKHR -> ShaderGroupShaderKHR -> Ordering
ShaderGroupShaderKHR
-> ShaderGroupShaderKHR -> ShaderGroupShaderKHR
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 :: ShaderGroupShaderKHR
-> ShaderGroupShaderKHR -> ShaderGroupShaderKHR
$cmin :: ShaderGroupShaderKHR
-> ShaderGroupShaderKHR -> ShaderGroupShaderKHR
max :: ShaderGroupShaderKHR
-> ShaderGroupShaderKHR -> ShaderGroupShaderKHR
$cmax :: ShaderGroupShaderKHR
-> ShaderGroupShaderKHR -> ShaderGroupShaderKHR
>= :: ShaderGroupShaderKHR -> ShaderGroupShaderKHR -> Bool
$c>= :: ShaderGroupShaderKHR -> ShaderGroupShaderKHR -> Bool
> :: ShaderGroupShaderKHR -> ShaderGroupShaderKHR -> Bool
$c> :: ShaderGroupShaderKHR -> ShaderGroupShaderKHR -> Bool
<= :: ShaderGroupShaderKHR -> ShaderGroupShaderKHR -> Bool
$c<= :: ShaderGroupShaderKHR -> ShaderGroupShaderKHR -> Bool
< :: ShaderGroupShaderKHR -> ShaderGroupShaderKHR -> Bool
$c< :: ShaderGroupShaderKHR -> ShaderGroupShaderKHR -> Bool
compare :: ShaderGroupShaderKHR -> ShaderGroupShaderKHR -> Ordering
$ccompare :: ShaderGroupShaderKHR -> ShaderGroupShaderKHR -> Ordering
$cp1Ord :: Eq ShaderGroupShaderKHR
Ord, Ptr b -> Int -> IO ShaderGroupShaderKHR
Ptr b -> Int -> ShaderGroupShaderKHR -> IO ()
Ptr ShaderGroupShaderKHR -> IO ShaderGroupShaderKHR
Ptr ShaderGroupShaderKHR -> Int -> IO ShaderGroupShaderKHR
Ptr ShaderGroupShaderKHR -> Int -> ShaderGroupShaderKHR -> IO ()
Ptr ShaderGroupShaderKHR -> ShaderGroupShaderKHR -> IO ()
ShaderGroupShaderKHR -> Int
(ShaderGroupShaderKHR -> Int)
-> (ShaderGroupShaderKHR -> Int)
-> (Ptr ShaderGroupShaderKHR -> Int -> IO ShaderGroupShaderKHR)
-> (Ptr ShaderGroupShaderKHR
-> Int -> ShaderGroupShaderKHR -> IO ())
-> (forall b. Ptr b -> Int -> IO ShaderGroupShaderKHR)
-> (forall b. Ptr b -> Int -> ShaderGroupShaderKHR -> IO ())
-> (Ptr ShaderGroupShaderKHR -> IO ShaderGroupShaderKHR)
-> (Ptr ShaderGroupShaderKHR -> ShaderGroupShaderKHR -> IO ())
-> Storable ShaderGroupShaderKHR
forall b. Ptr b -> Int -> IO ShaderGroupShaderKHR
forall b. Ptr b -> Int -> ShaderGroupShaderKHR -> 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 ShaderGroupShaderKHR -> ShaderGroupShaderKHR -> IO ()
$cpoke :: Ptr ShaderGroupShaderKHR -> ShaderGroupShaderKHR -> IO ()
peek :: Ptr ShaderGroupShaderKHR -> IO ShaderGroupShaderKHR
$cpeek :: Ptr ShaderGroupShaderKHR -> IO ShaderGroupShaderKHR
pokeByteOff :: Ptr b -> Int -> ShaderGroupShaderKHR -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> ShaderGroupShaderKHR -> IO ()
peekByteOff :: Ptr b -> Int -> IO ShaderGroupShaderKHR
$cpeekByteOff :: forall b. Ptr b -> Int -> IO ShaderGroupShaderKHR
pokeElemOff :: Ptr ShaderGroupShaderKHR -> Int -> ShaderGroupShaderKHR -> IO ()
$cpokeElemOff :: Ptr ShaderGroupShaderKHR -> Int -> ShaderGroupShaderKHR -> IO ()
peekElemOff :: Ptr ShaderGroupShaderKHR -> Int -> IO ShaderGroupShaderKHR
$cpeekElemOff :: Ptr ShaderGroupShaderKHR -> Int -> IO ShaderGroupShaderKHR
alignment :: ShaderGroupShaderKHR -> Int
$calignment :: ShaderGroupShaderKHR -> Int
sizeOf :: ShaderGroupShaderKHR -> Int
$csizeOf :: ShaderGroupShaderKHR -> Int
Storable, ShaderGroupShaderKHR
ShaderGroupShaderKHR -> Zero ShaderGroupShaderKHR
forall a. a -> Zero a
zero :: ShaderGroupShaderKHR
$czero :: ShaderGroupShaderKHR
Zero)
pattern $bSHADER_GROUP_SHADER_GENERAL_KHR :: ShaderGroupShaderKHR
$mSHADER_GROUP_SHADER_GENERAL_KHR :: forall r. ShaderGroupShaderKHR -> (Void# -> r) -> (Void# -> r) -> r
SHADER_GROUP_SHADER_GENERAL_KHR = ShaderGroupShaderKHR 0
pattern $bSHADER_GROUP_SHADER_CLOSEST_HIT_KHR :: ShaderGroupShaderKHR
$mSHADER_GROUP_SHADER_CLOSEST_HIT_KHR :: forall r. ShaderGroupShaderKHR -> (Void# -> r) -> (Void# -> r) -> r
SHADER_GROUP_SHADER_CLOSEST_HIT_KHR = ShaderGroupShaderKHR 1
pattern $bSHADER_GROUP_SHADER_ANY_HIT_KHR :: ShaderGroupShaderKHR
$mSHADER_GROUP_SHADER_ANY_HIT_KHR :: forall r. ShaderGroupShaderKHR -> (Void# -> r) -> (Void# -> r) -> r
SHADER_GROUP_SHADER_ANY_HIT_KHR = ShaderGroupShaderKHR 2
pattern $bSHADER_GROUP_SHADER_INTERSECTION_KHR :: ShaderGroupShaderKHR
$mSHADER_GROUP_SHADER_INTERSECTION_KHR :: forall r. ShaderGroupShaderKHR -> (Void# -> r) -> (Void# -> r) -> r
SHADER_GROUP_SHADER_INTERSECTION_KHR = ShaderGroupShaderKHR 3
{-# complete SHADER_GROUP_SHADER_GENERAL_KHR,
SHADER_GROUP_SHADER_CLOSEST_HIT_KHR,
SHADER_GROUP_SHADER_ANY_HIT_KHR,
SHADER_GROUP_SHADER_INTERSECTION_KHR :: ShaderGroupShaderKHR #-}
conNameShaderGroupShaderKHR :: String
conNameShaderGroupShaderKHR :: String
conNameShaderGroupShaderKHR = "ShaderGroupShaderKHR"
enumPrefixShaderGroupShaderKHR :: String
enumPrefixShaderGroupShaderKHR :: String
enumPrefixShaderGroupShaderKHR = "SHADER_GROUP_SHADER_"
showTableShaderGroupShaderKHR :: [(ShaderGroupShaderKHR, String)]
showTableShaderGroupShaderKHR :: [(ShaderGroupShaderKHR, String)]
showTableShaderGroupShaderKHR =
[ (ShaderGroupShaderKHR
SHADER_GROUP_SHADER_GENERAL_KHR , "GENERAL_KHR")
, (ShaderGroupShaderKHR
SHADER_GROUP_SHADER_CLOSEST_HIT_KHR , "CLOSEST_HIT_KHR")
, (ShaderGroupShaderKHR
SHADER_GROUP_SHADER_ANY_HIT_KHR , "ANY_HIT_KHR")
, (ShaderGroupShaderKHR
SHADER_GROUP_SHADER_INTERSECTION_KHR, "INTERSECTION_KHR")
]
instance Show ShaderGroupShaderKHR where
showsPrec :: Int -> ShaderGroupShaderKHR -> ShowS
showsPrec = String
-> [(ShaderGroupShaderKHR, String)]
-> String
-> (ShaderGroupShaderKHR -> Int32)
-> (Int32 -> ShowS)
-> Int
-> ShaderGroupShaderKHR
-> ShowS
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec String
enumPrefixShaderGroupShaderKHR
[(ShaderGroupShaderKHR, String)]
showTableShaderGroupShaderKHR
String
conNameShaderGroupShaderKHR
(\(ShaderGroupShaderKHR x :: Int32
x) -> Int32
x)
(Int -> Int32 -> ShowS
forall a. Show a => Int -> a -> ShowS
showsPrec 11)
instance Read ShaderGroupShaderKHR where
readPrec :: ReadPrec ShaderGroupShaderKHR
readPrec = String
-> [(ShaderGroupShaderKHR, String)]
-> String
-> (Int32 -> ShaderGroupShaderKHR)
-> ReadPrec ShaderGroupShaderKHR
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec String
enumPrefixShaderGroupShaderKHR
[(ShaderGroupShaderKHR, String)]
showTableShaderGroupShaderKHR
String
conNameShaderGroupShaderKHR
Int32 -> ShaderGroupShaderKHR
ShaderGroupShaderKHR
type KHR_RAY_TRACING_PIPELINE_SPEC_VERSION = 1
pattern KHR_RAY_TRACING_PIPELINE_SPEC_VERSION :: forall a . Integral a => a
pattern $bKHR_RAY_TRACING_PIPELINE_SPEC_VERSION :: a
$mKHR_RAY_TRACING_PIPELINE_SPEC_VERSION :: forall r a. Integral a => a -> (Void# -> r) -> (Void# -> r) -> r
KHR_RAY_TRACING_PIPELINE_SPEC_VERSION = 1
type KHR_RAY_TRACING_PIPELINE_EXTENSION_NAME = "VK_KHR_ray_tracing_pipeline"
pattern KHR_RAY_TRACING_PIPELINE_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $bKHR_RAY_TRACING_PIPELINE_EXTENSION_NAME :: a
$mKHR_RAY_TRACING_PIPELINE_EXTENSION_NAME :: forall r a.
(Eq a, IsString a) =>
a -> (Void# -> r) -> (Void# -> r) -> r
KHR_RAY_TRACING_PIPELINE_EXTENSION_NAME = "VK_KHR_ray_tracing_pipeline"