{-# language CPP #-}
module Vulkan.Extensions.VK_NV_ray_tracing ( compileDeferredNV
, createAccelerationStructureNV
, withAccelerationStructureNV
, destroyAccelerationStructureNV
, getAccelerationStructureMemoryRequirementsNV
, bindAccelerationStructureMemoryNV
, cmdCopyAccelerationStructureNV
, cmdWriteAccelerationStructuresPropertiesNV
, cmdBuildAccelerationStructureNV
, cmdTraceRaysNV
, getAccelerationStructureHandleNV
, createRayTracingPipelinesNV
, withRayTracingPipelinesNV
, pattern SHADER_STAGE_RAYGEN_BIT_NV
, pattern SHADER_STAGE_ANY_HIT_BIT_NV
, pattern SHADER_STAGE_CLOSEST_HIT_BIT_NV
, pattern SHADER_STAGE_MISS_BIT_NV
, pattern SHADER_STAGE_INTERSECTION_BIT_NV
, pattern SHADER_STAGE_CALLABLE_BIT_NV
, pattern PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_NV
, pattern PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_NV
, pattern BUFFER_USAGE_RAY_TRACING_BIT_NV
, pattern PIPELINE_BIND_POINT_RAY_TRACING_NV
, pattern ACCESS_ACCELERATION_STRUCTURE_READ_BIT_NV
, pattern ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_NV
, pattern INDEX_TYPE_NONE_NV
, pattern RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_NV
, pattern RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_NV
, pattern RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_NV
, pattern GEOMETRY_TYPE_TRIANGLES_NV
, pattern GEOMETRY_TYPE_AABBS_NV
, pattern ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_NV
, pattern ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_NV
, pattern GEOMETRY_OPAQUE_BIT_NV
, pattern GEOMETRY_NO_DUPLICATE_ANY_HIT_INVOCATION_BIT_NV
, pattern GEOMETRY_INSTANCE_TRIANGLE_CULL_DISABLE_BIT_NV
, pattern GEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_NV
, pattern GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_NV
, pattern GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_NV
, pattern BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_NV
, pattern BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_NV
, pattern BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_NV
, pattern BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_NV
, pattern BUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_NV
, pattern COPY_ACCELERATION_STRUCTURE_MODE_CLONE_NV
, pattern COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_NV
, pattern SHADER_UNUSED_NV
, getRayTracingShaderGroupHandlesNV
, RayTracingShaderGroupCreateInfoNV(..)
, RayTracingPipelineCreateInfoNV(..)
, GeometryTrianglesNV(..)
, GeometryAABBNV(..)
, GeometryDataNV(..)
, GeometryNV(..)
, AccelerationStructureInfoNV(..)
, AccelerationStructureCreateInfoNV(..)
, BindAccelerationStructureMemoryInfoNV(..)
, WriteDescriptorSetAccelerationStructureNV(..)
, AccelerationStructureMemoryRequirementsInfoNV(..)
, PhysicalDeviceRayTracingPropertiesNV(..)
, AccelerationStructureMemoryRequirementsTypeNV( ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_OBJECT_NV
, ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_BUILD_SCRATCH_NV
, ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_UPDATE_SCRATCH_NV
, ..
)
, GeometryFlagsNV
, GeometryInstanceFlagsNV
, BuildAccelerationStructureFlagsNV
, GeometryFlagBitsNV
, GeometryInstanceFlagBitsNV
, BuildAccelerationStructureFlagBitsNV
, CopyAccelerationStructureModeNV
, AccelerationStructureTypeNV
, GeometryTypeNV
, RayTracingShaderGroupTypeNV
, AabbPositionsNV
, TransformMatrixNV
, AccelerationStructureInstanceNV
, NV_RAY_TRACING_SPEC_VERSION
, pattern NV_RAY_TRACING_SPEC_VERSION
, NV_RAY_TRACING_EXTENSION_NAME
, pattern NV_RAY_TRACING_EXTENSION_NAME
, AccelerationStructureNV(..)
, AabbPositionsKHR(..)
, TransformMatrixKHR(..)
, AccelerationStructureInstanceKHR(..)
, getRayTracingShaderGroupHandlesKHR
, DebugReportObjectTypeEXT(..)
, GeometryInstanceFlagBitsKHR(..)
, GeometryInstanceFlagsKHR
, GeometryFlagBitsKHR(..)
, GeometryFlagsKHR
, BuildAccelerationStructureFlagBitsKHR(..)
, BuildAccelerationStructureFlagsKHR
, CopyAccelerationStructureModeKHR(..)
, AccelerationStructureTypeKHR(..)
, GeometryTypeKHR(..)
, RayTracingShaderGroupTypeKHR(..)
, MemoryRequirements2KHR
, pattern GEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_KHR
, 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 (allocaBytes)
import Foreign.Marshal.Alloc (callocBytes)
import Foreign.Marshal.Alloc (free)
import GHC.Base (when)
import GHC.IO (throwIO)
import GHC.Ptr (castPtr)
import GHC.Ptr (nullFunPtr)
import Foreign.Ptr (nullPtr)
import Foreign.Ptr (plusPtr)
import GHC.Show (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 (boolToBool32)
import Vulkan.Core10.Pipeline (destroyPipeline)
import Vulkan.CStruct.Extends (forgetExtensions)
import Vulkan.Extensions.VK_KHR_ray_tracing_pipeline (getRayTracingShaderGroupHandlesKHR)
import Vulkan.CStruct.Extends (peekSomeCStruct)
import Vulkan.CStruct.Extends (pokeSomeCStruct)
import Vulkan.NamedType ((:::))
import Vulkan.Extensions.VK_KHR_acceleration_structure (AabbPositionsKHR)
import Vulkan.Extensions.VK_KHR_acceleration_structure (AccelerationStructureInstanceKHR)
import Vulkan.Extensions.Handles (AccelerationStructureNV)
import Vulkan.Extensions.Handles (AccelerationStructureNV(..))
import Vulkan.Extensions.VK_KHR_acceleration_structure (AccelerationStructureTypeKHR)
import Vulkan.Core10.AllocationCallbacks (AllocationCallbacks)
import Vulkan.Core10.FundamentalTypes (Bool32)
import Vulkan.Core10.FundamentalTypes (Bool32(..))
import Vulkan.Core10.Handles (Buffer)
import Vulkan.Core10.Handles (Buffer(..))
import Vulkan.Extensions.VK_KHR_acceleration_structure (BuildAccelerationStructureFlagBitsKHR)
import Vulkan.Extensions.VK_KHR_acceleration_structure (BuildAccelerationStructureFlagsKHR)
import Vulkan.CStruct.Extends (Chain)
import Vulkan.Core10.Handles (CommandBuffer)
import Vulkan.Core10.Handles (CommandBuffer(..))
import Vulkan.Core10.Handles (CommandBuffer(CommandBuffer))
import Vulkan.Core10.Handles (CommandBuffer_T)
import Vulkan.Extensions.VK_KHR_acceleration_structure (CopyAccelerationStructureModeKHR)
import Vulkan.Extensions.VK_KHR_acceleration_structure (CopyAccelerationStructureModeKHR(..))
import Vulkan.Core10.Handles (Device)
import Vulkan.Core10.Handles (Device(..))
import Vulkan.Core10.Handles (Device(Device))
import Vulkan.Dynamic (DeviceCmds(pVkBindAccelerationStructureMemoryNV))
import Vulkan.Dynamic (DeviceCmds(pVkCmdBuildAccelerationStructureNV))
import Vulkan.Dynamic (DeviceCmds(pVkCmdCopyAccelerationStructureNV))
import Vulkan.Dynamic (DeviceCmds(pVkCmdTraceRaysNV))
import Vulkan.Dynamic (DeviceCmds(pVkCmdWriteAccelerationStructuresPropertiesNV))
import Vulkan.Dynamic (DeviceCmds(pVkCompileDeferredNV))
import Vulkan.Dynamic (DeviceCmds(pVkCreateAccelerationStructureNV))
import Vulkan.Dynamic (DeviceCmds(pVkCreateRayTracingPipelinesNV))
import Vulkan.Dynamic (DeviceCmds(pVkDestroyAccelerationStructureNV))
import Vulkan.Dynamic (DeviceCmds(pVkGetAccelerationStructureHandleNV))
import Vulkan.Dynamic (DeviceCmds(pVkGetAccelerationStructureMemoryRequirementsNV))
import Vulkan.Core10.Handles (DeviceMemory)
import Vulkan.Core10.FundamentalTypes (DeviceSize)
import Vulkan.Core10.Handles (Device_T)
import Vulkan.CStruct.Extends (Extends)
import Vulkan.CStruct.Extends (Extendss)
import Vulkan.CStruct.Extends (Extensible(..))
import Vulkan.Core10.Enums.Format (Format)
import Vulkan.Extensions.VK_KHR_acceleration_structure (GeometryFlagBitsKHR)
import Vulkan.Extensions.VK_KHR_acceleration_structure (GeometryFlagsKHR)
import Vulkan.Extensions.VK_KHR_acceleration_structure (GeometryInstanceFlagBitsKHR)
import Vulkan.Extensions.VK_KHR_acceleration_structure (GeometryInstanceFlagsKHR)
import Vulkan.Extensions.VK_KHR_acceleration_structure (GeometryTypeKHR)
import Vulkan.Core10.Enums.IndexType (IndexType)
import Vulkan.Extensions.VK_KHR_get_memory_requirements2 (MemoryRequirements2KHR)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_descriptor_buffer (OpaqueCaptureDescriptorDataCreateInfoEXT)
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_KHR_maintenance5 (PipelineCreateFlags2CreateInfoKHR)
import {-# SOURCE #-} Vulkan.Core13.Promoted_From_VK_EXT_pipeline_creation_feedback (PipelineCreationFeedbackCreateInfo)
import Vulkan.Core10.Handles (PipelineLayout)
import Vulkan.Core10.Pipeline (PipelineShaderStageCreateInfo)
import Vulkan.CStruct.Extends (PokeChain)
import Vulkan.CStruct.Extends (PokeChain(..))
import Vulkan.Core10.Handles (QueryPool)
import Vulkan.Core10.Handles (QueryPool(..))
import Vulkan.Core10.Enums.QueryType (QueryType)
import Vulkan.Core10.Enums.QueryType (QueryType(..))
import Vulkan.Extensions.VK_KHR_ray_tracing_pipeline (RayTracingShaderGroupTypeKHR)
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.Extensions.VK_KHR_acceleration_structure (TransformMatrixKHR)
import Vulkan.Exception (VulkanException(..))
import Vulkan.Extensions.VK_KHR_acceleration_structure (AccelerationStructureTypeKHR(ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_KHR))
import Vulkan.Extensions.VK_KHR_acceleration_structure (AccelerationStructureTypeKHR(ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_KHR))
import Vulkan.Core10.Enums.AccessFlagBits (AccessFlags)
import Vulkan.Core10.Enums.AccessFlagBits (AccessFlagBits(ACCESS_ACCELERATION_STRUCTURE_READ_BIT_KHR))
import Vulkan.Core10.Enums.AccessFlagBits (AccessFlags)
import Vulkan.Core10.Enums.AccessFlagBits (AccessFlagBits(ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_KHR))
import Vulkan.Core10.Enums.BufferUsageFlagBits (BufferUsageFlags)
import Vulkan.Core10.Enums.BufferUsageFlagBits (BufferUsageFlagBits(BUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHR))
import Vulkan.Extensions.VK_KHR_acceleration_structure (BuildAccelerationStructureFlagsKHR)
import Vulkan.Extensions.VK_KHR_acceleration_structure (BuildAccelerationStructureFlagBitsKHR(BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_KHR))
import Vulkan.Extensions.VK_KHR_acceleration_structure (BuildAccelerationStructureFlagsKHR)
import Vulkan.Extensions.VK_KHR_acceleration_structure (BuildAccelerationStructureFlagBitsKHR(BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_KHR))
import Vulkan.Extensions.VK_KHR_acceleration_structure (BuildAccelerationStructureFlagsKHR)
import Vulkan.Extensions.VK_KHR_acceleration_structure (BuildAccelerationStructureFlagBitsKHR(BUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_KHR))
import Vulkan.Extensions.VK_KHR_acceleration_structure (BuildAccelerationStructureFlagsKHR)
import Vulkan.Extensions.VK_KHR_acceleration_structure (BuildAccelerationStructureFlagBitsKHR(BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_KHR))
import Vulkan.Extensions.VK_KHR_acceleration_structure (BuildAccelerationStructureFlagsKHR)
import Vulkan.Extensions.VK_KHR_acceleration_structure (BuildAccelerationStructureFlagBitsKHR(BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_KHR))
import Vulkan.Extensions.VK_KHR_acceleration_structure (CopyAccelerationStructureModeKHR(COPY_ACCELERATION_STRUCTURE_MODE_CLONE_KHR))
import Vulkan.Extensions.VK_KHR_acceleration_structure (CopyAccelerationStructureModeKHR(COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_KHR))
import Vulkan.Extensions.VK_KHR_acceleration_structure (GeometryInstanceFlagsKHR)
import Vulkan.Extensions.VK_KHR_acceleration_structure (GeometryInstanceFlagBitsKHR(GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_KHR))
import Vulkan.Extensions.VK_KHR_acceleration_structure (GeometryInstanceFlagsKHR)
import Vulkan.Extensions.VK_KHR_acceleration_structure (GeometryInstanceFlagBitsKHR(GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_KHR))
import Vulkan.Extensions.VK_KHR_acceleration_structure (GeometryInstanceFlagsKHR)
import Vulkan.Extensions.VK_KHR_acceleration_structure (GeometryInstanceFlagBitsKHR(GEOMETRY_INSTANCE_TRIANGLE_FACING_CULL_DISABLE_BIT_KHR))
import Vulkan.Extensions.VK_KHR_acceleration_structure (pattern GEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_KHR)
import Vulkan.Extensions.VK_KHR_acceleration_structure (GeometryFlagsKHR)
import Vulkan.Extensions.VK_KHR_acceleration_structure (GeometryFlagBitsKHR(GEOMETRY_NO_DUPLICATE_ANY_HIT_INVOCATION_BIT_KHR))
import Vulkan.Extensions.VK_KHR_acceleration_structure (GeometryFlagsKHR)
import Vulkan.Extensions.VK_KHR_acceleration_structure (GeometryFlagBitsKHR(GEOMETRY_OPAQUE_BIT_KHR))
import Vulkan.Extensions.VK_KHR_acceleration_structure (GeometryTypeKHR(GEOMETRY_TYPE_AABBS_KHR))
import Vulkan.Extensions.VK_KHR_acceleration_structure (GeometryTypeKHR(GEOMETRY_TYPE_TRIANGLES_KHR))
import Vulkan.Core10.Enums.IndexType (IndexType(INDEX_TYPE_NONE_KHR))
import Vulkan.Core10.Enums.PipelineBindPoint (PipelineBindPoint(PIPELINE_BIND_POINT_RAY_TRACING_KHR))
import Vulkan.Core10.Enums.PipelineStageFlagBits (PipelineStageFlags)
import Vulkan.Core10.Enums.PipelineStageFlagBits (PipelineStageFlagBits(PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR))
import Vulkan.Core10.Enums.PipelineStageFlagBits (PipelineStageFlags)
import Vulkan.Core10.Enums.PipelineStageFlagBits (PipelineStageFlagBits(PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_KHR))
import Vulkan.Extensions.VK_KHR_ray_tracing_pipeline (RayTracingShaderGroupTypeKHR(RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_KHR))
import Vulkan.Extensions.VK_KHR_ray_tracing_pipeline (RayTracingShaderGroupTypeKHR(RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR))
import Vulkan.Extensions.VK_KHR_ray_tracing_pipeline (RayTracingShaderGroupTypeKHR(RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR))
import Vulkan.Core10.Enums.ShaderStageFlagBits (ShaderStageFlags)
import Vulkan.Core10.Enums.ShaderStageFlagBits (ShaderStageFlagBits(SHADER_STAGE_ANY_HIT_BIT_KHR))
import Vulkan.Core10.Enums.ShaderStageFlagBits (ShaderStageFlags)
import Vulkan.Core10.Enums.ShaderStageFlagBits (ShaderStageFlagBits(SHADER_STAGE_CALLABLE_BIT_KHR))
import Vulkan.Core10.Enums.ShaderStageFlagBits (ShaderStageFlags)
import Vulkan.Core10.Enums.ShaderStageFlagBits (ShaderStageFlagBits(SHADER_STAGE_CLOSEST_HIT_BIT_KHR))
import Vulkan.Core10.Enums.ShaderStageFlagBits (ShaderStageFlags)
import Vulkan.Core10.Enums.ShaderStageFlagBits (ShaderStageFlagBits(SHADER_STAGE_INTERSECTION_BIT_KHR))
import Vulkan.Core10.Enums.ShaderStageFlagBits (ShaderStageFlags)
import Vulkan.Core10.Enums.ShaderStageFlagBits (ShaderStageFlagBits(SHADER_STAGE_MISS_BIT_KHR))
import Vulkan.Core10.Enums.ShaderStageFlagBits (ShaderStageFlags)
import Vulkan.Core10.Enums.ShaderStageFlagBits (ShaderStageFlagBits(SHADER_STAGE_RAYGEN_BIT_KHR))
import Vulkan.Core10.APIConstants (pattern SHADER_UNUSED_KHR)
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_ACCELERATION_STRUCTURE_CREATE_INFO_NV))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_ACCELERATION_STRUCTURE_INFO_NV))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_INFO_NV))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_BIND_ACCELERATION_STRUCTURE_MEMORY_INFO_NV))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_GEOMETRY_AABB_NV))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_GEOMETRY_NV))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_GEOMETRY_TRIANGLES_NV))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PROPERTIES_NV))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_RAY_TRACING_PIPELINE_CREATE_INFO_NV))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_RAY_TRACING_SHADER_GROUP_CREATE_INFO_NV))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_NV))
import Vulkan.Core10.Enums.Result (Result(SUCCESS))
import Vulkan.Extensions.VK_KHR_ray_tracing_pipeline (getRayTracingShaderGroupHandlesKHR)
import Vulkan.Extensions.VK_KHR_acceleration_structure (AabbPositionsKHR(..))
import Vulkan.Extensions.VK_KHR_acceleration_structure (AccelerationStructureInstanceKHR(..))
import Vulkan.Extensions.Handles (AccelerationStructureNV(..))
import Vulkan.Extensions.VK_KHR_acceleration_structure (AccelerationStructureTypeKHR(..))
import Vulkan.Extensions.VK_KHR_acceleration_structure (BuildAccelerationStructureFlagBitsKHR(..))
import Vulkan.Extensions.VK_KHR_acceleration_structure (BuildAccelerationStructureFlagsKHR)
import Vulkan.Extensions.VK_KHR_acceleration_structure (CopyAccelerationStructureModeKHR(..))
import Vulkan.Extensions.VK_EXT_debug_report (DebugReportObjectTypeEXT(..))
import Vulkan.Extensions.VK_KHR_acceleration_structure (GeometryFlagBitsKHR(..))
import Vulkan.Extensions.VK_KHR_acceleration_structure (GeometryFlagsKHR)
import Vulkan.Extensions.VK_KHR_acceleration_structure (GeometryInstanceFlagBitsKHR(..))
import Vulkan.Extensions.VK_KHR_acceleration_structure (GeometryInstanceFlagsKHR)
import Vulkan.Extensions.VK_KHR_acceleration_structure (GeometryTypeKHR(..))
import Vulkan.Extensions.VK_KHR_get_memory_requirements2 (MemoryRequirements2KHR)
import Vulkan.Extensions.VK_KHR_ray_tracing_pipeline (RayTracingShaderGroupTypeKHR(..))
import Vulkan.Core10.APIConstants (SHADER_UNUSED_KHR)
import Vulkan.Extensions.VK_KHR_acceleration_structure (TransformMatrixKHR(..))
import Vulkan.Extensions.VK_KHR_acceleration_structure (pattern GEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_KHR)
import Vulkan.Core10.APIConstants (pattern SHADER_UNUSED_KHR)
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkCompileDeferredNV
:: FunPtr (Ptr Device_T -> Pipeline -> Word32 -> IO Result) -> Ptr Device_T -> Pipeline -> Word32 -> IO Result
compileDeferredNV :: forall io
. (MonadIO io)
=>
Device
->
Pipeline
->
("shader" ::: Word32)
-> io ()
compileDeferredNV :: forall (io :: * -> *).
MonadIO io =>
Device -> Pipeline -> ("shader" ::: Word32) -> io ()
compileDeferredNV Device
device Pipeline
pipeline "shader" ::: Word32
shader = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
let vkCompileDeferredNVPtr :: FunPtr
(Ptr Device_T -> Pipeline -> ("shader" ::: Word32) -> IO Result)
vkCompileDeferredNVPtr = DeviceCmds
-> FunPtr
(Ptr Device_T -> Pipeline -> ("shader" ::: Word32) -> IO Result)
pVkCompileDeferredNV (case Device
device of Device{DeviceCmds
$sel:deviceCmds:Device :: Device -> DeviceCmds
deviceCmds :: DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr Device_T -> Pipeline -> ("shader" ::: Word32) -> IO Result)
vkCompileDeferredNVPtr forall a. Eq a => a -> a -> Bool
/= forall a. FunPtr a
nullFunPtr) forall a b. (a -> b) -> a -> b
$
forall e a. Exception e => e -> IO a
throwIO forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkCompileDeferredNV is null" forall a. Maybe a
Nothing forall a. Maybe a
Nothing
let vkCompileDeferredNV' :: Ptr Device_T -> Pipeline -> ("shader" ::: Word32) -> IO Result
vkCompileDeferredNV' = FunPtr
(Ptr Device_T -> Pipeline -> ("shader" ::: Word32) -> IO Result)
-> Ptr Device_T -> Pipeline -> ("shader" ::: Word32) -> IO Result
mkVkCompileDeferredNV FunPtr
(Ptr Device_T -> Pipeline -> ("shader" ::: Word32) -> IO Result)
vkCompileDeferredNVPtr
Result
r <- forall a. String -> IO a -> IO a
traceAroundEvent String
"vkCompileDeferredNV" (Ptr Device_T -> Pipeline -> ("shader" ::: Word32) -> IO Result
vkCompileDeferredNV'
(Device -> Ptr Device_T
deviceHandle (Device
device))
(Pipeline
pipeline)
("shader" ::: Word32
shader))
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Result
r forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (forall e a. Exception e => e -> IO a
throwIO (Result -> VulkanException
VulkanException Result
r))
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkCreateAccelerationStructureNV
:: FunPtr (Ptr Device_T -> Ptr (SomeStruct AccelerationStructureCreateInfoNV) -> Ptr AllocationCallbacks -> Ptr AccelerationStructureNV -> IO Result) -> Ptr Device_T -> Ptr (SomeStruct AccelerationStructureCreateInfoNV) -> Ptr AllocationCallbacks -> Ptr AccelerationStructureNV -> IO Result
createAccelerationStructureNV :: forall a io
. ( Extendss AccelerationStructureCreateInfoNV a
, PokeChain a
, MonadIO io )
=>
Device
->
(AccelerationStructureCreateInfoNV a)
->
("allocator" ::: Maybe AllocationCallbacks)
-> io (AccelerationStructureNV)
createAccelerationStructureNV :: forall (a :: [*]) (io :: * -> *).
(Extendss AccelerationStructureCreateInfoNV a, PokeChain a,
MonadIO io) =>
Device
-> AccelerationStructureCreateInfoNV a
-> ("allocator" ::: Maybe AllocationCallbacks)
-> io AccelerationStructureNV
createAccelerationStructureNV Device
device
AccelerationStructureCreateInfoNV a
createInfo
"allocator" ::: Maybe AllocationCallbacks
allocator = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT forall a b. (a -> b) -> a -> b
$ do
let vkCreateAccelerationStructureNVPtr :: FunPtr
(Ptr Device_T
-> ("pCreateInfo"
::: Ptr (SomeStruct AccelerationStructureCreateInfoNV))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pAccelerationStructure" ::: Ptr AccelerationStructureNV)
-> IO Result)
vkCreateAccelerationStructureNVPtr = DeviceCmds
-> FunPtr
(Ptr Device_T
-> ("pCreateInfo"
::: Ptr (SomeStruct AccelerationStructureCreateInfoNV))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pAccelerationStructure" ::: Ptr AccelerationStructureNV)
-> IO Result)
pVkCreateAccelerationStructureNV (case Device
device of Device{DeviceCmds
deviceCmds :: DeviceCmds
$sel:deviceCmds:Device :: Device -> DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr Device_T
-> ("pCreateInfo"
::: Ptr (SomeStruct AccelerationStructureCreateInfoNV))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pAccelerationStructure" ::: Ptr AccelerationStructureNV)
-> IO Result)
vkCreateAccelerationStructureNVPtr forall a. Eq a => a -> a -> Bool
/= forall a. FunPtr a
nullFunPtr) forall a b. (a -> b) -> a -> b
$
forall e a. Exception e => e -> IO a
throwIO forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkCreateAccelerationStructureNV is null" forall a. Maybe a
Nothing forall a. Maybe a
Nothing
let vkCreateAccelerationStructureNV' :: Ptr Device_T
-> ("pCreateInfo"
::: Ptr (SomeStruct AccelerationStructureCreateInfoNV))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pAccelerationStructure" ::: Ptr AccelerationStructureNV)
-> IO Result
vkCreateAccelerationStructureNV' = FunPtr
(Ptr Device_T
-> ("pCreateInfo"
::: Ptr (SomeStruct AccelerationStructureCreateInfoNV))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pAccelerationStructure" ::: Ptr AccelerationStructureNV)
-> IO Result)
-> Ptr Device_T
-> ("pCreateInfo"
::: Ptr (SomeStruct AccelerationStructureCreateInfoNV))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pAccelerationStructure" ::: Ptr AccelerationStructureNV)
-> IO Result
mkVkCreateAccelerationStructureNV FunPtr
(Ptr Device_T
-> ("pCreateInfo"
::: Ptr (SomeStruct AccelerationStructureCreateInfoNV))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pAccelerationStructure" ::: Ptr AccelerationStructureNV)
-> IO Result)
vkCreateAccelerationStructureNVPtr
Ptr (AccelerationStructureCreateInfoNV a)
pCreateInfo <- forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (AccelerationStructureCreateInfoNV a
createInfo)
"pAllocator" ::: Ptr AllocationCallbacks
pAllocator <- case ("allocator" ::: Maybe AllocationCallbacks
allocator) of
"allocator" ::: Maybe AllocationCallbacks
Nothing -> forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a. Ptr a
nullPtr
Just AllocationCallbacks
j -> forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (AllocationCallbacks
j)
"pAccelerationStructure" ::: Ptr AccelerationStructureNV
pPAccelerationStructure <- forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b c. IO a -> (a -> IO b) -> (a -> IO c) -> IO c
bracket (forall a. Int -> IO (Ptr a)
callocBytes @AccelerationStructureNV Int
8) forall a. Ptr a -> IO ()
free
Result
r <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. String -> IO a -> IO a
traceAroundEvent String
"vkCreateAccelerationStructureNV" (Ptr Device_T
-> ("pCreateInfo"
::: Ptr (SomeStruct AccelerationStructureCreateInfoNV))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pAccelerationStructure" ::: Ptr AccelerationStructureNV)
-> IO Result
vkCreateAccelerationStructureNV'
(Device -> Ptr Device_T
deviceHandle (Device
device))
(forall (a :: [*] -> *) (es :: [*]).
Ptr (a es) -> Ptr (SomeStruct a)
forgetExtensions Ptr (AccelerationStructureCreateInfoNV a)
pCreateInfo)
"pAllocator" ::: Ptr AllocationCallbacks
pAllocator
("pAccelerationStructure" ::: Ptr AccelerationStructureNV
pPAccelerationStructure))
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Result
r forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (forall e a. Exception e => e -> IO a
throwIO (Result -> VulkanException
VulkanException Result
r))
AccelerationStructureNV
pAccelerationStructure <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> IO a
peek @AccelerationStructureNV "pAccelerationStructure" ::: Ptr AccelerationStructureNV
pPAccelerationStructure
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ (AccelerationStructureNV
pAccelerationStructure)
withAccelerationStructureNV :: forall a io r . (Extendss AccelerationStructureCreateInfoNV a, PokeChain a, MonadIO io) => Device -> AccelerationStructureCreateInfoNV a -> Maybe AllocationCallbacks -> (io AccelerationStructureNV -> (AccelerationStructureNV -> io ()) -> r) -> r
withAccelerationStructureNV :: forall (a :: [*]) (io :: * -> *) r.
(Extendss AccelerationStructureCreateInfoNV a, PokeChain a,
MonadIO io) =>
Device
-> AccelerationStructureCreateInfoNV a
-> ("allocator" ::: Maybe AllocationCallbacks)
-> (io AccelerationStructureNV
-> (AccelerationStructureNV -> io ()) -> r)
-> r
withAccelerationStructureNV Device
device AccelerationStructureCreateInfoNV a
pCreateInfo "allocator" ::: Maybe AllocationCallbacks
pAllocator io AccelerationStructureNV
-> (AccelerationStructureNV -> io ()) -> r
b =
io AccelerationStructureNV
-> (AccelerationStructureNV -> io ()) -> r
b (forall (a :: [*]) (io :: * -> *).
(Extendss AccelerationStructureCreateInfoNV a, PokeChain a,
MonadIO io) =>
Device
-> AccelerationStructureCreateInfoNV a
-> ("allocator" ::: Maybe AllocationCallbacks)
-> io AccelerationStructureNV
createAccelerationStructureNV Device
device AccelerationStructureCreateInfoNV a
pCreateInfo "allocator" ::: Maybe AllocationCallbacks
pAllocator)
(\(AccelerationStructureNV
o0) -> forall (io :: * -> *).
MonadIO io =>
Device
-> AccelerationStructureNV
-> ("allocator" ::: Maybe AllocationCallbacks)
-> io ()
destroyAccelerationStructureNV Device
device AccelerationStructureNV
o0 "allocator" ::: Maybe AllocationCallbacks
pAllocator)
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkDestroyAccelerationStructureNV
:: FunPtr (Ptr Device_T -> AccelerationStructureNV -> Ptr AllocationCallbacks -> IO ()) -> Ptr Device_T -> AccelerationStructureNV -> Ptr AllocationCallbacks -> IO ()
destroyAccelerationStructureNV :: forall io
. (MonadIO io)
=>
Device
->
AccelerationStructureNV
->
("allocator" ::: Maybe AllocationCallbacks)
-> io ()
destroyAccelerationStructureNV :: forall (io :: * -> *).
MonadIO io =>
Device
-> AccelerationStructureNV
-> ("allocator" ::: Maybe AllocationCallbacks)
-> io ()
destroyAccelerationStructureNV Device
device
AccelerationStructureNV
accelerationStructure
"allocator" ::: Maybe AllocationCallbacks
allocator = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT forall a b. (a -> b) -> a -> b
$ do
let vkDestroyAccelerationStructureNVPtr :: FunPtr
(Ptr Device_T
-> AccelerationStructureNV
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> IO ())
vkDestroyAccelerationStructureNVPtr = DeviceCmds
-> FunPtr
(Ptr Device_T
-> AccelerationStructureNV
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> IO ())
pVkDestroyAccelerationStructureNV (case Device
device of Device{DeviceCmds
deviceCmds :: DeviceCmds
$sel:deviceCmds:Device :: Device -> DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr Device_T
-> AccelerationStructureNV
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> IO ())
vkDestroyAccelerationStructureNVPtr forall a. Eq a => a -> a -> Bool
/= forall a. FunPtr a
nullFunPtr) forall a b. (a -> b) -> a -> b
$
forall e a. Exception e => e -> IO a
throwIO forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkDestroyAccelerationStructureNV is null" forall a. Maybe a
Nothing forall a. Maybe a
Nothing
let vkDestroyAccelerationStructureNV' :: Ptr Device_T
-> AccelerationStructureNV
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> IO ()
vkDestroyAccelerationStructureNV' = FunPtr
(Ptr Device_T
-> AccelerationStructureNV
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> IO ())
-> Ptr Device_T
-> AccelerationStructureNV
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> IO ()
mkVkDestroyAccelerationStructureNV FunPtr
(Ptr Device_T
-> AccelerationStructureNV
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> IO ())
vkDestroyAccelerationStructureNVPtr
"pAllocator" ::: Ptr AllocationCallbacks
pAllocator <- case ("allocator" ::: Maybe AllocationCallbacks
allocator) of
"allocator" ::: Maybe AllocationCallbacks
Nothing -> forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a. Ptr a
nullPtr
Just AllocationCallbacks
j -> forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (AllocationCallbacks
j)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. String -> IO a -> IO a
traceAroundEvent String
"vkDestroyAccelerationStructureNV" (Ptr Device_T
-> AccelerationStructureNV
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> IO ()
vkDestroyAccelerationStructureNV'
(Device -> Ptr Device_T
deviceHandle (Device
device))
(AccelerationStructureNV
accelerationStructure)
"pAllocator" ::: Ptr AllocationCallbacks
pAllocator)
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ ()
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkGetAccelerationStructureMemoryRequirementsNV
:: FunPtr (Ptr Device_T -> Ptr AccelerationStructureMemoryRequirementsInfoNV -> Ptr (SomeStruct MemoryRequirements2KHR) -> IO ()) -> Ptr Device_T -> Ptr AccelerationStructureMemoryRequirementsInfoNV -> Ptr (SomeStruct MemoryRequirements2KHR) -> IO ()
getAccelerationStructureMemoryRequirementsNV :: forall a io
. ( Extendss MemoryRequirements2KHR a
, PokeChain a
, PeekChain a
, MonadIO io )
=>
Device
->
AccelerationStructureMemoryRequirementsInfoNV
-> io (MemoryRequirements2KHR a)
getAccelerationStructureMemoryRequirementsNV :: forall (a :: [*]) (io :: * -> *).
(Extendss MemoryRequirements2KHR a, PokeChain a, PeekChain a,
MonadIO io) =>
Device
-> AccelerationStructureMemoryRequirementsInfoNV
-> io (MemoryRequirements2KHR a)
getAccelerationStructureMemoryRequirementsNV Device
device
AccelerationStructureMemoryRequirementsInfoNV
info = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT forall a b. (a -> b) -> a -> b
$ do
let vkGetAccelerationStructureMemoryRequirementsNVPtr :: FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV)
-> ("pMemoryRequirements"
::: Ptr (SomeStruct MemoryRequirements2KHR))
-> IO ())
vkGetAccelerationStructureMemoryRequirementsNVPtr = DeviceCmds
-> FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV)
-> ("pMemoryRequirements"
::: Ptr (SomeStruct MemoryRequirements2KHR))
-> IO ())
pVkGetAccelerationStructureMemoryRequirementsNV (case Device
device of Device{DeviceCmds
deviceCmds :: DeviceCmds
$sel:deviceCmds:Device :: Device -> DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV)
-> ("pMemoryRequirements"
::: Ptr (SomeStruct MemoryRequirements2KHR))
-> IO ())
vkGetAccelerationStructureMemoryRequirementsNVPtr forall a. Eq a => a -> a -> Bool
/= forall a. FunPtr a
nullFunPtr) forall a b. (a -> b) -> a -> b
$
forall e a. Exception e => e -> IO a
throwIO forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkGetAccelerationStructureMemoryRequirementsNV is null" forall a. Maybe a
Nothing forall a. Maybe a
Nothing
let vkGetAccelerationStructureMemoryRequirementsNV' :: Ptr Device_T
-> ("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV)
-> ("pMemoryRequirements"
::: Ptr (SomeStruct MemoryRequirements2KHR))
-> IO ()
vkGetAccelerationStructureMemoryRequirementsNV' = FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV)
-> ("pMemoryRequirements"
::: Ptr (SomeStruct MemoryRequirements2KHR))
-> IO ())
-> Ptr Device_T
-> ("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV)
-> ("pMemoryRequirements"
::: Ptr (SomeStruct MemoryRequirements2KHR))
-> IO ()
mkVkGetAccelerationStructureMemoryRequirementsNV FunPtr
(Ptr Device_T
-> ("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV)
-> ("pMemoryRequirements"
::: Ptr (SomeStruct MemoryRequirements2KHR))
-> IO ())
vkGetAccelerationStructureMemoryRequirementsNVPtr
"pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV
pInfo <- forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (AccelerationStructureMemoryRequirementsInfoNV
info)
Ptr (MemoryRequirements2KHR a)
pPMemoryRequirements <- forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (forall a b. ToCStruct a => (Ptr a -> IO b) -> IO b
withZeroCStruct @(MemoryRequirements2KHR _))
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. String -> IO a -> IO a
traceAroundEvent String
"vkGetAccelerationStructureMemoryRequirementsNV" (Ptr Device_T
-> ("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV)
-> ("pMemoryRequirements"
::: Ptr (SomeStruct MemoryRequirements2KHR))
-> IO ()
vkGetAccelerationStructureMemoryRequirementsNV'
(Device -> Ptr Device_T
deviceHandle (Device
device))
"pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV
pInfo
(forall (a :: [*] -> *) (es :: [*]).
Ptr (a es) -> Ptr (SomeStruct a)
forgetExtensions (Ptr (MemoryRequirements2KHR a)
pPMemoryRequirements)))
MemoryRequirements2KHR a
pMemoryRequirements <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @(MemoryRequirements2KHR _) Ptr (MemoryRequirements2KHR a)
pPMemoryRequirements
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ (MemoryRequirements2KHR a
pMemoryRequirements)
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkBindAccelerationStructureMemoryNV
:: FunPtr (Ptr Device_T -> Word32 -> Ptr BindAccelerationStructureMemoryInfoNV -> IO Result) -> Ptr Device_T -> Word32 -> Ptr BindAccelerationStructureMemoryInfoNV -> IO Result
bindAccelerationStructureMemoryNV :: forall io
. (MonadIO io)
=>
Device
->
("bindInfos" ::: Vector BindAccelerationStructureMemoryInfoNV)
-> io ()
bindAccelerationStructureMemoryNV :: forall (io :: * -> *).
MonadIO io =>
Device
-> ("bindInfos" ::: Vector BindAccelerationStructureMemoryInfoNV)
-> io ()
bindAccelerationStructureMemoryNV Device
device "bindInfos" ::: Vector BindAccelerationStructureMemoryInfoNV
bindInfos = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT forall a b. (a -> b) -> a -> b
$ do
let vkBindAccelerationStructureMemoryNVPtr :: FunPtr
(Ptr Device_T
-> ("shader" ::: Word32)
-> ("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoNV)
-> IO Result)
vkBindAccelerationStructureMemoryNVPtr = DeviceCmds
-> FunPtr
(Ptr Device_T
-> ("shader" ::: Word32)
-> ("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoNV)
-> IO Result)
pVkBindAccelerationStructureMemoryNV (case Device
device of Device{DeviceCmds
deviceCmds :: DeviceCmds
$sel:deviceCmds:Device :: Device -> DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr Device_T
-> ("shader" ::: Word32)
-> ("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoNV)
-> IO Result)
vkBindAccelerationStructureMemoryNVPtr forall a. Eq a => a -> a -> Bool
/= forall a. FunPtr a
nullFunPtr) forall a b. (a -> b) -> a -> b
$
forall e a. Exception e => e -> IO a
throwIO forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkBindAccelerationStructureMemoryNV is null" forall a. Maybe a
Nothing forall a. Maybe a
Nothing
let vkBindAccelerationStructureMemoryNV' :: Ptr Device_T
-> ("shader" ::: Word32)
-> ("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoNV)
-> IO Result
vkBindAccelerationStructureMemoryNV' = FunPtr
(Ptr Device_T
-> ("shader" ::: Word32)
-> ("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoNV)
-> IO Result)
-> Ptr Device_T
-> ("shader" ::: Word32)
-> ("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoNV)
-> IO Result
mkVkBindAccelerationStructureMemoryNV FunPtr
(Ptr Device_T
-> ("shader" ::: Word32)
-> ("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoNV)
-> IO Result)
vkBindAccelerationStructureMemoryNVPtr
"pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoNV
pPBindInfos <- forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes @BindAccelerationStructureMemoryInfoNV ((forall a. Vector a -> Int
Data.Vector.length ("bindInfos" ::: Vector BindAccelerationStructureMemoryInfoNV
bindInfos)) forall a. Num a => a -> a -> a
* Int
56)
forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\Int
i BindAccelerationStructureMemoryInfoNV
e -> forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct ("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoNV
pPBindInfos forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (Int
56 forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr BindAccelerationStructureMemoryInfoNV) (BindAccelerationStructureMemoryInfoNV
e) forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. (a -> b) -> a -> b
$ ())) ("bindInfos" ::: Vector BindAccelerationStructureMemoryInfoNV
bindInfos)
Result
r <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. String -> IO a -> IO a
traceAroundEvent String
"vkBindAccelerationStructureMemoryNV" (Ptr Device_T
-> ("shader" ::: Word32)
-> ("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoNV)
-> IO Result
vkBindAccelerationStructureMemoryNV'
(Device -> Ptr Device_T
deviceHandle (Device
device))
((forall a b. (Integral a, Num b) => a -> b
fromIntegral (forall a. Vector a -> Int
Data.Vector.length forall a b. (a -> b) -> a -> b
$ ("bindInfos" ::: Vector BindAccelerationStructureMemoryInfoNV
bindInfos)) :: Word32))
("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoNV
pPBindInfos))
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Result
r forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (forall e a. Exception e => e -> IO a
throwIO (Result -> VulkanException
VulkanException Result
r))
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkCmdCopyAccelerationStructureNV
:: FunPtr (Ptr CommandBuffer_T -> AccelerationStructureNV -> AccelerationStructureNV -> CopyAccelerationStructureModeKHR -> IO ()) -> Ptr CommandBuffer_T -> AccelerationStructureNV -> AccelerationStructureNV -> CopyAccelerationStructureModeKHR -> IO ()
cmdCopyAccelerationStructureNV :: forall io
. (MonadIO io)
=>
CommandBuffer
->
("dst" ::: AccelerationStructureNV)
->
("src" ::: AccelerationStructureNV)
->
CopyAccelerationStructureModeKHR
-> io ()
cmdCopyAccelerationStructureNV :: forall (io :: * -> *).
MonadIO io =>
CommandBuffer
-> AccelerationStructureNV
-> AccelerationStructureNV
-> CopyAccelerationStructureModeKHR
-> io ()
cmdCopyAccelerationStructureNV CommandBuffer
commandBuffer AccelerationStructureNV
dst AccelerationStructureNV
src CopyAccelerationStructureModeKHR
mode = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
let vkCmdCopyAccelerationStructureNVPtr :: FunPtr
(Ptr CommandBuffer_T
-> AccelerationStructureNV
-> AccelerationStructureNV
-> CopyAccelerationStructureModeKHR
-> IO ())
vkCmdCopyAccelerationStructureNVPtr = DeviceCmds
-> FunPtr
(Ptr CommandBuffer_T
-> AccelerationStructureNV
-> AccelerationStructureNV
-> CopyAccelerationStructureModeKHR
-> IO ())
pVkCmdCopyAccelerationStructureNV (case CommandBuffer
commandBuffer of CommandBuffer{DeviceCmds
$sel:deviceCmds:CommandBuffer :: CommandBuffer -> DeviceCmds
deviceCmds :: DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr CommandBuffer_T
-> AccelerationStructureNV
-> AccelerationStructureNV
-> CopyAccelerationStructureModeKHR
-> IO ())
vkCmdCopyAccelerationStructureNVPtr forall a. Eq a => a -> a -> Bool
/= forall a. FunPtr a
nullFunPtr) forall a b. (a -> b) -> a -> b
$
forall e a. Exception e => e -> IO a
throwIO forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkCmdCopyAccelerationStructureNV is null" forall a. Maybe a
Nothing forall a. Maybe a
Nothing
let vkCmdCopyAccelerationStructureNV' :: Ptr CommandBuffer_T
-> AccelerationStructureNV
-> AccelerationStructureNV
-> CopyAccelerationStructureModeKHR
-> IO ()
vkCmdCopyAccelerationStructureNV' = FunPtr
(Ptr CommandBuffer_T
-> AccelerationStructureNV
-> AccelerationStructureNV
-> CopyAccelerationStructureModeKHR
-> IO ())
-> Ptr CommandBuffer_T
-> AccelerationStructureNV
-> AccelerationStructureNV
-> CopyAccelerationStructureModeKHR
-> IO ()
mkVkCmdCopyAccelerationStructureNV FunPtr
(Ptr CommandBuffer_T
-> AccelerationStructureNV
-> AccelerationStructureNV
-> CopyAccelerationStructureModeKHR
-> IO ())
vkCmdCopyAccelerationStructureNVPtr
forall a. String -> IO a -> IO a
traceAroundEvent String
"vkCmdCopyAccelerationStructureNV" (Ptr CommandBuffer_T
-> AccelerationStructureNV
-> AccelerationStructureNV
-> CopyAccelerationStructureModeKHR
-> IO ()
vkCmdCopyAccelerationStructureNV'
(CommandBuffer -> Ptr CommandBuffer_T
commandBufferHandle (CommandBuffer
commandBuffer))
(AccelerationStructureNV
dst)
(AccelerationStructureNV
src)
(CopyAccelerationStructureModeKHR
mode))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ ()
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkCmdWriteAccelerationStructuresPropertiesNV
:: FunPtr (Ptr CommandBuffer_T -> Word32 -> Ptr AccelerationStructureNV -> QueryType -> QueryPool -> Word32 -> IO ()) -> Ptr CommandBuffer_T -> Word32 -> Ptr AccelerationStructureNV -> QueryType -> QueryPool -> Word32 -> IO ()
cmdWriteAccelerationStructuresPropertiesNV :: forall io
. (MonadIO io)
=>
CommandBuffer
->
("accelerationStructures" ::: Vector AccelerationStructureNV)
->
QueryType
->
QueryPool
->
("firstQuery" ::: Word32)
-> io ()
cmdWriteAccelerationStructuresPropertiesNV :: forall (io :: * -> *).
MonadIO io =>
CommandBuffer
-> ("accelerationStructures" ::: Vector AccelerationStructureNV)
-> QueryType
-> QueryPool
-> ("shader" ::: Word32)
-> io ()
cmdWriteAccelerationStructuresPropertiesNV CommandBuffer
commandBuffer
"accelerationStructures" ::: Vector AccelerationStructureNV
accelerationStructures
QueryType
queryType
QueryPool
queryPool
"shader" ::: Word32
firstQuery = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT forall a b. (a -> b) -> a -> b
$ do
let vkCmdWriteAccelerationStructuresPropertiesNVPtr :: FunPtr
(Ptr CommandBuffer_T
-> ("shader" ::: Word32)
-> ("pAccelerationStructure" ::: Ptr AccelerationStructureNV)
-> QueryType
-> QueryPool
-> ("shader" ::: Word32)
-> IO ())
vkCmdWriteAccelerationStructuresPropertiesNVPtr = DeviceCmds
-> FunPtr
(Ptr CommandBuffer_T
-> ("shader" ::: Word32)
-> ("pAccelerationStructure" ::: Ptr AccelerationStructureNV)
-> QueryType
-> QueryPool
-> ("shader" ::: Word32)
-> IO ())
pVkCmdWriteAccelerationStructuresPropertiesNV (case CommandBuffer
commandBuffer of CommandBuffer{DeviceCmds
deviceCmds :: DeviceCmds
$sel:deviceCmds:CommandBuffer :: CommandBuffer -> DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr CommandBuffer_T
-> ("shader" ::: Word32)
-> ("pAccelerationStructure" ::: Ptr AccelerationStructureNV)
-> QueryType
-> QueryPool
-> ("shader" ::: Word32)
-> IO ())
vkCmdWriteAccelerationStructuresPropertiesNVPtr forall a. Eq a => a -> a -> Bool
/= forall a. FunPtr a
nullFunPtr) forall a b. (a -> b) -> a -> b
$
forall e a. Exception e => e -> IO a
throwIO forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkCmdWriteAccelerationStructuresPropertiesNV is null" forall a. Maybe a
Nothing forall a. Maybe a
Nothing
let vkCmdWriteAccelerationStructuresPropertiesNV' :: Ptr CommandBuffer_T
-> ("shader" ::: Word32)
-> ("pAccelerationStructure" ::: Ptr AccelerationStructureNV)
-> QueryType
-> QueryPool
-> ("shader" ::: Word32)
-> IO ()
vkCmdWriteAccelerationStructuresPropertiesNV' = FunPtr
(Ptr CommandBuffer_T
-> ("shader" ::: Word32)
-> ("pAccelerationStructure" ::: Ptr AccelerationStructureNV)
-> QueryType
-> QueryPool
-> ("shader" ::: Word32)
-> IO ())
-> Ptr CommandBuffer_T
-> ("shader" ::: Word32)
-> ("pAccelerationStructure" ::: Ptr AccelerationStructureNV)
-> QueryType
-> QueryPool
-> ("shader" ::: Word32)
-> IO ()
mkVkCmdWriteAccelerationStructuresPropertiesNV FunPtr
(Ptr CommandBuffer_T
-> ("shader" ::: Word32)
-> ("pAccelerationStructure" ::: Ptr AccelerationStructureNV)
-> QueryType
-> QueryPool
-> ("shader" ::: Word32)
-> IO ())
vkCmdWriteAccelerationStructuresPropertiesNVPtr
"pAccelerationStructure" ::: Ptr AccelerationStructureNV
pPAccelerationStructures <- forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes @AccelerationStructureNV ((forall a. Vector a -> Int
Data.Vector.length ("accelerationStructures" ::: Vector AccelerationStructureNV
accelerationStructures)) forall a. Num a => a -> a -> a
* Int
8)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\Int
i AccelerationStructureNV
e -> forall a. Storable a => Ptr a -> a -> IO ()
poke ("pAccelerationStructure" ::: Ptr AccelerationStructureNV
pPAccelerationStructures forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (Int
8 forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr AccelerationStructureNV) (AccelerationStructureNV
e)) ("accelerationStructures" ::: Vector AccelerationStructureNV
accelerationStructures)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. String -> IO a -> IO a
traceAroundEvent String
"vkCmdWriteAccelerationStructuresPropertiesNV" (Ptr CommandBuffer_T
-> ("shader" ::: Word32)
-> ("pAccelerationStructure" ::: Ptr AccelerationStructureNV)
-> QueryType
-> QueryPool
-> ("shader" ::: Word32)
-> IO ()
vkCmdWriteAccelerationStructuresPropertiesNV'
(CommandBuffer -> Ptr CommandBuffer_T
commandBufferHandle (CommandBuffer
commandBuffer))
((forall a b. (Integral a, Num b) => a -> b
fromIntegral (forall a. Vector a -> Int
Data.Vector.length forall a b. (a -> b) -> a -> b
$ ("accelerationStructures" ::: Vector AccelerationStructureNV
accelerationStructures)) :: Word32))
("pAccelerationStructure" ::: Ptr AccelerationStructureNV
pPAccelerationStructures)
(QueryType
queryType)
(QueryPool
queryPool)
("shader" ::: Word32
firstQuery))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ ()
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkCmdBuildAccelerationStructureNV
:: FunPtr (Ptr CommandBuffer_T -> Ptr AccelerationStructureInfoNV -> Buffer -> DeviceSize -> Bool32 -> AccelerationStructureNV -> AccelerationStructureNV -> Buffer -> DeviceSize -> IO ()) -> Ptr CommandBuffer_T -> Ptr AccelerationStructureInfoNV -> Buffer -> DeviceSize -> Bool32 -> AccelerationStructureNV -> AccelerationStructureNV -> Buffer -> DeviceSize -> IO ()
cmdBuildAccelerationStructureNV :: forall io
. (MonadIO io)
=>
CommandBuffer
->
AccelerationStructureInfoNV
->
("instanceData" ::: Buffer)
->
("instanceOffset" ::: DeviceSize)
->
("update" ::: Bool)
->
("dst" ::: AccelerationStructureNV)
->
("src" ::: AccelerationStructureNV)
->
("scratch" ::: Buffer)
->
("scratchOffset" ::: DeviceSize)
-> io ()
cmdBuildAccelerationStructureNV :: forall (io :: * -> *).
MonadIO io =>
CommandBuffer
-> AccelerationStructureInfoNV
-> ("instanceData" ::: Buffer)
-> ("instanceOffset" ::: DeviceSize)
-> Bool
-> AccelerationStructureNV
-> AccelerationStructureNV
-> ("instanceData" ::: Buffer)
-> ("instanceOffset" ::: DeviceSize)
-> io ()
cmdBuildAccelerationStructureNV CommandBuffer
commandBuffer
AccelerationStructureInfoNV
info
"instanceData" ::: Buffer
instanceData
"instanceOffset" ::: DeviceSize
instanceOffset
Bool
update
AccelerationStructureNV
dst
AccelerationStructureNV
src
"instanceData" ::: Buffer
scratch
"instanceOffset" ::: DeviceSize
scratchOffset = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT forall a b. (a -> b) -> a -> b
$ do
let vkCmdBuildAccelerationStructureNVPtr :: FunPtr
(Ptr CommandBuffer_T
-> ("pInfo" ::: Ptr AccelerationStructureInfoNV)
-> ("instanceData" ::: Buffer)
-> ("instanceOffset" ::: DeviceSize)
-> ("update" ::: Bool32)
-> AccelerationStructureNV
-> AccelerationStructureNV
-> ("instanceData" ::: Buffer)
-> ("instanceOffset" ::: DeviceSize)
-> IO ())
vkCmdBuildAccelerationStructureNVPtr = DeviceCmds
-> FunPtr
(Ptr CommandBuffer_T
-> ("pInfo" ::: Ptr AccelerationStructureInfoNV)
-> ("instanceData" ::: Buffer)
-> ("instanceOffset" ::: DeviceSize)
-> ("update" ::: Bool32)
-> AccelerationStructureNV
-> AccelerationStructureNV
-> ("instanceData" ::: Buffer)
-> ("instanceOffset" ::: DeviceSize)
-> IO ())
pVkCmdBuildAccelerationStructureNV (case CommandBuffer
commandBuffer of CommandBuffer{DeviceCmds
deviceCmds :: DeviceCmds
$sel:deviceCmds:CommandBuffer :: CommandBuffer -> DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr CommandBuffer_T
-> ("pInfo" ::: Ptr AccelerationStructureInfoNV)
-> ("instanceData" ::: Buffer)
-> ("instanceOffset" ::: DeviceSize)
-> ("update" ::: Bool32)
-> AccelerationStructureNV
-> AccelerationStructureNV
-> ("instanceData" ::: Buffer)
-> ("instanceOffset" ::: DeviceSize)
-> IO ())
vkCmdBuildAccelerationStructureNVPtr forall a. Eq a => a -> a -> Bool
/= forall a. FunPtr a
nullFunPtr) forall a b. (a -> b) -> a -> b
$
forall e a. Exception e => e -> IO a
throwIO forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkCmdBuildAccelerationStructureNV is null" forall a. Maybe a
Nothing forall a. Maybe a
Nothing
let vkCmdBuildAccelerationStructureNV' :: Ptr CommandBuffer_T
-> ("pInfo" ::: Ptr AccelerationStructureInfoNV)
-> ("instanceData" ::: Buffer)
-> ("instanceOffset" ::: DeviceSize)
-> ("update" ::: Bool32)
-> AccelerationStructureNV
-> AccelerationStructureNV
-> ("instanceData" ::: Buffer)
-> ("instanceOffset" ::: DeviceSize)
-> IO ()
vkCmdBuildAccelerationStructureNV' = FunPtr
(Ptr CommandBuffer_T
-> ("pInfo" ::: Ptr AccelerationStructureInfoNV)
-> ("instanceData" ::: Buffer)
-> ("instanceOffset" ::: DeviceSize)
-> ("update" ::: Bool32)
-> AccelerationStructureNV
-> AccelerationStructureNV
-> ("instanceData" ::: Buffer)
-> ("instanceOffset" ::: DeviceSize)
-> IO ())
-> Ptr CommandBuffer_T
-> ("pInfo" ::: Ptr AccelerationStructureInfoNV)
-> ("instanceData" ::: Buffer)
-> ("instanceOffset" ::: DeviceSize)
-> ("update" ::: Bool32)
-> AccelerationStructureNV
-> AccelerationStructureNV
-> ("instanceData" ::: Buffer)
-> ("instanceOffset" ::: DeviceSize)
-> IO ()
mkVkCmdBuildAccelerationStructureNV FunPtr
(Ptr CommandBuffer_T
-> ("pInfo" ::: Ptr AccelerationStructureInfoNV)
-> ("instanceData" ::: Buffer)
-> ("instanceOffset" ::: DeviceSize)
-> ("update" ::: Bool32)
-> AccelerationStructureNV
-> AccelerationStructureNV
-> ("instanceData" ::: Buffer)
-> ("instanceOffset" ::: DeviceSize)
-> IO ())
vkCmdBuildAccelerationStructureNVPtr
"pInfo" ::: Ptr AccelerationStructureInfoNV
pInfo <- forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (AccelerationStructureInfoNV
info)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. String -> IO a -> IO a
traceAroundEvent String
"vkCmdBuildAccelerationStructureNV" (Ptr CommandBuffer_T
-> ("pInfo" ::: Ptr AccelerationStructureInfoNV)
-> ("instanceData" ::: Buffer)
-> ("instanceOffset" ::: DeviceSize)
-> ("update" ::: Bool32)
-> AccelerationStructureNV
-> AccelerationStructureNV
-> ("instanceData" ::: Buffer)
-> ("instanceOffset" ::: DeviceSize)
-> IO ()
vkCmdBuildAccelerationStructureNV'
(CommandBuffer -> Ptr CommandBuffer_T
commandBufferHandle (CommandBuffer
commandBuffer))
"pInfo" ::: Ptr AccelerationStructureInfoNV
pInfo
("instanceData" ::: Buffer
instanceData)
("instanceOffset" ::: DeviceSize
instanceOffset)
(Bool -> "update" ::: Bool32
boolToBool32 (Bool
update))
(AccelerationStructureNV
dst)
(AccelerationStructureNV
src)
("instanceData" ::: Buffer
scratch)
("instanceOffset" ::: DeviceSize
scratchOffset))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ ()
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkCmdTraceRaysNV
:: FunPtr (Ptr CommandBuffer_T -> Buffer -> DeviceSize -> Buffer -> DeviceSize -> DeviceSize -> Buffer -> DeviceSize -> DeviceSize -> Buffer -> DeviceSize -> DeviceSize -> Word32 -> Word32 -> Word32 -> IO ()) -> Ptr CommandBuffer_T -> Buffer -> DeviceSize -> Buffer -> DeviceSize -> DeviceSize -> Buffer -> DeviceSize -> DeviceSize -> Buffer -> DeviceSize -> DeviceSize -> Word32 -> Word32 -> Word32 -> IO ()
cmdTraceRaysNV :: forall io
. (MonadIO io)
=>
CommandBuffer
->
("raygenShaderBindingTableBuffer" ::: Buffer)
->
("raygenShaderBindingOffset" ::: DeviceSize)
->
("missShaderBindingTableBuffer" ::: Buffer)
->
("missShaderBindingOffset" ::: DeviceSize)
->
("missShaderBindingStride" ::: DeviceSize)
->
("hitShaderBindingTableBuffer" ::: Buffer)
->
("hitShaderBindingOffset" ::: DeviceSize)
->
("hitShaderBindingStride" ::: DeviceSize)
->
("callableShaderBindingTableBuffer" ::: Buffer)
->
("callableShaderBindingOffset" ::: DeviceSize)
->
("callableShaderBindingStride" ::: DeviceSize)
->
("width" ::: Word32)
->
("height" ::: Word32)
->
("depth" ::: Word32)
-> io ()
cmdTraceRaysNV :: forall (io :: * -> *).
MonadIO io =>
CommandBuffer
-> ("instanceData" ::: Buffer)
-> ("instanceOffset" ::: DeviceSize)
-> ("instanceData" ::: Buffer)
-> ("instanceOffset" ::: DeviceSize)
-> ("instanceOffset" ::: DeviceSize)
-> ("instanceData" ::: Buffer)
-> ("instanceOffset" ::: DeviceSize)
-> ("instanceOffset" ::: DeviceSize)
-> ("instanceData" ::: Buffer)
-> ("instanceOffset" ::: DeviceSize)
-> ("instanceOffset" ::: DeviceSize)
-> ("shader" ::: Word32)
-> ("shader" ::: Word32)
-> ("shader" ::: Word32)
-> io ()
cmdTraceRaysNV CommandBuffer
commandBuffer
"instanceData" ::: Buffer
raygenShaderBindingTableBuffer
"instanceOffset" ::: DeviceSize
raygenShaderBindingOffset
"instanceData" ::: Buffer
missShaderBindingTableBuffer
"instanceOffset" ::: DeviceSize
missShaderBindingOffset
"instanceOffset" ::: DeviceSize
missShaderBindingStride
"instanceData" ::: Buffer
hitShaderBindingTableBuffer
"instanceOffset" ::: DeviceSize
hitShaderBindingOffset
"instanceOffset" ::: DeviceSize
hitShaderBindingStride
"instanceData" ::: Buffer
callableShaderBindingTableBuffer
"instanceOffset" ::: DeviceSize
callableShaderBindingOffset
"instanceOffset" ::: DeviceSize
callableShaderBindingStride
"shader" ::: Word32
width
"shader" ::: Word32
height
"shader" ::: Word32
depth = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
let vkCmdTraceRaysNVPtr :: FunPtr
(Ptr CommandBuffer_T
-> ("instanceData" ::: Buffer)
-> ("instanceOffset" ::: DeviceSize)
-> ("instanceData" ::: Buffer)
-> ("instanceOffset" ::: DeviceSize)
-> ("instanceOffset" ::: DeviceSize)
-> ("instanceData" ::: Buffer)
-> ("instanceOffset" ::: DeviceSize)
-> ("instanceOffset" ::: DeviceSize)
-> ("instanceData" ::: Buffer)
-> ("instanceOffset" ::: DeviceSize)
-> ("instanceOffset" ::: DeviceSize)
-> ("shader" ::: Word32)
-> ("shader" ::: Word32)
-> ("shader" ::: Word32)
-> IO ())
vkCmdTraceRaysNVPtr = DeviceCmds
-> FunPtr
(Ptr CommandBuffer_T
-> ("instanceData" ::: Buffer)
-> ("instanceOffset" ::: DeviceSize)
-> ("instanceData" ::: Buffer)
-> ("instanceOffset" ::: DeviceSize)
-> ("instanceOffset" ::: DeviceSize)
-> ("instanceData" ::: Buffer)
-> ("instanceOffset" ::: DeviceSize)
-> ("instanceOffset" ::: DeviceSize)
-> ("instanceData" ::: Buffer)
-> ("instanceOffset" ::: DeviceSize)
-> ("instanceOffset" ::: DeviceSize)
-> ("shader" ::: Word32)
-> ("shader" ::: Word32)
-> ("shader" ::: Word32)
-> IO ())
pVkCmdTraceRaysNV (case CommandBuffer
commandBuffer of CommandBuffer{DeviceCmds
deviceCmds :: DeviceCmds
$sel:deviceCmds:CommandBuffer :: CommandBuffer -> DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr CommandBuffer_T
-> ("instanceData" ::: Buffer)
-> ("instanceOffset" ::: DeviceSize)
-> ("instanceData" ::: Buffer)
-> ("instanceOffset" ::: DeviceSize)
-> ("instanceOffset" ::: DeviceSize)
-> ("instanceData" ::: Buffer)
-> ("instanceOffset" ::: DeviceSize)
-> ("instanceOffset" ::: DeviceSize)
-> ("instanceData" ::: Buffer)
-> ("instanceOffset" ::: DeviceSize)
-> ("instanceOffset" ::: DeviceSize)
-> ("shader" ::: Word32)
-> ("shader" ::: Word32)
-> ("shader" ::: Word32)
-> IO ())
vkCmdTraceRaysNVPtr forall a. Eq a => a -> a -> Bool
/= forall a. FunPtr a
nullFunPtr) forall a b. (a -> b) -> a -> b
$
forall e a. Exception e => e -> IO a
throwIO forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkCmdTraceRaysNV is null" forall a. Maybe a
Nothing forall a. Maybe a
Nothing
let vkCmdTraceRaysNV' :: Ptr CommandBuffer_T
-> ("instanceData" ::: Buffer)
-> ("instanceOffset" ::: DeviceSize)
-> ("instanceData" ::: Buffer)
-> ("instanceOffset" ::: DeviceSize)
-> ("instanceOffset" ::: DeviceSize)
-> ("instanceData" ::: Buffer)
-> ("instanceOffset" ::: DeviceSize)
-> ("instanceOffset" ::: DeviceSize)
-> ("instanceData" ::: Buffer)
-> ("instanceOffset" ::: DeviceSize)
-> ("instanceOffset" ::: DeviceSize)
-> ("shader" ::: Word32)
-> ("shader" ::: Word32)
-> ("shader" ::: Word32)
-> IO ()
vkCmdTraceRaysNV' = FunPtr
(Ptr CommandBuffer_T
-> ("instanceData" ::: Buffer)
-> ("instanceOffset" ::: DeviceSize)
-> ("instanceData" ::: Buffer)
-> ("instanceOffset" ::: DeviceSize)
-> ("instanceOffset" ::: DeviceSize)
-> ("instanceData" ::: Buffer)
-> ("instanceOffset" ::: DeviceSize)
-> ("instanceOffset" ::: DeviceSize)
-> ("instanceData" ::: Buffer)
-> ("instanceOffset" ::: DeviceSize)
-> ("instanceOffset" ::: DeviceSize)
-> ("shader" ::: Word32)
-> ("shader" ::: Word32)
-> ("shader" ::: Word32)
-> IO ())
-> Ptr CommandBuffer_T
-> ("instanceData" ::: Buffer)
-> ("instanceOffset" ::: DeviceSize)
-> ("instanceData" ::: Buffer)
-> ("instanceOffset" ::: DeviceSize)
-> ("instanceOffset" ::: DeviceSize)
-> ("instanceData" ::: Buffer)
-> ("instanceOffset" ::: DeviceSize)
-> ("instanceOffset" ::: DeviceSize)
-> ("instanceData" ::: Buffer)
-> ("instanceOffset" ::: DeviceSize)
-> ("instanceOffset" ::: DeviceSize)
-> ("shader" ::: Word32)
-> ("shader" ::: Word32)
-> ("shader" ::: Word32)
-> IO ()
mkVkCmdTraceRaysNV FunPtr
(Ptr CommandBuffer_T
-> ("instanceData" ::: Buffer)
-> ("instanceOffset" ::: DeviceSize)
-> ("instanceData" ::: Buffer)
-> ("instanceOffset" ::: DeviceSize)
-> ("instanceOffset" ::: DeviceSize)
-> ("instanceData" ::: Buffer)
-> ("instanceOffset" ::: DeviceSize)
-> ("instanceOffset" ::: DeviceSize)
-> ("instanceData" ::: Buffer)
-> ("instanceOffset" ::: DeviceSize)
-> ("instanceOffset" ::: DeviceSize)
-> ("shader" ::: Word32)
-> ("shader" ::: Word32)
-> ("shader" ::: Word32)
-> IO ())
vkCmdTraceRaysNVPtr
forall a. String -> IO a -> IO a
traceAroundEvent String
"vkCmdTraceRaysNV" (Ptr CommandBuffer_T
-> ("instanceData" ::: Buffer)
-> ("instanceOffset" ::: DeviceSize)
-> ("instanceData" ::: Buffer)
-> ("instanceOffset" ::: DeviceSize)
-> ("instanceOffset" ::: DeviceSize)
-> ("instanceData" ::: Buffer)
-> ("instanceOffset" ::: DeviceSize)
-> ("instanceOffset" ::: DeviceSize)
-> ("instanceData" ::: Buffer)
-> ("instanceOffset" ::: DeviceSize)
-> ("instanceOffset" ::: DeviceSize)
-> ("shader" ::: Word32)
-> ("shader" ::: Word32)
-> ("shader" ::: Word32)
-> IO ()
vkCmdTraceRaysNV'
(CommandBuffer -> Ptr CommandBuffer_T
commandBufferHandle (CommandBuffer
commandBuffer))
("instanceData" ::: Buffer
raygenShaderBindingTableBuffer)
("instanceOffset" ::: DeviceSize
raygenShaderBindingOffset)
("instanceData" ::: Buffer
missShaderBindingTableBuffer)
("instanceOffset" ::: DeviceSize
missShaderBindingOffset)
("instanceOffset" ::: DeviceSize
missShaderBindingStride)
("instanceData" ::: Buffer
hitShaderBindingTableBuffer)
("instanceOffset" ::: DeviceSize
hitShaderBindingOffset)
("instanceOffset" ::: DeviceSize
hitShaderBindingStride)
("instanceData" ::: Buffer
callableShaderBindingTableBuffer)
("instanceOffset" ::: DeviceSize
callableShaderBindingOffset)
("instanceOffset" ::: DeviceSize
callableShaderBindingStride)
("shader" ::: Word32
width)
("shader" ::: Word32
height)
("shader" ::: Word32
depth))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ ()
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkGetAccelerationStructureHandleNV
:: FunPtr (Ptr Device_T -> AccelerationStructureNV -> CSize -> Ptr () -> IO Result) -> Ptr Device_T -> AccelerationStructureNV -> CSize -> Ptr () -> IO Result
getAccelerationStructureHandleNV :: forall io
. (MonadIO io)
=>
Device
->
AccelerationStructureNV
->
("dataSize" ::: Word64)
->
("data" ::: Ptr ())
-> io ()
getAccelerationStructureHandleNV :: forall (io :: * -> *).
MonadIO io =>
Device
-> AccelerationStructureNV
-> ("instanceOffset" ::: DeviceSize)
-> ("data" ::: Ptr ())
-> io ()
getAccelerationStructureHandleNV Device
device
AccelerationStructureNV
accelerationStructure
"instanceOffset" ::: DeviceSize
dataSize
"data" ::: Ptr ()
data' = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
let vkGetAccelerationStructureHandleNVPtr :: FunPtr
(Ptr Device_T
-> AccelerationStructureNV
-> ("dataSize" ::: CSize)
-> ("data" ::: Ptr ())
-> IO Result)
vkGetAccelerationStructureHandleNVPtr = DeviceCmds
-> FunPtr
(Ptr Device_T
-> AccelerationStructureNV
-> ("dataSize" ::: CSize)
-> ("data" ::: Ptr ())
-> IO Result)
pVkGetAccelerationStructureHandleNV (case Device
device of Device{DeviceCmds
deviceCmds :: DeviceCmds
$sel:deviceCmds:Device :: Device -> DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr Device_T
-> AccelerationStructureNV
-> ("dataSize" ::: CSize)
-> ("data" ::: Ptr ())
-> IO Result)
vkGetAccelerationStructureHandleNVPtr forall a. Eq a => a -> a -> Bool
/= forall a. FunPtr a
nullFunPtr) forall a b. (a -> b) -> a -> b
$
forall e a. Exception e => e -> IO a
throwIO forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkGetAccelerationStructureHandleNV is null" forall a. Maybe a
Nothing forall a. Maybe a
Nothing
let vkGetAccelerationStructureHandleNV' :: Ptr Device_T
-> AccelerationStructureNV
-> ("dataSize" ::: CSize)
-> ("data" ::: Ptr ())
-> IO Result
vkGetAccelerationStructureHandleNV' = FunPtr
(Ptr Device_T
-> AccelerationStructureNV
-> ("dataSize" ::: CSize)
-> ("data" ::: Ptr ())
-> IO Result)
-> Ptr Device_T
-> AccelerationStructureNV
-> ("dataSize" ::: CSize)
-> ("data" ::: Ptr ())
-> IO Result
mkVkGetAccelerationStructureHandleNV FunPtr
(Ptr Device_T
-> AccelerationStructureNV
-> ("dataSize" ::: CSize)
-> ("data" ::: Ptr ())
-> IO Result)
vkGetAccelerationStructureHandleNVPtr
Result
r <- forall a. String -> IO a -> IO a
traceAroundEvent String
"vkGetAccelerationStructureHandleNV" (Ptr Device_T
-> AccelerationStructureNV
-> ("dataSize" ::: CSize)
-> ("data" ::: Ptr ())
-> IO Result
vkGetAccelerationStructureHandleNV'
(Device -> Ptr Device_T
deviceHandle (Device
device))
(AccelerationStructureNV
accelerationStructure)
(("instanceOffset" ::: DeviceSize) -> "dataSize" ::: CSize
CSize ("instanceOffset" ::: DeviceSize
dataSize))
("data" ::: Ptr ()
data'))
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Result
r forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (forall e a. Exception e => e -> IO a
throwIO (Result -> VulkanException
VulkanException Result
r))
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkCreateRayTracingPipelinesNV
:: FunPtr (Ptr Device_T -> PipelineCache -> Word32 -> Ptr (SomeStruct RayTracingPipelineCreateInfoNV) -> Ptr AllocationCallbacks -> Ptr Pipeline -> IO Result) -> Ptr Device_T -> PipelineCache -> Word32 -> Ptr (SomeStruct RayTracingPipelineCreateInfoNV) -> Ptr AllocationCallbacks -> Ptr Pipeline -> IO Result
createRayTracingPipelinesNV :: forall io
. (MonadIO io)
=>
Device
->
PipelineCache
->
("createInfos" ::: Vector (SomeStruct RayTracingPipelineCreateInfoNV))
->
("allocator" ::: Maybe AllocationCallbacks)
-> io (Result, ("pipelines" ::: Vector Pipeline))
createRayTracingPipelinesNV :: forall (io :: * -> *).
MonadIO io =>
Device
-> PipelineCache
-> ("createInfos"
::: Vector (SomeStruct RayTracingPipelineCreateInfoNV))
-> ("allocator" ::: Maybe AllocationCallbacks)
-> io (Result, "pipelines" ::: Vector Pipeline)
createRayTracingPipelinesNV Device
device
PipelineCache
pipelineCache
"createInfos"
::: Vector (SomeStruct RayTracingPipelineCreateInfoNV)
createInfos
"allocator" ::: Maybe AllocationCallbacks
allocator = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT forall a b. (a -> b) -> a -> b
$ do
let vkCreateRayTracingPipelinesNVPtr :: FunPtr
(Ptr Device_T
-> PipelineCache
-> ("shader" ::: Word32)
-> ("pCreateInfos"
::: Ptr (SomeStruct RayTracingPipelineCreateInfoNV))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pPipelines" ::: Ptr Pipeline)
-> IO Result)
vkCreateRayTracingPipelinesNVPtr = DeviceCmds
-> FunPtr
(Ptr Device_T
-> PipelineCache
-> ("shader" ::: Word32)
-> ("pCreateInfos"
::: Ptr (SomeStruct RayTracingPipelineCreateInfoNV))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pPipelines" ::: Ptr Pipeline)
-> IO Result)
pVkCreateRayTracingPipelinesNV (case Device
device of Device{DeviceCmds
deviceCmds :: DeviceCmds
$sel:deviceCmds:Device :: Device -> DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr Device_T
-> PipelineCache
-> ("shader" ::: Word32)
-> ("pCreateInfos"
::: Ptr (SomeStruct RayTracingPipelineCreateInfoNV))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pPipelines" ::: Ptr Pipeline)
-> IO Result)
vkCreateRayTracingPipelinesNVPtr forall a. Eq a => a -> a -> Bool
/= forall a. FunPtr a
nullFunPtr) forall a b. (a -> b) -> a -> b
$
forall e a. Exception e => e -> IO a
throwIO forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkCreateRayTracingPipelinesNV is null" forall a. Maybe a
Nothing forall a. Maybe a
Nothing
let vkCreateRayTracingPipelinesNV' :: Ptr Device_T
-> PipelineCache
-> ("shader" ::: Word32)
-> ("pCreateInfos"
::: Ptr (SomeStruct RayTracingPipelineCreateInfoNV))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pPipelines" ::: Ptr Pipeline)
-> IO Result
vkCreateRayTracingPipelinesNV' = FunPtr
(Ptr Device_T
-> PipelineCache
-> ("shader" ::: Word32)
-> ("pCreateInfos"
::: Ptr (SomeStruct RayTracingPipelineCreateInfoNV))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pPipelines" ::: Ptr Pipeline)
-> IO Result)
-> Ptr Device_T
-> PipelineCache
-> ("shader" ::: Word32)
-> ("pCreateInfos"
::: Ptr (SomeStruct RayTracingPipelineCreateInfoNV))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pPipelines" ::: Ptr Pipeline)
-> IO Result
mkVkCreateRayTracingPipelinesNV FunPtr
(Ptr Device_T
-> PipelineCache
-> ("shader" ::: Word32)
-> ("pCreateInfos"
::: Ptr (SomeStruct RayTracingPipelineCreateInfoNV))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pPipelines" ::: Ptr Pipeline)
-> IO Result)
vkCreateRayTracingPipelinesNVPtr
Ptr (RayTracingPipelineCreateInfoNV Any)
pPCreateInfos <- forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes @(RayTracingPipelineCreateInfoNV _) ((forall a. Vector a -> Int
Data.Vector.length ("createInfos"
::: Vector (SomeStruct RayTracingPipelineCreateInfoNV)
createInfos)) forall a. Num a => a -> a -> a
* Int
80)
forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\Int
i SomeStruct RayTracingPipelineCreateInfoNV
e -> forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall (a :: [*] -> *) b.
(forall (es :: [*]).
(Extendss a es, PokeChain es) =>
ToCStruct (a es)) =>
Ptr (SomeStruct a) -> SomeStruct a -> IO b -> IO b
pokeSomeCStruct (forall (a :: [*] -> *) (es :: [*]).
Ptr (a es) -> Ptr (SomeStruct a)
forgetExtensions (Ptr (RayTracingPipelineCreateInfoNV Any)
pPCreateInfos forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (Int
80 forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr (RayTracingPipelineCreateInfoNV _))) (SomeStruct RayTracingPipelineCreateInfoNV
e) forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. (a -> b) -> a -> b
$ ())) ("createInfos"
::: Vector (SomeStruct RayTracingPipelineCreateInfoNV)
createInfos)
"pAllocator" ::: Ptr AllocationCallbacks
pAllocator <- case ("allocator" ::: Maybe AllocationCallbacks
allocator) of
"allocator" ::: Maybe AllocationCallbacks
Nothing -> forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a. Ptr a
nullPtr
Just AllocationCallbacks
j -> forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (AllocationCallbacks
j)
"pPipelines" ::: Ptr Pipeline
pPPipelines <- forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b c. IO a -> (a -> IO b) -> (a -> IO c) -> IO c
bracket (forall a. Int -> IO (Ptr a)
callocBytes @Pipeline ((forall a b. (Integral a, Num b) => a -> b
fromIntegral ((forall a b. (Integral a, Num b) => a -> b
fromIntegral (forall a. Vector a -> Int
Data.Vector.length forall a b. (a -> b) -> a -> b
$ ("createInfos"
::: Vector (SomeStruct RayTracingPipelineCreateInfoNV)
createInfos)) :: Word32))) forall a. Num a => a -> a -> a
* Int
8)) forall a. Ptr a -> IO ()
free
Result
r <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. String -> IO a -> IO a
traceAroundEvent String
"vkCreateRayTracingPipelinesNV" (Ptr Device_T
-> PipelineCache
-> ("shader" ::: Word32)
-> ("pCreateInfos"
::: Ptr (SomeStruct RayTracingPipelineCreateInfoNV))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pPipelines" ::: Ptr Pipeline)
-> IO Result
vkCreateRayTracingPipelinesNV'
(Device -> Ptr Device_T
deviceHandle (Device
device))
(PipelineCache
pipelineCache)
((forall a b. (Integral a, Num b) => a -> b
fromIntegral (forall a. Vector a -> Int
Data.Vector.length forall a b. (a -> b) -> a -> b
$ ("createInfos"
::: Vector (SomeStruct RayTracingPipelineCreateInfoNV)
createInfos)) :: Word32))
(forall (a :: [*] -> *) (es :: [*]).
Ptr (a es) -> Ptr (SomeStruct a)
forgetExtensions (Ptr (RayTracingPipelineCreateInfoNV Any)
pPCreateInfos))
"pAllocator" ::: Ptr AllocationCallbacks
pAllocator
("pPipelines" ::: Ptr Pipeline
pPPipelines))
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Result
r forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (forall e a. Exception e => e -> IO a
throwIO (Result -> VulkanException
VulkanException Result
r))
"pipelines" ::: Vector Pipeline
pPipelines <- forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
generateM (forall a b. (Integral a, Num b) => a -> b
fromIntegral ((forall a b. (Integral a, Num b) => a -> b
fromIntegral (forall a. Vector a -> Int
Data.Vector.length forall a b. (a -> b) -> a -> b
$ ("createInfos"
::: Vector (SomeStruct RayTracingPipelineCreateInfoNV)
createInfos)) :: Word32))) (\Int
i -> forall a. Storable a => Ptr a -> IO a
peek @Pipeline (("pPipelines" ::: Ptr Pipeline
pPPipelines forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
8 forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr Pipeline)))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ (Result
r, "pipelines" ::: Vector Pipeline
pPipelines)
withRayTracingPipelinesNV :: forall io r . MonadIO io => Device -> PipelineCache -> Vector (SomeStruct RayTracingPipelineCreateInfoNV) -> Maybe AllocationCallbacks -> (io (Result, Vector Pipeline) -> ((Result, Vector Pipeline) -> io ()) -> r) -> r
withRayTracingPipelinesNV :: forall (io :: * -> *) r.
MonadIO io =>
Device
-> PipelineCache
-> ("createInfos"
::: Vector (SomeStruct RayTracingPipelineCreateInfoNV))
-> ("allocator" ::: Maybe AllocationCallbacks)
-> (io (Result, "pipelines" ::: Vector Pipeline)
-> ((Result, "pipelines" ::: Vector Pipeline) -> io ()) -> r)
-> r
withRayTracingPipelinesNV Device
device PipelineCache
pipelineCache "createInfos"
::: Vector (SomeStruct RayTracingPipelineCreateInfoNV)
pCreateInfos "allocator" ::: Maybe AllocationCallbacks
pAllocator io (Result, "pipelines" ::: Vector Pipeline)
-> ((Result, "pipelines" ::: Vector Pipeline) -> io ()) -> r
b =
io (Result, "pipelines" ::: Vector Pipeline)
-> ((Result, "pipelines" ::: Vector Pipeline) -> io ()) -> r
b (forall (io :: * -> *).
MonadIO io =>
Device
-> PipelineCache
-> ("createInfos"
::: Vector (SomeStruct RayTracingPipelineCreateInfoNV))
-> ("allocator" ::: Maybe AllocationCallbacks)
-> io (Result, "pipelines" ::: Vector Pipeline)
createRayTracingPipelinesNV Device
device PipelineCache
pipelineCache "createInfos"
::: Vector (SomeStruct RayTracingPipelineCreateInfoNV)
pCreateInfos "allocator" ::: Maybe AllocationCallbacks
pAllocator)
(\(Result
_, "pipelines" ::: Vector Pipeline
o1) -> forall (t :: * -> *) (f :: * -> *) a b.
(Foldable t, Applicative f) =>
(a -> f b) -> t a -> f ()
traverse_ (\Pipeline
o1Elem -> forall (io :: * -> *).
MonadIO io =>
Device
-> Pipeline -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()
destroyPipeline Device
device
Pipeline
o1Elem
"allocator" ::: Maybe AllocationCallbacks
pAllocator) "pipelines" ::: Vector Pipeline
o1)
pattern $bSHADER_STAGE_RAYGEN_BIT_NV :: ShaderStageFlagBits
$mSHADER_STAGE_RAYGEN_BIT_NV :: forall {r}.
ShaderStageFlagBits -> ((# #) -> r) -> ((# #) -> r) -> r
SHADER_STAGE_RAYGEN_BIT_NV = SHADER_STAGE_RAYGEN_BIT_KHR
pattern $bSHADER_STAGE_ANY_HIT_BIT_NV :: ShaderStageFlagBits
$mSHADER_STAGE_ANY_HIT_BIT_NV :: forall {r}.
ShaderStageFlagBits -> ((# #) -> r) -> ((# #) -> r) -> r
SHADER_STAGE_ANY_HIT_BIT_NV = SHADER_STAGE_ANY_HIT_BIT_KHR
pattern $bSHADER_STAGE_CLOSEST_HIT_BIT_NV :: ShaderStageFlagBits
$mSHADER_STAGE_CLOSEST_HIT_BIT_NV :: forall {r}.
ShaderStageFlagBits -> ((# #) -> r) -> ((# #) -> r) -> r
SHADER_STAGE_CLOSEST_HIT_BIT_NV = SHADER_STAGE_CLOSEST_HIT_BIT_KHR
pattern $bSHADER_STAGE_MISS_BIT_NV :: ShaderStageFlagBits
$mSHADER_STAGE_MISS_BIT_NV :: forall {r}.
ShaderStageFlagBits -> ((# #) -> r) -> ((# #) -> r) -> r
SHADER_STAGE_MISS_BIT_NV = SHADER_STAGE_MISS_BIT_KHR
pattern $bSHADER_STAGE_INTERSECTION_BIT_NV :: ShaderStageFlagBits
$mSHADER_STAGE_INTERSECTION_BIT_NV :: forall {r}.
ShaderStageFlagBits -> ((# #) -> r) -> ((# #) -> r) -> r
SHADER_STAGE_INTERSECTION_BIT_NV = SHADER_STAGE_INTERSECTION_BIT_KHR
pattern $bSHADER_STAGE_CALLABLE_BIT_NV :: ShaderStageFlagBits
$mSHADER_STAGE_CALLABLE_BIT_NV :: forall {r}.
ShaderStageFlagBits -> ((# #) -> r) -> ((# #) -> r) -> r
SHADER_STAGE_CALLABLE_BIT_NV = SHADER_STAGE_CALLABLE_BIT_KHR
pattern $bPIPELINE_STAGE_RAY_TRACING_SHADER_BIT_NV :: PipelineStageFlagBits
$mPIPELINE_STAGE_RAY_TRACING_SHADER_BIT_NV :: forall {r}.
PipelineStageFlagBits -> ((# #) -> r) -> ((# #) -> r) -> r
PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_NV = PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_KHR
pattern $bPIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_NV :: PipelineStageFlagBits
$mPIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_NV :: forall {r}.
PipelineStageFlagBits -> ((# #) -> r) -> ((# #) -> r) -> r
PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_NV = PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR
pattern $bBUFFER_USAGE_RAY_TRACING_BIT_NV :: BufferUsageFlagBits
$mBUFFER_USAGE_RAY_TRACING_BIT_NV :: forall {r}.
BufferUsageFlagBits -> ((# #) -> r) -> ((# #) -> r) -> r
BUFFER_USAGE_RAY_TRACING_BIT_NV = BUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHR
pattern $bPIPELINE_BIND_POINT_RAY_TRACING_NV :: PipelineBindPoint
$mPIPELINE_BIND_POINT_RAY_TRACING_NV :: forall {r}. PipelineBindPoint -> ((# #) -> r) -> ((# #) -> r) -> r
PIPELINE_BIND_POINT_RAY_TRACING_NV = PIPELINE_BIND_POINT_RAY_TRACING_KHR
pattern $bACCESS_ACCELERATION_STRUCTURE_READ_BIT_NV :: AccessFlagBits
$mACCESS_ACCELERATION_STRUCTURE_READ_BIT_NV :: forall {r}. AccessFlagBits -> ((# #) -> r) -> ((# #) -> r) -> r
ACCESS_ACCELERATION_STRUCTURE_READ_BIT_NV = ACCESS_ACCELERATION_STRUCTURE_READ_BIT_KHR
pattern $bACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_NV :: AccessFlagBits
$mACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_NV :: forall {r}. AccessFlagBits -> ((# #) -> r) -> ((# #) -> r) -> r
ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_NV = ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_KHR
pattern $bINDEX_TYPE_NONE_NV :: IndexType
$mINDEX_TYPE_NONE_NV :: forall {r}. IndexType -> ((# #) -> r) -> ((# #) -> r) -> r
INDEX_TYPE_NONE_NV = INDEX_TYPE_NONE_KHR
pattern $bRAY_TRACING_SHADER_GROUP_TYPE_GENERAL_NV :: RayTracingShaderGroupTypeKHR
$mRAY_TRACING_SHADER_GROUP_TYPE_GENERAL_NV :: forall {r}.
RayTracingShaderGroupTypeKHR -> ((# #) -> r) -> ((# #) -> r) -> r
RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_NV = RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_KHR
pattern $bRAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_NV :: RayTracingShaderGroupTypeKHR
$mRAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_NV :: forall {r}.
RayTracingShaderGroupTypeKHR -> ((# #) -> r) -> ((# #) -> r) -> r
RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_NV = RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR
pattern $bRAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_NV :: RayTracingShaderGroupTypeKHR
$mRAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_NV :: forall {r}.
RayTracingShaderGroupTypeKHR -> ((# #) -> r) -> ((# #) -> r) -> r
RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_NV = RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR
pattern $bGEOMETRY_TYPE_TRIANGLES_NV :: GeometryTypeKHR
$mGEOMETRY_TYPE_TRIANGLES_NV :: forall {r}. GeometryTypeKHR -> ((# #) -> r) -> ((# #) -> r) -> r
GEOMETRY_TYPE_TRIANGLES_NV = GEOMETRY_TYPE_TRIANGLES_KHR
pattern $bGEOMETRY_TYPE_AABBS_NV :: GeometryTypeKHR
$mGEOMETRY_TYPE_AABBS_NV :: forall {r}. GeometryTypeKHR -> ((# #) -> r) -> ((# #) -> r) -> r
GEOMETRY_TYPE_AABBS_NV = GEOMETRY_TYPE_AABBS_KHR
pattern $bACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_NV :: AccelerationStructureTypeKHR
$mACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_NV :: forall {r}.
AccelerationStructureTypeKHR -> ((# #) -> r) -> ((# #) -> r) -> r
ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_NV = ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_KHR
pattern $bACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_NV :: AccelerationStructureTypeKHR
$mACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_NV :: forall {r}.
AccelerationStructureTypeKHR -> ((# #) -> r) -> ((# #) -> r) -> r
ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_NV = ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_KHR
pattern $bGEOMETRY_OPAQUE_BIT_NV :: GeometryFlagBitsKHR
$mGEOMETRY_OPAQUE_BIT_NV :: forall {r}.
GeometryFlagBitsKHR -> ((# #) -> r) -> ((# #) -> r) -> r
GEOMETRY_OPAQUE_BIT_NV = GEOMETRY_OPAQUE_BIT_KHR
pattern $bGEOMETRY_NO_DUPLICATE_ANY_HIT_INVOCATION_BIT_NV :: GeometryFlagBitsKHR
$mGEOMETRY_NO_DUPLICATE_ANY_HIT_INVOCATION_BIT_NV :: forall {r}.
GeometryFlagBitsKHR -> ((# #) -> r) -> ((# #) -> r) -> r
GEOMETRY_NO_DUPLICATE_ANY_HIT_INVOCATION_BIT_NV = GEOMETRY_NO_DUPLICATE_ANY_HIT_INVOCATION_BIT_KHR
pattern $bGEOMETRY_INSTANCE_TRIANGLE_CULL_DISABLE_BIT_NV :: GeometryInstanceFlagBitsKHR
$mGEOMETRY_INSTANCE_TRIANGLE_CULL_DISABLE_BIT_NV :: forall {r}.
GeometryInstanceFlagBitsKHR -> ((# #) -> r) -> ((# #) -> r) -> r
GEOMETRY_INSTANCE_TRIANGLE_CULL_DISABLE_BIT_NV = GEOMETRY_INSTANCE_TRIANGLE_FACING_CULL_DISABLE_BIT_KHR
pattern $bGEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_NV :: GeometryInstanceFlagBitsKHR
$mGEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_NV :: forall {r}.
GeometryInstanceFlagBitsKHR -> ((# #) -> r) -> ((# #) -> r) -> r
GEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_NV = GEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_KHR
pattern $bGEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_NV :: GeometryInstanceFlagBitsKHR
$mGEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_NV :: forall {r}.
GeometryInstanceFlagBitsKHR -> ((# #) -> r) -> ((# #) -> r) -> r
GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_NV = GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_KHR
pattern $bGEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_NV :: GeometryInstanceFlagBitsKHR
$mGEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_NV :: forall {r}.
GeometryInstanceFlagBitsKHR -> ((# #) -> r) -> ((# #) -> r) -> r
GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_NV = GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_KHR
pattern $bBUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_NV :: BuildAccelerationStructureFlagBitsKHR
$mBUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_NV :: forall {r}.
BuildAccelerationStructureFlagBitsKHR
-> ((# #) -> r) -> ((# #) -> r) -> r
BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_NV = BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_KHR
pattern $bBUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_NV :: BuildAccelerationStructureFlagBitsKHR
$mBUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_NV :: forall {r}.
BuildAccelerationStructureFlagBitsKHR
-> ((# #) -> r) -> ((# #) -> r) -> r
BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_NV = BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_KHR
pattern $bBUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_NV :: BuildAccelerationStructureFlagBitsKHR
$mBUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_NV :: forall {r}.
BuildAccelerationStructureFlagBitsKHR
-> ((# #) -> r) -> ((# #) -> r) -> r
BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_NV = BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_KHR
pattern $bBUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_NV :: BuildAccelerationStructureFlagBitsKHR
$mBUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_NV :: forall {r}.
BuildAccelerationStructureFlagBitsKHR
-> ((# #) -> r) -> ((# #) -> r) -> r
BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_NV = BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_KHR
pattern $bBUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_NV :: BuildAccelerationStructureFlagBitsKHR
$mBUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_NV :: forall {r}.
BuildAccelerationStructureFlagBitsKHR
-> ((# #) -> r) -> ((# #) -> r) -> r
BUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_NV = BUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_KHR
pattern $bCOPY_ACCELERATION_STRUCTURE_MODE_CLONE_NV :: CopyAccelerationStructureModeKHR
$mCOPY_ACCELERATION_STRUCTURE_MODE_CLONE_NV :: forall {r}.
CopyAccelerationStructureModeKHR
-> ((# #) -> r) -> ((# #) -> r) -> r
COPY_ACCELERATION_STRUCTURE_MODE_CLONE_NV = COPY_ACCELERATION_STRUCTURE_MODE_CLONE_KHR
pattern $bCOPY_ACCELERATION_STRUCTURE_MODE_COMPACT_NV :: CopyAccelerationStructureModeKHR
$mCOPY_ACCELERATION_STRUCTURE_MODE_COMPACT_NV :: forall {r}.
CopyAccelerationStructureModeKHR
-> ((# #) -> r) -> ((# #) -> r) -> r
COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_NV = COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_KHR
pattern $bSHADER_UNUSED_NV :: "shader" ::: Word32
$mSHADER_UNUSED_NV :: forall {r}.
("shader" ::: Word32) -> ((# #) -> r) -> ((# #) -> r) -> r
SHADER_UNUSED_NV = SHADER_UNUSED_KHR
getRayTracingShaderGroupHandlesNV :: Device
-> Pipeline
-> ("shader" ::: Word32)
-> ("shader" ::: Word32)
-> ("instanceOffset" ::: DeviceSize)
-> ("data" ::: Ptr ())
-> io ()
getRayTracingShaderGroupHandlesNV = forall (io :: * -> *).
MonadIO io =>
Device
-> Pipeline
-> ("shader" ::: Word32)
-> ("shader" ::: Word32)
-> ("instanceOffset" ::: DeviceSize)
-> ("data" ::: Ptr ())
-> io ()
getRayTracingShaderGroupHandlesKHR
data RayTracingShaderGroupCreateInfoNV = RayTracingShaderGroupCreateInfoNV
{
RayTracingShaderGroupCreateInfoNV -> RayTracingShaderGroupTypeKHR
type' :: RayTracingShaderGroupTypeKHR
,
RayTracingShaderGroupCreateInfoNV -> "shader" ::: Word32
generalShader :: Word32
,
RayTracingShaderGroupCreateInfoNV -> "shader" ::: Word32
closestHitShader :: Word32
,
RayTracingShaderGroupCreateInfoNV -> "shader" ::: Word32
anyHitShader :: Word32
,
RayTracingShaderGroupCreateInfoNV -> "shader" ::: Word32
intersectionShader :: Word32
}
deriving (Typeable, RayTracingShaderGroupCreateInfoNV
-> RayTracingShaderGroupCreateInfoNV -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RayTracingShaderGroupCreateInfoNV
-> RayTracingShaderGroupCreateInfoNV -> Bool
$c/= :: RayTracingShaderGroupCreateInfoNV
-> RayTracingShaderGroupCreateInfoNV -> Bool
== :: RayTracingShaderGroupCreateInfoNV
-> RayTracingShaderGroupCreateInfoNV -> Bool
$c== :: RayTracingShaderGroupCreateInfoNV
-> RayTracingShaderGroupCreateInfoNV -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (RayTracingShaderGroupCreateInfoNV)
#endif
deriving instance Show RayTracingShaderGroupCreateInfoNV
instance ToCStruct RayTracingShaderGroupCreateInfoNV where
withCStruct :: forall b.
RayTracingShaderGroupCreateInfoNV
-> (Ptr RayTracingShaderGroupCreateInfoNV -> IO b) -> IO b
withCStruct RayTracingShaderGroupCreateInfoNV
x Ptr RayTracingShaderGroupCreateInfoNV -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
40 forall a b. (a -> b) -> a -> b
$ \Ptr RayTracingShaderGroupCreateInfoNV
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr RayTracingShaderGroupCreateInfoNV
p RayTracingShaderGroupCreateInfoNV
x (Ptr RayTracingShaderGroupCreateInfoNV -> IO b
f Ptr RayTracingShaderGroupCreateInfoNV
p)
pokeCStruct :: forall b.
Ptr RayTracingShaderGroupCreateInfoNV
-> RayTracingShaderGroupCreateInfoNV -> IO b -> IO b
pokeCStruct Ptr RayTracingShaderGroupCreateInfoNV
p RayTracingShaderGroupCreateInfoNV{"shader" ::: Word32
RayTracingShaderGroupTypeKHR
intersectionShader :: "shader" ::: Word32
anyHitShader :: "shader" ::: Word32
closestHitShader :: "shader" ::: Word32
generalShader :: "shader" ::: Word32
type' :: RayTracingShaderGroupTypeKHR
$sel:intersectionShader:RayTracingShaderGroupCreateInfoNV :: RayTracingShaderGroupCreateInfoNV -> "shader" ::: Word32
$sel:anyHitShader:RayTracingShaderGroupCreateInfoNV :: RayTracingShaderGroupCreateInfoNV -> "shader" ::: Word32
$sel:closestHitShader:RayTracingShaderGroupCreateInfoNV :: RayTracingShaderGroupCreateInfoNV -> "shader" ::: Word32
$sel:generalShader:RayTracingShaderGroupCreateInfoNV :: RayTracingShaderGroupCreateInfoNV -> "shader" ::: Word32
$sel:type':RayTracingShaderGroupCreateInfoNV :: RayTracingShaderGroupCreateInfoNV -> RayTracingShaderGroupTypeKHR
..} IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RayTracingShaderGroupCreateInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_RAY_TRACING_SHADER_GROUP_CREATE_INFO_NV)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RayTracingShaderGroupCreateInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RayTracingShaderGroupCreateInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr RayTracingShaderGroupTypeKHR)) (RayTracingShaderGroupTypeKHR
type')
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RayTracingShaderGroupCreateInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Word32)) ("shader" ::: Word32
generalShader)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RayTracingShaderGroupCreateInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Word32)) ("shader" ::: Word32
closestHitShader)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RayTracingShaderGroupCreateInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr Word32)) ("shader" ::: Word32
anyHitShader)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RayTracingShaderGroupCreateInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Word32)) ("shader" ::: Word32
intersectionShader)
IO b
f
cStructSize :: Int
cStructSize = Int
40
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b. Ptr RayTracingShaderGroupCreateInfoNV -> IO b -> IO b
pokeZeroCStruct Ptr RayTracingShaderGroupCreateInfoNV
p IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RayTracingShaderGroupCreateInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_RAY_TRACING_SHADER_GROUP_CREATE_INFO_NV)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RayTracingShaderGroupCreateInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RayTracingShaderGroupCreateInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr RayTracingShaderGroupTypeKHR)) (forall a. Zero a => a
zero)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RayTracingShaderGroupCreateInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Word32)) (forall a. Zero a => a
zero)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RayTracingShaderGroupCreateInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Word32)) (forall a. Zero a => a
zero)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RayTracingShaderGroupCreateInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr Word32)) (forall a. Zero a => a
zero)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RayTracingShaderGroupCreateInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Word32)) (forall a. Zero a => a
zero)
IO b
f
instance FromCStruct RayTracingShaderGroupCreateInfoNV where
peekCStruct :: Ptr RayTracingShaderGroupCreateInfoNV
-> IO RayTracingShaderGroupCreateInfoNV
peekCStruct Ptr RayTracingShaderGroupCreateInfoNV
p = do
RayTracingShaderGroupTypeKHR
type' <- forall a. Storable a => Ptr a -> IO a
peek @RayTracingShaderGroupTypeKHR ((Ptr RayTracingShaderGroupCreateInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr RayTracingShaderGroupTypeKHR))
"shader" ::: Word32
generalShader <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr RayTracingShaderGroupCreateInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Word32))
"shader" ::: Word32
closestHitShader <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr RayTracingShaderGroupCreateInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Word32))
"shader" ::: Word32
anyHitShader <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr RayTracingShaderGroupCreateInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr Word32))
"shader" ::: Word32
intersectionShader <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr RayTracingShaderGroupCreateInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Word32))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ RayTracingShaderGroupTypeKHR
-> ("shader" ::: Word32)
-> ("shader" ::: Word32)
-> ("shader" ::: Word32)
-> ("shader" ::: Word32)
-> RayTracingShaderGroupCreateInfoNV
RayTracingShaderGroupCreateInfoNV
RayTracingShaderGroupTypeKHR
type'
"shader" ::: Word32
generalShader
"shader" ::: Word32
closestHitShader
"shader" ::: Word32
anyHitShader
"shader" ::: Word32
intersectionShader
instance Storable RayTracingShaderGroupCreateInfoNV where
sizeOf :: RayTracingShaderGroupCreateInfoNV -> Int
sizeOf ~RayTracingShaderGroupCreateInfoNV
_ = Int
40
alignment :: RayTracingShaderGroupCreateInfoNV -> Int
alignment ~RayTracingShaderGroupCreateInfoNV
_ = Int
8
peek :: Ptr RayTracingShaderGroupCreateInfoNV
-> IO RayTracingShaderGroupCreateInfoNV
peek = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr RayTracingShaderGroupCreateInfoNV
-> RayTracingShaderGroupCreateInfoNV -> IO ()
poke Ptr RayTracingShaderGroupCreateInfoNV
ptr RayTracingShaderGroupCreateInfoNV
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr RayTracingShaderGroupCreateInfoNV
ptr RayTracingShaderGroupCreateInfoNV
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero RayTracingShaderGroupCreateInfoNV where
zero :: RayTracingShaderGroupCreateInfoNV
zero = RayTracingShaderGroupTypeKHR
-> ("shader" ::: Word32)
-> ("shader" ::: Word32)
-> ("shader" ::: Word32)
-> ("shader" ::: Word32)
-> RayTracingShaderGroupCreateInfoNV
RayTracingShaderGroupCreateInfoNV
forall a. Zero a => a
zero
forall a. Zero a => a
zero
forall a. Zero a => a
zero
forall a. Zero a => a
zero
forall a. Zero a => a
zero
data RayTracingPipelineCreateInfoNV (es :: [Type]) = RayTracingPipelineCreateInfoNV
{
forall (es :: [*]). RayTracingPipelineCreateInfoNV es -> Chain es
next :: Chain es
,
forall (es :: [*]).
RayTracingPipelineCreateInfoNV es -> PipelineCreateFlags
flags :: PipelineCreateFlags
,
forall (es :: [*]).
RayTracingPipelineCreateInfoNV es
-> Vector (SomeStruct PipelineShaderStageCreateInfo)
stages :: Vector (SomeStruct PipelineShaderStageCreateInfo)
,
forall (es :: [*]).
RayTracingPipelineCreateInfoNV es
-> Vector RayTracingShaderGroupCreateInfoNV
groups :: Vector RayTracingShaderGroupCreateInfoNV
,
forall (es :: [*]).
RayTracingPipelineCreateInfoNV es -> "shader" ::: Word32
maxRecursionDepth :: Word32
,
forall (es :: [*]).
RayTracingPipelineCreateInfoNV es -> PipelineLayout
layout :: PipelineLayout
,
forall (es :: [*]). RayTracingPipelineCreateInfoNV es -> Pipeline
basePipelineHandle :: Pipeline
,
forall (es :: [*]). RayTracingPipelineCreateInfoNV es -> Int32
basePipelineIndex :: Int32
}
deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (RayTracingPipelineCreateInfoNV (es :: [Type]))
#endif
deriving instance Show (Chain es) => Show (RayTracingPipelineCreateInfoNV es)
instance Extensible RayTracingPipelineCreateInfoNV where
extensibleTypeName :: String
extensibleTypeName = String
"RayTracingPipelineCreateInfoNV"
setNext :: forall (ds :: [*]) (es :: [*]).
RayTracingPipelineCreateInfoNV ds
-> Chain es -> RayTracingPipelineCreateInfoNV es
setNext RayTracingPipelineCreateInfoNV{Int32
"shader" ::: Word32
Vector RayTracingShaderGroupCreateInfoNV
Vector (SomeStruct PipelineShaderStageCreateInfo)
Chain ds
PipelineLayout
Pipeline
PipelineCreateFlags
basePipelineIndex :: Int32
basePipelineHandle :: Pipeline
layout :: PipelineLayout
maxRecursionDepth :: "shader" ::: Word32
groups :: Vector RayTracingShaderGroupCreateInfoNV
stages :: Vector (SomeStruct PipelineShaderStageCreateInfo)
flags :: PipelineCreateFlags
next :: Chain ds
$sel:basePipelineIndex:RayTracingPipelineCreateInfoNV :: forall (es :: [*]). RayTracingPipelineCreateInfoNV es -> Int32
$sel:basePipelineHandle:RayTracingPipelineCreateInfoNV :: forall (es :: [*]). RayTracingPipelineCreateInfoNV es -> Pipeline
$sel:layout:RayTracingPipelineCreateInfoNV :: forall (es :: [*]).
RayTracingPipelineCreateInfoNV es -> PipelineLayout
$sel:maxRecursionDepth:RayTracingPipelineCreateInfoNV :: forall (es :: [*]).
RayTracingPipelineCreateInfoNV es -> "shader" ::: Word32
$sel:groups:RayTracingPipelineCreateInfoNV :: forall (es :: [*]).
RayTracingPipelineCreateInfoNV es
-> Vector RayTracingShaderGroupCreateInfoNV
$sel:stages:RayTracingPipelineCreateInfoNV :: forall (es :: [*]).
RayTracingPipelineCreateInfoNV es
-> Vector (SomeStruct PipelineShaderStageCreateInfo)
$sel:flags:RayTracingPipelineCreateInfoNV :: forall (es :: [*]).
RayTracingPipelineCreateInfoNV es -> PipelineCreateFlags
$sel:next:RayTracingPipelineCreateInfoNV :: forall (es :: [*]). RayTracingPipelineCreateInfoNV es -> Chain es
..} Chain es
next' = RayTracingPipelineCreateInfoNV{$sel:next:RayTracingPipelineCreateInfoNV :: Chain es
next = Chain es
next', Int32
"shader" ::: Word32
Vector RayTracingShaderGroupCreateInfoNV
Vector (SomeStruct PipelineShaderStageCreateInfo)
PipelineLayout
Pipeline
PipelineCreateFlags
basePipelineIndex :: Int32
basePipelineHandle :: Pipeline
layout :: PipelineLayout
maxRecursionDepth :: "shader" ::: Word32
groups :: Vector RayTracingShaderGroupCreateInfoNV
stages :: Vector (SomeStruct PipelineShaderStageCreateInfo)
flags :: PipelineCreateFlags
$sel:basePipelineIndex:RayTracingPipelineCreateInfoNV :: Int32
$sel:basePipelineHandle:RayTracingPipelineCreateInfoNV :: Pipeline
$sel:layout:RayTracingPipelineCreateInfoNV :: PipelineLayout
$sel:maxRecursionDepth:RayTracingPipelineCreateInfoNV :: "shader" ::: Word32
$sel:groups:RayTracingPipelineCreateInfoNV :: Vector RayTracingShaderGroupCreateInfoNV
$sel:stages:RayTracingPipelineCreateInfoNV :: Vector (SomeStruct PipelineShaderStageCreateInfo)
$sel:flags:RayTracingPipelineCreateInfoNV :: PipelineCreateFlags
..}
getNext :: forall (es :: [*]). RayTracingPipelineCreateInfoNV es -> Chain es
getNext RayTracingPipelineCreateInfoNV{Int32
"shader" ::: Word32
Vector RayTracingShaderGroupCreateInfoNV
Vector (SomeStruct PipelineShaderStageCreateInfo)
Chain es
PipelineLayout
Pipeline
PipelineCreateFlags
basePipelineIndex :: Int32
basePipelineHandle :: Pipeline
layout :: PipelineLayout
maxRecursionDepth :: "shader" ::: Word32
groups :: Vector RayTracingShaderGroupCreateInfoNV
stages :: Vector (SomeStruct PipelineShaderStageCreateInfo)
flags :: PipelineCreateFlags
next :: Chain es
$sel:basePipelineIndex:RayTracingPipelineCreateInfoNV :: forall (es :: [*]). RayTracingPipelineCreateInfoNV es -> Int32
$sel:basePipelineHandle:RayTracingPipelineCreateInfoNV :: forall (es :: [*]). RayTracingPipelineCreateInfoNV es -> Pipeline
$sel:layout:RayTracingPipelineCreateInfoNV :: forall (es :: [*]).
RayTracingPipelineCreateInfoNV es -> PipelineLayout
$sel:maxRecursionDepth:RayTracingPipelineCreateInfoNV :: forall (es :: [*]).
RayTracingPipelineCreateInfoNV es -> "shader" ::: Word32
$sel:groups:RayTracingPipelineCreateInfoNV :: forall (es :: [*]).
RayTracingPipelineCreateInfoNV es
-> Vector RayTracingShaderGroupCreateInfoNV
$sel:stages:RayTracingPipelineCreateInfoNV :: forall (es :: [*]).
RayTracingPipelineCreateInfoNV es
-> Vector (SomeStruct PipelineShaderStageCreateInfo)
$sel:flags:RayTracingPipelineCreateInfoNV :: forall (es :: [*]).
RayTracingPipelineCreateInfoNV es -> PipelineCreateFlags
$sel:next:RayTracingPipelineCreateInfoNV :: forall (es :: [*]). RayTracingPipelineCreateInfoNV es -> Chain es
..} = Chain es
next
extends :: forall e b proxy. Typeable e => proxy e -> (Extends RayTracingPipelineCreateInfoNV e => b) -> Maybe b
extends :: forall e b (proxy :: * -> *).
Typeable e =>
proxy e
-> (Extends RayTracingPipelineCreateInfoNV e => b) -> Maybe b
extends proxy e
_ Extends RayTracingPipelineCreateInfoNV e => b
f
| Just e :~: PipelineCreationFeedbackCreateInfo
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @PipelineCreationFeedbackCreateInfo = forall a. a -> Maybe a
Just Extends RayTracingPipelineCreateInfoNV e => b
f
| Just e :~: PipelineCreateFlags2CreateInfoKHR
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @PipelineCreateFlags2CreateInfoKHR = forall a. a -> Maybe a
Just Extends RayTracingPipelineCreateInfoNV e => b
f
| Bool
otherwise = forall a. Maybe a
Nothing
instance ( Extendss RayTracingPipelineCreateInfoNV es
, PokeChain es ) => ToCStruct (RayTracingPipelineCreateInfoNV es) where
withCStruct :: forall b.
RayTracingPipelineCreateInfoNV es
-> (Ptr (RayTracingPipelineCreateInfoNV es) -> IO b) -> IO b
withCStruct RayTracingPipelineCreateInfoNV es
x Ptr (RayTracingPipelineCreateInfoNV es) -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
80 forall a b. (a -> b) -> a -> b
$ \Ptr (RayTracingPipelineCreateInfoNV es)
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr (RayTracingPipelineCreateInfoNV es)
p RayTracingPipelineCreateInfoNV es
x (Ptr (RayTracingPipelineCreateInfoNV es) -> IO b
f Ptr (RayTracingPipelineCreateInfoNV es)
p)
pokeCStruct :: forall b.
Ptr (RayTracingPipelineCreateInfoNV es)
-> RayTracingPipelineCreateInfoNV es -> IO b -> IO b
pokeCStruct Ptr (RayTracingPipelineCreateInfoNV es)
p RayTracingPipelineCreateInfoNV{Int32
"shader" ::: Word32
Vector RayTracingShaderGroupCreateInfoNV
Vector (SomeStruct PipelineShaderStageCreateInfo)
Chain es
PipelineLayout
Pipeline
PipelineCreateFlags
basePipelineIndex :: Int32
basePipelineHandle :: Pipeline
layout :: PipelineLayout
maxRecursionDepth :: "shader" ::: Word32
groups :: Vector RayTracingShaderGroupCreateInfoNV
stages :: Vector (SomeStruct PipelineShaderStageCreateInfo)
flags :: PipelineCreateFlags
next :: Chain es
$sel:basePipelineIndex:RayTracingPipelineCreateInfoNV :: forall (es :: [*]). RayTracingPipelineCreateInfoNV es -> Int32
$sel:basePipelineHandle:RayTracingPipelineCreateInfoNV :: forall (es :: [*]). RayTracingPipelineCreateInfoNV es -> Pipeline
$sel:layout:RayTracingPipelineCreateInfoNV :: forall (es :: [*]).
RayTracingPipelineCreateInfoNV es -> PipelineLayout
$sel:maxRecursionDepth:RayTracingPipelineCreateInfoNV :: forall (es :: [*]).
RayTracingPipelineCreateInfoNV es -> "shader" ::: Word32
$sel:groups:RayTracingPipelineCreateInfoNV :: forall (es :: [*]).
RayTracingPipelineCreateInfoNV es
-> Vector RayTracingShaderGroupCreateInfoNV
$sel:stages:RayTracingPipelineCreateInfoNV :: forall (es :: [*]).
RayTracingPipelineCreateInfoNV es
-> Vector (SomeStruct PipelineShaderStageCreateInfo)
$sel:flags:RayTracingPipelineCreateInfoNV :: forall (es :: [*]).
RayTracingPipelineCreateInfoNV es -> PipelineCreateFlags
$sel:next:RayTracingPipelineCreateInfoNV :: forall (es :: [*]). RayTracingPipelineCreateInfoNV es -> Chain es
..} IO b
f = forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT forall a b. (a -> b) -> a -> b
$ do
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (RayTracingPipelineCreateInfoNV es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_RAY_TRACING_PIPELINE_CREATE_INFO_NV)
"data" ::: Ptr ()
pNext'' <- forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap forall a b. Ptr a -> Ptr b
castPtr forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall (es :: [*]) a.
PokeChain es =>
Chain es -> (Ptr (Chain es) -> IO a) -> IO a
withChain (Chain es
next)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (RayTracingPipelineCreateInfoNV es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) "data" ::: Ptr ()
pNext''
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (RayTracingPipelineCreateInfoNV es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr PipelineCreateFlags)) (PipelineCreateFlags
flags)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (RayTracingPipelineCreateInfoNV es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Word32)) ((forall a b. (Integral a, Num b) => a -> b
fromIntegral (forall a. Vector a -> Int
Data.Vector.length forall a b. (a -> b) -> a -> b
$ (Vector (SomeStruct PipelineShaderStageCreateInfo)
stages)) :: Word32))
Ptr (PipelineShaderStageCreateInfo Any)
pPStages' <- forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes @(PipelineShaderStageCreateInfo _) ((forall a. Vector a -> Int
Data.Vector.length (Vector (SomeStruct PipelineShaderStageCreateInfo)
stages)) forall a. Num a => a -> a -> a
* Int
48)
forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\Int
i SomeStruct PipelineShaderStageCreateInfo
e -> forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall (a :: [*] -> *) b.
(forall (es :: [*]).
(Extendss a es, PokeChain es) =>
ToCStruct (a es)) =>
Ptr (SomeStruct a) -> SomeStruct a -> IO b -> IO b
pokeSomeCStruct (forall (a :: [*] -> *) (es :: [*]).
Ptr (a es) -> Ptr (SomeStruct a)
forgetExtensions (Ptr (PipelineShaderStageCreateInfo Any)
pPStages' forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (Int
48 forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr (PipelineShaderStageCreateInfo _))) (SomeStruct PipelineShaderStageCreateInfo
e) forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. (a -> b) -> a -> b
$ ())) (Vector (SomeStruct PipelineShaderStageCreateInfo)
stages)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (RayTracingPipelineCreateInfoNV es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr (Ptr (PipelineShaderStageCreateInfo _)))) (Ptr (PipelineShaderStageCreateInfo Any)
pPStages')
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (RayTracingPipelineCreateInfoNV es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Word32)) ((forall a b. (Integral a, Num b) => a -> b
fromIntegral (forall a. Vector a -> Int
Data.Vector.length forall a b. (a -> b) -> a -> b
$ (Vector RayTracingShaderGroupCreateInfoNV
groups)) :: Word32))
Ptr RayTracingShaderGroupCreateInfoNV
pPGroups' <- forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes @RayTracingShaderGroupCreateInfoNV ((forall a. Vector a -> Int
Data.Vector.length (Vector RayTracingShaderGroupCreateInfoNV
groups)) forall a. Num a => a -> a -> a
* Int
40)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\Int
i RayTracingShaderGroupCreateInfoNV
e -> forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr RayTracingShaderGroupCreateInfoNV
pPGroups' forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (Int
40 forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr RayTracingShaderGroupCreateInfoNV) (RayTracingShaderGroupCreateInfoNV
e)) (Vector RayTracingShaderGroupCreateInfoNV
groups)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (RayTracingPipelineCreateInfoNV es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr (Ptr RayTracingShaderGroupCreateInfoNV))) (Ptr RayTracingShaderGroupCreateInfoNV
pPGroups')
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (RayTracingPipelineCreateInfoNV es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr Word32)) ("shader" ::: Word32
maxRecursionDepth)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (RayTracingPipelineCreateInfoNV es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56 :: Ptr PipelineLayout)) (PipelineLayout
layout)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (RayTracingPipelineCreateInfoNV es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
64 :: Ptr Pipeline)) (Pipeline
basePipelineHandle)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (RayTracingPipelineCreateInfoNV es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
72 :: Ptr Int32)) (Int32
basePipelineIndex)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ IO b
f
cStructSize :: Int
cStructSize = Int
80
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b. Ptr (RayTracingPipelineCreateInfoNV es) -> IO b -> IO b
pokeZeroCStruct Ptr (RayTracingPipelineCreateInfoNV es)
p IO b
f = forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT forall a b. (a -> b) -> a -> b
$ do
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (RayTracingPipelineCreateInfoNV es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_RAY_TRACING_PIPELINE_CREATE_INFO_NV)
"data" ::: Ptr ()
pNext' <- forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap forall a b. Ptr a -> Ptr b
castPtr forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall (es :: [*]) a.
PokeChain es =>
(Ptr (Chain es) -> IO a) -> IO a
withZeroChain @es
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (RayTracingPipelineCreateInfoNV es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) "data" ::: Ptr ()
pNext'
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (RayTracingPipelineCreateInfoNV es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr Word32)) (forall a. Zero a => a
zero)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (RayTracingPipelineCreateInfoNV es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56 :: Ptr PipelineLayout)) (forall a. Zero a => a
zero)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (RayTracingPipelineCreateInfoNV es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
72 :: Ptr Int32)) (forall a. Zero a => a
zero)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ IO b
f
instance ( Extendss RayTracingPipelineCreateInfoNV es
, PeekChain es ) => FromCStruct (RayTracingPipelineCreateInfoNV es) where
peekCStruct :: Ptr (RayTracingPipelineCreateInfoNV es)
-> IO (RayTracingPipelineCreateInfoNV es)
peekCStruct Ptr (RayTracingPipelineCreateInfoNV es)
p = do
"data" ::: Ptr ()
pNext <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr ()) ((Ptr (RayTracingPipelineCreateInfoNV es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ())))
Chain es
next <- forall (es :: [*]). PeekChain es => Ptr (Chain es) -> IO (Chain es)
peekChain (forall a b. Ptr a -> Ptr b
castPtr "data" ::: Ptr ()
pNext)
PipelineCreateFlags
flags <- forall a. Storable a => Ptr a -> IO a
peek @PipelineCreateFlags ((Ptr (RayTracingPipelineCreateInfoNV es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr PipelineCreateFlags))
"shader" ::: Word32
stageCount <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr (RayTracingPipelineCreateInfoNV es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Word32))
Ptr (PipelineShaderStageCreateInfo Any)
pStages <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr (PipelineShaderStageCreateInfo _)) ((Ptr (RayTracingPipelineCreateInfoNV es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr (Ptr (PipelineShaderStageCreateInfo _))))
Vector (SomeStruct PipelineShaderStageCreateInfo)
pStages' <- forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
generateM (forall a b. (Integral a, Num b) => a -> b
fromIntegral "shader" ::: Word32
stageCount) (\Int
i -> forall (a :: [*] -> *).
(Extensible a,
forall (es :: [*]).
(Extendss a es, PeekChain es) =>
FromCStruct (a es)) =>
Ptr (SomeStruct a) -> IO (SomeStruct a)
peekSomeCStruct (forall (a :: [*] -> *) (es :: [*]).
Ptr (a es) -> Ptr (SomeStruct a)
forgetExtensions ((Ptr (PipelineShaderStageCreateInfo Any)
pStages forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
48 forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr (PipelineShaderStageCreateInfo _)))))
"shader" ::: Word32
groupCount <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr (RayTracingPipelineCreateInfoNV es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Word32))
Ptr RayTracingShaderGroupCreateInfoNV
pGroups <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr RayTracingShaderGroupCreateInfoNV) ((Ptr (RayTracingPipelineCreateInfoNV es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr (Ptr RayTracingShaderGroupCreateInfoNV)))
Vector RayTracingShaderGroupCreateInfoNV
pGroups' <- forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
generateM (forall a b. (Integral a, Num b) => a -> b
fromIntegral "shader" ::: Word32
groupCount) (\Int
i -> forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @RayTracingShaderGroupCreateInfoNV ((Ptr RayTracingShaderGroupCreateInfoNV
pGroups forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
40 forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr RayTracingShaderGroupCreateInfoNV)))
"shader" ::: Word32
maxRecursionDepth <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr (RayTracingPipelineCreateInfoNV es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr Word32))
PipelineLayout
layout <- forall a. Storable a => Ptr a -> IO a
peek @PipelineLayout ((Ptr (RayTracingPipelineCreateInfoNV es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56 :: Ptr PipelineLayout))
Pipeline
basePipelineHandle <- forall a. Storable a => Ptr a -> IO a
peek @Pipeline ((Ptr (RayTracingPipelineCreateInfoNV es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
64 :: Ptr Pipeline))
Int32
basePipelineIndex <- forall a. Storable a => Ptr a -> IO a
peek @Int32 ((Ptr (RayTracingPipelineCreateInfoNV es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
72 :: Ptr Int32))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ forall (es :: [*]).
Chain es
-> PipelineCreateFlags
-> Vector (SomeStruct PipelineShaderStageCreateInfo)
-> Vector RayTracingShaderGroupCreateInfoNV
-> ("shader" ::: Word32)
-> PipelineLayout
-> Pipeline
-> Int32
-> RayTracingPipelineCreateInfoNV es
RayTracingPipelineCreateInfoNV
Chain es
next
PipelineCreateFlags
flags
Vector (SomeStruct PipelineShaderStageCreateInfo)
pStages'
Vector RayTracingShaderGroupCreateInfoNV
pGroups'
"shader" ::: Word32
maxRecursionDepth
PipelineLayout
layout
Pipeline
basePipelineHandle
Int32
basePipelineIndex
instance es ~ '[] => Zero (RayTracingPipelineCreateInfoNV es) where
zero :: RayTracingPipelineCreateInfoNV es
zero = forall (es :: [*]).
Chain es
-> PipelineCreateFlags
-> Vector (SomeStruct PipelineShaderStageCreateInfo)
-> Vector RayTracingShaderGroupCreateInfoNV
-> ("shader" ::: Word32)
-> PipelineLayout
-> Pipeline
-> Int32
-> RayTracingPipelineCreateInfoNV es
RayTracingPipelineCreateInfoNV
()
forall a. Zero a => a
zero
forall a. Monoid a => a
mempty
forall a. Monoid a => a
mempty
forall a. Zero a => a
zero
forall a. Zero a => a
zero
forall a. Zero a => a
zero
forall a. Zero a => a
zero
data GeometryTrianglesNV = GeometryTrianglesNV
{
GeometryTrianglesNV -> "instanceData" ::: Buffer
vertexData :: Buffer
,
GeometryTrianglesNV -> "instanceOffset" ::: DeviceSize
vertexOffset :: DeviceSize
,
GeometryTrianglesNV -> "shader" ::: Word32
vertexCount :: Word32
,
GeometryTrianglesNV -> "instanceOffset" ::: DeviceSize
vertexStride :: DeviceSize
,
GeometryTrianglesNV -> Format
vertexFormat :: Format
,
GeometryTrianglesNV -> "instanceData" ::: Buffer
indexData :: Buffer
,
GeometryTrianglesNV -> "instanceOffset" ::: DeviceSize
indexOffset :: DeviceSize
,
GeometryTrianglesNV -> "shader" ::: Word32
indexCount :: Word32
,
GeometryTrianglesNV -> IndexType
indexType :: IndexType
,
GeometryTrianglesNV -> "instanceData" ::: Buffer
transformData :: Buffer
,
GeometryTrianglesNV -> "instanceOffset" ::: DeviceSize
transformOffset :: DeviceSize
}
deriving (Typeable, GeometryTrianglesNV -> GeometryTrianglesNV -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GeometryTrianglesNV -> GeometryTrianglesNV -> Bool
$c/= :: GeometryTrianglesNV -> GeometryTrianglesNV -> Bool
== :: GeometryTrianglesNV -> GeometryTrianglesNV -> Bool
$c== :: GeometryTrianglesNV -> GeometryTrianglesNV -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (GeometryTrianglesNV)
#endif
deriving instance Show GeometryTrianglesNV
instance ToCStruct GeometryTrianglesNV where
withCStruct :: forall b.
GeometryTrianglesNV -> (Ptr GeometryTrianglesNV -> IO b) -> IO b
withCStruct GeometryTrianglesNV
x Ptr GeometryTrianglesNV -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
96 forall a b. (a -> b) -> a -> b
$ \Ptr GeometryTrianglesNV
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr GeometryTrianglesNV
p GeometryTrianglesNV
x (Ptr GeometryTrianglesNV -> IO b
f Ptr GeometryTrianglesNV
p)
pokeCStruct :: forall b.
Ptr GeometryTrianglesNV -> GeometryTrianglesNV -> IO b -> IO b
pokeCStruct Ptr GeometryTrianglesNV
p GeometryTrianglesNV{"shader" ::: Word32
"instanceOffset" ::: DeviceSize
Format
IndexType
"instanceData" ::: Buffer
transformOffset :: "instanceOffset" ::: DeviceSize
transformData :: "instanceData" ::: Buffer
indexType :: IndexType
indexCount :: "shader" ::: Word32
indexOffset :: "instanceOffset" ::: DeviceSize
indexData :: "instanceData" ::: Buffer
vertexFormat :: Format
vertexStride :: "instanceOffset" ::: DeviceSize
vertexCount :: "shader" ::: Word32
vertexOffset :: "instanceOffset" ::: DeviceSize
vertexData :: "instanceData" ::: Buffer
$sel:transformOffset:GeometryTrianglesNV :: GeometryTrianglesNV -> "instanceOffset" ::: DeviceSize
$sel:transformData:GeometryTrianglesNV :: GeometryTrianglesNV -> "instanceData" ::: Buffer
$sel:indexType:GeometryTrianglesNV :: GeometryTrianglesNV -> IndexType
$sel:indexCount:GeometryTrianglesNV :: GeometryTrianglesNV -> "shader" ::: Word32
$sel:indexOffset:GeometryTrianglesNV :: GeometryTrianglesNV -> "instanceOffset" ::: DeviceSize
$sel:indexData:GeometryTrianglesNV :: GeometryTrianglesNV -> "instanceData" ::: Buffer
$sel:vertexFormat:GeometryTrianglesNV :: GeometryTrianglesNV -> Format
$sel:vertexStride:GeometryTrianglesNV :: GeometryTrianglesNV -> "instanceOffset" ::: DeviceSize
$sel:vertexCount:GeometryTrianglesNV :: GeometryTrianglesNV -> "shader" ::: Word32
$sel:vertexOffset:GeometryTrianglesNV :: GeometryTrianglesNV -> "instanceOffset" ::: DeviceSize
$sel:vertexData:GeometryTrianglesNV :: GeometryTrianglesNV -> "instanceData" ::: Buffer
..} IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryTrianglesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_GEOMETRY_TRIANGLES_NV)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryTrianglesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryTrianglesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Buffer)) ("instanceData" ::: Buffer
vertexData)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryTrianglesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr DeviceSize)) ("instanceOffset" ::: DeviceSize
vertexOffset)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryTrianglesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Word32)) ("shader" ::: Word32
vertexCount)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryTrianglesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr DeviceSize)) ("instanceOffset" ::: DeviceSize
vertexStride)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryTrianglesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr Format)) (Format
vertexFormat)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryTrianglesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56 :: Ptr Buffer)) ("instanceData" ::: Buffer
indexData)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryTrianglesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
64 :: Ptr DeviceSize)) ("instanceOffset" ::: DeviceSize
indexOffset)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryTrianglesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
72 :: Ptr Word32)) ("shader" ::: Word32
indexCount)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryTrianglesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
76 :: Ptr IndexType)) (IndexType
indexType)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryTrianglesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
80 :: Ptr Buffer)) ("instanceData" ::: Buffer
transformData)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryTrianglesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
88 :: Ptr DeviceSize)) ("instanceOffset" ::: DeviceSize
transformOffset)
IO b
f
cStructSize :: Int
cStructSize = Int
96
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b. Ptr GeometryTrianglesNV -> IO b -> IO b
pokeZeroCStruct Ptr GeometryTrianglesNV
p IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryTrianglesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_GEOMETRY_TRIANGLES_NV)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryTrianglesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryTrianglesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr DeviceSize)) (forall a. Zero a => a
zero)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryTrianglesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Word32)) (forall a. Zero a => a
zero)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryTrianglesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr DeviceSize)) (forall a. Zero a => a
zero)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryTrianglesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr Format)) (forall a. Zero a => a
zero)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryTrianglesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
64 :: Ptr DeviceSize)) (forall a. Zero a => a
zero)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryTrianglesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
72 :: Ptr Word32)) (forall a. Zero a => a
zero)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryTrianglesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
76 :: Ptr IndexType)) (forall a. Zero a => a
zero)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryTrianglesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
88 :: Ptr DeviceSize)) (forall a. Zero a => a
zero)
IO b
f
instance FromCStruct GeometryTrianglesNV where
peekCStruct :: Ptr GeometryTrianglesNV -> IO GeometryTrianglesNV
peekCStruct Ptr GeometryTrianglesNV
p = do
"instanceData" ::: Buffer
vertexData <- forall a. Storable a => Ptr a -> IO a
peek @Buffer ((Ptr GeometryTrianglesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Buffer))
"instanceOffset" ::: DeviceSize
vertexOffset <- forall a. Storable a => Ptr a -> IO a
peek @DeviceSize ((Ptr GeometryTrianglesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr DeviceSize))
"shader" ::: Word32
vertexCount <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr GeometryTrianglesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Word32))
"instanceOffset" ::: DeviceSize
vertexStride <- forall a. Storable a => Ptr a -> IO a
peek @DeviceSize ((Ptr GeometryTrianglesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr DeviceSize))
Format
vertexFormat <- forall a. Storable a => Ptr a -> IO a
peek @Format ((Ptr GeometryTrianglesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr Format))
"instanceData" ::: Buffer
indexData <- forall a. Storable a => Ptr a -> IO a
peek @Buffer ((Ptr GeometryTrianglesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56 :: Ptr Buffer))
"instanceOffset" ::: DeviceSize
indexOffset <- forall a. Storable a => Ptr a -> IO a
peek @DeviceSize ((Ptr GeometryTrianglesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
64 :: Ptr DeviceSize))
"shader" ::: Word32
indexCount <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr GeometryTrianglesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
72 :: Ptr Word32))
IndexType
indexType <- forall a. Storable a => Ptr a -> IO a
peek @IndexType ((Ptr GeometryTrianglesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
76 :: Ptr IndexType))
"instanceData" ::: Buffer
transformData <- forall a. Storable a => Ptr a -> IO a
peek @Buffer ((Ptr GeometryTrianglesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
80 :: Ptr Buffer))
"instanceOffset" ::: DeviceSize
transformOffset <- forall a. Storable a => Ptr a -> IO a
peek @DeviceSize ((Ptr GeometryTrianglesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
88 :: Ptr DeviceSize))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ ("instanceData" ::: Buffer)
-> ("instanceOffset" ::: DeviceSize)
-> ("shader" ::: Word32)
-> ("instanceOffset" ::: DeviceSize)
-> Format
-> ("instanceData" ::: Buffer)
-> ("instanceOffset" ::: DeviceSize)
-> ("shader" ::: Word32)
-> IndexType
-> ("instanceData" ::: Buffer)
-> ("instanceOffset" ::: DeviceSize)
-> GeometryTrianglesNV
GeometryTrianglesNV
"instanceData" ::: Buffer
vertexData
"instanceOffset" ::: DeviceSize
vertexOffset
"shader" ::: Word32
vertexCount
"instanceOffset" ::: DeviceSize
vertexStride
Format
vertexFormat
"instanceData" ::: Buffer
indexData
"instanceOffset" ::: DeviceSize
indexOffset
"shader" ::: Word32
indexCount
IndexType
indexType
"instanceData" ::: Buffer
transformData
"instanceOffset" ::: DeviceSize
transformOffset
instance Storable GeometryTrianglesNV where
sizeOf :: GeometryTrianglesNV -> Int
sizeOf ~GeometryTrianglesNV
_ = Int
96
alignment :: GeometryTrianglesNV -> Int
alignment ~GeometryTrianglesNV
_ = Int
8
peek :: Ptr GeometryTrianglesNV -> IO GeometryTrianglesNV
peek = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr GeometryTrianglesNV -> GeometryTrianglesNV -> IO ()
poke Ptr GeometryTrianglesNV
ptr GeometryTrianglesNV
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr GeometryTrianglesNV
ptr GeometryTrianglesNV
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero GeometryTrianglesNV where
zero :: GeometryTrianglesNV
zero = ("instanceData" ::: Buffer)
-> ("instanceOffset" ::: DeviceSize)
-> ("shader" ::: Word32)
-> ("instanceOffset" ::: DeviceSize)
-> Format
-> ("instanceData" ::: Buffer)
-> ("instanceOffset" ::: DeviceSize)
-> ("shader" ::: Word32)
-> IndexType
-> ("instanceData" ::: Buffer)
-> ("instanceOffset" ::: DeviceSize)
-> GeometryTrianglesNV
GeometryTrianglesNV
forall a. Zero a => a
zero
forall a. Zero a => a
zero
forall a. Zero a => a
zero
forall a. Zero a => a
zero
forall a. Zero a => a
zero
forall a. Zero a => a
zero
forall a. Zero a => a
zero
forall a. Zero a => a
zero
forall a. Zero a => a
zero
forall a. Zero a => a
zero
forall a. Zero a => a
zero
data GeometryAABBNV = GeometryAABBNV
{
GeometryAABBNV -> "instanceData" ::: Buffer
aabbData :: Buffer
,
GeometryAABBNV -> "shader" ::: Word32
numAABBs :: Word32
,
GeometryAABBNV -> "shader" ::: Word32
stride :: Word32
,
GeometryAABBNV -> "instanceOffset" ::: DeviceSize
offset :: DeviceSize
}
deriving (Typeable, GeometryAABBNV -> GeometryAABBNV -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GeometryAABBNV -> GeometryAABBNV -> Bool
$c/= :: GeometryAABBNV -> GeometryAABBNV -> Bool
== :: GeometryAABBNV -> GeometryAABBNV -> Bool
$c== :: GeometryAABBNV -> GeometryAABBNV -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (GeometryAABBNV)
#endif
deriving instance Show GeometryAABBNV
instance ToCStruct GeometryAABBNV where
withCStruct :: forall b. GeometryAABBNV -> (Ptr GeometryAABBNV -> IO b) -> IO b
withCStruct GeometryAABBNV
x Ptr GeometryAABBNV -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
40 forall a b. (a -> b) -> a -> b
$ \Ptr GeometryAABBNV
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr GeometryAABBNV
p GeometryAABBNV
x (Ptr GeometryAABBNV -> IO b
f Ptr GeometryAABBNV
p)
pokeCStruct :: forall b. Ptr GeometryAABBNV -> GeometryAABBNV -> IO b -> IO b
pokeCStruct Ptr GeometryAABBNV
p GeometryAABBNV{"shader" ::: Word32
"instanceOffset" ::: DeviceSize
"instanceData" ::: Buffer
offset :: "instanceOffset" ::: DeviceSize
stride :: "shader" ::: Word32
numAABBs :: "shader" ::: Word32
aabbData :: "instanceData" ::: Buffer
$sel:offset:GeometryAABBNV :: GeometryAABBNV -> "instanceOffset" ::: DeviceSize
$sel:stride:GeometryAABBNV :: GeometryAABBNV -> "shader" ::: Word32
$sel:numAABBs:GeometryAABBNV :: GeometryAABBNV -> "shader" ::: Word32
$sel:aabbData:GeometryAABBNV :: GeometryAABBNV -> "instanceData" ::: Buffer
..} IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryAABBNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_GEOMETRY_AABB_NV)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryAABBNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryAABBNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Buffer)) ("instanceData" ::: Buffer
aabbData)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryAABBNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Word32)) ("shader" ::: Word32
numAABBs)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryAABBNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr Word32)) ("shader" ::: Word32
stride)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryAABBNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr DeviceSize)) ("instanceOffset" ::: DeviceSize
offset)
IO b
f
cStructSize :: Int
cStructSize = Int
40
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b. Ptr GeometryAABBNV -> IO b -> IO b
pokeZeroCStruct Ptr GeometryAABBNV
p IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryAABBNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_GEOMETRY_AABB_NV)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryAABBNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryAABBNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Word32)) (forall a. Zero a => a
zero)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryAABBNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr Word32)) (forall a. Zero a => a
zero)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryAABBNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr DeviceSize)) (forall a. Zero a => a
zero)
IO b
f
instance FromCStruct GeometryAABBNV where
peekCStruct :: Ptr GeometryAABBNV -> IO GeometryAABBNV
peekCStruct Ptr GeometryAABBNV
p = do
"instanceData" ::: Buffer
aabbData <- forall a. Storable a => Ptr a -> IO a
peek @Buffer ((Ptr GeometryAABBNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Buffer))
"shader" ::: Word32
numAABBs <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr GeometryAABBNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Word32))
"shader" ::: Word32
stride <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr GeometryAABBNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr Word32))
"instanceOffset" ::: DeviceSize
offset <- forall a. Storable a => Ptr a -> IO a
peek @DeviceSize ((Ptr GeometryAABBNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr DeviceSize))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ ("instanceData" ::: Buffer)
-> ("shader" ::: Word32)
-> ("shader" ::: Word32)
-> ("instanceOffset" ::: DeviceSize)
-> GeometryAABBNV
GeometryAABBNV
"instanceData" ::: Buffer
aabbData "shader" ::: Word32
numAABBs "shader" ::: Word32
stride "instanceOffset" ::: DeviceSize
offset
instance Storable GeometryAABBNV where
sizeOf :: GeometryAABBNV -> Int
sizeOf ~GeometryAABBNV
_ = Int
40
alignment :: GeometryAABBNV -> Int
alignment ~GeometryAABBNV
_ = Int
8
peek :: Ptr GeometryAABBNV -> IO GeometryAABBNV
peek = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr GeometryAABBNV -> GeometryAABBNV -> IO ()
poke Ptr GeometryAABBNV
ptr GeometryAABBNV
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr GeometryAABBNV
ptr GeometryAABBNV
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero GeometryAABBNV where
zero :: GeometryAABBNV
zero = ("instanceData" ::: Buffer)
-> ("shader" ::: Word32)
-> ("shader" ::: Word32)
-> ("instanceOffset" ::: DeviceSize)
-> GeometryAABBNV
GeometryAABBNV
forall a. Zero a => a
zero
forall a. Zero a => a
zero
forall a. Zero a => a
zero
forall a. Zero a => a
zero
data GeometryDataNV = GeometryDataNV
{
GeometryDataNV -> GeometryTrianglesNV
triangles :: GeometryTrianglesNV
,
GeometryDataNV -> GeometryAABBNV
aabbs :: GeometryAABBNV
}
deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (GeometryDataNV)
#endif
deriving instance Show GeometryDataNV
instance ToCStruct GeometryDataNV where
withCStruct :: forall b. GeometryDataNV -> (Ptr GeometryDataNV -> IO b) -> IO b
withCStruct GeometryDataNV
x Ptr GeometryDataNV -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
136 forall a b. (a -> b) -> a -> b
$ \Ptr GeometryDataNV
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr GeometryDataNV
p GeometryDataNV
x (Ptr GeometryDataNV -> IO b
f Ptr GeometryDataNV
p)
pokeCStruct :: forall b. Ptr GeometryDataNV -> GeometryDataNV -> IO b -> IO b
pokeCStruct Ptr GeometryDataNV
p GeometryDataNV{GeometryTrianglesNV
GeometryAABBNV
aabbs :: GeometryAABBNV
triangles :: GeometryTrianglesNV
$sel:aabbs:GeometryDataNV :: GeometryDataNV -> GeometryAABBNV
$sel:triangles:GeometryDataNV :: GeometryDataNV -> GeometryTrianglesNV
..} IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryDataNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr GeometryTrianglesNV)) (GeometryTrianglesNV
triangles)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryDataNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
96 :: Ptr GeometryAABBNV)) (GeometryAABBNV
aabbs)
IO b
f
cStructSize :: Int
cStructSize = Int
136
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b. Ptr GeometryDataNV -> IO b -> IO b
pokeZeroCStruct Ptr GeometryDataNV
p IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryDataNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr GeometryTrianglesNV)) (forall a. Zero a => a
zero)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryDataNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
96 :: Ptr GeometryAABBNV)) (forall a. Zero a => a
zero)
IO b
f
instance FromCStruct GeometryDataNV where
peekCStruct :: Ptr GeometryDataNV -> IO GeometryDataNV
peekCStruct Ptr GeometryDataNV
p = do
GeometryTrianglesNV
triangles <- forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @GeometryTrianglesNV ((Ptr GeometryDataNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr GeometryTrianglesNV))
GeometryAABBNV
aabbs <- forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @GeometryAABBNV ((Ptr GeometryDataNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
96 :: Ptr GeometryAABBNV))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ GeometryTrianglesNV -> GeometryAABBNV -> GeometryDataNV
GeometryDataNV
GeometryTrianglesNV
triangles GeometryAABBNV
aabbs
instance Storable GeometryDataNV where
sizeOf :: GeometryDataNV -> Int
sizeOf ~GeometryDataNV
_ = Int
136
alignment :: GeometryDataNV -> Int
alignment ~GeometryDataNV
_ = Int
8
peek :: Ptr GeometryDataNV -> IO GeometryDataNV
peek = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr GeometryDataNV -> GeometryDataNV -> IO ()
poke Ptr GeometryDataNV
ptr GeometryDataNV
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr GeometryDataNV
ptr GeometryDataNV
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero GeometryDataNV where
zero :: GeometryDataNV
zero = GeometryTrianglesNV -> GeometryAABBNV -> GeometryDataNV
GeometryDataNV
forall a. Zero a => a
zero
forall a. Zero a => a
zero
data GeometryNV = GeometryNV
{
GeometryNV -> GeometryTypeKHR
geometryType :: GeometryTypeKHR
,
GeometryNV -> GeometryDataNV
geometry :: GeometryDataNV
,
GeometryNV -> GeometryFlagBitsKHR
flags :: GeometryFlagsKHR
}
deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (GeometryNV)
#endif
deriving instance Show GeometryNV
instance ToCStruct GeometryNV where
withCStruct :: forall b. GeometryNV -> (Ptr GeometryNV -> IO b) -> IO b
withCStruct GeometryNV
x Ptr GeometryNV -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
168 forall a b. (a -> b) -> a -> b
$ \Ptr GeometryNV
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr GeometryNV
p GeometryNV
x (Ptr GeometryNV -> IO b
f Ptr GeometryNV
p)
pokeCStruct :: forall b. Ptr GeometryNV -> GeometryNV -> IO b -> IO b
pokeCStruct Ptr GeometryNV
p GeometryNV{GeometryTypeKHR
GeometryFlagBitsKHR
GeometryDataNV
flags :: GeometryFlagBitsKHR
geometry :: GeometryDataNV
geometryType :: GeometryTypeKHR
$sel:flags:GeometryNV :: GeometryNV -> GeometryFlagBitsKHR
$sel:geometry:GeometryNV :: GeometryNV -> GeometryDataNV
$sel:geometryType:GeometryNV :: GeometryNV -> GeometryTypeKHR
..} IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_GEOMETRY_NV)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr GeometryTypeKHR)) (GeometryTypeKHR
geometryType)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr GeometryDataNV)) (GeometryDataNV
geometry)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
160 :: Ptr GeometryFlagsKHR)) (GeometryFlagBitsKHR
flags)
IO b
f
cStructSize :: Int
cStructSize = Int
168
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b. Ptr GeometryNV -> IO b -> IO b
pokeZeroCStruct Ptr GeometryNV
p IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_GEOMETRY_NV)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr GeometryTypeKHR)) (forall a. Zero a => a
zero)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr GeometryDataNV)) (forall a. Zero a => a
zero)
IO b
f
instance FromCStruct GeometryNV where
peekCStruct :: Ptr GeometryNV -> IO GeometryNV
peekCStruct Ptr GeometryNV
p = do
GeometryTypeKHR
geometryType <- forall a. Storable a => Ptr a -> IO a
peek @GeometryTypeKHR ((Ptr GeometryNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr GeometryTypeKHR))
GeometryDataNV
geometry <- forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @GeometryDataNV ((Ptr GeometryNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr GeometryDataNV))
GeometryFlagBitsKHR
flags <- forall a. Storable a => Ptr a -> IO a
peek @GeometryFlagsKHR ((Ptr GeometryNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
160 :: Ptr GeometryFlagsKHR))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ GeometryTypeKHR
-> GeometryDataNV -> GeometryFlagBitsKHR -> GeometryNV
GeometryNV
GeometryTypeKHR
geometryType GeometryDataNV
geometry GeometryFlagBitsKHR
flags
instance Storable GeometryNV where
sizeOf :: GeometryNV -> Int
sizeOf ~GeometryNV
_ = Int
168
alignment :: GeometryNV -> Int
alignment ~GeometryNV
_ = Int
8
peek :: Ptr GeometryNV -> IO GeometryNV
peek = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr GeometryNV -> GeometryNV -> IO ()
poke Ptr GeometryNV
ptr GeometryNV
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr GeometryNV
ptr GeometryNV
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero GeometryNV where
zero :: GeometryNV
zero = GeometryTypeKHR
-> GeometryDataNV -> GeometryFlagBitsKHR -> GeometryNV
GeometryNV
forall a. Zero a => a
zero
forall a. Zero a => a
zero
forall a. Zero a => a
zero
data AccelerationStructureInfoNV = AccelerationStructureInfoNV
{
AccelerationStructureInfoNV -> AccelerationStructureTypeKHR
type' :: AccelerationStructureTypeNV
,
AccelerationStructureInfoNV
-> BuildAccelerationStructureFlagBitsKHR
flags :: BuildAccelerationStructureFlagsNV
,
AccelerationStructureInfoNV -> "shader" ::: Word32
instanceCount :: Word32
,
AccelerationStructureInfoNV -> Vector GeometryNV
geometries :: Vector GeometryNV
}
deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (AccelerationStructureInfoNV)
#endif
deriving instance Show AccelerationStructureInfoNV
instance ToCStruct AccelerationStructureInfoNV where
withCStruct :: forall b.
AccelerationStructureInfoNV
-> (("pInfo" ::: Ptr AccelerationStructureInfoNV) -> IO b) -> IO b
withCStruct AccelerationStructureInfoNV
x ("pInfo" ::: Ptr AccelerationStructureInfoNV) -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
40 forall a b. (a -> b) -> a -> b
$ \"pInfo" ::: Ptr AccelerationStructureInfoNV
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pInfo" ::: Ptr AccelerationStructureInfoNV
p AccelerationStructureInfoNV
x (("pInfo" ::: Ptr AccelerationStructureInfoNV) -> IO b
f "pInfo" ::: Ptr AccelerationStructureInfoNV
p)
pokeCStruct :: forall b.
("pInfo" ::: Ptr AccelerationStructureInfoNV)
-> AccelerationStructureInfoNV -> IO b -> IO b
pokeCStruct "pInfo" ::: Ptr AccelerationStructureInfoNV
p AccelerationStructureInfoNV{"shader" ::: Word32
Vector GeometryNV
AccelerationStructureTypeKHR
BuildAccelerationStructureFlagBitsKHR
geometries :: Vector GeometryNV
instanceCount :: "shader" ::: Word32
flags :: BuildAccelerationStructureFlagBitsKHR
type' :: AccelerationStructureTypeKHR
$sel:geometries:AccelerationStructureInfoNV :: AccelerationStructureInfoNV -> Vector GeometryNV
$sel:instanceCount:AccelerationStructureInfoNV :: AccelerationStructureInfoNV -> "shader" ::: Word32
$sel:flags:AccelerationStructureInfoNV :: AccelerationStructureInfoNV
-> BuildAccelerationStructureFlagBitsKHR
$sel:type':AccelerationStructureInfoNV :: AccelerationStructureInfoNV -> AccelerationStructureTypeKHR
..} IO b
f = forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT forall a b. (a -> b) -> a -> b
$ do
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr AccelerationStructureInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_ACCELERATION_STRUCTURE_INFO_NV)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr AccelerationStructureInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr AccelerationStructureInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr AccelerationStructureTypeNV)) (AccelerationStructureTypeKHR
type')
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr AccelerationStructureInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr BuildAccelerationStructureFlagsNV)) (BuildAccelerationStructureFlagBitsKHR
flags)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr AccelerationStructureInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Word32)) ("shader" ::: Word32
instanceCount)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr AccelerationStructureInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr Word32)) ((forall a b. (Integral a, Num b) => a -> b
fromIntegral (forall a. Vector a -> Int
Data.Vector.length forall a b. (a -> b) -> a -> b
$ (Vector GeometryNV
geometries)) :: Word32))
Ptr GeometryNV
pPGeometries' <- forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes @GeometryNV ((forall a. Vector a -> Int
Data.Vector.length (Vector GeometryNV
geometries)) forall a. Num a => a -> a -> a
* Int
168)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\Int
i GeometryNV
e -> forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr GeometryNV
pPGeometries' forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (Int
168 forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr GeometryNV) (GeometryNV
e)) (Vector GeometryNV
geometries)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr AccelerationStructureInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr (Ptr GeometryNV))) (Ptr GeometryNV
pPGeometries')
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ IO b
f
cStructSize :: Int
cStructSize = Int
40
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
("pInfo" ::: Ptr AccelerationStructureInfoNV) -> IO b -> IO b
pokeZeroCStruct "pInfo" ::: Ptr AccelerationStructureInfoNV
p IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr AccelerationStructureInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_ACCELERATION_STRUCTURE_INFO_NV)
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr AccelerationStructureInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr AccelerationStructureInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr AccelerationStructureTypeNV)) (forall a. Zero a => a
zero)
IO b
f
instance FromCStruct AccelerationStructureInfoNV where
peekCStruct :: ("pInfo" ::: Ptr AccelerationStructureInfoNV)
-> IO AccelerationStructureInfoNV
peekCStruct "pInfo" ::: Ptr AccelerationStructureInfoNV
p = do
AccelerationStructureTypeKHR
type' <- forall a. Storable a => Ptr a -> IO a
peek @AccelerationStructureTypeNV (("pInfo" ::: Ptr AccelerationStructureInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr AccelerationStructureTypeNV))
BuildAccelerationStructureFlagBitsKHR
flags <- forall a. Storable a => Ptr a -> IO a
peek @BuildAccelerationStructureFlagsNV (("pInfo" ::: Ptr AccelerationStructureInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr BuildAccelerationStructureFlagsNV))
"shader" ::: Word32
instanceCount <- forall a. Storable a => Ptr a -> IO a
peek @Word32 (("pInfo" ::: Ptr AccelerationStructureInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Word32))
"shader" ::: Word32
geometryCount <- forall a. Storable a => Ptr a -> IO a
peek @Word32 (("pInfo" ::: Ptr AccelerationStructureInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr Word32))
Ptr GeometryNV
pGeometries <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr GeometryNV) (("pInfo" ::: Ptr AccelerationStructureInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr (Ptr GeometryNV)))
Vector GeometryNV
pGeometries' <- forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
generateM (forall a b. (Integral a, Num b) => a -> b
fromIntegral "shader" ::: Word32
geometryCount) (\Int
i -> forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @GeometryNV ((Ptr GeometryNV
pGeometries forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
168 forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr GeometryNV)))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ AccelerationStructureTypeKHR
-> BuildAccelerationStructureFlagBitsKHR
-> ("shader" ::: Word32)
-> Vector GeometryNV
-> AccelerationStructureInfoNV
AccelerationStructureInfoNV
AccelerationStructureTypeKHR
type' BuildAccelerationStructureFlagBitsKHR
flags "shader" ::: Word32
instanceCount Vector GeometryNV
pGeometries'
instance Zero AccelerationStructureInfoNV where
zero :: AccelerationStructureInfoNV
zero = AccelerationStructureTypeKHR
-> BuildAccelerationStructureFlagBitsKHR
-> ("shader" ::: Word32)
-> Vector GeometryNV
-> AccelerationStructureInfoNV
AccelerationStructureInfoNV
forall a. Zero a => a
zero
forall a. Zero a => a
zero
forall a. Zero a => a
zero
forall a. Monoid a => a
mempty
data AccelerationStructureCreateInfoNV (es :: [Type]) = AccelerationStructureCreateInfoNV
{
forall (es :: [*]).
AccelerationStructureCreateInfoNV es -> Chain es
next :: Chain es
,
forall (es :: [*]).
AccelerationStructureCreateInfoNV es
-> "instanceOffset" ::: DeviceSize
compactedSize :: DeviceSize
,
forall (es :: [*]).
AccelerationStructureCreateInfoNV es -> AccelerationStructureInfoNV
info :: AccelerationStructureInfoNV
}
deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (AccelerationStructureCreateInfoNV (es :: [Type]))
#endif
deriving instance Show (Chain es) => Show (AccelerationStructureCreateInfoNV es)
instance Extensible AccelerationStructureCreateInfoNV where
extensibleTypeName :: String
extensibleTypeName = String
"AccelerationStructureCreateInfoNV"
setNext :: forall (ds :: [*]) (es :: [*]).
AccelerationStructureCreateInfoNV ds
-> Chain es -> AccelerationStructureCreateInfoNV es
setNext AccelerationStructureCreateInfoNV{"instanceOffset" ::: DeviceSize
Chain ds
AccelerationStructureInfoNV
info :: AccelerationStructureInfoNV
compactedSize :: "instanceOffset" ::: DeviceSize
next :: Chain ds
$sel:info:AccelerationStructureCreateInfoNV :: forall (es :: [*]).
AccelerationStructureCreateInfoNV es -> AccelerationStructureInfoNV
$sel:compactedSize:AccelerationStructureCreateInfoNV :: forall (es :: [*]).
AccelerationStructureCreateInfoNV es
-> "instanceOffset" ::: DeviceSize
$sel:next:AccelerationStructureCreateInfoNV :: forall (es :: [*]).
AccelerationStructureCreateInfoNV es -> Chain es
..} Chain es
next' = AccelerationStructureCreateInfoNV{$sel:next:AccelerationStructureCreateInfoNV :: Chain es
next = Chain es
next', "instanceOffset" ::: DeviceSize
AccelerationStructureInfoNV
info :: AccelerationStructureInfoNV
compactedSize :: "instanceOffset" ::: DeviceSize
$sel:info:AccelerationStructureCreateInfoNV :: AccelerationStructureInfoNV
$sel:compactedSize:AccelerationStructureCreateInfoNV :: "instanceOffset" ::: DeviceSize
..}
getNext :: forall (es :: [*]).
AccelerationStructureCreateInfoNV es -> Chain es
getNext AccelerationStructureCreateInfoNV{"instanceOffset" ::: DeviceSize
Chain es
AccelerationStructureInfoNV
info :: AccelerationStructureInfoNV
compactedSize :: "instanceOffset" ::: DeviceSize
next :: Chain es
$sel:info:AccelerationStructureCreateInfoNV :: forall (es :: [*]).
AccelerationStructureCreateInfoNV es -> AccelerationStructureInfoNV
$sel:compactedSize:AccelerationStructureCreateInfoNV :: forall (es :: [*]).
AccelerationStructureCreateInfoNV es
-> "instanceOffset" ::: DeviceSize
$sel:next:AccelerationStructureCreateInfoNV :: forall (es :: [*]).
AccelerationStructureCreateInfoNV es -> Chain es
..} = Chain es
next
extends :: forall e b proxy. Typeable e => proxy e -> (Extends AccelerationStructureCreateInfoNV e => b) -> Maybe b
extends :: forall e b (proxy :: * -> *).
Typeable e =>
proxy e
-> (Extends AccelerationStructureCreateInfoNV e => b) -> Maybe b
extends proxy e
_ Extends AccelerationStructureCreateInfoNV e => b
f
| Just e :~: OpaqueCaptureDescriptorDataCreateInfoEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @OpaqueCaptureDescriptorDataCreateInfoEXT = forall a. a -> Maybe a
Just Extends AccelerationStructureCreateInfoNV e => b
f
| Bool
otherwise = forall a. Maybe a
Nothing
instance ( Extendss AccelerationStructureCreateInfoNV es
, PokeChain es ) => ToCStruct (AccelerationStructureCreateInfoNV es) where
withCStruct :: forall b.
AccelerationStructureCreateInfoNV es
-> (Ptr (AccelerationStructureCreateInfoNV es) -> IO b) -> IO b
withCStruct AccelerationStructureCreateInfoNV es
x Ptr (AccelerationStructureCreateInfoNV es) -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
64 forall a b. (a -> b) -> a -> b
$ \Ptr (AccelerationStructureCreateInfoNV es)
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr (AccelerationStructureCreateInfoNV es)
p AccelerationStructureCreateInfoNV es
x (Ptr (AccelerationStructureCreateInfoNV es) -> IO b
f Ptr (AccelerationStructureCreateInfoNV es)
p)
pokeCStruct :: forall b.
Ptr (AccelerationStructureCreateInfoNV es)
-> AccelerationStructureCreateInfoNV es -> IO b -> IO b
pokeCStruct Ptr (AccelerationStructureCreateInfoNV es)
p AccelerationStructureCreateInfoNV{"instanceOffset" ::: DeviceSize
Chain es
AccelerationStructureInfoNV
info :: AccelerationStructureInfoNV
compactedSize :: "instanceOffset" ::: DeviceSize
next :: Chain es
$sel:info:AccelerationStructureCreateInfoNV :: forall (es :: [*]).
AccelerationStructureCreateInfoNV es -> AccelerationStructureInfoNV
$sel:compactedSize:AccelerationStructureCreateInfoNV :: forall (es :: [*]).
AccelerationStructureCreateInfoNV es
-> "instanceOffset" ::: DeviceSize
$sel:next:AccelerationStructureCreateInfoNV :: forall (es :: [*]).
AccelerationStructureCreateInfoNV es -> Chain es
..} IO b
f = forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT forall a b. (a -> b) -> a -> b
$ do
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (AccelerationStructureCreateInfoNV es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_ACCELERATION_STRUCTURE_CREATE_INFO_NV)
"data" ::: Ptr ()
pNext'' <- forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap forall a b. Ptr a -> Ptr b
castPtr forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall (es :: [*]) a.
PokeChain es =>
Chain es -> (Ptr (Chain es) -> IO a) -> IO a
withChain (Chain es
next)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (AccelerationStructureCreateInfoNV es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) "data" ::: Ptr ()
pNext''
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (AccelerationStructureCreateInfoNV es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr DeviceSize)) ("instanceOffset" ::: DeviceSize
compactedSize)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct ((Ptr (AccelerationStructureCreateInfoNV es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr AccelerationStructureInfoNV)) (AccelerationStructureInfoNV
info) forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. (a -> b) -> a -> b
$ ())
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ IO b
f
cStructSize :: Int
cStructSize = Int
64
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
Ptr (AccelerationStructureCreateInfoNV es) -> IO b -> IO b
pokeZeroCStruct Ptr (AccelerationStructureCreateInfoNV es)
p IO b
f = forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT forall a b. (a -> b) -> a -> b
$ do
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (AccelerationStructureCreateInfoNV es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_ACCELERATION_STRUCTURE_CREATE_INFO_NV)
"data" ::: Ptr ()
pNext' <- forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap forall a b. Ptr a -> Ptr b
castPtr forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall (es :: [*]) a.
PokeChain es =>
(Ptr (Chain es) -> IO a) -> IO a
withZeroChain @es
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (AccelerationStructureCreateInfoNV es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) "data" ::: Ptr ()
pNext'
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (AccelerationStructureCreateInfoNV es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr DeviceSize)) (forall a. Zero a => a
zero)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct ((Ptr (AccelerationStructureCreateInfoNV es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr AccelerationStructureInfoNV)) (forall a. Zero a => a
zero) forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a b. (a -> b) -> a -> b
$ ())
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ IO b
f
instance ( Extendss AccelerationStructureCreateInfoNV es
, PeekChain es ) => FromCStruct (AccelerationStructureCreateInfoNV es) where
peekCStruct :: Ptr (AccelerationStructureCreateInfoNV es)
-> IO (AccelerationStructureCreateInfoNV es)
peekCStruct Ptr (AccelerationStructureCreateInfoNV es)
p = do
"data" ::: Ptr ()
pNext <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr ()) ((Ptr (AccelerationStructureCreateInfoNV es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ())))
Chain es
next <- forall (es :: [*]). PeekChain es => Ptr (Chain es) -> IO (Chain es)
peekChain (forall a b. Ptr a -> Ptr b
castPtr "data" ::: Ptr ()
pNext)
"instanceOffset" ::: DeviceSize
compactedSize <- forall a. Storable a => Ptr a -> IO a
peek @DeviceSize ((Ptr (AccelerationStructureCreateInfoNV es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr DeviceSize))
AccelerationStructureInfoNV
info <- forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @AccelerationStructureInfoNV ((Ptr (AccelerationStructureCreateInfoNV es)
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr AccelerationStructureInfoNV))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ forall (es :: [*]).
Chain es
-> ("instanceOffset" ::: DeviceSize)
-> AccelerationStructureInfoNV
-> AccelerationStructureCreateInfoNV es
AccelerationStructureCreateInfoNV
Chain es
next "instanceOffset" ::: DeviceSize
compactedSize AccelerationStructureInfoNV
info
instance es ~ '[] => Zero (AccelerationStructureCreateInfoNV es) where
zero :: AccelerationStructureCreateInfoNV es
zero = forall (es :: [*]).
Chain es
-> ("instanceOffset" ::: DeviceSize)
-> AccelerationStructureInfoNV
-> AccelerationStructureCreateInfoNV es
AccelerationStructureCreateInfoNV
()
forall a. Zero a => a
zero
forall a. Zero a => a
zero
data BindAccelerationStructureMemoryInfoNV = BindAccelerationStructureMemoryInfoNV
{
BindAccelerationStructureMemoryInfoNV -> AccelerationStructureNV
accelerationStructure :: AccelerationStructureNV
,
BindAccelerationStructureMemoryInfoNV -> DeviceMemory
memory :: DeviceMemory
,
BindAccelerationStructureMemoryInfoNV
-> "instanceOffset" ::: DeviceSize
memoryOffset :: DeviceSize
,
BindAccelerationStructureMemoryInfoNV
-> Vector ("shader" ::: Word32)
deviceIndices :: Vector Word32
}
deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (BindAccelerationStructureMemoryInfoNV)
#endif
deriving instance Show BindAccelerationStructureMemoryInfoNV
instance ToCStruct BindAccelerationStructureMemoryInfoNV where
withCStruct :: forall b.
BindAccelerationStructureMemoryInfoNV
-> (("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoNV)
-> IO b)
-> IO b
withCStruct BindAccelerationStructureMemoryInfoNV
x ("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoNV)
-> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
56 forall a b. (a -> b) -> a -> b
$ \"pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoNV
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoNV
p BindAccelerationStructureMemoryInfoNV
x (("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoNV)
-> IO b
f "pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoNV
p)
pokeCStruct :: forall b.
("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoNV)
-> BindAccelerationStructureMemoryInfoNV -> IO b -> IO b
pokeCStruct "pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoNV
p BindAccelerationStructureMemoryInfoNV{"instanceOffset" ::: DeviceSize
Vector ("shader" ::: Word32)
DeviceMemory
AccelerationStructureNV
deviceIndices :: Vector ("shader" ::: Word32)
memoryOffset :: "instanceOffset" ::: DeviceSize
memory :: DeviceMemory
accelerationStructure :: AccelerationStructureNV
$sel:deviceIndices:BindAccelerationStructureMemoryInfoNV :: BindAccelerationStructureMemoryInfoNV
-> Vector ("shader" ::: Word32)
$sel:memoryOffset:BindAccelerationStructureMemoryInfoNV :: BindAccelerationStructureMemoryInfoNV
-> "instanceOffset" ::: DeviceSize
$sel:memory:BindAccelerationStructureMemoryInfoNV :: BindAccelerationStructureMemoryInfoNV -> DeviceMemory
$sel:accelerationStructure:BindAccelerationStructureMemoryInfoNV :: BindAccelerationStructureMemoryInfoNV -> AccelerationStructureNV
..} IO b
f = forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT forall a b. (a -> b) -> a -> b
$ do
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke (("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_BIND_ACCELERATION_STRUCTURE_MEMORY_INFO_NV)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke (("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke (("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr AccelerationStructureNV)) (AccelerationStructureNV
accelerationStructure)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke (("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr DeviceMemory)) (DeviceMemory
memory)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke (("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr DeviceSize)) ("instanceOffset" ::: DeviceSize
memoryOffset)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke (("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr Word32)) ((forall a b. (Integral a, Num b) => a -> b
fromIntegral (forall a. Vector a -> Int
Data.Vector.length forall a b. (a -> b) -> a -> b
$ (Vector ("shader" ::: Word32)
deviceIndices)) :: Word32))
Ptr ("shader" ::: Word32)
pPDeviceIndices' <- forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes @Word32 ((forall a. Vector a -> Int
Data.Vector.length (Vector ("shader" ::: Word32)
deviceIndices)) forall a. Num a => a -> a -> a
* Int
4)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\Int
i "shader" ::: Word32
e -> forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr ("shader" ::: Word32)
pPDeviceIndices' forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (Int
4 forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr Word32) ("shader" ::: Word32
e)) (Vector ("shader" ::: Word32)
deviceIndices)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke (("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr (Ptr Word32))) (Ptr ("shader" ::: Word32)
pPDeviceIndices')
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ IO b
f
cStructSize :: Int
cStructSize = Int
56
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoNV)
-> IO b -> IO b
pokeZeroCStruct "pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoNV
p IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_BIND_ACCELERATION_STRUCTURE_MEMORY_INFO_NV)
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr AccelerationStructureNV)) (forall a. Zero a => a
zero)
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr DeviceMemory)) (forall a. Zero a => a
zero)
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr DeviceSize)) (forall a. Zero a => a
zero)
IO b
f
instance FromCStruct BindAccelerationStructureMemoryInfoNV where
peekCStruct :: ("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoNV)
-> IO BindAccelerationStructureMemoryInfoNV
peekCStruct "pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoNV
p = do
AccelerationStructureNV
accelerationStructure <- forall a. Storable a => Ptr a -> IO a
peek @AccelerationStructureNV (("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr AccelerationStructureNV))
DeviceMemory
memory <- forall a. Storable a => Ptr a -> IO a
peek @DeviceMemory (("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr DeviceMemory))
"instanceOffset" ::: DeviceSize
memoryOffset <- forall a. Storable a => Ptr a -> IO a
peek @DeviceSize (("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr DeviceSize))
"shader" ::: Word32
deviceIndexCount <- forall a. Storable a => Ptr a -> IO a
peek @Word32 (("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr Word32))
Ptr ("shader" ::: Word32)
pDeviceIndices <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr Word32) (("pBindInfos" ::: Ptr BindAccelerationStructureMemoryInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr (Ptr Word32)))
Vector ("shader" ::: Word32)
pDeviceIndices' <- forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
generateM (forall a b. (Integral a, Num b) => a -> b
fromIntegral "shader" ::: Word32
deviceIndexCount) (\Int
i -> forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr ("shader" ::: Word32)
pDeviceIndices forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
4 forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr Word32)))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ AccelerationStructureNV
-> DeviceMemory
-> ("instanceOffset" ::: DeviceSize)
-> Vector ("shader" ::: Word32)
-> BindAccelerationStructureMemoryInfoNV
BindAccelerationStructureMemoryInfoNV
AccelerationStructureNV
accelerationStructure DeviceMemory
memory "instanceOffset" ::: DeviceSize
memoryOffset Vector ("shader" ::: Word32)
pDeviceIndices'
instance Zero BindAccelerationStructureMemoryInfoNV where
zero :: BindAccelerationStructureMemoryInfoNV
zero = AccelerationStructureNV
-> DeviceMemory
-> ("instanceOffset" ::: DeviceSize)
-> Vector ("shader" ::: Word32)
-> BindAccelerationStructureMemoryInfoNV
BindAccelerationStructureMemoryInfoNV
forall a. Zero a => a
zero
forall a. Zero a => a
zero
forall a. Zero a => a
zero
forall a. Monoid a => a
mempty
data WriteDescriptorSetAccelerationStructureNV = WriteDescriptorSetAccelerationStructureNV
{
WriteDescriptorSetAccelerationStructureNV
-> "accelerationStructures" ::: Vector AccelerationStructureNV
accelerationStructures :: Vector AccelerationStructureNV }
deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (WriteDescriptorSetAccelerationStructureNV)
#endif
deriving instance Show WriteDescriptorSetAccelerationStructureNV
instance ToCStruct WriteDescriptorSetAccelerationStructureNV where
withCStruct :: forall b.
WriteDescriptorSetAccelerationStructureNV
-> (Ptr WriteDescriptorSetAccelerationStructureNV -> IO b) -> IO b
withCStruct WriteDescriptorSetAccelerationStructureNV
x Ptr WriteDescriptorSetAccelerationStructureNV -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
32 forall a b. (a -> b) -> a -> b
$ \Ptr WriteDescriptorSetAccelerationStructureNV
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr WriteDescriptorSetAccelerationStructureNV
p WriteDescriptorSetAccelerationStructureNV
x (Ptr WriteDescriptorSetAccelerationStructureNV -> IO b
f Ptr WriteDescriptorSetAccelerationStructureNV
p)
pokeCStruct :: forall b.
Ptr WriteDescriptorSetAccelerationStructureNV
-> WriteDescriptorSetAccelerationStructureNV -> IO b -> IO b
pokeCStruct Ptr WriteDescriptorSetAccelerationStructureNV
p WriteDescriptorSetAccelerationStructureNV{"accelerationStructures" ::: Vector AccelerationStructureNV
accelerationStructures :: "accelerationStructures" ::: Vector AccelerationStructureNV
$sel:accelerationStructures:WriteDescriptorSetAccelerationStructureNV :: WriteDescriptorSetAccelerationStructureNV
-> "accelerationStructures" ::: Vector AccelerationStructureNV
..} IO b
f = forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT forall a b. (a -> b) -> a -> b
$ do
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr WriteDescriptorSetAccelerationStructureNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_NV)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr WriteDescriptorSetAccelerationStructureNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr WriteDescriptorSetAccelerationStructureNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32)) ((forall a b. (Integral a, Num b) => a -> b
fromIntegral (forall a. Vector a -> Int
Data.Vector.length forall a b. (a -> b) -> a -> b
$ ("accelerationStructures" ::: Vector AccelerationStructureNV
accelerationStructures)) :: Word32))
"pAccelerationStructure" ::: Ptr AccelerationStructureNV
pPAccelerationStructures' <- forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT forall a b. (a -> b) -> a -> b
$ forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes @AccelerationStructureNV ((forall a. Vector a -> Int
Data.Vector.length ("accelerationStructures" ::: Vector AccelerationStructureNV
accelerationStructures)) forall a. Num a => a -> a -> a
* Int
8)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\Int
i AccelerationStructureNV
e -> forall a. Storable a => Ptr a -> a -> IO ()
poke ("pAccelerationStructure" ::: Ptr AccelerationStructureNV
pPAccelerationStructures' forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (Int
8 forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr AccelerationStructureNV) (AccelerationStructureNV
e)) ("accelerationStructures" ::: Vector AccelerationStructureNV
accelerationStructures)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr WriteDescriptorSetAccelerationStructureNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr (Ptr AccelerationStructureNV))) ("pAccelerationStructure" ::: Ptr AccelerationStructureNV
pPAccelerationStructures')
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift forall a b. (a -> b) -> a -> b
$ IO b
f
cStructSize :: Int
cStructSize = Int
32
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
Ptr WriteDescriptorSetAccelerationStructureNV -> IO b -> IO b
pokeZeroCStruct Ptr WriteDescriptorSetAccelerationStructureNV
p IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr WriteDescriptorSetAccelerationStructureNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_NV)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr WriteDescriptorSetAccelerationStructureNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
IO b
f
instance FromCStruct WriteDescriptorSetAccelerationStructureNV where
peekCStruct :: Ptr WriteDescriptorSetAccelerationStructureNV
-> IO WriteDescriptorSetAccelerationStructureNV
peekCStruct Ptr WriteDescriptorSetAccelerationStructureNV
p = do
"shader" ::: Word32
accelerationStructureCount <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr WriteDescriptorSetAccelerationStructureNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32))
"pAccelerationStructure" ::: Ptr AccelerationStructureNV
pAccelerationStructures <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr AccelerationStructureNV) ((Ptr WriteDescriptorSetAccelerationStructureNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr (Ptr AccelerationStructureNV)))
"accelerationStructures" ::: Vector AccelerationStructureNV
pAccelerationStructures' <- forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
generateM (forall a b. (Integral a, Num b) => a -> b
fromIntegral "shader" ::: Word32
accelerationStructureCount) (\Int
i -> forall a. Storable a => Ptr a -> IO a
peek @AccelerationStructureNV (("pAccelerationStructure" ::: Ptr AccelerationStructureNV
pAccelerationStructures forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
8 forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr AccelerationStructureNV)))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ ("accelerationStructures" ::: Vector AccelerationStructureNV)
-> WriteDescriptorSetAccelerationStructureNV
WriteDescriptorSetAccelerationStructureNV
"accelerationStructures" ::: Vector AccelerationStructureNV
pAccelerationStructures'
instance Zero WriteDescriptorSetAccelerationStructureNV where
zero :: WriteDescriptorSetAccelerationStructureNV
zero = ("accelerationStructures" ::: Vector AccelerationStructureNV)
-> WriteDescriptorSetAccelerationStructureNV
WriteDescriptorSetAccelerationStructureNV
forall a. Monoid a => a
mempty
data AccelerationStructureMemoryRequirementsInfoNV = AccelerationStructureMemoryRequirementsInfoNV
{
AccelerationStructureMemoryRequirementsInfoNV
-> AccelerationStructureMemoryRequirementsTypeNV
type' :: AccelerationStructureMemoryRequirementsTypeNV
,
AccelerationStructureMemoryRequirementsInfoNV
-> AccelerationStructureNV
accelerationStructure :: AccelerationStructureNV
}
deriving (Typeable, AccelerationStructureMemoryRequirementsInfoNV
-> AccelerationStructureMemoryRequirementsInfoNV -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AccelerationStructureMemoryRequirementsInfoNV
-> AccelerationStructureMemoryRequirementsInfoNV -> Bool
$c/= :: AccelerationStructureMemoryRequirementsInfoNV
-> AccelerationStructureMemoryRequirementsInfoNV -> Bool
== :: AccelerationStructureMemoryRequirementsInfoNV
-> AccelerationStructureMemoryRequirementsInfoNV -> Bool
$c== :: AccelerationStructureMemoryRequirementsInfoNV
-> AccelerationStructureMemoryRequirementsInfoNV -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (AccelerationStructureMemoryRequirementsInfoNV)
#endif
deriving instance Show AccelerationStructureMemoryRequirementsInfoNV
instance ToCStruct AccelerationStructureMemoryRequirementsInfoNV where
withCStruct :: forall b.
AccelerationStructureMemoryRequirementsInfoNV
-> (("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV)
-> IO b)
-> IO b
withCStruct AccelerationStructureMemoryRequirementsInfoNV
x ("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV)
-> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
32 forall a b. (a -> b) -> a -> b
$ \"pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV
p AccelerationStructureMemoryRequirementsInfoNV
x (("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV)
-> IO b
f "pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV
p)
pokeCStruct :: forall b.
("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV)
-> AccelerationStructureMemoryRequirementsInfoNV -> IO b -> IO b
pokeCStruct "pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV
p AccelerationStructureMemoryRequirementsInfoNV{AccelerationStructureNV
AccelerationStructureMemoryRequirementsTypeNV
accelerationStructure :: AccelerationStructureNV
type' :: AccelerationStructureMemoryRequirementsTypeNV
$sel:accelerationStructure:AccelerationStructureMemoryRequirementsInfoNV :: AccelerationStructureMemoryRequirementsInfoNV
-> AccelerationStructureNV
$sel:type':AccelerationStructureMemoryRequirementsInfoNV :: AccelerationStructureMemoryRequirementsInfoNV
-> AccelerationStructureMemoryRequirementsTypeNV
..} IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_INFO_NV)
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr AccelerationStructureMemoryRequirementsTypeNV)) (AccelerationStructureMemoryRequirementsTypeNV
type')
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr AccelerationStructureNV)) (AccelerationStructureNV
accelerationStructure)
IO b
f
cStructSize :: Int
cStructSize = Int
32
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV)
-> IO b -> IO b
pokeZeroCStruct "pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV
p IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_INFO_NV)
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr AccelerationStructureMemoryRequirementsTypeNV)) (forall a. Zero a => a
zero)
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr AccelerationStructureNV)) (forall a. Zero a => a
zero)
IO b
f
instance FromCStruct AccelerationStructureMemoryRequirementsInfoNV where
peekCStruct :: ("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV)
-> IO AccelerationStructureMemoryRequirementsInfoNV
peekCStruct "pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV
p = do
AccelerationStructureMemoryRequirementsTypeNV
type' <- forall a. Storable a => Ptr a -> IO a
peek @AccelerationStructureMemoryRequirementsTypeNV (("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr AccelerationStructureMemoryRequirementsTypeNV))
AccelerationStructureNV
accelerationStructure <- forall a. Storable a => Ptr a -> IO a
peek @AccelerationStructureNV (("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr AccelerationStructureNV))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ AccelerationStructureMemoryRequirementsTypeNV
-> AccelerationStructureNV
-> AccelerationStructureMemoryRequirementsInfoNV
AccelerationStructureMemoryRequirementsInfoNV
AccelerationStructureMemoryRequirementsTypeNV
type' AccelerationStructureNV
accelerationStructure
instance Storable AccelerationStructureMemoryRequirementsInfoNV where
sizeOf :: AccelerationStructureMemoryRequirementsInfoNV -> Int
sizeOf ~AccelerationStructureMemoryRequirementsInfoNV
_ = Int
32
alignment :: AccelerationStructureMemoryRequirementsInfoNV -> Int
alignment ~AccelerationStructureMemoryRequirementsInfoNV
_ = Int
8
peek :: ("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV)
-> IO AccelerationStructureMemoryRequirementsInfoNV
peek = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: ("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV)
-> AccelerationStructureMemoryRequirementsInfoNV -> IO ()
poke "pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV
ptr AccelerationStructureMemoryRequirementsInfoNV
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV
ptr AccelerationStructureMemoryRequirementsInfoNV
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero AccelerationStructureMemoryRequirementsInfoNV where
zero :: AccelerationStructureMemoryRequirementsInfoNV
zero = AccelerationStructureMemoryRequirementsTypeNV
-> AccelerationStructureNV
-> AccelerationStructureMemoryRequirementsInfoNV
AccelerationStructureMemoryRequirementsInfoNV
forall a. Zero a => a
zero
forall a. Zero a => a
zero
data PhysicalDeviceRayTracingPropertiesNV = PhysicalDeviceRayTracingPropertiesNV
{
PhysicalDeviceRayTracingPropertiesNV -> "shader" ::: Word32
shaderGroupHandleSize :: Word32
,
PhysicalDeviceRayTracingPropertiesNV -> "shader" ::: Word32
maxRecursionDepth :: Word32
,
PhysicalDeviceRayTracingPropertiesNV -> "shader" ::: Word32
maxShaderGroupStride :: Word32
,
PhysicalDeviceRayTracingPropertiesNV -> "shader" ::: Word32
shaderGroupBaseAlignment :: Word32
,
PhysicalDeviceRayTracingPropertiesNV
-> "instanceOffset" ::: DeviceSize
maxGeometryCount :: Word64
,
PhysicalDeviceRayTracingPropertiesNV
-> "instanceOffset" ::: DeviceSize
maxInstanceCount :: Word64
,
PhysicalDeviceRayTracingPropertiesNV
-> "instanceOffset" ::: DeviceSize
maxTriangleCount :: Word64
,
PhysicalDeviceRayTracingPropertiesNV -> "shader" ::: Word32
maxDescriptorSetAccelerationStructures :: Word32
}
deriving (Typeable, PhysicalDeviceRayTracingPropertiesNV
-> PhysicalDeviceRayTracingPropertiesNV -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PhysicalDeviceRayTracingPropertiesNV
-> PhysicalDeviceRayTracingPropertiesNV -> Bool
$c/= :: PhysicalDeviceRayTracingPropertiesNV
-> PhysicalDeviceRayTracingPropertiesNV -> Bool
== :: PhysicalDeviceRayTracingPropertiesNV
-> PhysicalDeviceRayTracingPropertiesNV -> Bool
$c== :: PhysicalDeviceRayTracingPropertiesNV
-> PhysicalDeviceRayTracingPropertiesNV -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceRayTracingPropertiesNV)
#endif
deriving instance Show PhysicalDeviceRayTracingPropertiesNV
instance ToCStruct PhysicalDeviceRayTracingPropertiesNV where
withCStruct :: forall b.
PhysicalDeviceRayTracingPropertiesNV
-> (Ptr PhysicalDeviceRayTracingPropertiesNV -> IO b) -> IO b
withCStruct PhysicalDeviceRayTracingPropertiesNV
x Ptr PhysicalDeviceRayTracingPropertiesNV -> IO b
f = forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
64 forall a b. (a -> b) -> a -> b
$ \Ptr PhysicalDeviceRayTracingPropertiesNV
p -> forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceRayTracingPropertiesNV
p PhysicalDeviceRayTracingPropertiesNV
x (Ptr PhysicalDeviceRayTracingPropertiesNV -> IO b
f Ptr PhysicalDeviceRayTracingPropertiesNV
p)
pokeCStruct :: forall b.
Ptr PhysicalDeviceRayTracingPropertiesNV
-> PhysicalDeviceRayTracingPropertiesNV -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceRayTracingPropertiesNV
p PhysicalDeviceRayTracingPropertiesNV{"shader" ::: Word32
"instanceOffset" ::: DeviceSize
maxDescriptorSetAccelerationStructures :: "shader" ::: Word32
maxTriangleCount :: "instanceOffset" ::: DeviceSize
maxInstanceCount :: "instanceOffset" ::: DeviceSize
maxGeometryCount :: "instanceOffset" ::: DeviceSize
shaderGroupBaseAlignment :: "shader" ::: Word32
maxShaderGroupStride :: "shader" ::: Word32
maxRecursionDepth :: "shader" ::: Word32
shaderGroupHandleSize :: "shader" ::: Word32
$sel:maxDescriptorSetAccelerationStructures:PhysicalDeviceRayTracingPropertiesNV :: PhysicalDeviceRayTracingPropertiesNV -> "shader" ::: Word32
$sel:maxTriangleCount:PhysicalDeviceRayTracingPropertiesNV :: PhysicalDeviceRayTracingPropertiesNV
-> "instanceOffset" ::: DeviceSize
$sel:maxInstanceCount:PhysicalDeviceRayTracingPropertiesNV :: PhysicalDeviceRayTracingPropertiesNV
-> "instanceOffset" ::: DeviceSize
$sel:maxGeometryCount:PhysicalDeviceRayTracingPropertiesNV :: PhysicalDeviceRayTracingPropertiesNV
-> "instanceOffset" ::: DeviceSize
$sel:shaderGroupBaseAlignment:PhysicalDeviceRayTracingPropertiesNV :: PhysicalDeviceRayTracingPropertiesNV -> "shader" ::: Word32
$sel:maxShaderGroupStride:PhysicalDeviceRayTracingPropertiesNV :: PhysicalDeviceRayTracingPropertiesNV -> "shader" ::: Word32
$sel:maxRecursionDepth:PhysicalDeviceRayTracingPropertiesNV :: PhysicalDeviceRayTracingPropertiesNV -> "shader" ::: Word32
$sel:shaderGroupHandleSize:PhysicalDeviceRayTracingPropertiesNV :: PhysicalDeviceRayTracingPropertiesNV -> "shader" ::: Word32
..} IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PROPERTIES_NV)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32)) ("shader" ::: Word32
shaderGroupHandleSize)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Word32)) ("shader" ::: Word32
maxRecursionDepth)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Word32)) ("shader" ::: Word32
maxShaderGroupStride)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr Word32)) ("shader" ::: Word32
shaderGroupBaseAlignment)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Word64)) ("instanceOffset" ::: DeviceSize
maxGeometryCount)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr Word64)) ("instanceOffset" ::: DeviceSize
maxInstanceCount)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr Word64)) ("instanceOffset" ::: DeviceSize
maxTriangleCount)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56 :: Ptr Word32)) ("shader" ::: Word32
maxDescriptorSetAccelerationStructures)
IO b
f
cStructSize :: Int
cStructSize = Int
64
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b. Ptr PhysicalDeviceRayTracingPropertiesNV -> IO b -> IO b
pokeZeroCStruct Ptr PhysicalDeviceRayTracingPropertiesNV
p IO b
f = do
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PROPERTIES_NV)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (forall a. Ptr a
nullPtr)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32)) (forall a. Zero a => a
zero)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Word32)) (forall a. Zero a => a
zero)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Word32)) (forall a. Zero a => a
zero)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr Word32)) (forall a. Zero a => a
zero)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Word64)) (forall a. Zero a => a
zero)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr Word64)) (forall a. Zero a => a
zero)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr Word64)) (forall a. Zero a => a
zero)
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56 :: Ptr Word32)) (forall a. Zero a => a
zero)
IO b
f
instance FromCStruct PhysicalDeviceRayTracingPropertiesNV where
peekCStruct :: Ptr PhysicalDeviceRayTracingPropertiesNV
-> IO PhysicalDeviceRayTracingPropertiesNV
peekCStruct Ptr PhysicalDeviceRayTracingPropertiesNV
p = do
"shader" ::: Word32
shaderGroupHandleSize <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceRayTracingPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32))
"shader" ::: Word32
maxRecursionDepth <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceRayTracingPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Word32))
"shader" ::: Word32
maxShaderGroupStride <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceRayTracingPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Word32))
"shader" ::: Word32
shaderGroupBaseAlignment <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceRayTracingPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr Word32))
"instanceOffset" ::: DeviceSize
maxGeometryCount <- forall a. Storable a => Ptr a -> IO a
peek @Word64 ((Ptr PhysicalDeviceRayTracingPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Word64))
"instanceOffset" ::: DeviceSize
maxInstanceCount <- forall a. Storable a => Ptr a -> IO a
peek @Word64 ((Ptr PhysicalDeviceRayTracingPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr Word64))
"instanceOffset" ::: DeviceSize
maxTriangleCount <- forall a. Storable a => Ptr a -> IO a
peek @Word64 ((Ptr PhysicalDeviceRayTracingPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr Word64))
"shader" ::: Word32
maxDescriptorSetAccelerationStructures <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceRayTracingPropertiesNV
p forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56 :: Ptr Word32))
forall (f :: * -> *) a. Applicative f => a -> f a
pure forall a b. (a -> b) -> a -> b
$ ("shader" ::: Word32)
-> ("shader" ::: Word32)
-> ("shader" ::: Word32)
-> ("shader" ::: Word32)
-> ("instanceOffset" ::: DeviceSize)
-> ("instanceOffset" ::: DeviceSize)
-> ("instanceOffset" ::: DeviceSize)
-> ("shader" ::: Word32)
-> PhysicalDeviceRayTracingPropertiesNV
PhysicalDeviceRayTracingPropertiesNV
"shader" ::: Word32
shaderGroupHandleSize
"shader" ::: Word32
maxRecursionDepth
"shader" ::: Word32
maxShaderGroupStride
"shader" ::: Word32
shaderGroupBaseAlignment
"instanceOffset" ::: DeviceSize
maxGeometryCount
"instanceOffset" ::: DeviceSize
maxInstanceCount
"instanceOffset" ::: DeviceSize
maxTriangleCount
"shader" ::: Word32
maxDescriptorSetAccelerationStructures
instance Storable PhysicalDeviceRayTracingPropertiesNV where
sizeOf :: PhysicalDeviceRayTracingPropertiesNV -> Int
sizeOf ~PhysicalDeviceRayTracingPropertiesNV
_ = Int
64
alignment :: PhysicalDeviceRayTracingPropertiesNV -> Int
alignment ~PhysicalDeviceRayTracingPropertiesNV
_ = Int
8
peek :: Ptr PhysicalDeviceRayTracingPropertiesNV
-> IO PhysicalDeviceRayTracingPropertiesNV
peek = forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr PhysicalDeviceRayTracingPropertiesNV
-> PhysicalDeviceRayTracingPropertiesNV -> IO ()
poke Ptr PhysicalDeviceRayTracingPropertiesNV
ptr PhysicalDeviceRayTracingPropertiesNV
poked = forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceRayTracingPropertiesNV
ptr PhysicalDeviceRayTracingPropertiesNV
poked (forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PhysicalDeviceRayTracingPropertiesNV where
zero :: PhysicalDeviceRayTracingPropertiesNV
zero = ("shader" ::: Word32)
-> ("shader" ::: Word32)
-> ("shader" ::: Word32)
-> ("shader" ::: Word32)
-> ("instanceOffset" ::: DeviceSize)
-> ("instanceOffset" ::: DeviceSize)
-> ("instanceOffset" ::: DeviceSize)
-> ("shader" ::: Word32)
-> PhysicalDeviceRayTracingPropertiesNV
PhysicalDeviceRayTracingPropertiesNV
forall a. Zero a => a
zero
forall a. Zero a => a
zero
forall a. Zero a => a
zero
forall a. Zero a => a
zero
forall a. Zero a => a
zero
forall a. Zero a => a
zero
forall a. Zero a => a
zero
forall a. Zero a => a
zero
newtype AccelerationStructureMemoryRequirementsTypeNV = AccelerationStructureMemoryRequirementsTypeNV Int32
deriving newtype (AccelerationStructureMemoryRequirementsTypeNV
-> AccelerationStructureMemoryRequirementsTypeNV -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AccelerationStructureMemoryRequirementsTypeNV
-> AccelerationStructureMemoryRequirementsTypeNV -> Bool
$c/= :: AccelerationStructureMemoryRequirementsTypeNV
-> AccelerationStructureMemoryRequirementsTypeNV -> Bool
== :: AccelerationStructureMemoryRequirementsTypeNV
-> AccelerationStructureMemoryRequirementsTypeNV -> Bool
$c== :: AccelerationStructureMemoryRequirementsTypeNV
-> AccelerationStructureMemoryRequirementsTypeNV -> Bool
Eq, Eq AccelerationStructureMemoryRequirementsTypeNV
AccelerationStructureMemoryRequirementsTypeNV
-> AccelerationStructureMemoryRequirementsTypeNV -> Bool
AccelerationStructureMemoryRequirementsTypeNV
-> AccelerationStructureMemoryRequirementsTypeNV -> Ordering
AccelerationStructureMemoryRequirementsTypeNV
-> AccelerationStructureMemoryRequirementsTypeNV
-> AccelerationStructureMemoryRequirementsTypeNV
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 :: AccelerationStructureMemoryRequirementsTypeNV
-> AccelerationStructureMemoryRequirementsTypeNV
-> AccelerationStructureMemoryRequirementsTypeNV
$cmin :: AccelerationStructureMemoryRequirementsTypeNV
-> AccelerationStructureMemoryRequirementsTypeNV
-> AccelerationStructureMemoryRequirementsTypeNV
max :: AccelerationStructureMemoryRequirementsTypeNV
-> AccelerationStructureMemoryRequirementsTypeNV
-> AccelerationStructureMemoryRequirementsTypeNV
$cmax :: AccelerationStructureMemoryRequirementsTypeNV
-> AccelerationStructureMemoryRequirementsTypeNV
-> AccelerationStructureMemoryRequirementsTypeNV
>= :: AccelerationStructureMemoryRequirementsTypeNV
-> AccelerationStructureMemoryRequirementsTypeNV -> Bool
$c>= :: AccelerationStructureMemoryRequirementsTypeNV
-> AccelerationStructureMemoryRequirementsTypeNV -> Bool
> :: AccelerationStructureMemoryRequirementsTypeNV
-> AccelerationStructureMemoryRequirementsTypeNV -> Bool
$c> :: AccelerationStructureMemoryRequirementsTypeNV
-> AccelerationStructureMemoryRequirementsTypeNV -> Bool
<= :: AccelerationStructureMemoryRequirementsTypeNV
-> AccelerationStructureMemoryRequirementsTypeNV -> Bool
$c<= :: AccelerationStructureMemoryRequirementsTypeNV
-> AccelerationStructureMemoryRequirementsTypeNV -> Bool
< :: AccelerationStructureMemoryRequirementsTypeNV
-> AccelerationStructureMemoryRequirementsTypeNV -> Bool
$c< :: AccelerationStructureMemoryRequirementsTypeNV
-> AccelerationStructureMemoryRequirementsTypeNV -> Bool
compare :: AccelerationStructureMemoryRequirementsTypeNV
-> AccelerationStructureMemoryRequirementsTypeNV -> Ordering
$ccompare :: AccelerationStructureMemoryRequirementsTypeNV
-> AccelerationStructureMemoryRequirementsTypeNV -> Ordering
Ord, Ptr AccelerationStructureMemoryRequirementsTypeNV
-> IO AccelerationStructureMemoryRequirementsTypeNV
Ptr AccelerationStructureMemoryRequirementsTypeNV
-> Int -> IO AccelerationStructureMemoryRequirementsTypeNV
Ptr AccelerationStructureMemoryRequirementsTypeNV
-> Int -> AccelerationStructureMemoryRequirementsTypeNV -> IO ()
Ptr AccelerationStructureMemoryRequirementsTypeNV
-> AccelerationStructureMemoryRequirementsTypeNV -> IO ()
AccelerationStructureMemoryRequirementsTypeNV -> Int
forall b.
Ptr b -> Int -> IO AccelerationStructureMemoryRequirementsTypeNV
forall b.
Ptr b
-> Int -> AccelerationStructureMemoryRequirementsTypeNV -> 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 AccelerationStructureMemoryRequirementsTypeNV
-> AccelerationStructureMemoryRequirementsTypeNV -> IO ()
$cpoke :: Ptr AccelerationStructureMemoryRequirementsTypeNV
-> AccelerationStructureMemoryRequirementsTypeNV -> IO ()
peek :: Ptr AccelerationStructureMemoryRequirementsTypeNV
-> IO AccelerationStructureMemoryRequirementsTypeNV
$cpeek :: Ptr AccelerationStructureMemoryRequirementsTypeNV
-> IO AccelerationStructureMemoryRequirementsTypeNV
pokeByteOff :: forall b.
Ptr b
-> Int -> AccelerationStructureMemoryRequirementsTypeNV -> IO ()
$cpokeByteOff :: forall b.
Ptr b
-> Int -> AccelerationStructureMemoryRequirementsTypeNV -> IO ()
peekByteOff :: forall b.
Ptr b -> Int -> IO AccelerationStructureMemoryRequirementsTypeNV
$cpeekByteOff :: forall b.
Ptr b -> Int -> IO AccelerationStructureMemoryRequirementsTypeNV
pokeElemOff :: Ptr AccelerationStructureMemoryRequirementsTypeNV
-> Int -> AccelerationStructureMemoryRequirementsTypeNV -> IO ()
$cpokeElemOff :: Ptr AccelerationStructureMemoryRequirementsTypeNV
-> Int -> AccelerationStructureMemoryRequirementsTypeNV -> IO ()
peekElemOff :: Ptr AccelerationStructureMemoryRequirementsTypeNV
-> Int -> IO AccelerationStructureMemoryRequirementsTypeNV
$cpeekElemOff :: Ptr AccelerationStructureMemoryRequirementsTypeNV
-> Int -> IO AccelerationStructureMemoryRequirementsTypeNV
alignment :: AccelerationStructureMemoryRequirementsTypeNV -> Int
$calignment :: AccelerationStructureMemoryRequirementsTypeNV -> Int
sizeOf :: AccelerationStructureMemoryRequirementsTypeNV -> Int
$csizeOf :: AccelerationStructureMemoryRequirementsTypeNV -> Int
Storable, AccelerationStructureMemoryRequirementsTypeNV
forall a. a -> Zero a
zero :: AccelerationStructureMemoryRequirementsTypeNV
$czero :: AccelerationStructureMemoryRequirementsTypeNV
Zero)
pattern $bACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_OBJECT_NV :: AccelerationStructureMemoryRequirementsTypeNV
$mACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_OBJECT_NV :: forall {r}.
AccelerationStructureMemoryRequirementsTypeNV
-> ((# #) -> r) -> ((# #) -> r) -> r
ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_OBJECT_NV = AccelerationStructureMemoryRequirementsTypeNV 0
pattern $bACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_BUILD_SCRATCH_NV :: AccelerationStructureMemoryRequirementsTypeNV
$mACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_BUILD_SCRATCH_NV :: forall {r}.
AccelerationStructureMemoryRequirementsTypeNV
-> ((# #) -> r) -> ((# #) -> r) -> r
ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_BUILD_SCRATCH_NV = AccelerationStructureMemoryRequirementsTypeNV 1
pattern $bACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_UPDATE_SCRATCH_NV :: AccelerationStructureMemoryRequirementsTypeNV
$mACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_UPDATE_SCRATCH_NV :: forall {r}.
AccelerationStructureMemoryRequirementsTypeNV
-> ((# #) -> r) -> ((# #) -> r) -> r
ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_UPDATE_SCRATCH_NV = AccelerationStructureMemoryRequirementsTypeNV 2
{-# COMPLETE
ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_OBJECT_NV
, ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_BUILD_SCRATCH_NV
, ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_UPDATE_SCRATCH_NV ::
AccelerationStructureMemoryRequirementsTypeNV
#-}
conNameAccelerationStructureMemoryRequirementsTypeNV :: String
conNameAccelerationStructureMemoryRequirementsTypeNV :: String
conNameAccelerationStructureMemoryRequirementsTypeNV = String
"AccelerationStructureMemoryRequirementsTypeNV"
enumPrefixAccelerationStructureMemoryRequirementsTypeNV :: String
enumPrefixAccelerationStructureMemoryRequirementsTypeNV :: String
enumPrefixAccelerationStructureMemoryRequirementsTypeNV = String
"ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_"
showTableAccelerationStructureMemoryRequirementsTypeNV :: [(AccelerationStructureMemoryRequirementsTypeNV, String)]
showTableAccelerationStructureMemoryRequirementsTypeNV :: [(AccelerationStructureMemoryRequirementsTypeNV, String)]
showTableAccelerationStructureMemoryRequirementsTypeNV =
[
( AccelerationStructureMemoryRequirementsTypeNV
ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_OBJECT_NV
, String
"OBJECT_NV"
)
,
( AccelerationStructureMemoryRequirementsTypeNV
ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_BUILD_SCRATCH_NV
, String
"BUILD_SCRATCH_NV"
)
,
( AccelerationStructureMemoryRequirementsTypeNV
ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_UPDATE_SCRATCH_NV
, String
"UPDATE_SCRATCH_NV"
)
]
instance Show AccelerationStructureMemoryRequirementsTypeNV where
showsPrec :: Int -> AccelerationStructureMemoryRequirementsTypeNV -> ShowS
showsPrec =
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec
String
enumPrefixAccelerationStructureMemoryRequirementsTypeNV
[(AccelerationStructureMemoryRequirementsTypeNV, String)]
showTableAccelerationStructureMemoryRequirementsTypeNV
String
conNameAccelerationStructureMemoryRequirementsTypeNV
(\(AccelerationStructureMemoryRequirementsTypeNV Int32
x) -> Int32
x)
(forall a. Show a => Int -> a -> ShowS
showsPrec Int
11)
instance Read AccelerationStructureMemoryRequirementsTypeNV where
readPrec :: ReadPrec AccelerationStructureMemoryRequirementsTypeNV
readPrec =
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec
String
enumPrefixAccelerationStructureMemoryRequirementsTypeNV
[(AccelerationStructureMemoryRequirementsTypeNV, String)]
showTableAccelerationStructureMemoryRequirementsTypeNV
String
conNameAccelerationStructureMemoryRequirementsTypeNV
Int32 -> AccelerationStructureMemoryRequirementsTypeNV
AccelerationStructureMemoryRequirementsTypeNV
type GeometryFlagsNV = GeometryFlagsKHR
type GeometryInstanceFlagsNV = GeometryInstanceFlagsKHR
type BuildAccelerationStructureFlagsNV = BuildAccelerationStructureFlagsKHR
type GeometryFlagBitsNV = GeometryFlagBitsKHR
type GeometryInstanceFlagBitsNV = GeometryInstanceFlagBitsKHR
type BuildAccelerationStructureFlagBitsNV = BuildAccelerationStructureFlagBitsKHR
type CopyAccelerationStructureModeNV = CopyAccelerationStructureModeKHR
type AccelerationStructureTypeNV = AccelerationStructureTypeKHR
type GeometryTypeNV = GeometryTypeKHR
type RayTracingShaderGroupTypeNV = RayTracingShaderGroupTypeKHR
type AabbPositionsNV = AabbPositionsKHR
type TransformMatrixNV = TransformMatrixKHR
type AccelerationStructureInstanceNV = AccelerationStructureInstanceKHR
type NV_RAY_TRACING_SPEC_VERSION = 3
pattern NV_RAY_TRACING_SPEC_VERSION :: forall a . Integral a => a
pattern $bNV_RAY_TRACING_SPEC_VERSION :: forall a. Integral a => a
$mNV_RAY_TRACING_SPEC_VERSION :: forall {r} {a}.
Integral a =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
NV_RAY_TRACING_SPEC_VERSION = 3
type NV_RAY_TRACING_EXTENSION_NAME = "VK_NV_ray_tracing"
pattern NV_RAY_TRACING_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $bNV_RAY_TRACING_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
$mNV_RAY_TRACING_EXTENSION_NAME :: forall {r} {a}.
(Eq a, IsString a) =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
NV_RAY_TRACING_EXTENSION_NAME = "VK_NV_ray_tracing"