{-# language CPP #-}
module Vulkan.Extensions.VK_NV_ray_tracing  ( compileDeferredNV
                                            , createAccelerationStructureNV
                                            , getAccelerationStructureMemoryRequirementsNV
                                            , cmdCopyAccelerationStructureNV
                                            , cmdBuildAccelerationStructureNV
                                            , cmdTraceRaysNV
                                            , getAccelerationStructureHandleNV
                                            , createRayTracingPipelinesNV
                                            , pattern STRUCTURE_TYPE_BIND_ACCELERATION_STRUCTURE_MEMORY_INFO_NV
                                            , pattern STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_NV
                                            , 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 DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_NV
                                            , pattern ACCESS_ACCELERATION_STRUCTURE_READ_BIT_NV
                                            , pattern ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_NV
                                            , pattern QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_NV
                                            , pattern OBJECT_TYPE_ACCELERATION_STRUCTURE_NV
                                            , pattern DEBUG_REPORT_OBJECT_TYPE_ACCELERATION_STRUCTURE_NV_EXT
                                            , 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 ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_OBJECT_NV
                                            , pattern ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_BUILD_SCRATCH_NV
                                            , pattern ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_UPDATE_SCRATCH_NV
                                            , destroyAccelerationStructureNV
                                            , bindAccelerationStructureMemoryNV
                                            , cmdWriteAccelerationStructuresPropertiesNV
                                            , getRayTracingShaderGroupHandlesNV
                                            , pattern SHADER_UNUSED_NV
                                            , RayTracingShaderGroupCreateInfoNV(..)
                                            , RayTracingPipelineCreateInfoNV(..)
                                            , GeometryTrianglesNV(..)
                                            , GeometryAABBNV(..)
                                            , GeometryDataNV(..)
                                            , GeometryNV(..)
                                            , AccelerationStructureInfoNV(..)
                                            , AccelerationStructureCreateInfoNV(..)
                                            , AccelerationStructureMemoryRequirementsInfoNV(..)
                                            , PhysicalDeviceRayTracingPropertiesNV(..)
                                            , GeometryFlagsNV
                                            , GeometryInstanceFlagsNV
                                            , BuildAccelerationStructureFlagsNV
                                            , AccelerationStructureNV
                                            , GeometryFlagBitsNV
                                            , GeometryInstanceFlagBitsNV
                                            , BuildAccelerationStructureFlagBitsNV
                                            , CopyAccelerationStructureModeNV
                                            , AccelerationStructureTypeNV
                                            , GeometryTypeNV
                                            , RayTracingShaderGroupTypeNV
                                            , AccelerationStructureMemoryRequirementsTypeNV
                                            , BindAccelerationStructureMemoryInfoNV
                                            , WriteDescriptorSetAccelerationStructureNV
                                            , 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
                                            , AccelerationStructureKHR(..)
                                            , BindAccelerationStructureMemoryInfoKHR(..)
                                            , WriteDescriptorSetAccelerationStructureKHR(..)
                                            , AabbPositionsKHR(..)
                                            , TransformMatrixKHR(..)
                                            , AccelerationStructureInstanceKHR(..)
                                            , destroyAccelerationStructureKHR
                                            , bindAccelerationStructureMemoryKHR
                                            , cmdWriteAccelerationStructuresPropertiesKHR
                                            , getRayTracingShaderGroupHandlesKHR
                                            , DebugReportObjectTypeEXT(..)
                                            , GeometryInstanceFlagBitsKHR(..)
                                            , GeometryInstanceFlagsKHR
                                            , GeometryFlagBitsKHR(..)
                                            , GeometryFlagsKHR
                                            , BuildAccelerationStructureFlagBitsKHR(..)
                                            , BuildAccelerationStructureFlagsKHR
                                            , CopyAccelerationStructureModeKHR(..)
                                            , AccelerationStructureTypeKHR(..)
                                            , GeometryTypeKHR(..)
                                            , AccelerationStructureMemoryRequirementsTypeKHR(..)
                                            , RayTracingShaderGroupTypeKHR(..)
                                            , SHADER_UNUSED_KHR
                                            , pattern SHADER_UNUSED_KHR
                                            ) where

import Control.Exception.Base (bracket)
import Control.Monad (unless)
import Control.Monad.IO.Class (liftIO)
import Data.Typeable (eqT)
import Foreign.Marshal.Alloc (allocaBytesAligned)
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 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 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.IO.Exception (IOErrorType(..))
import GHC.IO.Exception (IOException(..))
import Data.Int (Int32)
import Foreign.Ptr (FunPtr)
import Foreign.Ptr (Ptr)
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.Extensions.VK_KHR_ray_tracing (bindAccelerationStructureMemoryKHR)
import Vulkan.Core10.BaseType (boolToBool32)
import Vulkan.Extensions.VK_KHR_ray_tracing (cmdWriteAccelerationStructuresPropertiesKHR)
import Vulkan.Extensions.VK_KHR_ray_tracing (destroyAccelerationStructureKHR)
import Vulkan.CStruct.Extends (forgetExtensions)
import Vulkan.Extensions.VK_KHR_ray_tracing (getRayTracingShaderGroupHandlesKHR)
import Vulkan.CStruct.Extends (peekSomeCStruct)
import Vulkan.CStruct.Extends (pokeSomeCStruct)
import Vulkan.NamedType ((:::))
import Vulkan.Extensions.VK_KHR_ray_tracing (AabbPositionsKHR)
import Vulkan.Extensions.VK_KHR_ray_tracing (AccelerationStructureInstanceKHR)
import Vulkan.Extensions.Handles (AccelerationStructureKHR)
import Vulkan.Extensions.Handles (AccelerationStructureKHR(..))
import Vulkan.Extensions.VK_KHR_ray_tracing (AccelerationStructureMemoryRequirementsTypeKHR)
import Vulkan.Extensions.VK_KHR_ray_tracing (AccelerationStructureTypeKHR)
import Vulkan.Core10.AllocationCallbacks (AllocationCallbacks)
import Vulkan.Extensions.VK_KHR_ray_tracing (BindAccelerationStructureMemoryInfoKHR)
import Vulkan.Core10.BaseType (Bool32)
import Vulkan.Core10.BaseType (Bool32(..))
import Vulkan.Core10.Handles (Buffer)
import Vulkan.Core10.Handles (Buffer(..))
import Vulkan.Extensions.VK_KHR_ray_tracing (BuildAccelerationStructureFlagBitsKHR)
import Vulkan.Extensions.VK_KHR_ray_tracing (BuildAccelerationStructureFlagsKHR)
import Vulkan.CStruct.Extends (Chain)
import Vulkan.Core10.Handles (CommandBuffer)
import Vulkan.Core10.Handles (CommandBuffer(..))
import Vulkan.Core10.Handles (CommandBuffer_T)
import Vulkan.Extensions.VK_KHR_ray_tracing (CopyAccelerationStructureModeKHR)
import Vulkan.Extensions.VK_KHR_ray_tracing (CopyAccelerationStructureModeKHR(..))
import Vulkan.Core10.Handles (Device)
import Vulkan.Core10.Handles (Device(..))
import Vulkan.Dynamic (DeviceCmds(pVkCmdBuildAccelerationStructureNV))
import Vulkan.Dynamic (DeviceCmds(pVkCmdCopyAccelerationStructureNV))
import Vulkan.Dynamic (DeviceCmds(pVkCmdTraceRaysNV))
import Vulkan.Dynamic (DeviceCmds(pVkCompileDeferredNV))
import Vulkan.Dynamic (DeviceCmds(pVkCreateAccelerationStructureNV))
import Vulkan.Dynamic (DeviceCmds(pVkCreateRayTracingPipelinesNV))
import Vulkan.Dynamic (DeviceCmds(pVkGetAccelerationStructureHandleNV))
import Vulkan.Dynamic (DeviceCmds(pVkGetAccelerationStructureMemoryRequirementsNV))
import Vulkan.Core10.BaseType (DeviceSize)
import Vulkan.Core10.Handles (Device_T)
import Vulkan.CStruct.Extends (Extends)
import Vulkan.CStruct.Extends (Extendss)
import Vulkan.CStruct.Extends (Extensible(..))
import Vulkan.Core10.Enums.Format (Format)
import Vulkan.CStruct (FromCStruct)
import Vulkan.CStruct (FromCStruct(..))
import Vulkan.Extensions.VK_KHR_ray_tracing (GeometryFlagBitsKHR)
import Vulkan.Extensions.VK_KHR_ray_tracing (GeometryFlagsKHR)
import Vulkan.Extensions.VK_KHR_ray_tracing (GeometryInstanceFlagBitsKHR)
import Vulkan.Extensions.VK_KHR_ray_tracing (GeometryInstanceFlagsKHR)
import Vulkan.Extensions.VK_KHR_ray_tracing (GeometryTypeKHR)
import Vulkan.Core10.Enums.IndexType (IndexType)
import Vulkan.Core11.Promoted_From_VK_KHR_get_memory_requirements2 (MemoryRequirements2KHR)
import Vulkan.CStruct.Extends (PeekChain)
import Vulkan.CStruct.Extends (PeekChain(..))
import Vulkan.Core10.Handles (Pipeline)
import Vulkan.Core10.Handles (Pipeline(..))
import Vulkan.Core10.Handles (PipelineCache)
import Vulkan.Core10.Handles (PipelineCache(..))
import Vulkan.Core10.Enums.PipelineCreateFlagBits (PipelineCreateFlags)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_pipeline_creation_feedback (PipelineCreationFeedbackCreateInfoEXT)
import Vulkan.Core10.Handles (PipelineLayout)
import Vulkan.Core10.Pipeline (PipelineShaderStageCreateInfo)
import Vulkan.CStruct.Extends (PokeChain)
import Vulkan.CStruct.Extends (PokeChain(..))
import Vulkan.Extensions.VK_KHR_ray_tracing (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.CStruct (ToCStruct)
import Vulkan.CStruct (ToCStruct(..))
import Vulkan.Extensions.VK_KHR_ray_tracing (TransformMatrixKHR)
import Vulkan.Exception (VulkanException(..))
import Vulkan.Extensions.VK_KHR_ray_tracing (WriteDescriptorSetAccelerationStructureKHR)
import Vulkan.Zero (Zero(..))
import Vulkan.Extensions.VK_KHR_ray_tracing (AccelerationStructureMemoryRequirementsTypeKHR(ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_BUILD_SCRATCH_KHR))
import Vulkan.Extensions.VK_KHR_ray_tracing (AccelerationStructureMemoryRequirementsTypeKHR(ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_OBJECT_KHR))
import Vulkan.Extensions.VK_KHR_ray_tracing (AccelerationStructureMemoryRequirementsTypeKHR(ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_UPDATE_SCRATCH_KHR))
import Vulkan.Extensions.VK_KHR_ray_tracing (AccelerationStructureTypeKHR(ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_KHR))
import Vulkan.Extensions.VK_KHR_ray_tracing (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_RAY_TRACING_BIT_KHR))
import Vulkan.Extensions.VK_KHR_ray_tracing (BuildAccelerationStructureFlagsKHR)
import Vulkan.Extensions.VK_KHR_ray_tracing (BuildAccelerationStructureFlagBitsKHR(BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_KHR))
import Vulkan.Extensions.VK_KHR_ray_tracing (BuildAccelerationStructureFlagsKHR)
import Vulkan.Extensions.VK_KHR_ray_tracing (BuildAccelerationStructureFlagBitsKHR(BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_KHR))
import Vulkan.Extensions.VK_KHR_ray_tracing (BuildAccelerationStructureFlagsKHR)
import Vulkan.Extensions.VK_KHR_ray_tracing (BuildAccelerationStructureFlagBitsKHR(BUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_KHR))
import Vulkan.Extensions.VK_KHR_ray_tracing (BuildAccelerationStructureFlagsKHR)
import Vulkan.Extensions.VK_KHR_ray_tracing (BuildAccelerationStructureFlagBitsKHR(BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_KHR))
import Vulkan.Extensions.VK_KHR_ray_tracing (BuildAccelerationStructureFlagsKHR)
import Vulkan.Extensions.VK_KHR_ray_tracing (BuildAccelerationStructureFlagBitsKHR(BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_KHR))
import Vulkan.Extensions.VK_KHR_ray_tracing (CopyAccelerationStructureModeKHR(COPY_ACCELERATION_STRUCTURE_MODE_CLONE_KHR))
import Vulkan.Extensions.VK_KHR_ray_tracing (CopyAccelerationStructureModeKHR(COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_KHR))
import Vulkan.Extensions.VK_EXT_debug_report (DebugReportObjectTypeEXT(DEBUG_REPORT_OBJECT_TYPE_ACCELERATION_STRUCTURE_KHR_EXT))
import Vulkan.Core10.Enums.DescriptorType (DescriptorType(DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR))
import Vulkan.Extensions.VK_KHR_ray_tracing (GeometryInstanceFlagsKHR)
import Vulkan.Extensions.VK_KHR_ray_tracing (GeometryInstanceFlagBitsKHR(GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_KHR))
import Vulkan.Extensions.VK_KHR_ray_tracing (GeometryInstanceFlagsKHR)
import Vulkan.Extensions.VK_KHR_ray_tracing (GeometryInstanceFlagBitsKHR(GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_KHR))
import Vulkan.Extensions.VK_KHR_ray_tracing (GeometryInstanceFlagsKHR)
import Vulkan.Extensions.VK_KHR_ray_tracing (GeometryInstanceFlagBitsKHR(GEOMETRY_INSTANCE_TRIANGLE_FACING_CULL_DISABLE_BIT_KHR))
import Vulkan.Extensions.VK_KHR_ray_tracing (GeometryInstanceFlagsKHR)
import Vulkan.Extensions.VK_KHR_ray_tracing (GeometryInstanceFlagBitsKHR(GEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_KHR))
import Vulkan.Extensions.VK_KHR_ray_tracing (GeometryFlagsKHR)
import Vulkan.Extensions.VK_KHR_ray_tracing (GeometryFlagBitsKHR(GEOMETRY_NO_DUPLICATE_ANY_HIT_INVOCATION_BIT_KHR))
import Vulkan.Extensions.VK_KHR_ray_tracing (GeometryFlagsKHR)
import Vulkan.Extensions.VK_KHR_ray_tracing (GeometryFlagBitsKHR(GEOMETRY_OPAQUE_BIT_KHR))
import Vulkan.Extensions.VK_KHR_ray_tracing (GeometryTypeKHR(GEOMETRY_TYPE_AABBS_KHR))
import Vulkan.Extensions.VK_KHR_ray_tracing (GeometryTypeKHR(GEOMETRY_TYPE_TRIANGLES_KHR))
import Vulkan.Core10.Enums.IndexType (IndexType(INDEX_TYPE_NONE_KHR))
import Vulkan.Core10.Enums.ObjectType (ObjectType(OBJECT_TYPE_ACCELERATION_STRUCTURE_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.Core10.Enums.QueryType (QueryType(QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_KHR))
import Vulkan.Extensions.VK_KHR_ray_tracing (RayTracingShaderGroupTypeKHR(RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_KHR))
import Vulkan.Extensions.VK_KHR_ray_tracing (RayTracingShaderGroupTypeKHR(RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR))
import Vulkan.Extensions.VK_KHR_ray_tracing (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_KHR))
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_KHR))
import Vulkan.Core10.Enums.Result (Result(SUCCESS))
import Vulkan.Extensions.VK_KHR_ray_tracing (bindAccelerationStructureMemoryKHR)
import Vulkan.Extensions.VK_KHR_ray_tracing (cmdWriteAccelerationStructuresPropertiesKHR)
import Vulkan.Extensions.VK_KHR_ray_tracing (destroyAccelerationStructureKHR)
import Vulkan.Extensions.VK_KHR_ray_tracing (getRayTracingShaderGroupHandlesKHR)
import Vulkan.Extensions.VK_KHR_ray_tracing (AabbPositionsKHR(..))
import Vulkan.Extensions.VK_KHR_ray_tracing (AccelerationStructureInstanceKHR(..))
import Vulkan.Extensions.Handles (AccelerationStructureKHR(..))
import Vulkan.Extensions.VK_KHR_ray_tracing (AccelerationStructureMemoryRequirementsTypeKHR(..))
import Vulkan.Extensions.VK_KHR_ray_tracing (AccelerationStructureTypeKHR(..))
import Vulkan.Extensions.VK_KHR_ray_tracing (BindAccelerationStructureMemoryInfoKHR(..))
import Vulkan.Extensions.VK_KHR_ray_tracing (BuildAccelerationStructureFlagBitsKHR(..))
import Vulkan.Extensions.VK_KHR_ray_tracing (BuildAccelerationStructureFlagsKHR)
import Vulkan.Extensions.VK_KHR_ray_tracing (CopyAccelerationStructureModeKHR(..))
import Vulkan.Extensions.VK_EXT_debug_report (DebugReportObjectTypeEXT(..))
import Vulkan.Extensions.VK_KHR_ray_tracing (GeometryFlagBitsKHR(..))
import Vulkan.Extensions.VK_KHR_ray_tracing (GeometryFlagsKHR)
import Vulkan.Extensions.VK_KHR_ray_tracing (GeometryInstanceFlagBitsKHR(..))
import Vulkan.Extensions.VK_KHR_ray_tracing (GeometryInstanceFlagsKHR)
import Vulkan.Extensions.VK_KHR_ray_tracing (GeometryTypeKHR(..))
import Vulkan.Extensions.VK_KHR_ray_tracing (RayTracingShaderGroupTypeKHR(..))
import Vulkan.Core10.APIConstants (SHADER_UNUSED_KHR)
import Vulkan.Extensions.VK_KHR_ray_tracing (TransformMatrixKHR(..))
import Vulkan.Extensions.VK_KHR_ray_tracing (WriteDescriptorSetAccelerationStructureKHR(..))
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

-- | vkCompileDeferredNV - Deferred compilation of shaders
--
-- = Parameters
--
-- -   @device@ is the logical device containing the ray tracing pipeline.
--
-- -   @pipeline@ is the ray tracing pipeline object containing the
--     shaders.
--
-- -   @shader@ is the index of the shader to compile.
--
-- == Return Codes
--
-- [<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fundamentals-successcodes Success>]
--
--     -   'Vulkan.Core10.Enums.Result.SUCCESS'
--
-- [<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fundamentals-errorcodes Failure>]
--
--     -   'Vulkan.Core10.Enums.Result.ERROR_OUT_OF_HOST_MEMORY'
--
--     -   'Vulkan.Core10.Enums.Result.ERROR_OUT_OF_DEVICE_MEMORY'
--
-- = See Also
--
-- 'Vulkan.Core10.Handles.Device', 'Vulkan.Core10.Handles.Pipeline'
compileDeferredNV :: forall io . MonadIO io => Device -> Pipeline -> ("shader" ::: Word32) -> io ()
compileDeferredNV :: Device -> Pipeline -> ("shader" ::: Word32) -> io ()
compileDeferredNV device :: Device
device pipeline :: Pipeline
pipeline shader :: "shader" ::: Word32
shader = IO () -> io ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> io ()) -> IO () -> io ()
forall a b. (a -> b) -> a -> b
$ do
  let vkCompileDeferredNVPtr :: FunPtr
  (Ptr Device_T -> Pipeline -> ("shader" ::: Word32) -> IO Result)
vkCompileDeferredNVPtr = DeviceCmds
-> FunPtr
     (Ptr Device_T -> Pipeline -> ("shader" ::: Word32) -> IO Result)
pVkCompileDeferredNV (Device -> DeviceCmds
deviceCmds (Device
device :: Device))
  Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
  (Ptr Device_T -> Pipeline -> ("shader" ::: Word32) -> IO Result)
vkCompileDeferredNVPtr FunPtr
  (Ptr Device_T -> Pipeline -> ("shader" ::: Word32) -> IO Result)
-> FunPtr
     (Ptr Device_T -> Pipeline -> ("shader" ::: Word32) -> IO Result)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
  (Ptr Device_T -> Pipeline -> ("shader" ::: Word32) -> IO Result)
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
    IOException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument "" "The function pointer for vkCompileDeferredNV is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
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 <- Ptr Device_T -> Pipeline -> ("shader" ::: Word32) -> IO Result
vkCompileDeferredNV' (Device -> Ptr Device_T
deviceHandle (Device
device)) (Pipeline
pipeline) ("shader" ::: Word32
shader)
  Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Result
r Result -> Result -> Bool
forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (VulkanException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (Result -> VulkanException
VulkanException Result
r))


foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
  unsafe
#endif
  "dynamic" mkVkCreateAccelerationStructureNV
  :: FunPtr (Ptr Device_T -> Ptr AccelerationStructureCreateInfoNV -> Ptr AllocationCallbacks -> Ptr AccelerationStructureNV -> IO Result) -> Ptr Device_T -> Ptr AccelerationStructureCreateInfoNV -> Ptr AllocationCallbacks -> Ptr AccelerationStructureNV -> IO Result

-- | vkCreateAccelerationStructureNV - Create a new acceleration structure
-- object
--
-- = Parameters
--
-- -   @device@ is the logical device that creates the buffer object.
--
-- -   @pCreateInfo@ is a pointer to a 'AccelerationStructureCreateInfoNV'
--     structure containing parameters affecting creation of the
--     acceleration structure.
--
-- -   @pAllocator@ controls host memory allocation as described in the
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#memory-allocation Memory Allocation>
--     chapter.
--
-- -   @pAccelerationStructure@ is a pointer to a 'AccelerationStructureNV'
--     handle in which the resulting acceleration structure object is
--     returned.
--
-- = Description
--
-- Similar to other objects in Vulkan, the acceleration structure creation
-- merely creates an object with a specific “shape” as specified by the
-- information in 'AccelerationStructureInfoNV' and @compactedSize@ in
-- @pCreateInfo@. Populating the data in the object after allocating and
-- binding memory is done with 'cmdBuildAccelerationStructureNV' and
-- 'cmdCopyAccelerationStructureNV'.
--
-- Acceleration structure creation uses the count and type information from
-- the geometries, but does not use the data references in the structures.
--
-- == Valid Usage (Implicit)
--
-- -   @device@ /must/ be a valid 'Vulkan.Core10.Handles.Device' handle
--
-- -   @pCreateInfo@ /must/ be a valid pointer to a valid
--     'AccelerationStructureCreateInfoNV' structure
--
-- -   If @pAllocator@ is not @NULL@, @pAllocator@ /must/ be a valid
--     pointer to a valid
--     'Vulkan.Core10.AllocationCallbacks.AllocationCallbacks' structure
--
-- -   @pAccelerationStructure@ /must/ be a valid pointer to a
--     'AccelerationStructureNV' handle
--
-- == Return Codes
--
-- [<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fundamentals-successcodes Success>]
--
--     -   'Vulkan.Core10.Enums.Result.SUCCESS'
--
-- [<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fundamentals-errorcodes Failure>]
--
--     -   'Vulkan.Core10.Enums.Result.ERROR_OUT_OF_HOST_MEMORY'
--
-- = See Also
--
-- 'AccelerationStructureCreateInfoNV', 'AccelerationStructureNV',
-- 'Vulkan.Core10.AllocationCallbacks.AllocationCallbacks',
-- 'Vulkan.Core10.Handles.Device'
createAccelerationStructureNV :: forall io . MonadIO io => Device -> AccelerationStructureCreateInfoNV -> ("allocator" ::: Maybe AllocationCallbacks) -> io (AccelerationStructureNV)
createAccelerationStructureNV :: Device
-> AccelerationStructureCreateInfoNV
-> ("allocator" ::: Maybe AllocationCallbacks)
-> io AccelerationStructureNV
createAccelerationStructureNV device :: Device
device createInfo :: AccelerationStructureCreateInfoNV
createInfo allocator :: "allocator" ::: Maybe AllocationCallbacks
allocator = IO AccelerationStructureNV -> io AccelerationStructureNV
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO AccelerationStructureNV -> io AccelerationStructureNV)
-> (ContT AccelerationStructureNV IO AccelerationStructureNV
    -> IO AccelerationStructureNV)
-> ContT AccelerationStructureNV IO AccelerationStructureNV
-> io AccelerationStructureNV
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT AccelerationStructureNV IO AccelerationStructureNV
-> IO AccelerationStructureNV
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT AccelerationStructureNV IO AccelerationStructureNV
 -> io AccelerationStructureNV)
-> ContT AccelerationStructureNV IO AccelerationStructureNV
-> io AccelerationStructureNV
forall a b. (a -> b) -> a -> b
$ do
  let vkCreateAccelerationStructureNVPtr :: FunPtr
  (Ptr Device_T
   -> ("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoNV)
   -> ("pAllocator" ::: Ptr AllocationCallbacks)
   -> ("pAccelerationStructure" ::: Ptr AccelerationStructureNV)
   -> IO Result)
vkCreateAccelerationStructureNVPtr = DeviceCmds
-> FunPtr
     (Ptr Device_T
      -> ("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoNV)
      -> ("pAllocator" ::: Ptr AllocationCallbacks)
      -> ("pAccelerationStructure" ::: Ptr AccelerationStructureNV)
      -> IO Result)
pVkCreateAccelerationStructureNV (Device -> DeviceCmds
deviceCmds (Device
device :: Device))
  IO () -> ContT AccelerationStructureNV IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT AccelerationStructureNV IO ())
-> IO () -> ContT AccelerationStructureNV IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
  (Ptr Device_T
   -> ("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoNV)
   -> ("pAllocator" ::: Ptr AllocationCallbacks)
   -> ("pAccelerationStructure" ::: Ptr AccelerationStructureNV)
   -> IO Result)
vkCreateAccelerationStructureNVPtr FunPtr
  (Ptr Device_T
   -> ("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoNV)
   -> ("pAllocator" ::: Ptr AllocationCallbacks)
   -> ("pAccelerationStructure" ::: Ptr AccelerationStructureNV)
   -> IO Result)
-> FunPtr
     (Ptr Device_T
      -> ("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoNV)
      -> ("pAllocator" ::: Ptr AllocationCallbacks)
      -> ("pAccelerationStructure" ::: Ptr AccelerationStructureNV)
      -> IO Result)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
  (Ptr Device_T
   -> ("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoNV)
   -> ("pAllocator" ::: Ptr AllocationCallbacks)
   -> ("pAccelerationStructure" ::: Ptr AccelerationStructureNV)
   -> IO Result)
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
    IOException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument "" "The function pointer for vkCreateAccelerationStructureNV is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
  let vkCreateAccelerationStructureNV' :: Ptr Device_T
-> ("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoNV)
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pAccelerationStructure" ::: Ptr AccelerationStructureNV)
-> IO Result
vkCreateAccelerationStructureNV' = FunPtr
  (Ptr Device_T
   -> ("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoNV)
   -> ("pAllocator" ::: Ptr AllocationCallbacks)
   -> ("pAccelerationStructure" ::: Ptr AccelerationStructureNV)
   -> IO Result)
-> Ptr Device_T
-> ("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoNV)
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pAccelerationStructure" ::: Ptr AccelerationStructureNV)
-> IO Result
mkVkCreateAccelerationStructureNV FunPtr
  (Ptr Device_T
   -> ("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoNV)
   -> ("pAllocator" ::: Ptr AllocationCallbacks)
   -> ("pAccelerationStructure" ::: Ptr AccelerationStructureNV)
   -> IO Result)
vkCreateAccelerationStructureNVPtr
  "pCreateInfo" ::: Ptr AccelerationStructureCreateInfoNV
pCreateInfo <- ((("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoNV)
  -> IO AccelerationStructureNV)
 -> IO AccelerationStructureNV)
-> ContT
     AccelerationStructureNV
     IO
     ("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoNV)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoNV)
   -> IO AccelerationStructureNV)
  -> IO AccelerationStructureNV)
 -> ContT
      AccelerationStructureNV
      IO
      ("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoNV))
-> ((("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoNV)
     -> IO AccelerationStructureNV)
    -> IO AccelerationStructureNV)
-> ContT
     AccelerationStructureNV
     IO
     ("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoNV)
forall a b. (a -> b) -> a -> b
$ AccelerationStructureCreateInfoNV
-> (("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoNV)
    -> IO AccelerationStructureNV)
-> IO AccelerationStructureNV
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (AccelerationStructureCreateInfoNV
createInfo)
  "pAllocator" ::: Ptr AllocationCallbacks
pAllocator <- case ("allocator" ::: Maybe AllocationCallbacks
allocator) of
    Nothing -> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ContT
     AccelerationStructureNV
     IO
     ("pAllocator" ::: Ptr AllocationCallbacks)
forall (f :: * -> *) a. Applicative f => a -> f a
pure "pAllocator" ::: Ptr AllocationCallbacks
forall a. Ptr a
nullPtr
    Just j :: AllocationCallbacks
j -> ((("pAllocator" ::: Ptr AllocationCallbacks)
  -> IO AccelerationStructureNV)
 -> IO AccelerationStructureNV)
-> ContT
     AccelerationStructureNV
     IO
     ("pAllocator" ::: Ptr AllocationCallbacks)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pAllocator" ::: Ptr AllocationCallbacks)
   -> IO AccelerationStructureNV)
  -> IO AccelerationStructureNV)
 -> ContT
      AccelerationStructureNV
      IO
      ("pAllocator" ::: Ptr AllocationCallbacks))
-> ((("pAllocator" ::: Ptr AllocationCallbacks)
     -> IO AccelerationStructureNV)
    -> IO AccelerationStructureNV)
-> ContT
     AccelerationStructureNV
     IO
     ("pAllocator" ::: Ptr AllocationCallbacks)
forall a b. (a -> b) -> a -> b
$ AllocationCallbacks
-> (("pAllocator" ::: Ptr AllocationCallbacks)
    -> IO AccelerationStructureNV)
-> IO AccelerationStructureNV
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (AllocationCallbacks
j)
  "pAccelerationStructure" ::: Ptr AccelerationStructureNV
pPAccelerationStructure <- ((("pAccelerationStructure" ::: Ptr AccelerationStructureNV)
  -> IO AccelerationStructureNV)
 -> IO AccelerationStructureNV)
-> ContT
     AccelerationStructureNV
     IO
     ("pAccelerationStructure" ::: Ptr AccelerationStructureNV)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pAccelerationStructure" ::: Ptr AccelerationStructureNV)
   -> IO AccelerationStructureNV)
  -> IO AccelerationStructureNV)
 -> ContT
      AccelerationStructureNV
      IO
      ("pAccelerationStructure" ::: Ptr AccelerationStructureNV))
-> ((("pAccelerationStructure" ::: Ptr AccelerationStructureNV)
     -> IO AccelerationStructureNV)
    -> IO AccelerationStructureNV)
-> ContT
     AccelerationStructureNV
     IO
     ("pAccelerationStructure" ::: Ptr AccelerationStructureNV)
forall a b. (a -> b) -> a -> b
$ IO ("pAccelerationStructure" ::: Ptr AccelerationStructureNV)
-> (("pAccelerationStructure" ::: Ptr AccelerationStructureNV)
    -> IO ())
-> (("pAccelerationStructure" ::: Ptr AccelerationStructureNV)
    -> IO AccelerationStructureNV)
-> IO AccelerationStructureNV
forall a b c. IO a -> (a -> IO b) -> (a -> IO c) -> IO c
bracket (Int
-> IO ("pAccelerationStructure" ::: Ptr AccelerationStructureNV)
forall a. Int -> IO (Ptr a)
callocBytes @AccelerationStructureNV 8) ("pAccelerationStructure" ::: Ptr AccelerationStructureNV) -> IO ()
forall a. Ptr a -> IO ()
free
  Result
r <- IO Result -> ContT AccelerationStructureNV IO Result
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO Result -> ContT AccelerationStructureNV IO Result)
-> IO Result -> ContT AccelerationStructureNV IO Result
forall a b. (a -> b) -> a -> b
$ Ptr Device_T
-> ("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoNV)
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pAccelerationStructure" ::: Ptr AccelerationStructureNV)
-> IO Result
vkCreateAccelerationStructureNV' (Device -> Ptr Device_T
deviceHandle (Device
device)) "pCreateInfo" ::: Ptr AccelerationStructureCreateInfoNV
pCreateInfo "pAllocator" ::: Ptr AllocationCallbacks
pAllocator ("pAccelerationStructure" ::: Ptr AccelerationStructureNV
pPAccelerationStructure)
  IO () -> ContT AccelerationStructureNV IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT AccelerationStructureNV IO ())
-> IO () -> ContT AccelerationStructureNV IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Result
r Result -> Result -> Bool
forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (VulkanException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (Result -> VulkanException
VulkanException Result
r))
  AccelerationStructureNV
pAccelerationStructure <- IO AccelerationStructureNV
-> ContT AccelerationStructureNV IO AccelerationStructureNV
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO AccelerationStructureNV
 -> ContT AccelerationStructureNV IO AccelerationStructureNV)
-> IO AccelerationStructureNV
-> ContT AccelerationStructureNV IO AccelerationStructureNV
forall a b. (a -> b) -> a -> b
$ ("pAccelerationStructure" ::: Ptr AccelerationStructureNV)
-> IO AccelerationStructureNV
forall a. Storable a => Ptr a -> IO a
peek @AccelerationStructureNV "pAccelerationStructure" ::: Ptr AccelerationStructureNV
pPAccelerationStructure
  AccelerationStructureNV
-> ContT AccelerationStructureNV IO AccelerationStructureNV
forall (f :: * -> *) a. Applicative f => a -> f a
pure (AccelerationStructureNV
 -> ContT AccelerationStructureNV IO AccelerationStructureNV)
-> AccelerationStructureNV
-> ContT AccelerationStructureNV IO AccelerationStructureNV
forall a b. (a -> b) -> a -> b
$ (AccelerationStructureNV
pAccelerationStructure)


foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
  unsafe
#endif
  "dynamic" mkVkGetAccelerationStructureMemoryRequirementsNV
  :: FunPtr (Ptr Device_T -> Ptr AccelerationStructureMemoryRequirementsInfoNV -> Ptr (MemoryRequirements2KHR a) -> IO ()) -> Ptr Device_T -> Ptr AccelerationStructureMemoryRequirementsInfoNV -> Ptr (MemoryRequirements2KHR a) -> IO ()

-- | vkGetAccelerationStructureMemoryRequirementsNV - Get acceleration
-- structure memory requirements
--
-- = Parameters
--
-- -   @device@ is the logical device on which the acceleration structure
--     was created.
--
-- -   @pInfo@ specifies the acceleration structure to get memory
--     requirements for.
--
-- -   @pMemoryRequirements@ returns the requested acceleration structure
--     memory requirements.
--
-- == Valid Usage (Implicit)
--
-- = See Also
--
-- 'AccelerationStructureMemoryRequirementsInfoNV',
-- 'Vulkan.Core10.Handles.Device',
-- 'Vulkan.Core11.Promoted_From_VK_KHR_get_memory_requirements2.MemoryRequirements2KHR'
getAccelerationStructureMemoryRequirementsNV :: forall a io . (Extendss MemoryRequirements2KHR a, PokeChain a, PeekChain a, MonadIO io) => Device -> AccelerationStructureMemoryRequirementsInfoNV -> io (MemoryRequirements2KHR a)
getAccelerationStructureMemoryRequirementsNV :: Device
-> AccelerationStructureMemoryRequirementsInfoNV
-> io (MemoryRequirements2KHR a)
getAccelerationStructureMemoryRequirementsNV device :: Device
device info :: AccelerationStructureMemoryRequirementsInfoNV
info = IO (MemoryRequirements2KHR a) -> io (MemoryRequirements2KHR a)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (MemoryRequirements2KHR a) -> io (MemoryRequirements2KHR a))
-> (ContT (MemoryRequirements2KHR a) IO (MemoryRequirements2KHR a)
    -> IO (MemoryRequirements2KHR a))
-> ContT (MemoryRequirements2KHR a) IO (MemoryRequirements2KHR a)
-> io (MemoryRequirements2KHR a)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT (MemoryRequirements2KHR a) IO (MemoryRequirements2KHR a)
-> IO (MemoryRequirements2KHR a)
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT (MemoryRequirements2KHR a) IO (MemoryRequirements2KHR a)
 -> io (MemoryRequirements2KHR a))
-> ContT (MemoryRequirements2KHR a) IO (MemoryRequirements2KHR a)
-> io (MemoryRequirements2KHR a)
forall a b. (a -> b) -> a -> b
$ do
  let vkGetAccelerationStructureMemoryRequirementsNVPtr :: FunPtr
  (Ptr Device_T
   -> ("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV)
   -> ("pMemoryRequirements" ::: Ptr (MemoryRequirements2KHR a))
   -> IO ())
vkGetAccelerationStructureMemoryRequirementsNVPtr = DeviceCmds
-> forall (a :: [*]).
   FunPtr
     (Ptr Device_T
      -> ("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV)
      -> ("pMemoryRequirements" ::: Ptr (MemoryRequirements2KHR a))
      -> IO ())
pVkGetAccelerationStructureMemoryRequirementsNV (Device -> DeviceCmds
deviceCmds (Device
device :: Device))
  IO () -> ContT (MemoryRequirements2KHR a) IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT (MemoryRequirements2KHR a) IO ())
-> IO () -> ContT (MemoryRequirements2KHR a) IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
  (Ptr Device_T
   -> ("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV)
   -> ("pMemoryRequirements" ::: Ptr (MemoryRequirements2KHR a))
   -> IO ())
vkGetAccelerationStructureMemoryRequirementsNVPtr FunPtr
  (Ptr Device_T
   -> ("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV)
   -> ("pMemoryRequirements" ::: Ptr (MemoryRequirements2KHR a))
   -> IO ())
-> FunPtr
     (Ptr Device_T
      -> ("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV)
      -> ("pMemoryRequirements" ::: Ptr (MemoryRequirements2KHR a))
      -> IO ())
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
  (Ptr Device_T
   -> ("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV)
   -> ("pMemoryRequirements" ::: Ptr (MemoryRequirements2KHR a))
   -> IO ())
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
    IOException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument "" "The function pointer for vkGetAccelerationStructureMemoryRequirementsNV is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
  let vkGetAccelerationStructureMemoryRequirementsNV' :: Ptr Device_T
-> ("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV)
-> ("pMemoryRequirements" ::: Ptr (MemoryRequirements2KHR a))
-> IO ()
vkGetAccelerationStructureMemoryRequirementsNV' = FunPtr
  (Ptr Device_T
   -> ("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV)
   -> ("pMemoryRequirements" ::: Ptr (MemoryRequirements2KHR a))
   -> IO ())
-> Ptr Device_T
-> ("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV)
-> ("pMemoryRequirements" ::: Ptr (MemoryRequirements2KHR a))
-> IO ()
forall (a :: [*]).
FunPtr
  (Ptr Device_T
   -> ("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV)
   -> Ptr (MemoryRequirements2KHR a)
   -> IO ())
-> Ptr Device_T
-> ("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV)
-> Ptr (MemoryRequirements2KHR a)
-> IO ()
mkVkGetAccelerationStructureMemoryRequirementsNV FunPtr
  (Ptr Device_T
   -> ("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV)
   -> ("pMemoryRequirements" ::: Ptr (MemoryRequirements2KHR a))
   -> IO ())
vkGetAccelerationStructureMemoryRequirementsNVPtr
  "pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV
pInfo <- ((("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV)
  -> IO (MemoryRequirements2KHR a))
 -> IO (MemoryRequirements2KHR a))
-> ContT
     (MemoryRequirements2KHR a)
     IO
     ("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV)
   -> IO (MemoryRequirements2KHR a))
  -> IO (MemoryRequirements2KHR a))
 -> ContT
      (MemoryRequirements2KHR a)
      IO
      ("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV))
-> ((("pInfo"
      ::: Ptr AccelerationStructureMemoryRequirementsInfoNV)
     -> IO (MemoryRequirements2KHR a))
    -> IO (MemoryRequirements2KHR a))
-> ContT
     (MemoryRequirements2KHR a)
     IO
     ("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV)
forall a b. (a -> b) -> a -> b
$ AccelerationStructureMemoryRequirementsInfoNV
-> (("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV)
    -> IO (MemoryRequirements2KHR a))
-> IO (MemoryRequirements2KHR a)
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (AccelerationStructureMemoryRequirementsInfoNV
info)
  "pMemoryRequirements" ::: Ptr (MemoryRequirements2KHR a)
pPMemoryRequirements <- ((("pMemoryRequirements" ::: Ptr (MemoryRequirements2KHR a))
  -> IO (MemoryRequirements2KHR a))
 -> IO (MemoryRequirements2KHR a))
-> ContT
     (MemoryRequirements2KHR a)
     IO
     ("pMemoryRequirements" ::: Ptr (MemoryRequirements2KHR a))
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (forall b.
ToCStruct (MemoryRequirements2KHR a) =>
(("pMemoryRequirements" ::: Ptr (MemoryRequirements2KHR a))
 -> IO b)
-> IO b
forall a b. ToCStruct a => (Ptr a -> IO b) -> IO b
withZeroCStruct @(MemoryRequirements2KHR _))
  IO () -> ContT (MemoryRequirements2KHR a) IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT (MemoryRequirements2KHR a) IO ())
-> IO () -> ContT (MemoryRequirements2KHR a) IO ()
forall a b. (a -> b) -> a -> b
$ Ptr Device_T
-> ("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV)
-> ("pMemoryRequirements" ::: Ptr (MemoryRequirements2KHR a))
-> IO ()
vkGetAccelerationStructureMemoryRequirementsNV' (Device -> Ptr Device_T
deviceHandle (Device
device)) "pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV
pInfo ("pMemoryRequirements" ::: Ptr (MemoryRequirements2KHR a)
pPMemoryRequirements)
  MemoryRequirements2KHR a
pMemoryRequirements <- IO (MemoryRequirements2KHR a)
-> ContT (MemoryRequirements2KHR a) IO (MemoryRequirements2KHR a)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO (MemoryRequirements2KHR a)
 -> ContT (MemoryRequirements2KHR a) IO (MemoryRequirements2KHR a))
-> IO (MemoryRequirements2KHR a)
-> ContT (MemoryRequirements2KHR a) IO (MemoryRequirements2KHR a)
forall a b. (a -> b) -> a -> b
$ ("pMemoryRequirements" ::: Ptr (MemoryRequirements2KHR a))
-> IO (MemoryRequirements2KHR a)
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @(MemoryRequirements2KHR _) "pMemoryRequirements" ::: Ptr (MemoryRequirements2KHR a)
pPMemoryRequirements
  MemoryRequirements2KHR a
-> ContT (MemoryRequirements2KHR a) IO (MemoryRequirements2KHR a)
forall (f :: * -> *) a. Applicative f => a -> f a
pure (MemoryRequirements2KHR a
 -> ContT (MemoryRequirements2KHR a) IO (MemoryRequirements2KHR a))
-> MemoryRequirements2KHR a
-> ContT (MemoryRequirements2KHR a) IO (MemoryRequirements2KHR a)
forall a b. (a -> b) -> a -> b
$ (MemoryRequirements2KHR a
pMemoryRequirements)


foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
  unsafe
#endif
  "dynamic" mkVkCmdCopyAccelerationStructureNV
  :: FunPtr (Ptr CommandBuffer_T -> AccelerationStructureKHR -> AccelerationStructureKHR -> CopyAccelerationStructureModeKHR -> IO ()) -> Ptr CommandBuffer_T -> AccelerationStructureKHR -> AccelerationStructureKHR -> CopyAccelerationStructureModeKHR -> IO ()

-- | vkCmdCopyAccelerationStructureNV - Copy an acceleration structure
--
-- = Parameters
--
-- -   @commandBuffer@ is the command buffer into which the command will be
--     recorded.
--
-- -   @dst@ is a pointer to the target acceleration structure for the
--     copy.
--
-- -   @src@ is a pointer to the source acceleration structure for the
--     copy.
--
-- -   @mode@ is a
--     'Vulkan.Extensions.VK_KHR_ray_tracing.CopyAccelerationStructureModeKHR'
--     value specifying additional operations to perform during the copy.
--
-- == Valid Usage
--
-- -   @mode@ /must/ be
--     'Vulkan.Extensions.VK_KHR_ray_tracing.COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_KHR'
--     or
--     'Vulkan.Extensions.VK_KHR_ray_tracing.COPY_ACCELERATION_STRUCTURE_MODE_CLONE_KHR'
--
-- -   @src@ /must/ have been built with
--     'Vulkan.Extensions.VK_KHR_ray_tracing.BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_KHR'
--     if @mode@ is
--     'Vulkan.Extensions.VK_KHR_ray_tracing.COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_KHR'
--
-- == Valid Usage (Implicit)
--
-- -   @commandBuffer@ /must/ be a valid
--     'Vulkan.Core10.Handles.CommandBuffer' handle
--
-- -   @dst@ /must/ be a valid
--     'Vulkan.Extensions.Handles.AccelerationStructureKHR' handle
--
-- -   @src@ /must/ be a valid
--     'Vulkan.Extensions.Handles.AccelerationStructureKHR' handle
--
-- -   @mode@ /must/ be a valid
--     'Vulkan.Extensions.VK_KHR_ray_tracing.CopyAccelerationStructureModeKHR'
--     value
--
-- -   @commandBuffer@ /must/ be in the
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>
--
-- -   The 'Vulkan.Core10.Handles.CommandPool' that @commandBuffer@ was
--     allocated from /must/ support compute operations
--
-- -   This command /must/ only be called outside of a render pass instance
--
-- -   Each of @commandBuffer@, @dst@, and @src@ /must/ have been created,
--     allocated, or retrieved from the same 'Vulkan.Core10.Handles.Device'
--
-- == Host Synchronization
--
-- -   Host access to the 'Vulkan.Core10.Handles.CommandPool' that
--     @commandBuffer@ was allocated from /must/ be externally synchronized
--
-- == Command Properties
--
-- \'
--
-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+
-- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |
-- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================+
-- | Primary                                                                                                                    | Outside                                                                                                                | Compute                                                                                                               |                                                                                                                                     |
-- | Secondary                                                                                                                  |                                                                                                                        |                                                                                                                       |                                                                                                                                     |
-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+
--
-- = See Also
--
-- 'Vulkan.Extensions.Handles.AccelerationStructureKHR',
-- 'Vulkan.Core10.Handles.CommandBuffer',
-- 'Vulkan.Extensions.VK_KHR_ray_tracing.CopyAccelerationStructureModeKHR'
cmdCopyAccelerationStructureNV :: forall io . MonadIO io => CommandBuffer -> ("dst" ::: AccelerationStructureKHR) -> ("src" ::: AccelerationStructureKHR) -> CopyAccelerationStructureModeKHR -> io ()
cmdCopyAccelerationStructureNV :: CommandBuffer
-> AccelerationStructureNV
-> AccelerationStructureNV
-> CopyAccelerationStructureModeKHR
-> io ()
cmdCopyAccelerationStructureNV commandBuffer :: CommandBuffer
commandBuffer dst :: AccelerationStructureNV
dst src :: AccelerationStructureNV
src mode :: CopyAccelerationStructureModeKHR
mode = IO () -> io ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> io ()) -> IO () -> io ()
forall a b. (a -> b) -> a -> b
$ do
  let vkCmdCopyAccelerationStructureNVPtr :: FunPtr
  (Ptr CommandBuffer_T
   -> AccelerationStructureNV
   -> AccelerationStructureNV
   -> CopyAccelerationStructureModeKHR
   -> IO ())
vkCmdCopyAccelerationStructureNVPtr = DeviceCmds
-> FunPtr
     (Ptr CommandBuffer_T
      -> AccelerationStructureNV
      -> AccelerationStructureNV
      -> CopyAccelerationStructureModeKHR
      -> IO ())
pVkCmdCopyAccelerationStructureNV (CommandBuffer -> DeviceCmds
deviceCmds (CommandBuffer
commandBuffer :: CommandBuffer))
  Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
  (Ptr CommandBuffer_T
   -> AccelerationStructureNV
   -> AccelerationStructureNV
   -> CopyAccelerationStructureModeKHR
   -> IO ())
vkCmdCopyAccelerationStructureNVPtr FunPtr
  (Ptr CommandBuffer_T
   -> AccelerationStructureNV
   -> AccelerationStructureNV
   -> CopyAccelerationStructureModeKHR
   -> IO ())
-> FunPtr
     (Ptr CommandBuffer_T
      -> AccelerationStructureNV
      -> AccelerationStructureNV
      -> CopyAccelerationStructureModeKHR
      -> IO ())
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
  (Ptr CommandBuffer_T
   -> AccelerationStructureNV
   -> AccelerationStructureNV
   -> CopyAccelerationStructureModeKHR
   -> IO ())
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
    IOException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument "" "The function pointer for vkCmdCopyAccelerationStructureNV is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
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
  Ptr CommandBuffer_T
-> AccelerationStructureNV
-> AccelerationStructureNV
-> CopyAccelerationStructureModeKHR
-> IO ()
vkCmdCopyAccelerationStructureNV' (CommandBuffer -> Ptr CommandBuffer_T
commandBufferHandle (CommandBuffer
commandBuffer)) (AccelerationStructureNV
dst) (AccelerationStructureNV
src) (CopyAccelerationStructureModeKHR
mode)
  () -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure (() -> IO ()) -> () -> IO ()
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 -> AccelerationStructureKHR -> AccelerationStructureKHR -> Buffer -> DeviceSize -> IO ()) -> Ptr CommandBuffer_T -> Ptr AccelerationStructureInfoNV -> Buffer -> DeviceSize -> Bool32 -> AccelerationStructureKHR -> AccelerationStructureKHR -> Buffer -> DeviceSize -> IO ()

-- | vkCmdBuildAccelerationStructureNV - Build an acceleration structure
--
-- = Parameters
--
-- -   @commandBuffer@ is the command buffer into which the command will be
--     recorded.
--
-- -   @pInfo@ contains the shared information for the acceleration
--     structure’s structure.
--
-- -   @instanceData@ is the buffer containing an array of
--     'Vulkan.Extensions.VK_KHR_ray_tracing.AccelerationStructureInstanceKHR'
--     structures defining acceleration structures. This parameter /must/
--     be @NULL@ for bottom level acceleration structures.
--
-- -   @instanceOffset@ is the offset in bytes (relative to the start of
--     @instanceData@) at which the instance data is located.
--
-- -   @update@ specifies whether to update the @dst@ acceleration
--     structure with the data in @src@.
--
-- -   @dst@ is a pointer to the target acceleration structure for the
--     build.
--
-- -   @src@ is a pointer to an existing acceleration structure that is to
--     be used to update the @dst@ acceleration structure.
--
-- -   @scratch@ is the 'Vulkan.Core10.Handles.Buffer' that will be used as
--     scratch memory for the build.
--
-- -   @scratchOffset@ is the offset in bytes relative to the start of
--     @scratch@ that will be used as a scratch memory.
--
-- == Valid Usage
--
-- -   @geometryCount@ /must/ be less than or equal to
--     'PhysicalDeviceRayTracingPropertiesNV'::@maxGeometryCount@
--
-- -   @dst@ /must/ have been created with compatible
--     'AccelerationStructureInfoNV' where
--     'AccelerationStructureInfoNV'::@type@ and
--     'AccelerationStructureInfoNV'::@flags@ are identical,
--     'AccelerationStructureInfoNV'::@instanceCount@ and
--     'AccelerationStructureInfoNV'::@geometryCount@ for @dst@ are greater
--     than or equal to the build size and each geometry in
--     'AccelerationStructureInfoNV'::@pGeometries@ for @dst@ has greater
--     than or equal to the number of vertices, indices, and AABBs
--
-- -   If @update@ is 'Vulkan.Core10.BaseType.TRUE', @src@ /must/ not be
--     'Vulkan.Core10.APIConstants.NULL_HANDLE'
--
-- -   If @update@ is 'Vulkan.Core10.BaseType.TRUE', @src@ /must/ have been
--     built before with 'BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_NV'
--     set in 'AccelerationStructureInfoNV'::@flags@
--
-- -   If @update@ is 'Vulkan.Core10.BaseType.FALSE', the @size@ member of
--     the 'Vulkan.Core10.MemoryManagement.MemoryRequirements' structure
--     returned from a call to
--     'getAccelerationStructureMemoryRequirementsNV' with
--     'AccelerationStructureMemoryRequirementsInfoNV'::@accelerationStructure@
--     set to @dst@ and
--     'AccelerationStructureMemoryRequirementsInfoNV'::@type@ set to
--     'ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_BUILD_SCRATCH_NV'
--     /must/ be less than or equal to the size of @scratch@ minus
--     @scratchOffset@
--
-- -   If @update@ is 'Vulkan.Core10.BaseType.TRUE', the @size@ member of
--     the 'Vulkan.Core10.MemoryManagement.MemoryRequirements' structure
--     returned from a call to
--     'getAccelerationStructureMemoryRequirementsNV' with
--     'AccelerationStructureMemoryRequirementsInfoNV'::@accelerationStructure@
--     set to @dst@ and
--     'AccelerationStructureMemoryRequirementsInfoNV'::@type@ set to
--     'ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_UPDATE_SCRATCH_NV'
--     /must/ be less than or equal to the size of @scratch@ minus
--     @scratchOffset@
--
-- -   @scratch@ /must/ have been created with
--     'BUFFER_USAGE_RAY_TRACING_BIT_NV' usage flag
--
-- -   If @instanceData@ is not 'Vulkan.Core10.APIConstants.NULL_HANDLE',
--     @instanceData@ /must/ have been created with
--     'BUFFER_USAGE_RAY_TRACING_BIT_NV' usage flag
--
-- -   If @update@ is 'Vulkan.Core10.BaseType.TRUE', then objects that were
--     previously active /must/ not be made inactive as per
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#acceleration-structure-inactive-prims>
--
-- -   If @update@ is 'Vulkan.Core10.BaseType.TRUE', then objects that were
--     previously inactive /must/ not be made active as per
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#acceleration-structure-inactive-prims>
--
-- -   If @update@ is 'Vulkan.Core10.BaseType.TRUE', the @src@ and @dst@
--     objects /must/ either be the same object or not have any
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#resources-memory-aliasing memory aliasing>
--
-- == Valid Usage (Implicit)
--
-- -   @commandBuffer@ /must/ be a valid
--     'Vulkan.Core10.Handles.CommandBuffer' handle
--
-- -   @pInfo@ /must/ be a valid pointer to a valid
--     'AccelerationStructureInfoNV' structure
--
-- -   If @instanceData@ is not 'Vulkan.Core10.APIConstants.NULL_HANDLE',
--     @instanceData@ /must/ be a valid 'Vulkan.Core10.Handles.Buffer'
--     handle
--
-- -   @dst@ /must/ be a valid
--     'Vulkan.Extensions.Handles.AccelerationStructureKHR' handle
--
-- -   If @src@ is not 'Vulkan.Core10.APIConstants.NULL_HANDLE', @src@
--     /must/ be a valid
--     'Vulkan.Extensions.Handles.AccelerationStructureKHR' handle
--
-- -   @scratch@ /must/ be a valid 'Vulkan.Core10.Handles.Buffer' handle
--
-- -   @commandBuffer@ /must/ be in the
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>
--
-- -   The 'Vulkan.Core10.Handles.CommandPool' that @commandBuffer@ was
--     allocated from /must/ support compute operations
--
-- -   This command /must/ only be called outside of a render pass instance
--
-- -   Each of @commandBuffer@, @dst@, @instanceData@, @scratch@, and @src@
--     that are valid handles of non-ignored parameters /must/ have been
--     created, allocated, or retrieved from the same
--     'Vulkan.Core10.Handles.Device'
--
-- == Host Synchronization
--
-- -   Host access to the 'Vulkan.Core10.Handles.CommandPool' that
--     @commandBuffer@ was allocated from /must/ be externally synchronized
--
-- == Command Properties
--
-- \'
--
-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+
-- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |
-- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================+
-- | Primary                                                                                                                    | Outside                                                                                                                | Compute                                                                                                               |                                                                                                                                     |
-- | Secondary                                                                                                                  |                                                                                                                        |                                                                                                                       |                                                                                                                                     |
-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+
--
-- = See Also
--
-- 'AccelerationStructureInfoNV',
-- 'Vulkan.Extensions.Handles.AccelerationStructureKHR',
-- 'Vulkan.Core10.BaseType.Bool32', 'Vulkan.Core10.Handles.Buffer',
-- 'Vulkan.Core10.Handles.CommandBuffer',
-- 'Vulkan.Core10.BaseType.DeviceSize'
cmdBuildAccelerationStructureNV :: forall io . MonadIO io => CommandBuffer -> AccelerationStructureInfoNV -> ("instanceData" ::: Buffer) -> ("instanceOffset" ::: DeviceSize) -> ("update" ::: Bool) -> ("dst" ::: AccelerationStructureKHR) -> ("src" ::: AccelerationStructureKHR) -> ("scratch" ::: Buffer) -> ("scratchOffset" ::: DeviceSize) -> io ()
cmdBuildAccelerationStructureNV :: CommandBuffer
-> AccelerationStructureInfoNV
-> ("instanceData" ::: Buffer)
-> ("instanceOffset" ::: DeviceSize)
-> Bool
-> AccelerationStructureNV
-> AccelerationStructureNV
-> ("instanceData" ::: Buffer)
-> ("instanceOffset" ::: DeviceSize)
-> io ()
cmdBuildAccelerationStructureNV commandBuffer :: CommandBuffer
commandBuffer info :: AccelerationStructureInfoNV
info instanceData :: "instanceData" ::: Buffer
instanceData instanceOffset :: "instanceOffset" ::: DeviceSize
instanceOffset update :: Bool
update dst :: AccelerationStructureNV
dst src :: AccelerationStructureNV
src scratch :: "instanceData" ::: Buffer
scratch scratchOffset :: "instanceOffset" ::: DeviceSize
scratchOffset = IO () -> io ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> io ())
-> (ContT () IO () -> IO ()) -> ContT () IO () -> io ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT () IO () -> IO ()
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT () IO () -> io ()) -> ContT () IO () -> io ()
forall a b. (a -> b) -> a -> b
$ do
  let 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 (CommandBuffer -> DeviceCmds
deviceCmds (CommandBuffer
commandBuffer :: CommandBuffer))
  IO () -> ContT () IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT () IO ()) -> IO () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
  (Ptr CommandBuffer_T
   -> ("pInfo" ::: Ptr AccelerationStructureInfoNV)
   -> ("instanceData" ::: Buffer)
   -> ("instanceOffset" ::: DeviceSize)
   -> ("update" ::: Bool32)
   -> AccelerationStructureNV
   -> AccelerationStructureNV
   -> ("instanceData" ::: Buffer)
   -> ("instanceOffset" ::: DeviceSize)
   -> IO ())
vkCmdBuildAccelerationStructureNVPtr FunPtr
  (Ptr CommandBuffer_T
   -> ("pInfo" ::: Ptr AccelerationStructureInfoNV)
   -> ("instanceData" ::: Buffer)
   -> ("instanceOffset" ::: DeviceSize)
   -> ("update" ::: Bool32)
   -> AccelerationStructureNV
   -> AccelerationStructureNV
   -> ("instanceData" ::: Buffer)
   -> ("instanceOffset" ::: DeviceSize)
   -> IO ())
-> FunPtr
     (Ptr CommandBuffer_T
      -> ("pInfo" ::: Ptr AccelerationStructureInfoNV)
      -> ("instanceData" ::: Buffer)
      -> ("instanceOffset" ::: DeviceSize)
      -> ("update" ::: Bool32)
      -> AccelerationStructureNV
      -> AccelerationStructureNV
      -> ("instanceData" ::: Buffer)
      -> ("instanceOffset" ::: DeviceSize)
      -> IO ())
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
  (Ptr CommandBuffer_T
   -> ("pInfo" ::: Ptr AccelerationStructureInfoNV)
   -> ("instanceData" ::: Buffer)
   -> ("instanceOffset" ::: DeviceSize)
   -> ("update" ::: Bool32)
   -> AccelerationStructureNV
   -> AccelerationStructureNV
   -> ("instanceData" ::: Buffer)
   -> ("instanceOffset" ::: DeviceSize)
   -> IO ())
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
    IOException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument "" "The function pointer for vkCmdBuildAccelerationStructureNV is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
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 <- ((("pInfo" ::: Ptr AccelerationStructureInfoNV) -> IO ()) -> IO ())
-> ContT () IO ("pInfo" ::: Ptr AccelerationStructureInfoNV)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pInfo" ::: Ptr AccelerationStructureInfoNV) -> IO ())
  -> IO ())
 -> ContT () IO ("pInfo" ::: Ptr AccelerationStructureInfoNV))
-> ((("pInfo" ::: Ptr AccelerationStructureInfoNV) -> IO ())
    -> IO ())
-> ContT () IO ("pInfo" ::: Ptr AccelerationStructureInfoNV)
forall a b. (a -> b) -> a -> b
$ AccelerationStructureInfoNV
-> (("pInfo" ::: Ptr AccelerationStructureInfoNV) -> IO ())
-> IO ()
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (AccelerationStructureInfoNV
info)
  IO () -> ContT () IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT () IO ()) -> IO () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ Ptr CommandBuffer_T
-> ("pInfo" ::: Ptr 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)
  () -> ContT () IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure (() -> ContT () IO ()) -> () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ ()


foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
  unsafe
#endif
  "dynamic" 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 ()

-- | vkCmdTraceRaysNV - Initialize a ray tracing dispatch
--
-- = Parameters
--
-- -   @commandBuffer@ is the command buffer into which the command will be
--     recorded.
--
-- -   @raygenShaderBindingTableBuffer@ is the buffer object that holds the
--     shader binding table data for the ray generation shader stage.
--
-- -   @raygenShaderBindingOffset@ is the offset in bytes (relative to
--     @raygenShaderBindingTableBuffer@) of the ray generation shader being
--     used for the trace.
--
-- -   @missShaderBindingTableBuffer@ is the buffer object that holds the
--     shader binding table data for the miss shader stage.
--
-- -   @missShaderBindingOffset@ is the offset in bytes (relative to
--     @missShaderBindingTableBuffer@) of the miss shader being used for
--     the trace.
--
-- -   @missShaderBindingStride@ is the size in bytes of each shader
--     binding table record in @missShaderBindingTableBuffer@.
--
-- -   @hitShaderBindingTableBuffer@ is the buffer object that holds the
--     shader binding table data for the hit shader stages.
--
-- -   @hitShaderBindingOffset@ is the offset in bytes (relative to
--     @hitShaderBindingTableBuffer@) of the hit shader group being used
--     for the trace.
--
-- -   @hitShaderBindingStride@ is the size in bytes of each shader binding
--     table record in @hitShaderBindingTableBuffer@.
--
-- -   @callableShaderBindingTableBuffer@ is the buffer object that holds
--     the shader binding table data for the callable shader stage.
--
-- -   @callableShaderBindingOffset@ is the offset in bytes (relative to
--     @callableShaderBindingTableBuffer@) of the callable shader being
--     used for the trace.
--
-- -   @callableShaderBindingStride@ is the size in bytes of each shader
--     binding table record in @callableShaderBindingTableBuffer@.
--
-- -   @width@ is the width of the ray trace query dimensions.
--
-- -   @height@ is height of the ray trace query dimensions.
--
-- -   @depth@ is depth of the ray trace query dimensions.
--
-- = Description
--
-- When the command is executed, a ray generation group of @width@ ×
-- @height@ × @depth@ rays is assembled.
--
-- == Valid Usage
--
-- -   If a 'Vulkan.Core10.Handles.ImageView' is sampled with
--     'Vulkan.Core10.Enums.Filter.FILTER_LINEAR' as a result of this
--     command, then the image view’s
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#resources-image-view-format-features format features>
--     /must/ contain
--     'Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT'
--
-- -   If a 'Vulkan.Core10.Handles.ImageView' is accessed using atomic
--     operations as a result of this command, then the image view’s
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#resources-image-view-format-features format features>
--     /must/ contain
--     'Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT'
--
-- -   If a 'Vulkan.Core10.Handles.ImageView' is sampled with
--     'Vulkan.Extensions.VK_EXT_filter_cubic.FILTER_CUBIC_EXT' as a result
--     of this command, then the image view’s
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#resources-image-view-format-features format features>
--     /must/ contain
--     'Vulkan.Extensions.VK_EXT_filter_cubic.FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT'
--
-- -   Any 'Vulkan.Core10.Handles.ImageView' being sampled with
--     'Vulkan.Extensions.VK_EXT_filter_cubic.FILTER_CUBIC_EXT' as a result
--     of this command /must/ have a
--     'Vulkan.Core10.Enums.ImageViewType.ImageViewType' and format that
--     supports cubic filtering, as specified by
--     'Vulkan.Extensions.VK_EXT_filter_cubic.FilterCubicImageViewImageFormatPropertiesEXT'::@filterCubic@
--     returned by
--     'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.getPhysicalDeviceImageFormatProperties2'
--
-- -   Any 'Vulkan.Core10.Handles.ImageView' being sampled with
--     'Vulkan.Extensions.VK_EXT_filter_cubic.FILTER_CUBIC_EXT' with a
--     reduction mode of either
--     'Vulkan.Core12.Enums.SamplerReductionMode.SAMPLER_REDUCTION_MODE_MIN'
--     or
--     'Vulkan.Core12.Enums.SamplerReductionMode.SAMPLER_REDUCTION_MODE_MAX'
--     as a result of this command /must/ have a
--     'Vulkan.Core10.Enums.ImageViewType.ImageViewType' and format that
--     supports cubic filtering together with minmax filtering, as
--     specified by
--     'Vulkan.Extensions.VK_EXT_filter_cubic.FilterCubicImageViewImageFormatPropertiesEXT'::@filterCubicMinmax@
--     returned by
--     'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.getPhysicalDeviceImageFormatProperties2'
--
-- -   Any 'Vulkan.Core10.Handles.Image' created with a
--     'Vulkan.Core10.Image.ImageCreateInfo'::@flags@ containing
--     'Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_CORNER_SAMPLED_BIT_NV'
--     sampled as a result of this command /must/ only be sampled using a
--     'Vulkan.Core10.Enums.SamplerAddressMode.SamplerAddressMode' of
--     'Vulkan.Core10.Enums.SamplerAddressMode.SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE'
--
-- -   For each set /n/ that is statically used by the
--     'Vulkan.Core10.Handles.Pipeline' bound to the pipeline bind point
--     used by this command, a descriptor set /must/ have been bound to /n/
--     at the same pipeline bind point, with a
--     'Vulkan.Core10.Handles.PipelineLayout' that is compatible for set
--     /n/, with the 'Vulkan.Core10.Handles.PipelineLayout' used to create
--     the current 'Vulkan.Core10.Handles.Pipeline', as described in
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#descriptorsets-compatibility ???>
--
-- -   For each push constant that is statically used by the
--     'Vulkan.Core10.Handles.Pipeline' bound to the pipeline bind point
--     used by this command, a push constant value /must/ have been set for
--     the same pipeline bind point, with a
--     'Vulkan.Core10.Handles.PipelineLayout' that is compatible for push
--     constants, with the 'Vulkan.Core10.Handles.PipelineLayout' used to
--     create the current 'Vulkan.Core10.Handles.Pipeline', as described in
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#descriptorsets-compatibility ???>
--
-- -   Descriptors in each bound descriptor set, specified via
--     'Vulkan.Core10.CommandBufferBuilding.cmdBindDescriptorSets', /must/
--     be valid if they are statically used by the
--     'Vulkan.Core10.Handles.Pipeline' bound to the pipeline bind point
--     used by this command
--
-- -   A valid pipeline /must/ be bound to the pipeline bind point used by
--     this command
--
-- -   If the 'Vulkan.Core10.Handles.Pipeline' object bound to the pipeline
--     bind point used by this command requires any dynamic state, that
--     state /must/ have been set for @commandBuffer@, and done so after
--     any previously bound pipeline with the corresponding state not
--     specified as dynamic
--
-- -   There /must/ not have been any calls to dynamic state setting
--     commands for any state not specified as dynamic in the
--     'Vulkan.Core10.Handles.Pipeline' object bound to the pipeline bind
--     point used by this command, since that pipeline was bound
--
-- -   If the 'Vulkan.Core10.Handles.Pipeline' object bound to the pipeline
--     bind point used by this command accesses a
--     'Vulkan.Core10.Handles.Sampler' object that uses unnormalized
--     coordinates, that sampler /must/ not be used to sample from any
--     'Vulkan.Core10.Handles.Image' with a
--     'Vulkan.Core10.Handles.ImageView' of the type
--     'Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_3D',
--     'Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_CUBE',
--     'Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_1D_ARRAY',
--     'Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_2D_ARRAY' or
--     'Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_CUBE_ARRAY', in
--     any shader stage
--
-- -   If the 'Vulkan.Core10.Handles.Pipeline' object bound to the pipeline
--     bind point used by this command accesses a
--     'Vulkan.Core10.Handles.Sampler' object that uses unnormalized
--     coordinates, that sampler /must/ not be used with any of the SPIR-V
--     @OpImageSample*@ or @OpImageSparseSample*@ instructions with
--     @ImplicitLod@, @Dref@ or @Proj@ in their name, in any shader stage
--
-- -   If the 'Vulkan.Core10.Handles.Pipeline' object bound to the pipeline
--     bind point used by this command accesses a
--     'Vulkan.Core10.Handles.Sampler' object that uses unnormalized
--     coordinates, that sampler /must/ not be used with any of the SPIR-V
--     @OpImageSample*@ or @OpImageSparseSample*@ instructions that
--     includes a LOD bias or any offset values, in any shader stage
--
-- -   If the
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-robustBufferAccess robust buffer access>
--     feature is not enabled, and if the 'Vulkan.Core10.Handles.Pipeline'
--     object bound to the pipeline bind point used by this command
--     accesses a uniform buffer, it /must/ not access values outside of
--     the range of the buffer as specified in the descriptor set bound to
--     the same pipeline bind point
--
-- -   If the
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-robustBufferAccess robust buffer access>
--     feature is not enabled, and if the 'Vulkan.Core10.Handles.Pipeline'
--     object bound to the pipeline bind point used by this command
--     accesses a storage buffer, it /must/ not access values outside of
--     the range of the buffer as specified in the descriptor set bound to
--     the same pipeline bind point
--
-- -   If @commandBuffer@ is an unprotected command buffer, any resource
--     accessed by the 'Vulkan.Core10.Handles.Pipeline' object bound to the
--     pipeline bind point used by this command /must/ not be a protected
--     resource
--
-- -   Any shader group handle referenced by this call /must/ have been
--     queried from the currently bound ray tracing shader pipeline
--
-- -   This command /must/ not cause a shader call instruction to be
--     executed from a shader invocation with a
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#ray-tracing-recursion-depth recursion depth>
--     greater than the value of @maxRecursionDepth@ used to create the
--     bound ray tracing pipeline
--
-- -   If @commandBuffer@ is a protected command buffer, any resource
--     written to by the 'Vulkan.Core10.Handles.Pipeline' object bound to
--     the pipeline bind point used by this command /must/ not be an
--     unprotected resource
--
-- -   If @commandBuffer@ is a protected command buffer, pipeline stages
--     other than the framebuffer-space and compute stages in the
--     'Vulkan.Core10.Handles.Pipeline' object bound to the pipeline bind
--     point /must/ not write to any resource
--
-- -   If @raygenShaderBindingTableBuffer@ is non-sparse then it /must/ be
--     bound completely and contiguously to a single
--     'Vulkan.Core10.Handles.DeviceMemory' object
--
-- -   @raygenShaderBindingOffset@ /must/ be less than the size of
--     @raygenShaderBindingTableBuffer@
--
-- -   @raygenShaderBindingOffset@ /must/ be a multiple of
--     'PhysicalDeviceRayTracingPropertiesNV'::@shaderGroupBaseAlignment@
--
-- -   If @missShaderBindingTableBuffer@ is non-sparse then it /must/ be
--     bound completely and contiguously to a single
--     'Vulkan.Core10.Handles.DeviceMemory' object
--
-- -   @missShaderBindingOffset@ /must/ be less than the size of
--     @missShaderBindingTableBuffer@
--
-- -   @missShaderBindingOffset@ /must/ be a multiple of
--     'PhysicalDeviceRayTracingPropertiesNV'::@shaderGroupBaseAlignment@
--
-- -   If @hitShaderBindingTableBuffer@ is non-sparse then it /must/ be
--     bound completely and contiguously to a single
--     'Vulkan.Core10.Handles.DeviceMemory' object
--
-- -   @hitShaderBindingOffset@ /must/ be less than the size of
--     @hitShaderBindingTableBuffer@
--
-- -   @hitShaderBindingOffset@ /must/ be a multiple of
--     'PhysicalDeviceRayTracingPropertiesNV'::@shaderGroupBaseAlignment@
--
-- -   If @callableShaderBindingTableBuffer@ is non-sparse then it /must/
--     be bound completely and contiguously to a single
--     'Vulkan.Core10.Handles.DeviceMemory' object
--
-- -   @callableShaderBindingOffset@ /must/ be less than the size of
--     @callableShaderBindingTableBuffer@
--
-- -   @callableShaderBindingOffset@ /must/ be a multiple of
--     'PhysicalDeviceRayTracingPropertiesNV'::@shaderGroupBaseAlignment@
--
-- -   @missShaderBindingStride@ /must/ be a multiple of
--     'PhysicalDeviceRayTracingPropertiesNV'::@shaderGroupHandleSize@
--
-- -   @hitShaderBindingStride@ /must/ be a multiple of
--     'PhysicalDeviceRayTracingPropertiesNV'::@shaderGroupHandleSize@
--
-- -   @callableShaderBindingStride@ /must/ be a multiple of
--     'PhysicalDeviceRayTracingPropertiesNV'::@shaderGroupHandleSize@
--
-- -   @missShaderBindingStride@ /must/ be less than or equal to
--     'PhysicalDeviceRayTracingPropertiesNV'::@maxShaderGroupStride@
--
-- -   @hitShaderBindingStride@ /must/ be less than or equal to
--     'PhysicalDeviceRayTracingPropertiesNV'::@maxShaderGroupStride@
--
-- -   @callableShaderBindingStride@ /must/ be less than or equal to
--     'PhysicalDeviceRayTracingPropertiesNV'::@maxShaderGroupStride@
--
-- -   @width@ /must/ be less than or equal to
--     'Vulkan.Core10.DeviceInitialization.PhysicalDeviceLimits'::@maxComputeWorkGroupCount@[0]
--
-- -   @height@ /must/ be less than or equal to
--     'Vulkan.Core10.DeviceInitialization.PhysicalDeviceLimits'::@maxComputeWorkGroupCount@[1]
--
-- -   @depth@ /must/ be less than or equal to
--     'Vulkan.Core10.DeviceInitialization.PhysicalDeviceLimits'::@maxComputeWorkGroupCount@[2]
--
-- == Valid Usage (Implicit)
--
-- -   @commandBuffer@ /must/ be a valid
--     'Vulkan.Core10.Handles.CommandBuffer' handle
--
-- -   @raygenShaderBindingTableBuffer@ /must/ be a valid
--     'Vulkan.Core10.Handles.Buffer' handle
--
-- -   If @missShaderBindingTableBuffer@ is not
--     'Vulkan.Core10.APIConstants.NULL_HANDLE',
--     @missShaderBindingTableBuffer@ /must/ be a valid
--     'Vulkan.Core10.Handles.Buffer' handle
--
-- -   If @hitShaderBindingTableBuffer@ is not
--     'Vulkan.Core10.APIConstants.NULL_HANDLE',
--     @hitShaderBindingTableBuffer@ /must/ be a valid
--     'Vulkan.Core10.Handles.Buffer' handle
--
-- -   If @callableShaderBindingTableBuffer@ is not
--     'Vulkan.Core10.APIConstants.NULL_HANDLE',
--     @callableShaderBindingTableBuffer@ /must/ be a valid
--     'Vulkan.Core10.Handles.Buffer' handle
--
-- -   @commandBuffer@ /must/ be in the
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>
--
-- -   The 'Vulkan.Core10.Handles.CommandPool' that @commandBuffer@ was
--     allocated from /must/ support compute operations
--
-- -   This command /must/ only be called outside of a render pass instance
--
-- -   Each of @callableShaderBindingTableBuffer@, @commandBuffer@,
--     @hitShaderBindingTableBuffer@, @missShaderBindingTableBuffer@, and
--     @raygenShaderBindingTableBuffer@ that are valid handles of
--     non-ignored parameters /must/ have been created, allocated, or
--     retrieved from the same 'Vulkan.Core10.Handles.Device'
--
-- == Host Synchronization
--
-- -   Host access to the 'Vulkan.Core10.Handles.CommandPool' that
--     @commandBuffer@ was allocated from /must/ be externally synchronized
--
-- == Command Properties
--
-- \'
--
-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+
-- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#synchronization-pipeline-stages-types Pipeline Type> |
-- +============================================================================================================================+========================================================================================================================+=======================================================================================================================+=====================================================================================================================================+
-- | Primary                                                                                                                    | Outside                                                                                                                | Compute                                                                                                               |                                                                                                                                     |
-- | Secondary                                                                                                                  |                                                                                                                        |                                                                                                                       |                                                                                                                                     |
-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+
--
-- = See Also
--
-- 'Vulkan.Core10.Handles.Buffer', 'Vulkan.Core10.Handles.CommandBuffer',
-- 'Vulkan.Core10.BaseType.DeviceSize'
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 :: 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
commandBuffer raygenShaderBindingTableBuffer :: "instanceData" ::: Buffer
raygenShaderBindingTableBuffer raygenShaderBindingOffset :: "instanceOffset" ::: DeviceSize
raygenShaderBindingOffset missShaderBindingTableBuffer :: "instanceData" ::: Buffer
missShaderBindingTableBuffer missShaderBindingOffset :: "instanceOffset" ::: DeviceSize
missShaderBindingOffset missShaderBindingStride :: "instanceOffset" ::: DeviceSize
missShaderBindingStride hitShaderBindingTableBuffer :: "instanceData" ::: Buffer
hitShaderBindingTableBuffer hitShaderBindingOffset :: "instanceOffset" ::: DeviceSize
hitShaderBindingOffset hitShaderBindingStride :: "instanceOffset" ::: DeviceSize
hitShaderBindingStride callableShaderBindingTableBuffer :: "instanceData" ::: Buffer
callableShaderBindingTableBuffer callableShaderBindingOffset :: "instanceOffset" ::: DeviceSize
callableShaderBindingOffset callableShaderBindingStride :: "instanceOffset" ::: DeviceSize
callableShaderBindingStride width :: "shader" ::: Word32
width height :: "shader" ::: Word32
height depth :: "shader" ::: Word32
depth = IO () -> io ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> io ()) -> IO () -> io ()
forall a b. (a -> b) -> a -> b
$ do
  let 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 (CommandBuffer -> DeviceCmds
deviceCmds (CommandBuffer
commandBuffer :: CommandBuffer))
  Bool -> IO () -> IO ()
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 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 ())
-> 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 ())
-> Bool
forall a. Eq a => a -> a -> Bool
/= 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 ())
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
    IOException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument "" "The function pointer for vkCmdTraceRaysNV is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
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
  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)
  () -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure (() -> IO ()) -> () -> IO ()
forall a b. (a -> b) -> a -> b
$ ()


foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
  unsafe
#endif
  "dynamic" mkVkGetAccelerationStructureHandleNV
  :: FunPtr (Ptr Device_T -> AccelerationStructureKHR -> CSize -> Ptr () -> IO Result) -> Ptr Device_T -> AccelerationStructureKHR -> CSize -> Ptr () -> IO Result

-- | vkGetAccelerationStructureHandleNV - Get opaque acceleration structure
-- handle
--
-- = Parameters
--
-- -   @device@ is the logical device that owns the acceleration
--     structures.
--
-- -   @accelerationStructure@ is the acceleration structure.
--
-- -   @dataSize@ is the size in bytes of the buffer pointed to by @pData@.
--
-- -   @pData@ is a pointer to a user-allocated buffer where the results
--     will be written.
--
-- == Return Codes
--
-- [<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fundamentals-successcodes Success>]
--
--     -   'Vulkan.Core10.Enums.Result.SUCCESS'
--
-- [<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fundamentals-errorcodes Failure>]
--
--     -   'Vulkan.Core10.Enums.Result.ERROR_OUT_OF_HOST_MEMORY'
--
--     -   'Vulkan.Core10.Enums.Result.ERROR_OUT_OF_DEVICE_MEMORY'
--
-- = See Also
--
-- 'Vulkan.Extensions.Handles.AccelerationStructureKHR',
-- 'Vulkan.Core10.Handles.Device'
getAccelerationStructureHandleNV :: forall io . MonadIO io => Device -> AccelerationStructureKHR -> ("dataSize" ::: Word64) -> ("data" ::: Ptr ()) -> io ()
getAccelerationStructureHandleNV :: Device
-> AccelerationStructureNV
-> ("instanceOffset" ::: DeviceSize)
-> ("data" ::: Ptr ())
-> io ()
getAccelerationStructureHandleNV device :: Device
device accelerationStructure :: AccelerationStructureNV
accelerationStructure dataSize :: "instanceOffset" ::: DeviceSize
dataSize data' :: "data" ::: Ptr ()
data' = IO () -> io ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> io ()) -> IO () -> io ()
forall a b. (a -> b) -> a -> b
$ do
  let 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 (Device -> DeviceCmds
deviceCmds (Device
device :: Device))
  Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
  (Ptr Device_T
   -> AccelerationStructureNV
   -> ("dataSize" ::: CSize)
   -> ("data" ::: Ptr ())
   -> IO Result)
vkGetAccelerationStructureHandleNVPtr FunPtr
  (Ptr Device_T
   -> AccelerationStructureNV
   -> ("dataSize" ::: CSize)
   -> ("data" ::: Ptr ())
   -> IO Result)
-> FunPtr
     (Ptr Device_T
      -> AccelerationStructureNV
      -> ("dataSize" ::: CSize)
      -> ("data" ::: Ptr ())
      -> IO Result)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
  (Ptr Device_T
   -> AccelerationStructureNV
   -> ("dataSize" ::: CSize)
   -> ("data" ::: Ptr ())
   -> IO Result)
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
    IOException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument "" "The function pointer for vkGetAccelerationStructureHandleNV is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
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 <- 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')
  Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Result
r Result -> Result -> Bool
forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (VulkanException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (Result -> VulkanException
VulkanException Result
r))


foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
  unsafe
#endif
  "dynamic" mkVkCreateRayTracingPipelinesNV
  :: FunPtr (Ptr Device_T -> PipelineCache -> Word32 -> Ptr (RayTracingPipelineCreateInfoNV a) -> Ptr AllocationCallbacks -> Ptr Pipeline -> IO Result) -> Ptr Device_T -> PipelineCache -> Word32 -> Ptr (RayTracingPipelineCreateInfoNV a) -> Ptr AllocationCallbacks -> Ptr Pipeline -> IO Result

-- | vkCreateRayTracingPipelinesNV - Creates a new ray tracing pipeline
-- object
--
-- = Parameters
--
-- -   @device@ is the logical device that creates the ray tracing
--     pipelines.
--
-- -   @pipelineCache@ is either 'Vulkan.Core10.APIConstants.NULL_HANDLE',
--     indicating that pipeline caching is disabled, or the handle of a
--     valid
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#pipelines-cache pipeline cache>
--     object, in which case use of that cache is enabled for the duration
--     of the command.
--
-- -   @createInfoCount@ is the length of the @pCreateInfos@ and
--     @pPipelines@ arrays.
--
-- -   @pCreateInfos@ is a pointer to an array of
--     'RayTracingPipelineCreateInfoNV' structures.
--
-- -   @pAllocator@ controls host memory allocation as described in the
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#memory-allocation Memory Allocation>
--     chapter.
--
-- -   @pPipelines@ is a pointer to an array in which the resulting ray
--     tracing pipeline objects are returned.
--
-- == Valid Usage
--
-- -   If the @flags@ member of any element of @pCreateInfos@ contains the
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_DERIVATIVE_BIT'
--     flag, and the @basePipelineIndex@ member of that same element is not
--     @-1@, @basePipelineIndex@ /must/ be less than the index into
--     @pCreateInfos@ that corresponds to that element
--
-- -   If the @flags@ member of any element of @pCreateInfos@ contains the
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_DERIVATIVE_BIT'
--     flag, the base pipeline /must/ have been created with the
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT'
--     flag set
--
-- -   If @pipelineCache@ was created with
--     'Vulkan.Core10.Enums.PipelineCacheCreateFlagBits.PIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT_EXT',
--     host access to @pipelineCache@ /must/ be
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fundamentals-threadingbehavior externally synchronized>
--
-- == Valid Usage (Implicit)
--
-- -   @device@ /must/ be a valid 'Vulkan.Core10.Handles.Device' handle
--
-- -   If @pipelineCache@ is not 'Vulkan.Core10.APIConstants.NULL_HANDLE',
--     @pipelineCache@ /must/ be a valid
--     'Vulkan.Core10.Handles.PipelineCache' handle
--
-- -   @pCreateInfos@ /must/ be a valid pointer to an array of
--     @createInfoCount@ valid 'RayTracingPipelineCreateInfoNV' structures
--
-- -   If @pAllocator@ is not @NULL@, @pAllocator@ /must/ be a valid
--     pointer to a valid
--     'Vulkan.Core10.AllocationCallbacks.AllocationCallbacks' structure
--
-- -   @pPipelines@ /must/ be a valid pointer to an array of
--     @createInfoCount@ 'Vulkan.Core10.Handles.Pipeline' handles
--
-- -   @createInfoCount@ /must/ be greater than @0@
--
-- -   If @pipelineCache@ is a valid handle, it /must/ have been created,
--     allocated, or retrieved from @device@
--
-- == Return Codes
--
-- [<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fundamentals-successcodes Success>]
--
--     -   'Vulkan.Core10.Enums.Result.SUCCESS'
--
--     -   'Vulkan.Core10.Enums.Result.PIPELINE_COMPILE_REQUIRED_EXT'
--
-- [<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fundamentals-errorcodes Failure>]
--
--     -   'Vulkan.Core10.Enums.Result.ERROR_OUT_OF_HOST_MEMORY'
--
--     -   'Vulkan.Core10.Enums.Result.ERROR_OUT_OF_DEVICE_MEMORY'
--
--     -   'Vulkan.Core10.Enums.Result.ERROR_INVALID_SHADER_NV'
--
-- = See Also
--
-- 'Vulkan.Core10.AllocationCallbacks.AllocationCallbacks',
-- 'Vulkan.Core10.Handles.Device', 'Vulkan.Core10.Handles.Pipeline',
-- 'Vulkan.Core10.Handles.PipelineCache', 'RayTracingPipelineCreateInfoNV'
createRayTracingPipelinesNV :: forall io . MonadIO io => Device -> PipelineCache -> ("createInfos" ::: Vector (SomeStruct RayTracingPipelineCreateInfoNV)) -> ("allocator" ::: Maybe AllocationCallbacks) -> io (Result, ("pipelines" ::: Vector Pipeline))
createRayTracingPipelinesNV :: Device
-> PipelineCache
-> ("createInfos"
    ::: Vector (SomeStruct RayTracingPipelineCreateInfoNV))
-> ("allocator" ::: Maybe AllocationCallbacks)
-> io (Result, "pipelines" ::: Vector Pipeline)
createRayTracingPipelinesNV device :: Device
device pipelineCache :: PipelineCache
pipelineCache createInfos :: "createInfos"
::: Vector (SomeStruct RayTracingPipelineCreateInfoNV)
createInfos allocator :: "allocator" ::: Maybe AllocationCallbacks
allocator = IO (Result, "pipelines" ::: Vector Pipeline)
-> io (Result, "pipelines" ::: Vector Pipeline)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Result, "pipelines" ::: Vector Pipeline)
 -> io (Result, "pipelines" ::: Vector Pipeline))
-> (ContT
      (Result, "pipelines" ::: Vector Pipeline)
      IO
      (Result, "pipelines" ::: Vector Pipeline)
    -> IO (Result, "pipelines" ::: Vector Pipeline))
-> ContT
     (Result, "pipelines" ::: Vector Pipeline)
     IO
     (Result, "pipelines" ::: Vector Pipeline)
-> io (Result, "pipelines" ::: Vector Pipeline)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT
  (Result, "pipelines" ::: Vector Pipeline)
  IO
  (Result, "pipelines" ::: Vector Pipeline)
-> IO (Result, "pipelines" ::: Vector Pipeline)
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT
   (Result, "pipelines" ::: Vector Pipeline)
   IO
   (Result, "pipelines" ::: Vector Pipeline)
 -> io (Result, "pipelines" ::: Vector Pipeline))
-> ContT
     (Result, "pipelines" ::: Vector Pipeline)
     IO
     (Result, "pipelines" ::: Vector Pipeline)
-> io (Result, "pipelines" ::: Vector Pipeline)
forall a b. (a -> b) -> a -> b
$ do
  let vkCreateRayTracingPipelinesNVPtr :: FunPtr
  (Ptr Device_T
   -> PipelineCache
   -> ("shader" ::: Word32)
   -> ("pCreateInfos" ::: Ptr (RayTracingPipelineCreateInfoNV Any))
   -> ("pAllocator" ::: Ptr AllocationCallbacks)
   -> ("pPipelines" ::: Ptr Pipeline)
   -> IO Result)
vkCreateRayTracingPipelinesNVPtr = DeviceCmds
-> forall (a :: [*]).
   FunPtr
     (Ptr Device_T
      -> PipelineCache
      -> ("shader" ::: Word32)
      -> ("pCreateInfos" ::: Ptr (RayTracingPipelineCreateInfoNV a))
      -> ("pAllocator" ::: Ptr AllocationCallbacks)
      -> ("pPipelines" ::: Ptr Pipeline)
      -> IO Result)
pVkCreateRayTracingPipelinesNV (Device -> DeviceCmds
deviceCmds (Device
device :: Device))
  IO () -> ContT (Result, "pipelines" ::: Vector Pipeline) IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT (Result, "pipelines" ::: Vector Pipeline) IO ())
-> IO () -> ContT (Result, "pipelines" ::: Vector Pipeline) IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
  (Ptr Device_T
   -> PipelineCache
   -> ("shader" ::: Word32)
   -> ("pCreateInfos" ::: Ptr (RayTracingPipelineCreateInfoNV Any))
   -> ("pAllocator" ::: Ptr AllocationCallbacks)
   -> ("pPipelines" ::: Ptr Pipeline)
   -> IO Result)
vkCreateRayTracingPipelinesNVPtr FunPtr
  (Ptr Device_T
   -> PipelineCache
   -> ("shader" ::: Word32)
   -> ("pCreateInfos" ::: Ptr (RayTracingPipelineCreateInfoNV Any))
   -> ("pAllocator" ::: Ptr AllocationCallbacks)
   -> ("pPipelines" ::: Ptr Pipeline)
   -> IO Result)
-> FunPtr
     (Ptr Device_T
      -> PipelineCache
      -> ("shader" ::: Word32)
      -> ("pCreateInfos" ::: Ptr (RayTracingPipelineCreateInfoNV Any))
      -> ("pAllocator" ::: Ptr AllocationCallbacks)
      -> ("pPipelines" ::: Ptr Pipeline)
      -> IO Result)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
  (Ptr Device_T
   -> PipelineCache
   -> ("shader" ::: Word32)
   -> ("pCreateInfos" ::: Ptr (RayTracingPipelineCreateInfoNV Any))
   -> ("pAllocator" ::: Ptr AllocationCallbacks)
   -> ("pPipelines" ::: Ptr Pipeline)
   -> IO Result)
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
    IOException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument "" "The function pointer for vkCreateRayTracingPipelinesNV is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
  let vkCreateRayTracingPipelinesNV' :: Ptr Device_T
-> PipelineCache
-> ("shader" ::: Word32)
-> ("pCreateInfos" ::: Ptr (RayTracingPipelineCreateInfoNV Any))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pPipelines" ::: Ptr Pipeline)
-> IO Result
vkCreateRayTracingPipelinesNV' = FunPtr
  (Ptr Device_T
   -> PipelineCache
   -> ("shader" ::: Word32)
   -> ("pCreateInfos" ::: Ptr (RayTracingPipelineCreateInfoNV Any))
   -> ("pAllocator" ::: Ptr AllocationCallbacks)
   -> ("pPipelines" ::: Ptr Pipeline)
   -> IO Result)
-> Ptr Device_T
-> PipelineCache
-> ("shader" ::: Word32)
-> ("pCreateInfos" ::: Ptr (RayTracingPipelineCreateInfoNV Any))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pPipelines" ::: Ptr Pipeline)
-> IO Result
forall (a :: [*]).
FunPtr
  (Ptr Device_T
   -> PipelineCache
   -> ("shader" ::: Word32)
   -> Ptr (RayTracingPipelineCreateInfoNV a)
   -> ("pAllocator" ::: Ptr AllocationCallbacks)
   -> ("pPipelines" ::: Ptr Pipeline)
   -> IO Result)
-> Ptr Device_T
-> PipelineCache
-> ("shader" ::: Word32)
-> Ptr (RayTracingPipelineCreateInfoNV a)
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pPipelines" ::: Ptr Pipeline)
-> IO Result
mkVkCreateRayTracingPipelinesNV FunPtr
  (Ptr Device_T
   -> PipelineCache
   -> ("shader" ::: Word32)
   -> ("pCreateInfos" ::: Ptr (RayTracingPipelineCreateInfoNV Any))
   -> ("pAllocator" ::: Ptr AllocationCallbacks)
   -> ("pPipelines" ::: Ptr Pipeline)
   -> IO Result)
vkCreateRayTracingPipelinesNVPtr
  "pCreateInfos" ::: Ptr (RayTracingPipelineCreateInfoNV Any)
pPCreateInfos <- ((("pCreateInfos" ::: Ptr (RayTracingPipelineCreateInfoNV Any))
  -> IO (Result, "pipelines" ::: Vector Pipeline))
 -> IO (Result, "pipelines" ::: Vector Pipeline))
-> ContT
     (Result, "pipelines" ::: Vector Pipeline)
     IO
     ("pCreateInfos" ::: Ptr (RayTracingPipelineCreateInfoNV Any))
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pCreateInfos" ::: Ptr (RayTracingPipelineCreateInfoNV Any))
   -> IO (Result, "pipelines" ::: Vector Pipeline))
  -> IO (Result, "pipelines" ::: Vector Pipeline))
 -> ContT
      (Result, "pipelines" ::: Vector Pipeline)
      IO
      ("pCreateInfos" ::: Ptr (RayTracingPipelineCreateInfoNV Any)))
-> ((("pCreateInfos" ::: Ptr (RayTracingPipelineCreateInfoNV Any))
     -> IO (Result, "pipelines" ::: Vector Pipeline))
    -> IO (Result, "pipelines" ::: Vector Pipeline))
-> ContT
     (Result, "pipelines" ::: Vector Pipeline)
     IO
     ("pCreateInfos" ::: Ptr (RayTracingPipelineCreateInfoNV Any))
forall a b. (a -> b) -> a -> b
$ Int
-> Int
-> (("pCreateInfos" ::: Ptr (RayTracingPipelineCreateInfoNV Any))
    -> IO (Result, "pipelines" ::: Vector Pipeline))
-> IO (Result, "pipelines" ::: Vector Pipeline)
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned @(RayTracingPipelineCreateInfoNV _) ((("createInfos"
 ::: Vector (SomeStruct RayTracingPipelineCreateInfoNV))
-> Int
forall a. Vector a -> Int
Data.Vector.length ("createInfos"
::: Vector (SomeStruct RayTracingPipelineCreateInfoNV)
createInfos)) Int -> Int -> Int
forall a. Num a => a -> a -> a
* 80) 8
  (Int
 -> SomeStruct RayTracingPipelineCreateInfoNV
 -> ContT (Result, "pipelines" ::: Vector Pipeline) IO ())
-> ("createInfos"
    ::: Vector (SomeStruct RayTracingPipelineCreateInfoNV))
-> ContT (Result, "pipelines" ::: Vector Pipeline) IO ()
forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\i :: Int
i e :: SomeStruct RayTracingPipelineCreateInfoNV
e -> ((() -> IO (Result, "pipelines" ::: Vector Pipeline))
 -> IO (Result, "pipelines" ::: Vector Pipeline))
-> ContT (Result, "pipelines" ::: Vector Pipeline) IO ()
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((() -> IO (Result, "pipelines" ::: Vector Pipeline))
  -> IO (Result, "pipelines" ::: Vector Pipeline))
 -> ContT (Result, "pipelines" ::: Vector Pipeline) IO ())
-> ((() -> IO (Result, "pipelines" ::: Vector Pipeline))
    -> IO (Result, "pipelines" ::: Vector Pipeline))
-> ContT (Result, "pipelines" ::: Vector Pipeline) IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (SomeStruct RayTracingPipelineCreateInfoNV)
-> SomeStruct RayTracingPipelineCreateInfoNV
-> IO (Result, "pipelines" ::: Vector Pipeline)
-> IO (Result, "pipelines" ::: Vector Pipeline)
forall (a :: [*] -> *) b.
(forall (es :: [*]).
 (Extendss a es, PokeChain es) =>
 ToCStruct (a es)) =>
Ptr (SomeStruct a) -> SomeStruct a -> IO b -> IO b
pokeSomeCStruct (("pCreateInfos" ::: Ptr (RayTracingPipelineCreateInfoNV Any))
-> Ptr (SomeStruct RayTracingPipelineCreateInfoNV)
forall (a :: [*] -> *) (es :: [*]).
Ptr (a es) -> Ptr (SomeStruct a)
forgetExtensions ("pCreateInfos" ::: Ptr (RayTracingPipelineCreateInfoNV Any)
pPCreateInfos ("pCreateInfos" ::: Ptr (RayTracingPipelineCreateInfoNV Any))
-> Int -> Ptr (RayTracingPipelineCreateInfoNV _)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (80 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr (RayTracingPipelineCreateInfoNV _))) (SomeStruct RayTracingPipelineCreateInfoNV
e) (IO (Result, "pipelines" ::: Vector Pipeline)
 -> IO (Result, "pipelines" ::: Vector Pipeline))
-> ((() -> IO (Result, "pipelines" ::: Vector Pipeline))
    -> IO (Result, "pipelines" ::: Vector Pipeline))
-> (() -> IO (Result, "pipelines" ::: Vector Pipeline))
-> IO (Result, "pipelines" ::: Vector Pipeline)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((() -> IO (Result, "pipelines" ::: Vector Pipeline))
-> () -> IO (Result, "pipelines" ::: Vector Pipeline)
forall a b. (a -> b) -> a -> b
$ ())) ("createInfos"
::: Vector (SomeStruct RayTracingPipelineCreateInfoNV)
createInfos)
  "pAllocator" ::: Ptr AllocationCallbacks
pAllocator <- case ("allocator" ::: Maybe AllocationCallbacks
allocator) of
    Nothing -> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ContT
     (Result, "pipelines" ::: Vector Pipeline)
     IO
     ("pAllocator" ::: Ptr AllocationCallbacks)
forall (f :: * -> *) a. Applicative f => a -> f a
pure "pAllocator" ::: Ptr AllocationCallbacks
forall a. Ptr a
nullPtr
    Just j :: AllocationCallbacks
j -> ((("pAllocator" ::: Ptr AllocationCallbacks)
  -> IO (Result, "pipelines" ::: Vector Pipeline))
 -> IO (Result, "pipelines" ::: Vector Pipeline))
-> ContT
     (Result, "pipelines" ::: Vector Pipeline)
     IO
     ("pAllocator" ::: Ptr AllocationCallbacks)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pAllocator" ::: Ptr AllocationCallbacks)
   -> IO (Result, "pipelines" ::: Vector Pipeline))
  -> IO (Result, "pipelines" ::: Vector Pipeline))
 -> ContT
      (Result, "pipelines" ::: Vector Pipeline)
      IO
      ("pAllocator" ::: Ptr AllocationCallbacks))
-> ((("pAllocator" ::: Ptr AllocationCallbacks)
     -> IO (Result, "pipelines" ::: Vector Pipeline))
    -> IO (Result, "pipelines" ::: Vector Pipeline))
-> ContT
     (Result, "pipelines" ::: Vector Pipeline)
     IO
     ("pAllocator" ::: Ptr AllocationCallbacks)
forall a b. (a -> b) -> a -> b
$ AllocationCallbacks
-> (("pAllocator" ::: Ptr AllocationCallbacks)
    -> IO (Result, "pipelines" ::: Vector Pipeline))
-> IO (Result, "pipelines" ::: Vector Pipeline)
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (AllocationCallbacks
j)
  "pPipelines" ::: Ptr Pipeline
pPPipelines <- ((("pPipelines" ::: Ptr Pipeline)
  -> IO (Result, "pipelines" ::: Vector Pipeline))
 -> IO (Result, "pipelines" ::: Vector Pipeline))
-> ContT
     (Result, "pipelines" ::: Vector Pipeline)
     IO
     ("pPipelines" ::: Ptr Pipeline)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pPipelines" ::: Ptr Pipeline)
   -> IO (Result, "pipelines" ::: Vector Pipeline))
  -> IO (Result, "pipelines" ::: Vector Pipeline))
 -> ContT
      (Result, "pipelines" ::: Vector Pipeline)
      IO
      ("pPipelines" ::: Ptr Pipeline))
-> ((("pPipelines" ::: Ptr Pipeline)
     -> IO (Result, "pipelines" ::: Vector Pipeline))
    -> IO (Result, "pipelines" ::: Vector Pipeline))
-> ContT
     (Result, "pipelines" ::: Vector Pipeline)
     IO
     ("pPipelines" ::: Ptr Pipeline)
forall a b. (a -> b) -> a -> b
$ IO ("pPipelines" ::: Ptr Pipeline)
-> (("pPipelines" ::: Ptr Pipeline) -> IO ())
-> (("pPipelines" ::: Ptr Pipeline)
    -> IO (Result, "pipelines" ::: Vector Pipeline))
-> IO (Result, "pipelines" ::: Vector Pipeline)
forall a b c. IO a -> (a -> IO b) -> (a -> IO c) -> IO c
bracket (Int -> IO ("pPipelines" ::: Ptr Pipeline)
forall a. Int -> IO (Ptr a)
callocBytes @Pipeline ((("shader" ::: Word32) -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral ((Int -> "shader" ::: Word32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (("createInfos"
 ::: Vector (SomeStruct RayTracingPipelineCreateInfoNV))
-> Int
forall a. Vector a -> Int
Data.Vector.length (("createInfos"
  ::: Vector (SomeStruct RayTracingPipelineCreateInfoNV))
 -> Int)
-> ("createInfos"
    ::: Vector (SomeStruct RayTracingPipelineCreateInfoNV))
-> Int
forall a b. (a -> b) -> a -> b
$ ("createInfos"
::: Vector (SomeStruct RayTracingPipelineCreateInfoNV)
createInfos)) :: Word32))) Int -> Int -> Int
forall a. Num a => a -> a -> a
* 8)) ("pPipelines" ::: Ptr Pipeline) -> IO ()
forall a. Ptr a -> IO ()
free
  Result
r <- IO Result
-> ContT (Result, "pipelines" ::: Vector Pipeline) IO Result
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO Result
 -> ContT (Result, "pipelines" ::: Vector Pipeline) IO Result)
-> IO Result
-> ContT (Result, "pipelines" ::: Vector Pipeline) IO Result
forall a b. (a -> b) -> a -> b
$ Ptr Device_T
-> PipelineCache
-> ("shader" ::: Word32)
-> ("pCreateInfos" ::: Ptr (RayTracingPipelineCreateInfoNV Any))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pPipelines" ::: Ptr Pipeline)
-> IO Result
vkCreateRayTracingPipelinesNV' (Device -> Ptr Device_T
deviceHandle (Device
device)) (PipelineCache
pipelineCache) ((Int -> "shader" ::: Word32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (("createInfos"
 ::: Vector (SomeStruct RayTracingPipelineCreateInfoNV))
-> Int
forall a. Vector a -> Int
Data.Vector.length (("createInfos"
  ::: Vector (SomeStruct RayTracingPipelineCreateInfoNV))
 -> Int)
-> ("createInfos"
    ::: Vector (SomeStruct RayTracingPipelineCreateInfoNV))
-> Int
forall a b. (a -> b) -> a -> b
$ ("createInfos"
::: Vector (SomeStruct RayTracingPipelineCreateInfoNV)
createInfos)) :: Word32)) ("pCreateInfos" ::: Ptr (RayTracingPipelineCreateInfoNV Any)
pPCreateInfos) "pAllocator" ::: Ptr AllocationCallbacks
pAllocator ("pPipelines" ::: Ptr Pipeline
pPPipelines)
  IO () -> ContT (Result, "pipelines" ::: Vector Pipeline) IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT (Result, "pipelines" ::: Vector Pipeline) IO ())
-> IO () -> ContT (Result, "pipelines" ::: Vector Pipeline) IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Result
r Result -> Result -> Bool
forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (VulkanException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (Result -> VulkanException
VulkanException Result
r))
  "pipelines" ::: Vector Pipeline
pPipelines <- IO ("pipelines" ::: Vector Pipeline)
-> ContT
     (Result, "pipelines" ::: Vector Pipeline)
     IO
     ("pipelines" ::: Vector Pipeline)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO ("pipelines" ::: Vector Pipeline)
 -> ContT
      (Result, "pipelines" ::: Vector Pipeline)
      IO
      ("pipelines" ::: Vector Pipeline))
-> IO ("pipelines" ::: Vector Pipeline)
-> ContT
     (Result, "pipelines" ::: Vector Pipeline)
     IO
     ("pipelines" ::: Vector Pipeline)
forall a b. (a -> b) -> a -> b
$ Int -> (Int -> IO Pipeline) -> IO ("pipelines" ::: Vector Pipeline)
forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
generateM (("shader" ::: Word32) -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral ((Int -> "shader" ::: Word32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (("createInfos"
 ::: Vector (SomeStruct RayTracingPipelineCreateInfoNV))
-> Int
forall a. Vector a -> Int
Data.Vector.length (("createInfos"
  ::: Vector (SomeStruct RayTracingPipelineCreateInfoNV))
 -> Int)
-> ("createInfos"
    ::: Vector (SomeStruct RayTracingPipelineCreateInfoNV))
-> Int
forall a b. (a -> b) -> a -> b
$ ("createInfos"
::: Vector (SomeStruct RayTracingPipelineCreateInfoNV)
createInfos)) :: Word32))) (\i :: Int
i -> ("pPipelines" ::: Ptr Pipeline) -> IO Pipeline
forall a. Storable a => Ptr a -> IO a
peek @Pipeline (("pPipelines" ::: Ptr Pipeline
pPPipelines ("pPipelines" ::: Ptr Pipeline)
-> Int -> "pPipelines" ::: Ptr Pipeline
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (8 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr Pipeline)))
  (Result, "pipelines" ::: Vector Pipeline)
-> ContT
     (Result, "pipelines" ::: Vector Pipeline)
     IO
     (Result, "pipelines" ::: Vector Pipeline)
forall (f :: * -> *) a. Applicative f => a -> f a
pure ((Result, "pipelines" ::: Vector Pipeline)
 -> ContT
      (Result, "pipelines" ::: Vector Pipeline)
      IO
      (Result, "pipelines" ::: Vector Pipeline))
-> (Result, "pipelines" ::: Vector Pipeline)
-> ContT
     (Result, "pipelines" ::: Vector Pipeline)
     IO
     (Result, "pipelines" ::: Vector Pipeline)
forall a b. (a -> b) -> a -> b
$ (Result
r, "pipelines" ::: Vector Pipeline
pPipelines)


-- No documentation found for TopLevel "VK_STRUCTURE_TYPE_BIND_ACCELERATION_STRUCTURE_MEMORY_INFO_NV"
pattern $bSTRUCTURE_TYPE_BIND_ACCELERATION_STRUCTURE_MEMORY_INFO_NV :: StructureType
$mSTRUCTURE_TYPE_BIND_ACCELERATION_STRUCTURE_MEMORY_INFO_NV :: forall r. StructureType -> (Void# -> r) -> (Void# -> r) -> r
STRUCTURE_TYPE_BIND_ACCELERATION_STRUCTURE_MEMORY_INFO_NV = STRUCTURE_TYPE_BIND_ACCELERATION_STRUCTURE_MEMORY_INFO_KHR


-- No documentation found for TopLevel "VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_NV"
pattern $bSTRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_NV :: StructureType
$mSTRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_NV :: forall r. StructureType -> (Void# -> r) -> (Void# -> r) -> r
STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_NV = STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_KHR


-- No documentation found for TopLevel "VK_SHADER_STAGE_RAYGEN_BIT_NV"
pattern $bSHADER_STAGE_RAYGEN_BIT_NV :: ShaderStageFlagBits
$mSHADER_STAGE_RAYGEN_BIT_NV :: forall r. ShaderStageFlagBits -> (Void# -> r) -> (Void# -> r) -> r
SHADER_STAGE_RAYGEN_BIT_NV = SHADER_STAGE_RAYGEN_BIT_KHR


-- No documentation found for TopLevel "VK_SHADER_STAGE_ANY_HIT_BIT_NV"
pattern $bSHADER_STAGE_ANY_HIT_BIT_NV :: ShaderStageFlagBits
$mSHADER_STAGE_ANY_HIT_BIT_NV :: forall r. ShaderStageFlagBits -> (Void# -> r) -> (Void# -> r) -> r
SHADER_STAGE_ANY_HIT_BIT_NV = SHADER_STAGE_ANY_HIT_BIT_KHR


-- No documentation found for TopLevel "VK_SHADER_STAGE_CLOSEST_HIT_BIT_NV"
pattern $bSHADER_STAGE_CLOSEST_HIT_BIT_NV :: ShaderStageFlagBits
$mSHADER_STAGE_CLOSEST_HIT_BIT_NV :: forall r. ShaderStageFlagBits -> (Void# -> r) -> (Void# -> r) -> r
SHADER_STAGE_CLOSEST_HIT_BIT_NV = SHADER_STAGE_CLOSEST_HIT_BIT_KHR


-- No documentation found for TopLevel "VK_SHADER_STAGE_MISS_BIT_NV"
pattern $bSHADER_STAGE_MISS_BIT_NV :: ShaderStageFlagBits
$mSHADER_STAGE_MISS_BIT_NV :: forall r. ShaderStageFlagBits -> (Void# -> r) -> (Void# -> r) -> r
SHADER_STAGE_MISS_BIT_NV = SHADER_STAGE_MISS_BIT_KHR


-- No documentation found for TopLevel "VK_SHADER_STAGE_INTERSECTION_BIT_NV"
pattern $bSHADER_STAGE_INTERSECTION_BIT_NV :: ShaderStageFlagBits
$mSHADER_STAGE_INTERSECTION_BIT_NV :: forall r. ShaderStageFlagBits -> (Void# -> r) -> (Void# -> r) -> r
SHADER_STAGE_INTERSECTION_BIT_NV = SHADER_STAGE_INTERSECTION_BIT_KHR


-- No documentation found for TopLevel "VK_SHADER_STAGE_CALLABLE_BIT_NV"
pattern $bSHADER_STAGE_CALLABLE_BIT_NV :: ShaderStageFlagBits
$mSHADER_STAGE_CALLABLE_BIT_NV :: forall r. ShaderStageFlagBits -> (Void# -> r) -> (Void# -> r) -> r
SHADER_STAGE_CALLABLE_BIT_NV = SHADER_STAGE_CALLABLE_BIT_KHR


-- No documentation found for TopLevel "VK_PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_NV"
pattern $bPIPELINE_STAGE_RAY_TRACING_SHADER_BIT_NV :: PipelineStageFlagBits
$mPIPELINE_STAGE_RAY_TRACING_SHADER_BIT_NV :: forall r.
PipelineStageFlagBits -> (Void# -> r) -> (Void# -> r) -> r
PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_NV = PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_KHR


-- No documentation found for TopLevel "VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_NV"
pattern $bPIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_NV :: PipelineStageFlagBits
$mPIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_NV :: forall r.
PipelineStageFlagBits -> (Void# -> r) -> (Void# -> r) -> r
PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_NV = PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR


-- No documentation found for TopLevel "VK_BUFFER_USAGE_RAY_TRACING_BIT_NV"
pattern $bBUFFER_USAGE_RAY_TRACING_BIT_NV :: BufferUsageFlagBits
$mBUFFER_USAGE_RAY_TRACING_BIT_NV :: forall r. BufferUsageFlagBits -> (Void# -> r) -> (Void# -> r) -> r
BUFFER_USAGE_RAY_TRACING_BIT_NV = BUFFER_USAGE_RAY_TRACING_BIT_KHR


-- No documentation found for TopLevel "VK_PIPELINE_BIND_POINT_RAY_TRACING_NV"
pattern $bPIPELINE_BIND_POINT_RAY_TRACING_NV :: PipelineBindPoint
$mPIPELINE_BIND_POINT_RAY_TRACING_NV :: forall r. PipelineBindPoint -> (Void# -> r) -> (Void# -> r) -> r
PIPELINE_BIND_POINT_RAY_TRACING_NV = PIPELINE_BIND_POINT_RAY_TRACING_KHR


-- No documentation found for TopLevel "VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_NV"
pattern $bDESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_NV :: DescriptorType
$mDESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_NV :: forall r. DescriptorType -> (Void# -> r) -> (Void# -> r) -> r
DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_NV = DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR


-- No documentation found for TopLevel "VK_ACCESS_ACCELERATION_STRUCTURE_READ_BIT_NV"
pattern $bACCESS_ACCELERATION_STRUCTURE_READ_BIT_NV :: AccessFlagBits
$mACCESS_ACCELERATION_STRUCTURE_READ_BIT_NV :: forall r. AccessFlagBits -> (Void# -> r) -> (Void# -> r) -> r
ACCESS_ACCELERATION_STRUCTURE_READ_BIT_NV = ACCESS_ACCELERATION_STRUCTURE_READ_BIT_KHR


-- No documentation found for TopLevel "VK_ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_NV"
pattern $bACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_NV :: AccessFlagBits
$mACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_NV :: forall r. AccessFlagBits -> (Void# -> r) -> (Void# -> r) -> r
ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_NV = ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_KHR


-- No documentation found for TopLevel "VK_QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_NV"
pattern $bQUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_NV :: QueryType
$mQUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_NV :: forall r. QueryType -> (Void# -> r) -> (Void# -> r) -> r
QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_NV = QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_KHR


-- No documentation found for TopLevel "VK_OBJECT_TYPE_ACCELERATION_STRUCTURE_NV"
pattern $bOBJECT_TYPE_ACCELERATION_STRUCTURE_NV :: ObjectType
$mOBJECT_TYPE_ACCELERATION_STRUCTURE_NV :: forall r. ObjectType -> (Void# -> r) -> (Void# -> r) -> r
OBJECT_TYPE_ACCELERATION_STRUCTURE_NV = OBJECT_TYPE_ACCELERATION_STRUCTURE_KHR


-- No documentation found for TopLevel "VK_DEBUG_REPORT_OBJECT_TYPE_ACCELERATION_STRUCTURE_NV_EXT"
pattern $bDEBUG_REPORT_OBJECT_TYPE_ACCELERATION_STRUCTURE_NV_EXT :: DebugReportObjectTypeEXT
$mDEBUG_REPORT_OBJECT_TYPE_ACCELERATION_STRUCTURE_NV_EXT :: forall r.
DebugReportObjectTypeEXT -> (Void# -> r) -> (Void# -> r) -> r
DEBUG_REPORT_OBJECT_TYPE_ACCELERATION_STRUCTURE_NV_EXT = DEBUG_REPORT_OBJECT_TYPE_ACCELERATION_STRUCTURE_KHR_EXT


-- No documentation found for TopLevel "VK_INDEX_TYPE_NONE_NV"
pattern $bINDEX_TYPE_NONE_NV :: IndexType
$mINDEX_TYPE_NONE_NV :: forall r. IndexType -> (Void# -> r) -> (Void# -> r) -> r
INDEX_TYPE_NONE_NV = INDEX_TYPE_NONE_KHR


-- No documentation found for TopLevel "VK_RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_NV"
pattern $bRAY_TRACING_SHADER_GROUP_TYPE_GENERAL_NV :: RayTracingShaderGroupTypeKHR
$mRAY_TRACING_SHADER_GROUP_TYPE_GENERAL_NV :: forall r.
RayTracingShaderGroupTypeKHR -> (Void# -> r) -> (Void# -> r) -> r
RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_NV = RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_KHR


-- No documentation found for TopLevel "VK_RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_NV"
pattern $bRAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_NV :: RayTracingShaderGroupTypeKHR
$mRAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_NV :: forall r.
RayTracingShaderGroupTypeKHR -> (Void# -> r) -> (Void# -> r) -> r
RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_NV = RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR


-- No documentation found for TopLevel "VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_NV"
pattern $bRAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_NV :: RayTracingShaderGroupTypeKHR
$mRAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_NV :: forall r.
RayTracingShaderGroupTypeKHR -> (Void# -> r) -> (Void# -> r) -> r
RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_NV = RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR


-- No documentation found for TopLevel "VK_GEOMETRY_TYPE_TRIANGLES_NV"
pattern $bGEOMETRY_TYPE_TRIANGLES_NV :: GeometryTypeKHR
$mGEOMETRY_TYPE_TRIANGLES_NV :: forall r. GeometryTypeKHR -> (Void# -> r) -> (Void# -> r) -> r
GEOMETRY_TYPE_TRIANGLES_NV = GEOMETRY_TYPE_TRIANGLES_KHR


-- No documentation found for TopLevel "VK_GEOMETRY_TYPE_AABBS_NV"
pattern $bGEOMETRY_TYPE_AABBS_NV :: GeometryTypeKHR
$mGEOMETRY_TYPE_AABBS_NV :: forall r. GeometryTypeKHR -> (Void# -> r) -> (Void# -> r) -> r
GEOMETRY_TYPE_AABBS_NV = GEOMETRY_TYPE_AABBS_KHR


-- No documentation found for TopLevel "VK_ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_NV"
pattern $bACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_NV :: AccelerationStructureTypeKHR
$mACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_NV :: forall r.
AccelerationStructureTypeKHR -> (Void# -> r) -> (Void# -> r) -> r
ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_NV = ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_KHR


-- No documentation found for TopLevel "VK_ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_NV"
pattern $bACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_NV :: AccelerationStructureTypeKHR
$mACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_NV :: forall r.
AccelerationStructureTypeKHR -> (Void# -> r) -> (Void# -> r) -> r
ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_NV = ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_KHR


-- No documentation found for TopLevel "VK_GEOMETRY_OPAQUE_BIT_NV"
pattern $bGEOMETRY_OPAQUE_BIT_NV :: GeometryFlagBitsKHR
$mGEOMETRY_OPAQUE_BIT_NV :: forall r. GeometryFlagBitsKHR -> (Void# -> r) -> (Void# -> r) -> r
GEOMETRY_OPAQUE_BIT_NV = GEOMETRY_OPAQUE_BIT_KHR


-- No documentation found for TopLevel "VK_GEOMETRY_NO_DUPLICATE_ANY_HIT_INVOCATION_BIT_NV"
pattern $bGEOMETRY_NO_DUPLICATE_ANY_HIT_INVOCATION_BIT_NV :: GeometryFlagBitsKHR
$mGEOMETRY_NO_DUPLICATE_ANY_HIT_INVOCATION_BIT_NV :: forall r. GeometryFlagBitsKHR -> (Void# -> r) -> (Void# -> r) -> r
GEOMETRY_NO_DUPLICATE_ANY_HIT_INVOCATION_BIT_NV = GEOMETRY_NO_DUPLICATE_ANY_HIT_INVOCATION_BIT_KHR


-- No documentation found for TopLevel "VK_GEOMETRY_INSTANCE_TRIANGLE_CULL_DISABLE_BIT_NV"
pattern $bGEOMETRY_INSTANCE_TRIANGLE_CULL_DISABLE_BIT_NV :: GeometryInstanceFlagBitsKHR
$mGEOMETRY_INSTANCE_TRIANGLE_CULL_DISABLE_BIT_NV :: forall r.
GeometryInstanceFlagBitsKHR -> (Void# -> r) -> (Void# -> r) -> r
GEOMETRY_INSTANCE_TRIANGLE_CULL_DISABLE_BIT_NV = GEOMETRY_INSTANCE_TRIANGLE_FACING_CULL_DISABLE_BIT_KHR


-- No documentation found for TopLevel "VK_GEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_NV"
pattern $bGEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_NV :: GeometryInstanceFlagBitsKHR
$mGEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_NV :: forall r.
GeometryInstanceFlagBitsKHR -> (Void# -> r) -> (Void# -> r) -> r
GEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_NV = GEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_KHR


-- No documentation found for TopLevel "VK_GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_NV"
pattern $bGEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_NV :: GeometryInstanceFlagBitsKHR
$mGEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_NV :: forall r.
GeometryInstanceFlagBitsKHR -> (Void# -> r) -> (Void# -> r) -> r
GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_NV = GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_KHR


-- No documentation found for TopLevel "VK_GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_NV"
pattern $bGEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_NV :: GeometryInstanceFlagBitsKHR
$mGEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_NV :: forall r.
GeometryInstanceFlagBitsKHR -> (Void# -> r) -> (Void# -> r) -> r
GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_NV = GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_KHR


-- No documentation found for TopLevel "VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_NV"
pattern $bBUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_NV :: BuildAccelerationStructureFlagBitsKHR
$mBUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_NV :: forall r.
BuildAccelerationStructureFlagBitsKHR
-> (Void# -> r) -> (Void# -> r) -> r
BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_NV = BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_KHR


-- No documentation found for TopLevel "VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_NV"
pattern $bBUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_NV :: BuildAccelerationStructureFlagBitsKHR
$mBUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_NV :: forall r.
BuildAccelerationStructureFlagBitsKHR
-> (Void# -> r) -> (Void# -> r) -> r
BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_NV = BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_KHR


-- No documentation found for TopLevel "VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_NV"
pattern $bBUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_NV :: BuildAccelerationStructureFlagBitsKHR
$mBUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_NV :: forall r.
BuildAccelerationStructureFlagBitsKHR
-> (Void# -> r) -> (Void# -> r) -> r
BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_NV = BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_KHR


-- No documentation found for TopLevel "VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_NV"
pattern $bBUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_NV :: BuildAccelerationStructureFlagBitsKHR
$mBUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_NV :: forall r.
BuildAccelerationStructureFlagBitsKHR
-> (Void# -> r) -> (Void# -> r) -> r
BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_NV = BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_KHR


-- No documentation found for TopLevel "VK_BUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_NV"
pattern $bBUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_NV :: BuildAccelerationStructureFlagBitsKHR
$mBUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_NV :: forall r.
BuildAccelerationStructureFlagBitsKHR
-> (Void# -> r) -> (Void# -> r) -> r
BUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_NV = BUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_KHR


-- No documentation found for TopLevel "VK_COPY_ACCELERATION_STRUCTURE_MODE_CLONE_NV"
pattern $bCOPY_ACCELERATION_STRUCTURE_MODE_CLONE_NV :: CopyAccelerationStructureModeKHR
$mCOPY_ACCELERATION_STRUCTURE_MODE_CLONE_NV :: forall r.
CopyAccelerationStructureModeKHR
-> (Void# -> r) -> (Void# -> r) -> r
COPY_ACCELERATION_STRUCTURE_MODE_CLONE_NV = COPY_ACCELERATION_STRUCTURE_MODE_CLONE_KHR


-- No documentation found for TopLevel "VK_COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_NV"
pattern $bCOPY_ACCELERATION_STRUCTURE_MODE_COMPACT_NV :: CopyAccelerationStructureModeKHR
$mCOPY_ACCELERATION_STRUCTURE_MODE_COMPACT_NV :: forall r.
CopyAccelerationStructureModeKHR
-> (Void# -> r) -> (Void# -> r) -> r
COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_NV = COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_KHR


-- No documentation found for TopLevel "VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_OBJECT_NV"
pattern $bACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_OBJECT_NV :: AccelerationStructureMemoryRequirementsTypeKHR
$mACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_OBJECT_NV :: forall r.
AccelerationStructureMemoryRequirementsTypeKHR
-> (Void# -> r) -> (Void# -> r) -> r
ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_OBJECT_NV = ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_OBJECT_KHR


-- No documentation found for TopLevel "VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_BUILD_SCRATCH_NV"
pattern $bACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_BUILD_SCRATCH_NV :: AccelerationStructureMemoryRequirementsTypeKHR
$mACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_BUILD_SCRATCH_NV :: forall r.
AccelerationStructureMemoryRequirementsTypeKHR
-> (Void# -> r) -> (Void# -> r) -> r
ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_BUILD_SCRATCH_NV = ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_BUILD_SCRATCH_KHR


-- No documentation found for TopLevel "VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_UPDATE_SCRATCH_NV"
pattern $bACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_UPDATE_SCRATCH_NV :: AccelerationStructureMemoryRequirementsTypeKHR
$mACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_UPDATE_SCRATCH_NV :: forall r.
AccelerationStructureMemoryRequirementsTypeKHR
-> (Void# -> r) -> (Void# -> r) -> r
ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_UPDATE_SCRATCH_NV = ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_UPDATE_SCRATCH_KHR


-- No documentation found for TopLevel "vkDestroyAccelerationStructureNV"
destroyAccelerationStructureNV :: Device
-> AccelerationStructureNV
-> ("allocator" ::: Maybe AllocationCallbacks)
-> io ()
destroyAccelerationStructureNV = Device
-> AccelerationStructureNV
-> ("allocator" ::: Maybe AllocationCallbacks)
-> io ()
forall (io :: * -> *).
MonadIO io =>
Device
-> AccelerationStructureNV
-> ("allocator" ::: Maybe AllocationCallbacks)
-> io ()
destroyAccelerationStructureKHR


-- No documentation found for TopLevel "vkBindAccelerationStructureMemoryNV"
bindAccelerationStructureMemoryNV :: Device
-> ("bindInfos" ::: Vector BindAccelerationStructureMemoryInfoKHR)
-> io ()
bindAccelerationStructureMemoryNV = Device
-> ("bindInfos" ::: Vector BindAccelerationStructureMemoryInfoKHR)
-> io ()
forall (io :: * -> *).
MonadIO io =>
Device
-> ("bindInfos" ::: Vector BindAccelerationStructureMemoryInfoKHR)
-> io ()
bindAccelerationStructureMemoryKHR


-- No documentation found for TopLevel "vkCmdWriteAccelerationStructuresPropertiesNV"
cmdWriteAccelerationStructuresPropertiesNV :: CommandBuffer
-> ("accelerationStructures" ::: Vector AccelerationStructureNV)
-> QueryType
-> QueryPool
-> ("shader" ::: Word32)
-> io ()
cmdWriteAccelerationStructuresPropertiesNV = CommandBuffer
-> ("accelerationStructures" ::: Vector AccelerationStructureNV)
-> QueryType
-> QueryPool
-> ("shader" ::: Word32)
-> io ()
forall (io :: * -> *).
MonadIO io =>
CommandBuffer
-> ("accelerationStructures" ::: Vector AccelerationStructureNV)
-> QueryType
-> QueryPool
-> ("shader" ::: Word32)
-> io ()
cmdWriteAccelerationStructuresPropertiesKHR


-- No documentation found for TopLevel "vkGetRayTracingShaderGroupHandlesNV"
getRayTracingShaderGroupHandlesNV :: Device
-> Pipeline
-> ("shader" ::: Word32)
-> ("shader" ::: Word32)
-> ("instanceOffset" ::: DeviceSize)
-> ("data" ::: Ptr ())
-> io ()
getRayTracingShaderGroupHandlesNV = Device
-> Pipeline
-> ("shader" ::: Word32)
-> ("shader" ::: Word32)
-> ("instanceOffset" ::: DeviceSize)
-> ("data" ::: Ptr ())
-> io ()
forall (io :: * -> *).
MonadIO io =>
Device
-> Pipeline
-> ("shader" ::: Word32)
-> ("shader" ::: Word32)
-> ("instanceOffset" ::: DeviceSize)
-> ("data" ::: Ptr ())
-> io ()
getRayTracingShaderGroupHandlesKHR


-- No documentation found for TopLevel "VK_SHADER_UNUSED_NV"
pattern $bSHADER_UNUSED_NV :: "shader" ::: Word32
$mSHADER_UNUSED_NV :: forall r.
("shader" ::: Word32) -> (Void# -> r) -> (Void# -> r) -> r
SHADER_UNUSED_NV = SHADER_UNUSED_KHR


-- | VkRayTracingShaderGroupCreateInfoNV - Structure specifying shaders in a
-- shader group
--
-- == Valid Usage
--
-- -   If @type@ is 'RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_NV' then
--     @generalShader@ /must/ be a valid index into
--     'RayTracingPipelineCreateInfoNV'::@pStages@ referring to a shader of
--     'SHADER_STAGE_RAYGEN_BIT_NV', 'SHADER_STAGE_MISS_BIT_NV', or
--     'SHADER_STAGE_CALLABLE_BIT_NV'
--
-- -   If @type@ is 'RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_NV' then
--     @closestHitShader@, @anyHitShader@, and @intersectionShader@ /must/
--     be 'Vulkan.Core10.APIConstants.SHADER_UNUSED_NV'
--
-- -   If @type@ is 'RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_NV'
--     then @intersectionShader@ /must/ be a valid index into
--     'RayTracingPipelineCreateInfoNV'::@pStages@ referring to a shader of
--     'SHADER_STAGE_INTERSECTION_BIT_NV'
--
-- -   If @type@ is 'RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_NV'
--     then @intersectionShader@ /must/ be
--     'Vulkan.Core10.APIConstants.SHADER_UNUSED_NV'
--
-- -   @closestHitShader@ /must/ be either
--     'Vulkan.Core10.APIConstants.SHADER_UNUSED_NV' or a valid index into
--     'RayTracingPipelineCreateInfoNV'::@pStages@ referring to a shader of
--     'SHADER_STAGE_CLOSEST_HIT_BIT_NV'
--
-- -   @anyHitShader@ /must/ be either
--     'Vulkan.Core10.APIConstants.SHADER_UNUSED_NV' or a valid index into
--     'RayTracingPipelineCreateInfoNV'::@pStages@ referring to a shader of
--     'SHADER_STAGE_ANY_HIT_BIT_NV'
--
-- == Valid Usage (Implicit)
--
-- -   @sType@ /must/ be
--     'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_RAY_TRACING_SHADER_GROUP_CREATE_INFO_NV'
--
-- -   @pNext@ /must/ be @NULL@
--
-- -   @type@ /must/ be a valid
--     'Vulkan.Extensions.VK_KHR_ray_tracing.RayTracingShaderGroupTypeKHR'
--     value
--
-- = See Also
--
-- 'RayTracingPipelineCreateInfoNV',
-- 'Vulkan.Extensions.VK_KHR_ray_tracing.RayTracingShaderGroupTypeKHR',
-- 'Vulkan.Core10.Enums.StructureType.StructureType'
data RayTracingShaderGroupCreateInfoNV = RayTracingShaderGroupCreateInfoNV
  { -- | @type@ is the type of hit group specified in this structure.
    RayTracingShaderGroupCreateInfoNV -> RayTracingShaderGroupTypeKHR
type' :: RayTracingShaderGroupTypeKHR
  , -- | @generalShader@ is the index of the ray generation, miss, or callable
    -- shader from 'RayTracingPipelineCreateInfoNV'::@pStages@ in the group if
    -- the shader group has @type@ of
    -- 'RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_NV', and
    -- 'Vulkan.Core10.APIConstants.SHADER_UNUSED_NV' otherwise.
    RayTracingShaderGroupCreateInfoNV -> "shader" ::: Word32
generalShader :: Word32
  , -- | @closestHitShader@ is the optional index of the closest hit shader from
    -- 'RayTracingPipelineCreateInfoNV'::@pStages@ in the group if the shader
    -- group has @type@ of
    -- 'RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_NV' or
    -- 'RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_NV', and
    -- 'Vulkan.Core10.APIConstants.SHADER_UNUSED_NV' otherwise.
    RayTracingShaderGroupCreateInfoNV -> "shader" ::: Word32
closestHitShader :: Word32
  , -- | @anyHitShader@ is the optional index of the any-hit shader from
    -- 'RayTracingPipelineCreateInfoNV'::@pStages@ in the group if the shader
    -- group has @type@ of
    -- 'RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_NV' or
    -- 'RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_NV', and
    -- 'Vulkan.Core10.APIConstants.SHADER_UNUSED_NV' otherwise.
    RayTracingShaderGroupCreateInfoNV -> "shader" ::: Word32
anyHitShader :: Word32
  , -- | @intersectionShader@ is the index of the intersection shader from
    -- 'RayTracingPipelineCreateInfoNV'::@pStages@ in the group if the shader
    -- group has @type@ of
    -- 'RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_NV', and
    -- 'Vulkan.Core10.APIConstants.SHADER_UNUSED_NV' otherwise.
    RayTracingShaderGroupCreateInfoNV -> "shader" ::: Word32
intersectionShader :: Word32
  }
  deriving (Typeable)
deriving instance Show RayTracingShaderGroupCreateInfoNV

instance ToCStruct RayTracingShaderGroupCreateInfoNV where
  withCStruct :: RayTracingShaderGroupCreateInfoNV
-> (Ptr RayTracingShaderGroupCreateInfoNV -> IO b) -> IO b
withCStruct x :: RayTracingShaderGroupCreateInfoNV
x f :: Ptr RayTracingShaderGroupCreateInfoNV -> IO b
f = Int
-> Int -> (Ptr RayTracingShaderGroupCreateInfoNV -> IO b) -> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 40 8 ((Ptr RayTracingShaderGroupCreateInfoNV -> IO b) -> IO b)
-> (Ptr RayTracingShaderGroupCreateInfoNV -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \p :: Ptr RayTracingShaderGroupCreateInfoNV
p -> Ptr RayTracingShaderGroupCreateInfoNV
-> RayTracingShaderGroupCreateInfoNV -> IO b -> IO b
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 :: Ptr RayTracingShaderGroupCreateInfoNV
-> RayTracingShaderGroupCreateInfoNV -> IO b -> IO b
pokeCStruct p :: Ptr RayTracingShaderGroupCreateInfoNV
p RayTracingShaderGroupCreateInfoNV{..} f :: IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RayTracingShaderGroupCreateInfoNV
p Ptr RayTracingShaderGroupCreateInfoNV -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_RAY_TRACING_SHADER_GROUP_CREATE_INFO_NV)
    Ptr ("data" ::: Ptr ()) -> ("data" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RayTracingShaderGroupCreateInfoNV
p Ptr RayTracingShaderGroupCreateInfoNV
-> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) ("data" ::: Ptr ()
forall a. Ptr a
nullPtr)
    Ptr RayTracingShaderGroupTypeKHR
-> RayTracingShaderGroupTypeKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RayTracingShaderGroupCreateInfoNV
p Ptr RayTracingShaderGroupCreateInfoNV
-> Int -> Ptr RayTracingShaderGroupTypeKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr RayTracingShaderGroupTypeKHR)) (RayTracingShaderGroupTypeKHR
type')
    Ptr ("shader" ::: Word32) -> ("shader" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RayTracingShaderGroupCreateInfoNV
p Ptr RayTracingShaderGroupCreateInfoNV
-> Int -> Ptr ("shader" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr Word32)) ("shader" ::: Word32
generalShader)
    Ptr ("shader" ::: Word32) -> ("shader" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RayTracingShaderGroupCreateInfoNV
p Ptr RayTracingShaderGroupCreateInfoNV
-> Int -> Ptr ("shader" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr Word32)) ("shader" ::: Word32
closestHitShader)
    Ptr ("shader" ::: Word32) -> ("shader" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RayTracingShaderGroupCreateInfoNV
p Ptr RayTracingShaderGroupCreateInfoNV
-> Int -> Ptr ("shader" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 28 :: Ptr Word32)) ("shader" ::: Word32
anyHitShader)
    Ptr ("shader" ::: Word32) -> ("shader" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RayTracingShaderGroupCreateInfoNV
p Ptr RayTracingShaderGroupCreateInfoNV
-> Int -> Ptr ("shader" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr Word32)) ("shader" ::: Word32
intersectionShader)
    IO b
f
  cStructSize :: Int
cStructSize = 40
  cStructAlignment :: Int
cStructAlignment = 8
  pokeZeroCStruct :: Ptr RayTracingShaderGroupCreateInfoNV -> IO b -> IO b
pokeZeroCStruct p :: Ptr RayTracingShaderGroupCreateInfoNV
p f :: IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RayTracingShaderGroupCreateInfoNV
p Ptr RayTracingShaderGroupCreateInfoNV -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_RAY_TRACING_SHADER_GROUP_CREATE_INFO_NV)
    Ptr ("data" ::: Ptr ()) -> ("data" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RayTracingShaderGroupCreateInfoNV
p Ptr RayTracingShaderGroupCreateInfoNV
-> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) ("data" ::: Ptr ()
forall a. Ptr a
nullPtr)
    Ptr RayTracingShaderGroupTypeKHR
-> RayTracingShaderGroupTypeKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RayTracingShaderGroupCreateInfoNV
p Ptr RayTracingShaderGroupCreateInfoNV
-> Int -> Ptr RayTracingShaderGroupTypeKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr RayTracingShaderGroupTypeKHR)) (RayTracingShaderGroupTypeKHR
forall a. Zero a => a
zero)
    Ptr ("shader" ::: Word32) -> ("shader" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RayTracingShaderGroupCreateInfoNV
p Ptr RayTracingShaderGroupCreateInfoNV
-> Int -> Ptr ("shader" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr Word32)) ("shader" ::: Word32
forall a. Zero a => a
zero)
    Ptr ("shader" ::: Word32) -> ("shader" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RayTracingShaderGroupCreateInfoNV
p Ptr RayTracingShaderGroupCreateInfoNV
-> Int -> Ptr ("shader" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr Word32)) ("shader" ::: Word32
forall a. Zero a => a
zero)
    Ptr ("shader" ::: Word32) -> ("shader" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RayTracingShaderGroupCreateInfoNV
p Ptr RayTracingShaderGroupCreateInfoNV
-> Int -> Ptr ("shader" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 28 :: Ptr Word32)) ("shader" ::: Word32
forall a. Zero a => a
zero)
    Ptr ("shader" ::: Word32) -> ("shader" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr RayTracingShaderGroupCreateInfoNV
p Ptr RayTracingShaderGroupCreateInfoNV
-> Int -> Ptr ("shader" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr Word32)) ("shader" ::: Word32
forall a. Zero a => a
zero)
    IO b
f

instance FromCStruct RayTracingShaderGroupCreateInfoNV where
  peekCStruct :: Ptr RayTracingShaderGroupCreateInfoNV
-> IO RayTracingShaderGroupCreateInfoNV
peekCStruct p :: Ptr RayTracingShaderGroupCreateInfoNV
p = do
    RayTracingShaderGroupTypeKHR
type' <- Ptr RayTracingShaderGroupTypeKHR -> IO RayTracingShaderGroupTypeKHR
forall a. Storable a => Ptr a -> IO a
peek @RayTracingShaderGroupTypeKHR ((Ptr RayTracingShaderGroupCreateInfoNV
p Ptr RayTracingShaderGroupCreateInfoNV
-> Int -> Ptr RayTracingShaderGroupTypeKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr RayTracingShaderGroupTypeKHR))
    "shader" ::: Word32
generalShader <- Ptr ("shader" ::: Word32) -> IO ("shader" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr RayTracingShaderGroupCreateInfoNV
p Ptr RayTracingShaderGroupCreateInfoNV
-> Int -> Ptr ("shader" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr Word32))
    "shader" ::: Word32
closestHitShader <- Ptr ("shader" ::: Word32) -> IO ("shader" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr RayTracingShaderGroupCreateInfoNV
p Ptr RayTracingShaderGroupCreateInfoNV
-> Int -> Ptr ("shader" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr Word32))
    "shader" ::: Word32
anyHitShader <- Ptr ("shader" ::: Word32) -> IO ("shader" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr RayTracingShaderGroupCreateInfoNV
p Ptr RayTracingShaderGroupCreateInfoNV
-> Int -> Ptr ("shader" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 28 :: Ptr Word32))
    "shader" ::: Word32
intersectionShader <- Ptr ("shader" ::: Word32) -> IO ("shader" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr RayTracingShaderGroupCreateInfoNV
p Ptr RayTracingShaderGroupCreateInfoNV
-> Int -> Ptr ("shader" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr Word32))
    RayTracingShaderGroupCreateInfoNV
-> IO RayTracingShaderGroupCreateInfoNV
forall (f :: * -> *) a. Applicative f => a -> f a
pure (RayTracingShaderGroupCreateInfoNV
 -> IO RayTracingShaderGroupCreateInfoNV)
-> RayTracingShaderGroupCreateInfoNV
-> IO RayTracingShaderGroupCreateInfoNV
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
_ = 40
  alignment :: RayTracingShaderGroupCreateInfoNV -> Int
alignment ~RayTracingShaderGroupCreateInfoNV
_ = 8
  peek :: Ptr RayTracingShaderGroupCreateInfoNV
-> IO RayTracingShaderGroupCreateInfoNV
peek = Ptr RayTracingShaderGroupCreateInfoNV
-> IO RayTracingShaderGroupCreateInfoNV
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
  poke :: Ptr RayTracingShaderGroupCreateInfoNV
-> RayTracingShaderGroupCreateInfoNV -> IO ()
poke ptr :: Ptr RayTracingShaderGroupCreateInfoNV
ptr poked :: RayTracingShaderGroupCreateInfoNV
poked = Ptr RayTracingShaderGroupCreateInfoNV
-> RayTracingShaderGroupCreateInfoNV -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr RayTracingShaderGroupCreateInfoNV
ptr RayTracingShaderGroupCreateInfoNV
poked (() -> IO ()
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
           RayTracingShaderGroupTypeKHR
forall a. Zero a => a
zero
           "shader" ::: Word32
forall a. Zero a => a
zero
           "shader" ::: Word32
forall a. Zero a => a
zero
           "shader" ::: Word32
forall a. Zero a => a
zero
           "shader" ::: Word32
forall a. Zero a => a
zero


-- | VkRayTracingPipelineCreateInfoNV - Structure specifying parameters of a
-- newly created ray tracing pipeline
--
-- = Description
--
-- The parameters @basePipelineHandle@ and @basePipelineIndex@ are
-- described in more detail in
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#pipelines-pipeline-derivatives Pipeline Derivatives>.
--
-- == Valid Usage
--
-- -   If @flags@ contains the
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_DERIVATIVE_BIT'
--     flag, and @basePipelineIndex@ is @-1@, @basePipelineHandle@ /must/
--     be a valid handle to a ray tracing 'Vulkan.Core10.Handles.Pipeline'
--
-- -   If @flags@ contains the
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_DERIVATIVE_BIT'
--     flag, and @basePipelineHandle@ is
--     'Vulkan.Core10.APIConstants.NULL_HANDLE', @basePipelineIndex@ /must/
--     be a valid index into the calling command’s @pCreateInfos@ parameter
--
-- -   If @flags@ contains the
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_DERIVATIVE_BIT'
--     flag, and @basePipelineIndex@ is not @-1@, @basePipelineHandle@
--     /must/ be 'Vulkan.Core10.APIConstants.NULL_HANDLE'
--
-- -   If @flags@ contains the
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_DERIVATIVE_BIT'
--     flag, and @basePipelineHandle@ is not
--     'Vulkan.Core10.APIConstants.NULL_HANDLE', @basePipelineIndex@ /must/
--     be @-1@
--
-- -   The @stage@ member of at least one element of @pStages@ /must/ be
--     'Vulkan.Core10.Enums.ShaderStageFlagBits.SHADER_STAGE_RAYGEN_BIT_KHR'
--
-- -   The shader code for the entry points identified by @pStages@, and
--     the rest of the state identified by this structure /must/ adhere to
--     the pipeline linking rules described in the
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#interfaces Shader Interfaces>
--     chapter
--
-- -   @layout@ /must/ be
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#descriptorsets-pipelinelayout-consistency consistent>
--     with all shaders specified in @pStages@
--
-- -   The number of resources in @layout@ accessible to each shader stage
--     that is used by the pipeline /must/ be less than or equal to
--     'Vulkan.Core10.DeviceInitialization.PhysicalDeviceLimits'::@maxPerStageResources@
--
-- -   @flags@ /must/ not include
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_INDIRECT_BINDABLE_BIT_NV'
--
-- -   If the
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-pipelineCreationCacheControl pipelineCreationCacheControl>
--     feature is not enabled, @flags@ /must/ not include
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT_EXT'
--     or
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_EARLY_RETURN_ON_FAILURE_BIT_EXT'
--
-- -   @flags@ /must/ not include
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_LIBRARY_BIT_KHR'
--
-- -   @maxRecursionDepth@ /must/ be less than or equal to
--     'PhysicalDeviceRayTracingPropertiesNV'::@maxRecursionDepth@
--
-- -   @flags@ /must/ not include
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR'
--
-- -   @flags@ /must/ not include
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR'
--
-- -   @flags@ /must/ not include
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHR'
--
-- -   @flags@ /must/ not include
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR'
--
-- -   @flags@ /must/ not include
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_RAY_TRACING_SKIP_AABBS_BIT_KHR'
--
-- -   @flags@ /must/ not include
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_RAY_TRACING_SKIP_TRIANGLES_BIT_KHR'
--
-- -   @flags@ /must/ not include both
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_DEFER_COMPILE_BIT_NV'
--     and
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT_EXT'
--     at the same time
--
-- == Valid Usage (Implicit)
--
-- -   @sType@ /must/ be
--     'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_RAY_TRACING_PIPELINE_CREATE_INFO_NV'
--
-- -   @pNext@ /must/ be @NULL@ or a pointer to a valid instance of
--     'Vulkan.Extensions.VK_EXT_pipeline_creation_feedback.PipelineCreationFeedbackCreateInfoEXT'
--
-- -   The @sType@ value of each struct in the @pNext@ chain /must/ be
--     unique
--
-- -   @flags@ /must/ be a valid combination of
--     'Vulkan.Core10.Enums.PipelineCreateFlagBits.PipelineCreateFlagBits'
--     values
--
-- -   @pStages@ /must/ be a valid pointer to an array of @stageCount@
--     valid 'Vulkan.Core10.Pipeline.PipelineShaderStageCreateInfo'
--     structures
--
-- -   @pGroups@ /must/ be a valid pointer to an array of @groupCount@
--     valid 'RayTracingShaderGroupCreateInfoNV' structures
--
-- -   @layout@ /must/ be a valid 'Vulkan.Core10.Handles.PipelineLayout'
--     handle
--
-- -   @stageCount@ /must/ be greater than @0@
--
-- -   @groupCount@ /must/ be greater than @0@
--
-- -   Both of @basePipelineHandle@, and @layout@ that are valid handles of
--     non-ignored parameters /must/ have been created, allocated, or
--     retrieved from the same 'Vulkan.Core10.Handles.Device'
--
-- = See Also
--
-- 'Vulkan.Core10.Handles.Pipeline',
-- 'Vulkan.Core10.Enums.PipelineCreateFlagBits.PipelineCreateFlags',
-- 'Vulkan.Core10.Handles.PipelineLayout',
-- 'Vulkan.Core10.Pipeline.PipelineShaderStageCreateInfo',
-- 'RayTracingShaderGroupCreateInfoNV',
-- 'Vulkan.Core10.Enums.StructureType.StructureType',
-- 'createRayTracingPipelinesNV'
data RayTracingPipelineCreateInfoNV (es :: [Type]) = RayTracingPipelineCreateInfoNV
  { -- | @pNext@ is @NULL@ or a pointer to an extension-specific structure.
    RayTracingPipelineCreateInfoNV es -> Chain es
next :: Chain es
  , -- | @flags@ is a bitmask of
    -- 'Vulkan.Core10.Enums.PipelineCreateFlagBits.PipelineCreateFlagBits'
    -- specifying how the pipeline will be generated.
    RayTracingPipelineCreateInfoNV es -> PipelineCreateFlags
flags :: PipelineCreateFlags
  , -- | @pStages@ is an array of size @stageCount@ structures of type
    -- 'Vulkan.Core10.Pipeline.PipelineShaderStageCreateInfo' describing the
    -- set of the shader stages to be included in the ray tracing pipeline.
    RayTracingPipelineCreateInfoNV es
-> Vector (SomeStruct PipelineShaderStageCreateInfo)
stages :: Vector (SomeStruct PipelineShaderStageCreateInfo)
  , -- | @pGroups@ is an array of size @groupCount@ structures of type
    -- 'RayTracingShaderGroupCreateInfoNV' describing the set of the shader
    -- stages to be included in each shader group in the ray tracing pipeline.
    RayTracingPipelineCreateInfoNV es
-> Vector RayTracingShaderGroupCreateInfoNV
groups :: Vector RayTracingShaderGroupCreateInfoNV
  , -- | @maxRecursionDepth@ is the
    -- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#ray-tracing-recursion-depth maximum recursion depth>
    -- of shaders executed by this pipeline.
    RayTracingPipelineCreateInfoNV es -> "shader" ::: Word32
maxRecursionDepth :: Word32
  , -- | @layout@ is the description of binding locations used by both the
    -- pipeline and descriptor sets used with the pipeline.
    RayTracingPipelineCreateInfoNV es -> PipelineLayout
layout :: PipelineLayout
  , -- | @basePipelineHandle@ is a pipeline to derive from.
    RayTracingPipelineCreateInfoNV es -> Pipeline
basePipelineHandle :: Pipeline
  , -- | @basePipelineIndex@ is an index into the @pCreateInfos@ parameter to use
    -- as a pipeline to derive from.
    RayTracingPipelineCreateInfoNV es -> Int32
basePipelineIndex :: Int32
  }
  deriving (Typeable)
deriving instance Show (Chain es) => Show (RayTracingPipelineCreateInfoNV es)

instance Extensible RayTracingPipelineCreateInfoNV where
  extensibleType :: StructureType
extensibleType = StructureType
STRUCTURE_TYPE_RAY_TRACING_PIPELINE_CREATE_INFO_NV
  setNext :: RayTracingPipelineCreateInfoNV ds
-> Chain es -> RayTracingPipelineCreateInfoNV es
setNext x :: RayTracingPipelineCreateInfoNV ds
x next :: Chain es
next = RayTracingPipelineCreateInfoNV ds
x{$sel:next:RayTracingPipelineCreateInfoNV :: Chain es
next = Chain es
next}
  getNext :: RayTracingPipelineCreateInfoNV es -> Chain es
getNext RayTracingPipelineCreateInfoNV{..} = Chain es
next
  extends :: forall e b proxy. Typeable e => proxy e -> (Extends RayTracingPipelineCreateInfoNV e => b) -> Maybe b
  extends :: proxy e
-> (Extends RayTracingPipelineCreateInfoNV e => b) -> Maybe b
extends _ f :: Extends RayTracingPipelineCreateInfoNV e => b
f
    | Just Refl <- (Typeable e, Typeable PipelineCreationFeedbackCreateInfoEXT) =>
Maybe (e :~: PipelineCreationFeedbackCreateInfoEXT)
forall k (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
eqT @e @PipelineCreationFeedbackCreateInfoEXT = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends RayTracingPipelineCreateInfoNV e => b
f
    | Bool
otherwise = Maybe b
forall a. Maybe a
Nothing

instance (Extendss RayTracingPipelineCreateInfoNV es, PokeChain es) => ToCStruct (RayTracingPipelineCreateInfoNV es) where
  withCStruct :: RayTracingPipelineCreateInfoNV es
-> (Ptr (RayTracingPipelineCreateInfoNV es) -> IO b) -> IO b
withCStruct x :: RayTracingPipelineCreateInfoNV es
x f :: Ptr (RayTracingPipelineCreateInfoNV es) -> IO b
f = Int
-> Int -> (Ptr (RayTracingPipelineCreateInfoNV es) -> IO b) -> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 80 8 ((Ptr (RayTracingPipelineCreateInfoNV es) -> IO b) -> IO b)
-> (Ptr (RayTracingPipelineCreateInfoNV es) -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \p :: Ptr (RayTracingPipelineCreateInfoNV es)
p -> Ptr (RayTracingPipelineCreateInfoNV es)
-> RayTracingPipelineCreateInfoNV es -> IO b -> IO b
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 :: Ptr (RayTracingPipelineCreateInfoNV es)
-> RayTracingPipelineCreateInfoNV es -> IO b -> IO b
pokeCStruct p :: Ptr (RayTracingPipelineCreateInfoNV es)
p RayTracingPipelineCreateInfoNV{..} f :: IO b
f = ContT b IO b -> IO b
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT b IO b -> IO b) -> ContT b IO b -> IO b
forall a b. (a -> b) -> a -> b
$ do
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (RayTracingPipelineCreateInfoNV es)
p Ptr (RayTracingPipelineCreateInfoNV es) -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_RAY_TRACING_PIPELINE_CREATE_INFO_NV)
    "data" ::: Ptr ()
pNext'' <- (Ptr (Chain es) -> "data" ::: Ptr ())
-> ContT b IO (Ptr (Chain es)) -> ContT b IO ("data" ::: Ptr ())
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap Ptr (Chain es) -> "data" ::: Ptr ()
forall a b. Ptr a -> Ptr b
castPtr (ContT b IO (Ptr (Chain es)) -> ContT b IO ("data" ::: Ptr ()))
-> (((Ptr (Chain es) -> IO b) -> IO b)
    -> ContT b IO (Ptr (Chain es)))
-> ((Ptr (Chain es) -> IO b) -> IO b)
-> ContT b IO ("data" ::: Ptr ())
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((Ptr (Chain es) -> IO b) -> IO b) -> ContT b IO (Ptr (Chain es))
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr (Chain es) -> IO b) -> IO b)
 -> ContT b IO ("data" ::: Ptr ()))
-> ((Ptr (Chain es) -> IO b) -> IO b)
-> ContT b IO ("data" ::: Ptr ())
forall a b. (a -> b) -> a -> b
$ Chain es -> (Ptr (Chain es) -> IO b) -> IO b
forall (es :: [*]) a.
PokeChain es =>
Chain es -> (Ptr (Chain es) -> IO a) -> IO a
withChain (Chain es
next)
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr ("data" ::: Ptr ()) -> ("data" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (RayTracingPipelineCreateInfoNV es)
p Ptr (RayTracingPipelineCreateInfoNV es)
-> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) "data" ::: Ptr ()
pNext''
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr PipelineCreateFlags -> PipelineCreateFlags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (RayTracingPipelineCreateInfoNV es)
p Ptr (RayTracingPipelineCreateInfoNV es)
-> Int -> Ptr PipelineCreateFlags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr PipelineCreateFlags)) (PipelineCreateFlags
flags)
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr ("shader" ::: Word32) -> ("shader" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (RayTracingPipelineCreateInfoNV es)
p Ptr (RayTracingPipelineCreateInfoNV es)
-> Int -> Ptr ("shader" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr Word32)) ((Int -> "shader" ::: Word32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Vector (SomeStruct PipelineShaderStageCreateInfo) -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector (SomeStruct PipelineShaderStageCreateInfo) -> Int)
-> Vector (SomeStruct PipelineShaderStageCreateInfo) -> Int
forall a b. (a -> b) -> a -> b
$ (Vector (SomeStruct PipelineShaderStageCreateInfo)
stages)) :: Word32))
    Ptr (PipelineShaderStageCreateInfo Any)
pPStages' <- ((Ptr (PipelineShaderStageCreateInfo Any) -> IO b) -> IO b)
-> ContT b IO (Ptr (PipelineShaderStageCreateInfo Any))
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr (PipelineShaderStageCreateInfo Any) -> IO b) -> IO b)
 -> ContT b IO (Ptr (PipelineShaderStageCreateInfo Any)))
-> ((Ptr (PipelineShaderStageCreateInfo Any) -> IO b) -> IO b)
-> ContT b IO (Ptr (PipelineShaderStageCreateInfo Any))
forall a b. (a -> b) -> a -> b
$ Int
-> Int -> (Ptr (PipelineShaderStageCreateInfo Any) -> IO b) -> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned @(PipelineShaderStageCreateInfo _) ((Vector (SomeStruct PipelineShaderStageCreateInfo) -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector (SomeStruct PipelineShaderStageCreateInfo)
stages)) Int -> Int -> Int
forall a. Num a => a -> a -> a
* 48) 8
    (Int -> SomeStruct PipelineShaderStageCreateInfo -> ContT b IO ())
-> Vector (SomeStruct PipelineShaderStageCreateInfo)
-> ContT b IO ()
forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\i :: Int
i e :: SomeStruct PipelineShaderStageCreateInfo
e -> ((() -> IO b) -> IO b) -> ContT b IO ()
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((() -> IO b) -> IO b) -> ContT b IO ())
-> ((() -> IO b) -> IO b) -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (SomeStruct PipelineShaderStageCreateInfo)
-> SomeStruct PipelineShaderStageCreateInfo -> IO b -> IO b
forall (a :: [*] -> *) b.
(forall (es :: [*]).
 (Extendss a es, PokeChain es) =>
 ToCStruct (a es)) =>
Ptr (SomeStruct a) -> SomeStruct a -> IO b -> IO b
pokeSomeCStruct (Ptr (PipelineShaderStageCreateInfo Any)
-> Ptr (SomeStruct PipelineShaderStageCreateInfo)
forall (a :: [*] -> *) (es :: [*]).
Ptr (a es) -> Ptr (SomeStruct a)
forgetExtensions (Ptr (PipelineShaderStageCreateInfo Any)
pPStages' Ptr (PipelineShaderStageCreateInfo Any)
-> Int -> Ptr (PipelineShaderStageCreateInfo _)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (48 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr (PipelineShaderStageCreateInfo _))) (SomeStruct PipelineShaderStageCreateInfo
e) (IO b -> IO b) -> ((() -> IO b) -> IO b) -> (() -> IO b) -> IO b
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((() -> IO b) -> () -> IO b
forall a b. (a -> b) -> a -> b
$ ())) (Vector (SomeStruct PipelineShaderStageCreateInfo)
stages)
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (Ptr (PipelineShaderStageCreateInfo Any))
-> Ptr (PipelineShaderStageCreateInfo Any) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (RayTracingPipelineCreateInfoNV es)
p Ptr (RayTracingPipelineCreateInfoNV es)
-> Int -> Ptr (Ptr (PipelineShaderStageCreateInfo _))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr (Ptr (PipelineShaderStageCreateInfo _)))) (Ptr (PipelineShaderStageCreateInfo Any)
pPStages')
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr ("shader" ::: Word32) -> ("shader" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (RayTracingPipelineCreateInfoNV es)
p Ptr (RayTracingPipelineCreateInfoNV es)
-> Int -> Ptr ("shader" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr Word32)) ((Int -> "shader" ::: Word32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Vector RayTracingShaderGroupCreateInfoNV -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector RayTracingShaderGroupCreateInfoNV -> Int)
-> Vector RayTracingShaderGroupCreateInfoNV -> Int
forall a b. (a -> b) -> a -> b
$ (Vector RayTracingShaderGroupCreateInfoNV
groups)) :: Word32))
    Ptr RayTracingShaderGroupCreateInfoNV
pPGroups' <- ((Ptr RayTracingShaderGroupCreateInfoNV -> IO b) -> IO b)
-> ContT b IO (Ptr RayTracingShaderGroupCreateInfoNV)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr RayTracingShaderGroupCreateInfoNV -> IO b) -> IO b)
 -> ContT b IO (Ptr RayTracingShaderGroupCreateInfoNV))
-> ((Ptr RayTracingShaderGroupCreateInfoNV -> IO b) -> IO b)
-> ContT b IO (Ptr RayTracingShaderGroupCreateInfoNV)
forall a b. (a -> b) -> a -> b
$ Int
-> Int -> (Ptr RayTracingShaderGroupCreateInfoNV -> IO b) -> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned @RayTracingShaderGroupCreateInfoNV ((Vector RayTracingShaderGroupCreateInfoNV -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector RayTracingShaderGroupCreateInfoNV
groups)) Int -> Int -> Int
forall a. Num a => a -> a -> a
* 40) 8
    (Int -> RayTracingShaderGroupCreateInfoNV -> ContT b IO ())
-> Vector RayTracingShaderGroupCreateInfoNV -> ContT b IO ()
forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\i :: Int
i e :: RayTracingShaderGroupCreateInfoNV
e -> ((() -> IO b) -> IO b) -> ContT b IO ()
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((() -> IO b) -> IO b) -> ContT b IO ())
-> ((() -> IO b) -> IO b) -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr RayTracingShaderGroupCreateInfoNV
-> RayTracingShaderGroupCreateInfoNV -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct (Ptr RayTracingShaderGroupCreateInfoNV
pPGroups' Ptr RayTracingShaderGroupCreateInfoNV
-> Int -> Ptr RayTracingShaderGroupCreateInfoNV
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (40 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr RayTracingShaderGroupCreateInfoNV) (RayTracingShaderGroupCreateInfoNV
e) (IO b -> IO b) -> ((() -> IO b) -> IO b) -> (() -> IO b) -> IO b
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((() -> IO b) -> () -> IO b
forall a b. (a -> b) -> a -> b
$ ())) (Vector RayTracingShaderGroupCreateInfoNV
groups)
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (Ptr RayTracingShaderGroupCreateInfoNV)
-> Ptr RayTracingShaderGroupCreateInfoNV -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (RayTracingPipelineCreateInfoNV es)
p Ptr (RayTracingPipelineCreateInfoNV es)
-> Int -> Ptr (Ptr RayTracingShaderGroupCreateInfoNV)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 40 :: Ptr (Ptr RayTracingShaderGroupCreateInfoNV))) (Ptr RayTracingShaderGroupCreateInfoNV
pPGroups')
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr ("shader" ::: Word32) -> ("shader" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (RayTracingPipelineCreateInfoNV es)
p Ptr (RayTracingPipelineCreateInfoNV es)
-> Int -> Ptr ("shader" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 48 :: Ptr Word32)) ("shader" ::: Word32
maxRecursionDepth)
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr PipelineLayout -> PipelineLayout -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (RayTracingPipelineCreateInfoNV es)
p Ptr (RayTracingPipelineCreateInfoNV es)
-> Int -> Ptr PipelineLayout
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 56 :: Ptr PipelineLayout)) (PipelineLayout
layout)
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ ("pPipelines" ::: Ptr Pipeline) -> Pipeline -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (RayTracingPipelineCreateInfoNV es)
p Ptr (RayTracingPipelineCreateInfoNV es)
-> Int -> "pPipelines" ::: Ptr Pipeline
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 64 :: Ptr Pipeline)) (Pipeline
basePipelineHandle)
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr Int32 -> Int32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (RayTracingPipelineCreateInfoNV es)
p Ptr (RayTracingPipelineCreateInfoNV es) -> Int -> Ptr Int32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 72 :: Ptr Int32)) (Int32
basePipelineIndex)
    IO b -> ContT b IO b
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO b -> ContT b IO b) -> IO b -> ContT b IO b
forall a b. (a -> b) -> a -> b
$ IO b
f
  cStructSize :: Int
cStructSize = 80
  cStructAlignment :: Int
cStructAlignment = 8
  pokeZeroCStruct :: Ptr (RayTracingPipelineCreateInfoNV es) -> IO b -> IO b
pokeZeroCStruct p :: Ptr (RayTracingPipelineCreateInfoNV es)
p f :: IO b
f = ContT b IO b -> IO b
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT b IO b -> IO b) -> ContT b IO b -> IO b
forall a b. (a -> b) -> a -> b
$ do
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (RayTracingPipelineCreateInfoNV es)
p Ptr (RayTracingPipelineCreateInfoNV es) -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_RAY_TRACING_PIPELINE_CREATE_INFO_NV)
    "data" ::: Ptr ()
pNext' <- (Ptr (Chain es) -> "data" ::: Ptr ())
-> ContT b IO (Ptr (Chain es)) -> ContT b IO ("data" ::: Ptr ())
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap Ptr (Chain es) -> "data" ::: Ptr ()
forall a b. Ptr a -> Ptr b
castPtr (ContT b IO (Ptr (Chain es)) -> ContT b IO ("data" ::: Ptr ()))
-> (((Ptr (Chain es) -> IO b) -> IO b)
    -> ContT b IO (Ptr (Chain es)))
-> ((Ptr (Chain es) -> IO b) -> IO b)
-> ContT b IO ("data" ::: Ptr ())
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((Ptr (Chain es) -> IO b) -> IO b) -> ContT b IO (Ptr (Chain es))
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr (Chain es) -> IO b) -> IO b)
 -> ContT b IO ("data" ::: Ptr ()))
-> ((Ptr (Chain es) -> IO b) -> IO b)
-> ContT b IO ("data" ::: Ptr ())
forall a b. (a -> b) -> a -> b
$ forall a. PokeChain es => (Ptr (Chain es) -> IO a) -> IO a
forall (es :: [*]) a.
PokeChain es =>
(Ptr (Chain es) -> IO a) -> IO a
withZeroChain @es
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr ("data" ::: Ptr ()) -> ("data" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (RayTracingPipelineCreateInfoNV es)
p Ptr (RayTracingPipelineCreateInfoNV es)
-> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) "data" ::: Ptr ()
pNext'
    Ptr (PipelineShaderStageCreateInfo Any)
pPStages' <- ((Ptr (PipelineShaderStageCreateInfo Any) -> IO b) -> IO b)
-> ContT b IO (Ptr (PipelineShaderStageCreateInfo Any))
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr (PipelineShaderStageCreateInfo Any) -> IO b) -> IO b)
 -> ContT b IO (Ptr (PipelineShaderStageCreateInfo Any)))
-> ((Ptr (PipelineShaderStageCreateInfo Any) -> IO b) -> IO b)
-> ContT b IO (Ptr (PipelineShaderStageCreateInfo Any))
forall a b. (a -> b) -> a -> b
$ Int
-> Int -> (Ptr (PipelineShaderStageCreateInfo Any) -> IO b) -> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned @(PipelineShaderStageCreateInfo _) ((Vector Any -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector Any
forall a. Monoid a => a
mempty)) Int -> Int -> Int
forall a. Num a => a -> a -> a
* 48) 8
    (Int -> SomeStruct PipelineShaderStageCreateInfo -> ContT b IO ())
-> Vector (SomeStruct PipelineShaderStageCreateInfo)
-> ContT b IO ()
forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\i :: Int
i e :: SomeStruct PipelineShaderStageCreateInfo
e -> ((() -> IO b) -> IO b) -> ContT b IO ()
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((() -> IO b) -> IO b) -> ContT b IO ())
-> ((() -> IO b) -> IO b) -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (SomeStruct PipelineShaderStageCreateInfo)
-> SomeStruct PipelineShaderStageCreateInfo -> IO b -> IO b
forall (a :: [*] -> *) b.
(forall (es :: [*]).
 (Extendss a es, PokeChain es) =>
 ToCStruct (a es)) =>
Ptr (SomeStruct a) -> SomeStruct a -> IO b -> IO b
pokeSomeCStruct (Ptr (PipelineShaderStageCreateInfo Any)
-> Ptr (SomeStruct PipelineShaderStageCreateInfo)
forall (a :: [*] -> *) (es :: [*]).
Ptr (a es) -> Ptr (SomeStruct a)
forgetExtensions (Ptr (PipelineShaderStageCreateInfo Any)
pPStages' Ptr (PipelineShaderStageCreateInfo Any)
-> Int -> Ptr (PipelineShaderStageCreateInfo _)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (48 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr (PipelineShaderStageCreateInfo _))) (SomeStruct PipelineShaderStageCreateInfo
e) (IO b -> IO b) -> ((() -> IO b) -> IO b) -> (() -> IO b) -> IO b
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((() -> IO b) -> () -> IO b
forall a b. (a -> b) -> a -> b
$ ())) (Vector (SomeStruct PipelineShaderStageCreateInfo)
forall a. Monoid a => a
mempty)
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (Ptr (PipelineShaderStageCreateInfo Any))
-> Ptr (PipelineShaderStageCreateInfo Any) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (RayTracingPipelineCreateInfoNV es)
p Ptr (RayTracingPipelineCreateInfoNV es)
-> Int -> Ptr (Ptr (PipelineShaderStageCreateInfo _))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr (Ptr (PipelineShaderStageCreateInfo _)))) (Ptr (PipelineShaderStageCreateInfo Any)
pPStages')
    Ptr RayTracingShaderGroupCreateInfoNV
pPGroups' <- ((Ptr RayTracingShaderGroupCreateInfoNV -> IO b) -> IO b)
-> ContT b IO (Ptr RayTracingShaderGroupCreateInfoNV)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr RayTracingShaderGroupCreateInfoNV -> IO b) -> IO b)
 -> ContT b IO (Ptr RayTracingShaderGroupCreateInfoNV))
-> ((Ptr RayTracingShaderGroupCreateInfoNV -> IO b) -> IO b)
-> ContT b IO (Ptr RayTracingShaderGroupCreateInfoNV)
forall a b. (a -> b) -> a -> b
$ Int
-> Int -> (Ptr RayTracingShaderGroupCreateInfoNV -> IO b) -> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned @RayTracingShaderGroupCreateInfoNV ((Vector Any -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector Any
forall a. Monoid a => a
mempty)) Int -> Int -> Int
forall a. Num a => a -> a -> a
* 40) 8
    (Int -> RayTracingShaderGroupCreateInfoNV -> ContT b IO ())
-> Vector RayTracingShaderGroupCreateInfoNV -> ContT b IO ()
forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\i :: Int
i e :: RayTracingShaderGroupCreateInfoNV
e -> ((() -> IO b) -> IO b) -> ContT b IO ()
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((() -> IO b) -> IO b) -> ContT b IO ())
-> ((() -> IO b) -> IO b) -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr RayTracingShaderGroupCreateInfoNV
-> RayTracingShaderGroupCreateInfoNV -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct (Ptr RayTracingShaderGroupCreateInfoNV
pPGroups' Ptr RayTracingShaderGroupCreateInfoNV
-> Int -> Ptr RayTracingShaderGroupCreateInfoNV
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (40 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr RayTracingShaderGroupCreateInfoNV) (RayTracingShaderGroupCreateInfoNV
e) (IO b -> IO b) -> ((() -> IO b) -> IO b) -> (() -> IO b) -> IO b
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((() -> IO b) -> () -> IO b
forall a b. (a -> b) -> a -> b
$ ())) (Vector RayTracingShaderGroupCreateInfoNV
forall a. Monoid a => a
mempty)
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (Ptr RayTracingShaderGroupCreateInfoNV)
-> Ptr RayTracingShaderGroupCreateInfoNV -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (RayTracingPipelineCreateInfoNV es)
p Ptr (RayTracingPipelineCreateInfoNV es)
-> Int -> Ptr (Ptr RayTracingShaderGroupCreateInfoNV)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 40 :: Ptr (Ptr RayTracingShaderGroupCreateInfoNV))) (Ptr RayTracingShaderGroupCreateInfoNV
pPGroups')
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr ("shader" ::: Word32) -> ("shader" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (RayTracingPipelineCreateInfoNV es)
p Ptr (RayTracingPipelineCreateInfoNV es)
-> Int -> Ptr ("shader" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 48 :: Ptr Word32)) ("shader" ::: Word32
forall a. Zero a => a
zero)
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr PipelineLayout -> PipelineLayout -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (RayTracingPipelineCreateInfoNV es)
p Ptr (RayTracingPipelineCreateInfoNV es)
-> Int -> Ptr PipelineLayout
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 56 :: Ptr PipelineLayout)) (PipelineLayout
forall a. Zero a => a
zero)
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr Int32 -> Int32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (RayTracingPipelineCreateInfoNV es)
p Ptr (RayTracingPipelineCreateInfoNV es) -> Int -> Ptr Int32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 72 :: Ptr Int32)) (Int32
forall a. Zero a => a
zero)
    IO b -> ContT b IO b
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO b -> ContT b IO b) -> IO b -> ContT b IO b
forall a b. (a -> b) -> a -> b
$ IO b
f

instance (Extendss RayTracingPipelineCreateInfoNV es, PeekChain es) => FromCStruct (RayTracingPipelineCreateInfoNV es) where
  peekCStruct :: Ptr (RayTracingPipelineCreateInfoNV es)
-> IO (RayTracingPipelineCreateInfoNV es)
peekCStruct p :: Ptr (RayTracingPipelineCreateInfoNV es)
p = do
    "data" ::: Ptr ()
pNext <- Ptr ("data" ::: Ptr ()) -> IO ("data" ::: Ptr ())
forall a. Storable a => Ptr a -> IO a
peek @(Ptr ()) ((Ptr (RayTracingPipelineCreateInfoNV es)
p Ptr (RayTracingPipelineCreateInfoNV es)
-> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ())))
    Chain es
next <- Ptr (Chain es) -> IO (Chain es)
forall (es :: [*]). PeekChain es => Ptr (Chain es) -> IO (Chain es)
peekChain (("data" ::: Ptr ()) -> Ptr (Chain es)
forall a b. Ptr a -> Ptr b
castPtr "data" ::: Ptr ()
pNext)
    PipelineCreateFlags
flags <- Ptr PipelineCreateFlags -> IO PipelineCreateFlags
forall a. Storable a => Ptr a -> IO a
peek @PipelineCreateFlags ((Ptr (RayTracingPipelineCreateInfoNV es)
p Ptr (RayTracingPipelineCreateInfoNV es)
-> Int -> Ptr PipelineCreateFlags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr PipelineCreateFlags))
    "shader" ::: Word32
stageCount <- Ptr ("shader" ::: Word32) -> IO ("shader" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr (RayTracingPipelineCreateInfoNV es)
p Ptr (RayTracingPipelineCreateInfoNV es)
-> Int -> Ptr ("shader" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr Word32))
    Ptr (PipelineShaderStageCreateInfo Any)
pStages <- Ptr (Ptr (PipelineShaderStageCreateInfo Any))
-> IO (Ptr (PipelineShaderStageCreateInfo Any))
forall a. Storable a => Ptr a -> IO a
peek @(Ptr (PipelineShaderStageCreateInfo _)) ((Ptr (RayTracingPipelineCreateInfoNV es)
p Ptr (RayTracingPipelineCreateInfoNV es)
-> Int -> Ptr (Ptr (PipelineShaderStageCreateInfo a))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr (Ptr (PipelineShaderStageCreateInfo a))))
    Vector (SomeStruct PipelineShaderStageCreateInfo)
pStages' <- Int
-> (Int -> IO (SomeStruct PipelineShaderStageCreateInfo))
-> IO (Vector (SomeStruct PipelineShaderStageCreateInfo))
forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
generateM (("shader" ::: Word32) -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral "shader" ::: Word32
stageCount) (\i :: Int
i -> Ptr (SomeStruct PipelineShaderStageCreateInfo)
-> IO (SomeStruct PipelineShaderStageCreateInfo)
forall (a :: [*] -> *).
(Extensible a,
 forall (es :: [*]).
 (Extendss a es, PeekChain es) =>
 FromCStruct (a es)) =>
Ptr (SomeStruct a) -> IO (SomeStruct a)
peekSomeCStruct (Ptr (PipelineShaderStageCreateInfo Any)
-> Ptr (SomeStruct PipelineShaderStageCreateInfo)
forall (a :: [*] -> *) (es :: [*]).
Ptr (a es) -> Ptr (SomeStruct a)
forgetExtensions ((Ptr (PipelineShaderStageCreateInfo Any)
pStages Ptr (PipelineShaderStageCreateInfo Any)
-> Int -> Ptr (PipelineShaderStageCreateInfo Any)
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (48 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr (PipelineShaderStageCreateInfo _)))))
    "shader" ::: Word32
groupCount <- Ptr ("shader" ::: Word32) -> IO ("shader" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr (RayTracingPipelineCreateInfoNV es)
p Ptr (RayTracingPipelineCreateInfoNV es)
-> Int -> Ptr ("shader" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr Word32))
    Ptr RayTracingShaderGroupCreateInfoNV
pGroups <- Ptr (Ptr RayTracingShaderGroupCreateInfoNV)
-> IO (Ptr RayTracingShaderGroupCreateInfoNV)
forall a. Storable a => Ptr a -> IO a
peek @(Ptr RayTracingShaderGroupCreateInfoNV) ((Ptr (RayTracingPipelineCreateInfoNV es)
p Ptr (RayTracingPipelineCreateInfoNV es)
-> Int -> Ptr (Ptr RayTracingShaderGroupCreateInfoNV)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 40 :: Ptr (Ptr RayTracingShaderGroupCreateInfoNV)))
    Vector RayTracingShaderGroupCreateInfoNV
pGroups' <- Int
-> (Int -> IO RayTracingShaderGroupCreateInfoNV)
-> IO (Vector RayTracingShaderGroupCreateInfoNV)
forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
generateM (("shader" ::: Word32) -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral "shader" ::: Word32
groupCount) (\i :: Int
i -> Ptr RayTracingShaderGroupCreateInfoNV
-> IO RayTracingShaderGroupCreateInfoNV
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @RayTracingShaderGroupCreateInfoNV ((Ptr RayTracingShaderGroupCreateInfoNV
pGroups Ptr RayTracingShaderGroupCreateInfoNV
-> Int -> Ptr RayTracingShaderGroupCreateInfoNV
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (40 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr RayTracingShaderGroupCreateInfoNV)))
    "shader" ::: Word32
maxRecursionDepth <- Ptr ("shader" ::: Word32) -> IO ("shader" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr (RayTracingPipelineCreateInfoNV es)
p Ptr (RayTracingPipelineCreateInfoNV es)
-> Int -> Ptr ("shader" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 48 :: Ptr Word32))
    PipelineLayout
layout <- Ptr PipelineLayout -> IO PipelineLayout
forall a. Storable a => Ptr a -> IO a
peek @PipelineLayout ((Ptr (RayTracingPipelineCreateInfoNV es)
p Ptr (RayTracingPipelineCreateInfoNV es)
-> Int -> Ptr PipelineLayout
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 56 :: Ptr PipelineLayout))
    Pipeline
basePipelineHandle <- ("pPipelines" ::: Ptr Pipeline) -> IO Pipeline
forall a. Storable a => Ptr a -> IO a
peek @Pipeline ((Ptr (RayTracingPipelineCreateInfoNV es)
p Ptr (RayTracingPipelineCreateInfoNV es)
-> Int -> "pPipelines" ::: Ptr Pipeline
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 64 :: Ptr Pipeline))
    Int32
basePipelineIndex <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek @Int32 ((Ptr (RayTracingPipelineCreateInfoNV es)
p Ptr (RayTracingPipelineCreateInfoNV es) -> Int -> Ptr Int32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 72 :: Ptr Int32))
    RayTracingPipelineCreateInfoNV es
-> IO (RayTracingPipelineCreateInfoNV es)
forall (f :: * -> *) a. Applicative f => a -> f a
pure (RayTracingPipelineCreateInfoNV es
 -> IO (RayTracingPipelineCreateInfoNV es))
-> RayTracingPipelineCreateInfoNV es
-> IO (RayTracingPipelineCreateInfoNV es)
forall a b. (a -> b) -> a -> b
$ Chain es
-> PipelineCreateFlags
-> Vector (SomeStruct PipelineShaderStageCreateInfo)
-> Vector RayTracingShaderGroupCreateInfoNV
-> ("shader" ::: Word32)
-> PipelineLayout
-> Pipeline
-> Int32
-> RayTracingPipelineCreateInfoNV es
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 = Chain es
-> PipelineCreateFlags
-> Vector (SomeStruct PipelineShaderStageCreateInfo)
-> Vector RayTracingShaderGroupCreateInfoNV
-> ("shader" ::: Word32)
-> PipelineLayout
-> Pipeline
-> Int32
-> RayTracingPipelineCreateInfoNV es
forall (es :: [*]).
Chain es
-> PipelineCreateFlags
-> Vector (SomeStruct PipelineShaderStageCreateInfo)
-> Vector RayTracingShaderGroupCreateInfoNV
-> ("shader" ::: Word32)
-> PipelineLayout
-> Pipeline
-> Int32
-> RayTracingPipelineCreateInfoNV es
RayTracingPipelineCreateInfoNV
           ()
           PipelineCreateFlags
forall a. Zero a => a
zero
           Vector (SomeStruct PipelineShaderStageCreateInfo)
forall a. Monoid a => a
mempty
           Vector RayTracingShaderGroupCreateInfoNV
forall a. Monoid a => a
mempty
           "shader" ::: Word32
forall a. Zero a => a
zero
           PipelineLayout
forall a. Zero a => a
zero
           Pipeline
forall a. Zero a => a
zero
           Int32
forall a. Zero a => a
zero


-- | VkGeometryTrianglesNV - Structure specifying a triangle geometry in a
-- bottom-level acceleration structure
--
-- = Description
--
-- If @indexType@ is 'INDEX_TYPE_NONE_NV', then this structure describes a
-- set of triangles determined by @vertexCount@. Otherwise, this structure
-- describes a set of indexed triangles determined by @indexCount@.
--
-- == Valid Usage
--
-- -   @vertexOffset@ /must/ be less than the size of @vertexData@
--
-- -   @vertexOffset@ /must/ be a multiple of the component size of
--     @vertexFormat@
--
-- -   @vertexFormat@ /must/ be one of
--     'Vulkan.Core10.Enums.Format.FORMAT_R32G32B32_SFLOAT',
--     'Vulkan.Core10.Enums.Format.FORMAT_R32G32_SFLOAT',
--     'Vulkan.Core10.Enums.Format.FORMAT_R16G16B16_SFLOAT',
--     'Vulkan.Core10.Enums.Format.FORMAT_R16G16_SFLOAT',
--     'Vulkan.Core10.Enums.Format.FORMAT_R16G16_SNORM', or
--     'Vulkan.Core10.Enums.Format.FORMAT_R16G16B16_SNORM'
--
-- -   @indexOffset@ /must/ be less than the size of @indexData@
--
-- -   @indexOffset@ /must/ be a multiple of the element size of
--     @indexType@
--
-- -   @indexType@ /must/ be
--     'Vulkan.Core10.Enums.IndexType.INDEX_TYPE_UINT16',
--     'Vulkan.Core10.Enums.IndexType.INDEX_TYPE_UINT32', or
--     'INDEX_TYPE_NONE_NV'
--
-- -   @indexData@ /must/ be 'Vulkan.Core10.APIConstants.NULL_HANDLE' if
--     @indexType@ is 'INDEX_TYPE_NONE_NV'
--
-- -   @indexData@ /must/ be a valid 'Vulkan.Core10.Handles.Buffer' handle
--     if @indexType@ is not 'INDEX_TYPE_NONE_NV'
--
-- -   @indexCount@ /must/ be @0@ if @indexType@ is 'INDEX_TYPE_NONE_NV'
--
-- -   @transformOffset@ /must/ be less than the size of @transformData@
--
-- -   @transformOffset@ /must/ be a multiple of @16@
--
-- == Valid Usage (Implicit)
--
-- -   @sType@ /must/ be
--     'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_GEOMETRY_TRIANGLES_NV'
--
-- -   @pNext@ /must/ be @NULL@
--
-- -   If @vertexData@ is not 'Vulkan.Core10.APIConstants.NULL_HANDLE',
--     @vertexData@ /must/ be a valid 'Vulkan.Core10.Handles.Buffer' handle
--
-- -   @vertexFormat@ /must/ be a valid 'Vulkan.Core10.Enums.Format.Format'
--     value
--
-- -   If @indexData@ is not 'Vulkan.Core10.APIConstants.NULL_HANDLE',
--     @indexData@ /must/ be a valid 'Vulkan.Core10.Handles.Buffer' handle
--
-- -   @indexType@ /must/ be a valid
--     'Vulkan.Core10.Enums.IndexType.IndexType' value
--
-- -   If @transformData@ is not 'Vulkan.Core10.APIConstants.NULL_HANDLE',
--     @transformData@ /must/ be a valid 'Vulkan.Core10.Handles.Buffer'
--     handle
--
-- -   Each of @indexData@, @transformData@, and @vertexData@ that are
--     valid handles of non-ignored parameters /must/ have been created,
--     allocated, or retrieved from the same 'Vulkan.Core10.Handles.Device'
--
-- = See Also
--
-- 'Vulkan.Core10.Handles.Buffer', 'Vulkan.Core10.BaseType.DeviceSize',
-- 'Vulkan.Core10.Enums.Format.Format', 'GeometryDataNV',
-- 'Vulkan.Core10.Enums.IndexType.IndexType',
-- 'Vulkan.Core10.Enums.StructureType.StructureType'
data GeometryTrianglesNV = GeometryTrianglesNV
  { -- | @vertexData@ is the buffer containing vertex data for this geometry.
    GeometryTrianglesNV -> "instanceData" ::: Buffer
vertexData :: Buffer
  , -- | @vertexOffset@ is the offset in bytes within @vertexData@ containing
    -- vertex data for this geometry.
    GeometryTrianglesNV -> "instanceOffset" ::: DeviceSize
vertexOffset :: DeviceSize
  , -- | @vertexCount@ is the number of valid vertices.
    GeometryTrianglesNV -> "shader" ::: Word32
vertexCount :: Word32
  , -- | @vertexStride@ is the stride in bytes between each vertex.
    GeometryTrianglesNV -> "instanceOffset" ::: DeviceSize
vertexStride :: DeviceSize
  , -- | @vertexFormat@ is a 'Vulkan.Core10.Enums.Format.Format' describing the
    -- format of each vertex element.
    GeometryTrianglesNV -> Format
vertexFormat :: Format
  , -- | @indexData@ is the buffer containing index data for this geometry.
    GeometryTrianglesNV -> "instanceData" ::: Buffer
indexData :: Buffer
  , -- | @indexOffset@ is the offset in bytes within @indexData@ containing index
    -- data for this geometry.
    GeometryTrianglesNV -> "instanceOffset" ::: DeviceSize
indexOffset :: DeviceSize
  , -- | @indexCount@ is the number of indices to include in this geometry.
    GeometryTrianglesNV -> "shader" ::: Word32
indexCount :: Word32
  , -- | @indexType@ is a 'Vulkan.Core10.Enums.IndexType.IndexType' describing
    -- the format of each index.
    GeometryTrianglesNV -> IndexType
indexType :: IndexType
  , -- | @transformData@ is an optional buffer containing an 'TransformMatrixNV'
    -- structure defining a transformation to be applied to this geometry.
    GeometryTrianglesNV -> "instanceData" ::: Buffer
transformData :: Buffer
  , -- | @transformOffset@ is the offset in bytes in @transformData@ of the
    -- transform information described above.
    GeometryTrianglesNV -> "instanceOffset" ::: DeviceSize
transformOffset :: DeviceSize
  }
  deriving (Typeable)
deriving instance Show GeometryTrianglesNV

instance ToCStruct GeometryTrianglesNV where
  withCStruct :: GeometryTrianglesNV -> (Ptr GeometryTrianglesNV -> IO b) -> IO b
withCStruct x :: GeometryTrianglesNV
x f :: Ptr GeometryTrianglesNV -> IO b
f = Int -> Int -> (Ptr GeometryTrianglesNV -> IO b) -> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 96 8 ((Ptr GeometryTrianglesNV -> IO b) -> IO b)
-> (Ptr GeometryTrianglesNV -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \p :: Ptr GeometryTrianglesNV
p -> Ptr GeometryTrianglesNV -> GeometryTrianglesNV -> IO b -> IO b
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 :: Ptr GeometryTrianglesNV -> GeometryTrianglesNV -> IO b -> IO b
pokeCStruct p :: Ptr GeometryTrianglesNV
p GeometryTrianglesNV{..} f :: IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryTrianglesNV
p Ptr GeometryTrianglesNV -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_GEOMETRY_TRIANGLES_NV)
    Ptr ("data" ::: Ptr ()) -> ("data" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryTrianglesNV
p Ptr GeometryTrianglesNV -> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) ("data" ::: Ptr ()
forall a. Ptr a
nullPtr)
    Ptr ("instanceData" ::: Buffer)
-> ("instanceData" ::: Buffer) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryTrianglesNV
p Ptr GeometryTrianglesNV -> Int -> Ptr ("instanceData" ::: Buffer)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Buffer)) ("instanceData" ::: Buffer
vertexData)
    Ptr ("instanceOffset" ::: DeviceSize)
-> ("instanceOffset" ::: DeviceSize) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryTrianglesNV
p Ptr GeometryTrianglesNV
-> Int -> Ptr ("instanceOffset" ::: DeviceSize)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr DeviceSize)) ("instanceOffset" ::: DeviceSize
vertexOffset)
    Ptr ("shader" ::: Word32) -> ("shader" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryTrianglesNV
p Ptr GeometryTrianglesNV -> Int -> Ptr ("shader" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr Word32)) ("shader" ::: Word32
vertexCount)
    Ptr ("instanceOffset" ::: DeviceSize)
-> ("instanceOffset" ::: DeviceSize) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryTrianglesNV
p Ptr GeometryTrianglesNV
-> Int -> Ptr ("instanceOffset" ::: DeviceSize)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 40 :: Ptr DeviceSize)) ("instanceOffset" ::: DeviceSize
vertexStride)
    Ptr Format -> Format -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryTrianglesNV
p Ptr GeometryTrianglesNV -> Int -> Ptr Format
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 48 :: Ptr Format)) (Format
vertexFormat)
    Ptr ("instanceData" ::: Buffer)
-> ("instanceData" ::: Buffer) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryTrianglesNV
p Ptr GeometryTrianglesNV -> Int -> Ptr ("instanceData" ::: Buffer)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 56 :: Ptr Buffer)) ("instanceData" ::: Buffer
indexData)
    Ptr ("instanceOffset" ::: DeviceSize)
-> ("instanceOffset" ::: DeviceSize) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryTrianglesNV
p Ptr GeometryTrianglesNV
-> Int -> Ptr ("instanceOffset" ::: DeviceSize)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 64 :: Ptr DeviceSize)) ("instanceOffset" ::: DeviceSize
indexOffset)
    Ptr ("shader" ::: Word32) -> ("shader" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryTrianglesNV
p Ptr GeometryTrianglesNV -> Int -> Ptr ("shader" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 72 :: Ptr Word32)) ("shader" ::: Word32
indexCount)
    Ptr IndexType -> IndexType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryTrianglesNV
p Ptr GeometryTrianglesNV -> Int -> Ptr IndexType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 76 :: Ptr IndexType)) (IndexType
indexType)
    Ptr ("instanceData" ::: Buffer)
-> ("instanceData" ::: Buffer) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryTrianglesNV
p Ptr GeometryTrianglesNV -> Int -> Ptr ("instanceData" ::: Buffer)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 80 :: Ptr Buffer)) ("instanceData" ::: Buffer
transformData)
    Ptr ("instanceOffset" ::: DeviceSize)
-> ("instanceOffset" ::: DeviceSize) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryTrianglesNV
p Ptr GeometryTrianglesNV
-> Int -> Ptr ("instanceOffset" ::: DeviceSize)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 88 :: Ptr DeviceSize)) ("instanceOffset" ::: DeviceSize
transformOffset)
    IO b
f
  cStructSize :: Int
cStructSize = 96
  cStructAlignment :: Int
cStructAlignment = 8
  pokeZeroCStruct :: Ptr GeometryTrianglesNV -> IO b -> IO b
pokeZeroCStruct p :: Ptr GeometryTrianglesNV
p f :: IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryTrianglesNV
p Ptr GeometryTrianglesNV -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_GEOMETRY_TRIANGLES_NV)
    Ptr ("data" ::: Ptr ()) -> ("data" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryTrianglesNV
p Ptr GeometryTrianglesNV -> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) ("data" ::: Ptr ()
forall a. Ptr a
nullPtr)
    Ptr ("instanceOffset" ::: DeviceSize)
-> ("instanceOffset" ::: DeviceSize) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryTrianglesNV
p Ptr GeometryTrianglesNV
-> Int -> Ptr ("instanceOffset" ::: DeviceSize)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr DeviceSize)) ("instanceOffset" ::: DeviceSize
forall a. Zero a => a
zero)
    Ptr ("shader" ::: Word32) -> ("shader" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryTrianglesNV
p Ptr GeometryTrianglesNV -> Int -> Ptr ("shader" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr Word32)) ("shader" ::: Word32
forall a. Zero a => a
zero)
    Ptr ("instanceOffset" ::: DeviceSize)
-> ("instanceOffset" ::: DeviceSize) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryTrianglesNV
p Ptr GeometryTrianglesNV
-> Int -> Ptr ("instanceOffset" ::: DeviceSize)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 40 :: Ptr DeviceSize)) ("instanceOffset" ::: DeviceSize
forall a. Zero a => a
zero)
    Ptr Format -> Format -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryTrianglesNV
p Ptr GeometryTrianglesNV -> Int -> Ptr Format
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 48 :: Ptr Format)) (Format
forall a. Zero a => a
zero)
    Ptr ("instanceOffset" ::: DeviceSize)
-> ("instanceOffset" ::: DeviceSize) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryTrianglesNV
p Ptr GeometryTrianglesNV
-> Int -> Ptr ("instanceOffset" ::: DeviceSize)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 64 :: Ptr DeviceSize)) ("instanceOffset" ::: DeviceSize
forall a. Zero a => a
zero)
    Ptr ("shader" ::: Word32) -> ("shader" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryTrianglesNV
p Ptr GeometryTrianglesNV -> Int -> Ptr ("shader" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 72 :: Ptr Word32)) ("shader" ::: Word32
forall a. Zero a => a
zero)
    Ptr IndexType -> IndexType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryTrianglesNV
p Ptr GeometryTrianglesNV -> Int -> Ptr IndexType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 76 :: Ptr IndexType)) (IndexType
forall a. Zero a => a
zero)
    Ptr ("instanceOffset" ::: DeviceSize)
-> ("instanceOffset" ::: DeviceSize) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryTrianglesNV
p Ptr GeometryTrianglesNV
-> Int -> Ptr ("instanceOffset" ::: DeviceSize)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 88 :: Ptr DeviceSize)) ("instanceOffset" ::: DeviceSize
forall a. Zero a => a
zero)
    IO b
f

instance FromCStruct GeometryTrianglesNV where
  peekCStruct :: Ptr GeometryTrianglesNV -> IO GeometryTrianglesNV
peekCStruct p :: Ptr GeometryTrianglesNV
p = do
    "instanceData" ::: Buffer
vertexData <- Ptr ("instanceData" ::: Buffer) -> IO ("instanceData" ::: Buffer)
forall a. Storable a => Ptr a -> IO a
peek @Buffer ((Ptr GeometryTrianglesNV
p Ptr GeometryTrianglesNV -> Int -> Ptr ("instanceData" ::: Buffer)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Buffer))
    "instanceOffset" ::: DeviceSize
vertexOffset <- Ptr ("instanceOffset" ::: DeviceSize)
-> IO ("instanceOffset" ::: DeviceSize)
forall a. Storable a => Ptr a -> IO a
peek @DeviceSize ((Ptr GeometryTrianglesNV
p Ptr GeometryTrianglesNV
-> Int -> Ptr ("instanceOffset" ::: DeviceSize)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr DeviceSize))
    "shader" ::: Word32
vertexCount <- Ptr ("shader" ::: Word32) -> IO ("shader" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr GeometryTrianglesNV
p Ptr GeometryTrianglesNV -> Int -> Ptr ("shader" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr Word32))
    "instanceOffset" ::: DeviceSize
vertexStride <- Ptr ("instanceOffset" ::: DeviceSize)
-> IO ("instanceOffset" ::: DeviceSize)
forall a. Storable a => Ptr a -> IO a
peek @DeviceSize ((Ptr GeometryTrianglesNV
p Ptr GeometryTrianglesNV
-> Int -> Ptr ("instanceOffset" ::: DeviceSize)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 40 :: Ptr DeviceSize))
    Format
vertexFormat <- Ptr Format -> IO Format
forall a. Storable a => Ptr a -> IO a
peek @Format ((Ptr GeometryTrianglesNV
p Ptr GeometryTrianglesNV -> Int -> Ptr Format
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 48 :: Ptr Format))
    "instanceData" ::: Buffer
indexData <- Ptr ("instanceData" ::: Buffer) -> IO ("instanceData" ::: Buffer)
forall a. Storable a => Ptr a -> IO a
peek @Buffer ((Ptr GeometryTrianglesNV
p Ptr GeometryTrianglesNV -> Int -> Ptr ("instanceData" ::: Buffer)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 56 :: Ptr Buffer))
    "instanceOffset" ::: DeviceSize
indexOffset <- Ptr ("instanceOffset" ::: DeviceSize)
-> IO ("instanceOffset" ::: DeviceSize)
forall a. Storable a => Ptr a -> IO a
peek @DeviceSize ((Ptr GeometryTrianglesNV
p Ptr GeometryTrianglesNV
-> Int -> Ptr ("instanceOffset" ::: DeviceSize)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 64 :: Ptr DeviceSize))
    "shader" ::: Word32
indexCount <- Ptr ("shader" ::: Word32) -> IO ("shader" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr GeometryTrianglesNV
p Ptr GeometryTrianglesNV -> Int -> Ptr ("shader" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 72 :: Ptr Word32))
    IndexType
indexType <- Ptr IndexType -> IO IndexType
forall a. Storable a => Ptr a -> IO a
peek @IndexType ((Ptr GeometryTrianglesNV
p Ptr GeometryTrianglesNV -> Int -> Ptr IndexType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 76 :: Ptr IndexType))
    "instanceData" ::: Buffer
transformData <- Ptr ("instanceData" ::: Buffer) -> IO ("instanceData" ::: Buffer)
forall a. Storable a => Ptr a -> IO a
peek @Buffer ((Ptr GeometryTrianglesNV
p Ptr GeometryTrianglesNV -> Int -> Ptr ("instanceData" ::: Buffer)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 80 :: Ptr Buffer))
    "instanceOffset" ::: DeviceSize
transformOffset <- Ptr ("instanceOffset" ::: DeviceSize)
-> IO ("instanceOffset" ::: DeviceSize)
forall a. Storable a => Ptr a -> IO a
peek @DeviceSize ((Ptr GeometryTrianglesNV
p Ptr GeometryTrianglesNV
-> Int -> Ptr ("instanceOffset" ::: DeviceSize)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 88 :: Ptr DeviceSize))
    GeometryTrianglesNV -> IO GeometryTrianglesNV
forall (f :: * -> *) a. Applicative f => a -> f a
pure (GeometryTrianglesNV -> IO GeometryTrianglesNV)
-> GeometryTrianglesNV -> IO GeometryTrianglesNV
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
_ = 96
  alignment :: GeometryTrianglesNV -> Int
alignment ~GeometryTrianglesNV
_ = 8
  peek :: Ptr GeometryTrianglesNV -> IO GeometryTrianglesNV
peek = Ptr GeometryTrianglesNV -> IO GeometryTrianglesNV
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
  poke :: Ptr GeometryTrianglesNV -> GeometryTrianglesNV -> IO ()
poke ptr :: Ptr GeometryTrianglesNV
ptr poked :: GeometryTrianglesNV
poked = Ptr GeometryTrianglesNV -> GeometryTrianglesNV -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr GeometryTrianglesNV
ptr GeometryTrianglesNV
poked (() -> IO ()
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
           "instanceData" ::: Buffer
forall a. Zero a => a
zero
           "instanceOffset" ::: DeviceSize
forall a. Zero a => a
zero
           "shader" ::: Word32
forall a. Zero a => a
zero
           "instanceOffset" ::: DeviceSize
forall a. Zero a => a
zero
           Format
forall a. Zero a => a
zero
           "instanceData" ::: Buffer
forall a. Zero a => a
zero
           "instanceOffset" ::: DeviceSize
forall a. Zero a => a
zero
           "shader" ::: Word32
forall a. Zero a => a
zero
           IndexType
forall a. Zero a => a
zero
           "instanceData" ::: Buffer
forall a. Zero a => a
zero
           "instanceOffset" ::: DeviceSize
forall a. Zero a => a
zero


-- | VkGeometryAABBNV - Structure specifying axis-aligned bounding box
-- geometry in a bottom-level acceleration structure
--
-- = Description
--
-- The AABB data in memory is six 32-bit floats consisting of the minimum
-- x, y, and z values followed by the maximum x, y, and z values.
--
-- == Valid Usage
--
-- -   @offset@ /must/ be less than the size of @aabbData@
--
-- -   @offset@ /must/ be a multiple of @8@
--
-- -   @stride@ /must/ be a multiple of @8@
--
-- == Valid Usage (Implicit)
--
-- -   @sType@ /must/ be
--     'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_GEOMETRY_AABB_NV'
--
-- -   @pNext@ /must/ be @NULL@
--
-- -   If @aabbData@ is not 'Vulkan.Core10.APIConstants.NULL_HANDLE',
--     @aabbData@ /must/ be a valid 'Vulkan.Core10.Handles.Buffer' handle
--
-- = See Also
--
-- 'Vulkan.Core10.Handles.Buffer', 'Vulkan.Core10.BaseType.DeviceSize',
-- 'GeometryDataNV', 'Vulkan.Core10.Enums.StructureType.StructureType'
data GeometryAABBNV = GeometryAABBNV
  { -- | @aabbData@ is the buffer containing axis-aligned bounding box data.
    GeometryAABBNV -> "instanceData" ::: Buffer
aabbData :: Buffer
  , -- | @numAABBs@ is the number of AABBs in this geometry.
    GeometryAABBNV -> "shader" ::: Word32
numAABBs :: Word32
  , -- | @stride@ is the stride in bytes between AABBs in @aabbData@.
    GeometryAABBNV -> "shader" ::: Word32
stride :: Word32
  , -- | @offset@ is the offset in bytes of the first AABB in @aabbData@.
    GeometryAABBNV -> "instanceOffset" ::: DeviceSize
offset :: DeviceSize
  }
  deriving (Typeable)
deriving instance Show GeometryAABBNV

instance ToCStruct GeometryAABBNV where
  withCStruct :: GeometryAABBNV -> (Ptr GeometryAABBNV -> IO b) -> IO b
withCStruct x :: GeometryAABBNV
x f :: Ptr GeometryAABBNV -> IO b
f = Int -> Int -> (Ptr GeometryAABBNV -> IO b) -> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 40 8 ((Ptr GeometryAABBNV -> IO b) -> IO b)
-> (Ptr GeometryAABBNV -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \p :: Ptr GeometryAABBNV
p -> Ptr GeometryAABBNV -> GeometryAABBNV -> IO b -> IO b
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 :: Ptr GeometryAABBNV -> GeometryAABBNV -> IO b -> IO b
pokeCStruct p :: Ptr GeometryAABBNV
p GeometryAABBNV{..} f :: IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryAABBNV
p Ptr GeometryAABBNV -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_GEOMETRY_AABB_NV)
    Ptr ("data" ::: Ptr ()) -> ("data" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryAABBNV
p Ptr GeometryAABBNV -> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) ("data" ::: Ptr ()
forall a. Ptr a
nullPtr)
    Ptr ("instanceData" ::: Buffer)
-> ("instanceData" ::: Buffer) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryAABBNV
p Ptr GeometryAABBNV -> Int -> Ptr ("instanceData" ::: Buffer)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Buffer)) ("instanceData" ::: Buffer
aabbData)
    Ptr ("shader" ::: Word32) -> ("shader" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryAABBNV
p Ptr GeometryAABBNV -> Int -> Ptr ("shader" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr Word32)) ("shader" ::: Word32
numAABBs)
    Ptr ("shader" ::: Word32) -> ("shader" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryAABBNV
p Ptr GeometryAABBNV -> Int -> Ptr ("shader" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 28 :: Ptr Word32)) ("shader" ::: Word32
stride)
    Ptr ("instanceOffset" ::: DeviceSize)
-> ("instanceOffset" ::: DeviceSize) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryAABBNV
p Ptr GeometryAABBNV -> Int -> Ptr ("instanceOffset" ::: DeviceSize)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr DeviceSize)) ("instanceOffset" ::: DeviceSize
offset)
    IO b
f
  cStructSize :: Int
cStructSize = 40
  cStructAlignment :: Int
cStructAlignment = 8
  pokeZeroCStruct :: Ptr GeometryAABBNV -> IO b -> IO b
pokeZeroCStruct p :: Ptr GeometryAABBNV
p f :: IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryAABBNV
p Ptr GeometryAABBNV -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_GEOMETRY_AABB_NV)
    Ptr ("data" ::: Ptr ()) -> ("data" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryAABBNV
p Ptr GeometryAABBNV -> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) ("data" ::: Ptr ()
forall a. Ptr a
nullPtr)
    Ptr ("shader" ::: Word32) -> ("shader" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryAABBNV
p Ptr GeometryAABBNV -> Int -> Ptr ("shader" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr Word32)) ("shader" ::: Word32
forall a. Zero a => a
zero)
    Ptr ("shader" ::: Word32) -> ("shader" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryAABBNV
p Ptr GeometryAABBNV -> Int -> Ptr ("shader" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 28 :: Ptr Word32)) ("shader" ::: Word32
forall a. Zero a => a
zero)
    Ptr ("instanceOffset" ::: DeviceSize)
-> ("instanceOffset" ::: DeviceSize) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryAABBNV
p Ptr GeometryAABBNV -> Int -> Ptr ("instanceOffset" ::: DeviceSize)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr DeviceSize)) ("instanceOffset" ::: DeviceSize
forall a. Zero a => a
zero)
    IO b
f

instance FromCStruct GeometryAABBNV where
  peekCStruct :: Ptr GeometryAABBNV -> IO GeometryAABBNV
peekCStruct p :: Ptr GeometryAABBNV
p = do
    "instanceData" ::: Buffer
aabbData <- Ptr ("instanceData" ::: Buffer) -> IO ("instanceData" ::: Buffer)
forall a. Storable a => Ptr a -> IO a
peek @Buffer ((Ptr GeometryAABBNV
p Ptr GeometryAABBNV -> Int -> Ptr ("instanceData" ::: Buffer)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Buffer))
    "shader" ::: Word32
numAABBs <- Ptr ("shader" ::: Word32) -> IO ("shader" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr GeometryAABBNV
p Ptr GeometryAABBNV -> Int -> Ptr ("shader" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr Word32))
    "shader" ::: Word32
stride <- Ptr ("shader" ::: Word32) -> IO ("shader" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr GeometryAABBNV
p Ptr GeometryAABBNV -> Int -> Ptr ("shader" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 28 :: Ptr Word32))
    "instanceOffset" ::: DeviceSize
offset <- Ptr ("instanceOffset" ::: DeviceSize)
-> IO ("instanceOffset" ::: DeviceSize)
forall a. Storable a => Ptr a -> IO a
peek @DeviceSize ((Ptr GeometryAABBNV
p Ptr GeometryAABBNV -> Int -> Ptr ("instanceOffset" ::: DeviceSize)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr DeviceSize))
    GeometryAABBNV -> IO GeometryAABBNV
forall (f :: * -> *) a. Applicative f => a -> f a
pure (GeometryAABBNV -> IO GeometryAABBNV)
-> GeometryAABBNV -> IO GeometryAABBNV
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
_ = 40
  alignment :: GeometryAABBNV -> Int
alignment ~GeometryAABBNV
_ = 8
  peek :: Ptr GeometryAABBNV -> IO GeometryAABBNV
peek = Ptr GeometryAABBNV -> IO GeometryAABBNV
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
  poke :: Ptr GeometryAABBNV -> GeometryAABBNV -> IO ()
poke ptr :: Ptr GeometryAABBNV
ptr poked :: GeometryAABBNV
poked = Ptr GeometryAABBNV -> GeometryAABBNV -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr GeometryAABBNV
ptr GeometryAABBNV
poked (() -> IO ()
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
           "instanceData" ::: Buffer
forall a. Zero a => a
zero
           "shader" ::: Word32
forall a. Zero a => a
zero
           "shader" ::: Word32
forall a. Zero a => a
zero
           "instanceOffset" ::: DeviceSize
forall a. Zero a => a
zero


-- | VkGeometryDataNV - Structure specifying geometry in a bottom-level
-- acceleration structure
--
-- == Valid Usage (Implicit)
--
-- = See Also
--
-- 'GeometryAABBNV', 'GeometryNV', 'GeometryTrianglesNV'
data GeometryDataNV = GeometryDataNV
  { -- | @triangles@ /must/ be a valid 'GeometryTrianglesNV' structure
    GeometryDataNV -> GeometryTrianglesNV
triangles :: GeometryTrianglesNV
  , -- | @aabbs@ /must/ be a valid 'GeometryAABBNV' structure
    GeometryDataNV -> GeometryAABBNV
aabbs :: GeometryAABBNV
  }
  deriving (Typeable)
deriving instance Show GeometryDataNV

instance ToCStruct GeometryDataNV where
  withCStruct :: GeometryDataNV -> (Ptr GeometryDataNV -> IO b) -> IO b
withCStruct x :: GeometryDataNV
x f :: Ptr GeometryDataNV -> IO b
f = Int -> Int -> (Ptr GeometryDataNV -> IO b) -> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 136 8 ((Ptr GeometryDataNV -> IO b) -> IO b)
-> (Ptr GeometryDataNV -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \p :: Ptr GeometryDataNV
p -> Ptr GeometryDataNV -> GeometryDataNV -> IO b -> IO b
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 :: Ptr GeometryDataNV -> GeometryDataNV -> IO b -> IO b
pokeCStruct p :: Ptr GeometryDataNV
p GeometryDataNV{..} f :: IO b
f = ContT b IO b -> IO b
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT b IO b -> IO b) -> ContT b IO b -> IO b
forall a b. (a -> b) -> a -> b
$ do
    ((() -> IO b) -> IO b) -> ContT b IO ()
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((() -> IO b) -> IO b) -> ContT b IO ())
-> ((() -> IO b) -> IO b) -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr GeometryTrianglesNV -> GeometryTrianglesNV -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct ((Ptr GeometryDataNV
p Ptr GeometryDataNV -> Int -> Ptr GeometryTrianglesNV
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr GeometryTrianglesNV)) (GeometryTrianglesNV
triangles) (IO b -> IO b) -> ((() -> IO b) -> IO b) -> (() -> IO b) -> IO b
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((() -> IO b) -> () -> IO b
forall a b. (a -> b) -> a -> b
$ ())
    ((() -> IO b) -> IO b) -> ContT b IO ()
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((() -> IO b) -> IO b) -> ContT b IO ())
-> ((() -> IO b) -> IO b) -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr GeometryAABBNV -> GeometryAABBNV -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct ((Ptr GeometryDataNV
p Ptr GeometryDataNV -> Int -> Ptr GeometryAABBNV
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 96 :: Ptr GeometryAABBNV)) (GeometryAABBNV
aabbs) (IO b -> IO b) -> ((() -> IO b) -> IO b) -> (() -> IO b) -> IO b
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((() -> IO b) -> () -> IO b
forall a b. (a -> b) -> a -> b
$ ())
    IO b -> ContT b IO b
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO b -> ContT b IO b) -> IO b -> ContT b IO b
forall a b. (a -> b) -> a -> b
$ IO b
f
  cStructSize :: Int
cStructSize = 136
  cStructAlignment :: Int
cStructAlignment = 8
  pokeZeroCStruct :: Ptr GeometryDataNV -> IO b -> IO b
pokeZeroCStruct p :: Ptr GeometryDataNV
p f :: IO b
f = ContT b IO b -> IO b
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT b IO b -> IO b) -> ContT b IO b -> IO b
forall a b. (a -> b) -> a -> b
$ do
    ((() -> IO b) -> IO b) -> ContT b IO ()
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((() -> IO b) -> IO b) -> ContT b IO ())
-> ((() -> IO b) -> IO b) -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr GeometryTrianglesNV -> GeometryTrianglesNV -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct ((Ptr GeometryDataNV
p Ptr GeometryDataNV -> Int -> Ptr GeometryTrianglesNV
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr GeometryTrianglesNV)) (GeometryTrianglesNV
forall a. Zero a => a
zero) (IO b -> IO b) -> ((() -> IO b) -> IO b) -> (() -> IO b) -> IO b
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((() -> IO b) -> () -> IO b
forall a b. (a -> b) -> a -> b
$ ())
    ((() -> IO b) -> IO b) -> ContT b IO ()
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((() -> IO b) -> IO b) -> ContT b IO ())
-> ((() -> IO b) -> IO b) -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr GeometryAABBNV -> GeometryAABBNV -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct ((Ptr GeometryDataNV
p Ptr GeometryDataNV -> Int -> Ptr GeometryAABBNV
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 96 :: Ptr GeometryAABBNV)) (GeometryAABBNV
forall a. Zero a => a
zero) (IO b -> IO b) -> ((() -> IO b) -> IO b) -> (() -> IO b) -> IO b
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((() -> IO b) -> () -> IO b
forall a b. (a -> b) -> a -> b
$ ())
    IO b -> ContT b IO b
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO b -> ContT b IO b) -> IO b -> ContT b IO b
forall a b. (a -> b) -> a -> b
$ IO b
f

instance FromCStruct GeometryDataNV where
  peekCStruct :: Ptr GeometryDataNV -> IO GeometryDataNV
peekCStruct p :: Ptr GeometryDataNV
p = do
    GeometryTrianglesNV
triangles <- Ptr GeometryTrianglesNV -> IO GeometryTrianglesNV
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @GeometryTrianglesNV ((Ptr GeometryDataNV
p Ptr GeometryDataNV -> Int -> Ptr GeometryTrianglesNV
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr GeometryTrianglesNV))
    GeometryAABBNV
aabbs <- Ptr GeometryAABBNV -> IO GeometryAABBNV
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @GeometryAABBNV ((Ptr GeometryDataNV
p Ptr GeometryDataNV -> Int -> Ptr GeometryAABBNV
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 96 :: Ptr GeometryAABBNV))
    GeometryDataNV -> IO GeometryDataNV
forall (f :: * -> *) a. Applicative f => a -> f a
pure (GeometryDataNV -> IO GeometryDataNV)
-> GeometryDataNV -> IO GeometryDataNV
forall a b. (a -> b) -> a -> b
$ GeometryTrianglesNV -> GeometryAABBNV -> GeometryDataNV
GeometryDataNV
             GeometryTrianglesNV
triangles GeometryAABBNV
aabbs

instance Zero GeometryDataNV where
  zero :: GeometryDataNV
zero = GeometryTrianglesNV -> GeometryAABBNV -> GeometryDataNV
GeometryDataNV
           GeometryTrianglesNV
forall a. Zero a => a
zero
           GeometryAABBNV
forall a. Zero a => a
zero


-- | VkGeometryNV - Structure specifying a geometry in a bottom-level
-- acceleration structure
--
-- == Valid Usage (Implicit)
--
-- = See Also
--
-- 'AccelerationStructureInfoNV', 'GeometryDataNV',
-- 'Vulkan.Extensions.VK_KHR_ray_tracing.GeometryFlagsKHR',
-- 'Vulkan.Extensions.VK_KHR_ray_tracing.GeometryTypeKHR',
-- 'Vulkan.Core10.Enums.StructureType.StructureType'
data GeometryNV = GeometryNV
  { -- | @geometryType@ /must/ be a valid
    -- 'Vulkan.Extensions.VK_KHR_ray_tracing.GeometryTypeKHR' value
    GeometryNV -> GeometryTypeKHR
geometryType :: GeometryTypeKHR
  , -- | @geometry@ /must/ be a valid 'GeometryDataNV' structure
    GeometryNV -> GeometryDataNV
geometry :: GeometryDataNV
  , -- | @flags@ /must/ be a valid combination of
    -- 'Vulkan.Extensions.VK_KHR_ray_tracing.GeometryFlagBitsKHR' values
    GeometryNV -> GeometryFlagBitsKHR
flags :: GeometryFlagsKHR
  }
  deriving (Typeable)
deriving instance Show GeometryNV

instance ToCStruct GeometryNV where
  withCStruct :: GeometryNV -> (Ptr GeometryNV -> IO b) -> IO b
withCStruct x :: GeometryNV
x f :: Ptr GeometryNV -> IO b
f = Int -> Int -> (Ptr GeometryNV -> IO b) -> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 168 8 ((Ptr GeometryNV -> IO b) -> IO b)
-> (Ptr GeometryNV -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \p :: Ptr GeometryNV
p -> Ptr GeometryNV -> GeometryNV -> IO b -> IO b
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 :: Ptr GeometryNV -> GeometryNV -> IO b -> IO b
pokeCStruct p :: Ptr GeometryNV
p GeometryNV{..} f :: IO b
f = ContT b IO b -> IO b
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT b IO b -> IO b) -> ContT b IO b -> IO b
forall a b. (a -> b) -> a -> b
$ do
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryNV
p Ptr GeometryNV -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_GEOMETRY_NV)
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr ("data" ::: Ptr ()) -> ("data" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryNV
p Ptr GeometryNV -> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) ("data" ::: Ptr ()
forall a. Ptr a
nullPtr)
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr GeometryTypeKHR -> GeometryTypeKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryNV
p Ptr GeometryNV -> Int -> Ptr GeometryTypeKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr GeometryTypeKHR)) (GeometryTypeKHR
geometryType)
    ((() -> IO b) -> IO b) -> ContT b IO ()
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((() -> IO b) -> IO b) -> ContT b IO ())
-> ((() -> IO b) -> IO b) -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr GeometryDataNV -> GeometryDataNV -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct ((Ptr GeometryNV
p Ptr GeometryNV -> Int -> Ptr GeometryDataNV
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr GeometryDataNV)) (GeometryDataNV
geometry) (IO b -> IO b) -> ((() -> IO b) -> IO b) -> (() -> IO b) -> IO b
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((() -> IO b) -> () -> IO b
forall a b. (a -> b) -> a -> b
$ ())
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr GeometryFlagBitsKHR -> GeometryFlagBitsKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryNV
p Ptr GeometryNV -> Int -> Ptr GeometryFlagBitsKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 160 :: Ptr GeometryFlagsKHR)) (GeometryFlagBitsKHR
flags)
    IO b -> ContT b IO b
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO b -> ContT b IO b) -> IO b -> ContT b IO b
forall a b. (a -> b) -> a -> b
$ IO b
f
  cStructSize :: Int
cStructSize = 168
  cStructAlignment :: Int
cStructAlignment = 8
  pokeZeroCStruct :: Ptr GeometryNV -> IO b -> IO b
pokeZeroCStruct p :: Ptr GeometryNV
p f :: IO b
f = ContT b IO b -> IO b
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT b IO b -> IO b) -> ContT b IO b -> IO b
forall a b. (a -> b) -> a -> b
$ do
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryNV
p Ptr GeometryNV -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_GEOMETRY_NV)
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr ("data" ::: Ptr ()) -> ("data" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryNV
p Ptr GeometryNV -> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) ("data" ::: Ptr ()
forall a. Ptr a
nullPtr)
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr GeometryTypeKHR -> GeometryTypeKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr GeometryNV
p Ptr GeometryNV -> Int -> Ptr GeometryTypeKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr GeometryTypeKHR)) (GeometryTypeKHR
forall a. Zero a => a
zero)
    ((() -> IO b) -> IO b) -> ContT b IO ()
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((() -> IO b) -> IO b) -> ContT b IO ())
-> ((() -> IO b) -> IO b) -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr GeometryDataNV -> GeometryDataNV -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct ((Ptr GeometryNV
p Ptr GeometryNV -> Int -> Ptr GeometryDataNV
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr GeometryDataNV)) (GeometryDataNV
forall a. Zero a => a
zero) (IO b -> IO b) -> ((() -> IO b) -> IO b) -> (() -> IO b) -> IO b
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((() -> IO b) -> () -> IO b
forall a b. (a -> b) -> a -> b
$ ())
    IO b -> ContT b IO b
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO b -> ContT b IO b) -> IO b -> ContT b IO b
forall a b. (a -> b) -> a -> b
$ IO b
f

instance FromCStruct GeometryNV where
  peekCStruct :: Ptr GeometryNV -> IO GeometryNV
peekCStruct p :: Ptr GeometryNV
p = do
    GeometryTypeKHR
geometryType <- Ptr GeometryTypeKHR -> IO GeometryTypeKHR
forall a. Storable a => Ptr a -> IO a
peek @GeometryTypeKHR ((Ptr GeometryNV
p Ptr GeometryNV -> Int -> Ptr GeometryTypeKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr GeometryTypeKHR))
    GeometryDataNV
geometry <- Ptr GeometryDataNV -> IO GeometryDataNV
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @GeometryDataNV ((Ptr GeometryNV
p Ptr GeometryNV -> Int -> Ptr GeometryDataNV
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr GeometryDataNV))
    GeometryFlagBitsKHR
flags <- Ptr GeometryFlagBitsKHR -> IO GeometryFlagBitsKHR
forall a. Storable a => Ptr a -> IO a
peek @GeometryFlagsKHR ((Ptr GeometryNV
p Ptr GeometryNV -> Int -> Ptr GeometryFlagBitsKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 160 :: Ptr GeometryFlagsKHR))
    GeometryNV -> IO GeometryNV
forall (f :: * -> *) a. Applicative f => a -> f a
pure (GeometryNV -> IO GeometryNV) -> GeometryNV -> IO GeometryNV
forall a b. (a -> b) -> a -> b
$ GeometryTypeKHR
-> GeometryDataNV -> GeometryFlagBitsKHR -> GeometryNV
GeometryNV
             GeometryTypeKHR
geometryType GeometryDataNV
geometry GeometryFlagBitsKHR
flags

instance Zero GeometryNV where
  zero :: GeometryNV
zero = GeometryTypeKHR
-> GeometryDataNV -> GeometryFlagBitsKHR -> GeometryNV
GeometryNV
           GeometryTypeKHR
forall a. Zero a => a
zero
           GeometryDataNV
forall a. Zero a => a
zero
           GeometryFlagBitsKHR
forall a. Zero a => a
zero


-- | VkAccelerationStructureInfoNV - Structure specifying the parameters of
-- acceleration structure object
--
-- = Description
--
-- 'AccelerationStructureInfoNV' contains information that is used both for
-- acceleration structure creation with 'createAccelerationStructureNV' and
-- in combination with the actual geometric data to build the acceleration
-- structure with 'cmdBuildAccelerationStructureNV'.
--
-- == Valid Usage
--
-- -   @geometryCount@ /must/ be less than or equal to
--     'PhysicalDeviceRayTracingPropertiesNV'::@maxGeometryCount@
--
-- -   @instanceCount@ /must/ be less than or equal to
--     'PhysicalDeviceRayTracingPropertiesNV'::@maxInstanceCount@
--
-- -   The total number of triangles in all geometries /must/ be less than
--     or equal to
--     'PhysicalDeviceRayTracingPropertiesNV'::@maxTriangleCount@
--
-- -   If @type@ is 'ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_NV' then
--     @geometryCount@ /must/ be @0@
--
-- -   If @type@ is 'ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_NV' then
--     @instanceCount@ /must/ be @0@
--
-- -   If @type@ is 'ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_NV' then the
--     @geometryType@ member of each geometry in @pGeometries@ /must/ be
--     the same
--
-- -   @flags@ /must/ be a valid combination of
--     'BuildAccelerationStructureFlagBitsNV' values
--
-- -   If @flags@ has the
--     'BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_NV' bit set,
--     then it /must/ not have the
--     'BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_NV' bit set
--
-- -   @scratch@ /must/ have been created with
--     'BUFFER_USAGE_RAY_TRACING_BIT_NV' usage flag
--
-- -   If @instanceData@ is not 'Vulkan.Core10.APIConstants.NULL_HANDLE',
--     @instanceData@ /must/ have been created with
--     'BUFFER_USAGE_RAY_TRACING_BIT_NV' usage flag
--
-- == Valid Usage (Implicit)
--
-- -   @sType@ /must/ be
--     'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_ACCELERATION_STRUCTURE_INFO_NV'
--
-- -   @pNext@ /must/ be @NULL@
--
-- -   @type@ /must/ be a valid 'AccelerationStructureTypeNV' value
--
-- -   @flags@ /must/ be @0@
--
-- -   If @geometryCount@ is not @0@, @pGeometries@ /must/ be a valid
--     pointer to an array of @geometryCount@ valid 'GeometryNV' structures
--
-- = See Also
--
-- 'AccelerationStructureCreateInfoNV', 'AccelerationStructureTypeNV',
-- 'BuildAccelerationStructureFlagsNV', 'GeometryNV',
-- 'Vulkan.Core10.Enums.StructureType.StructureType',
-- 'cmdBuildAccelerationStructureNV'
data AccelerationStructureInfoNV = AccelerationStructureInfoNV
  { -- | @type@ is a 'AccelerationStructureTypeNV' value specifying the type of
    -- acceleration structure that will be created.
    AccelerationStructureInfoNV -> AccelerationStructureTypeKHR
type' :: AccelerationStructureTypeNV
  , -- | @flags@ is a bitmask of 'BuildAccelerationStructureFlagBitsNV'
    -- specifying additional parameters of the acceleration structure.
    AccelerationStructureInfoNV
-> BuildAccelerationStructureFlagBitsKHR
flags :: BuildAccelerationStructureFlagsNV
  , -- | @instanceCount@ specifies the number of instances that will be in the
    -- new acceleration structure.
    AccelerationStructureInfoNV -> "shader" ::: Word32
instanceCount :: Word32
  , -- | @pGeometries@ is a pointer to an array of @geometryCount@ 'GeometryNV'
    -- structures containing the scene data being passed into the acceleration
    -- structure.
    AccelerationStructureInfoNV -> Vector GeometryNV
geometries :: Vector GeometryNV
  }
  deriving (Typeable)
deriving instance Show AccelerationStructureInfoNV

instance ToCStruct AccelerationStructureInfoNV where
  withCStruct :: AccelerationStructureInfoNV
-> (("pInfo" ::: Ptr AccelerationStructureInfoNV) -> IO b) -> IO b
withCStruct x :: AccelerationStructureInfoNV
x f :: ("pInfo" ::: Ptr AccelerationStructureInfoNV) -> IO b
f = Int
-> Int
-> (("pInfo" ::: Ptr AccelerationStructureInfoNV) -> IO b)
-> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 40 8 ((("pInfo" ::: Ptr AccelerationStructureInfoNV) -> IO b) -> IO b)
-> (("pInfo" ::: Ptr AccelerationStructureInfoNV) -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \p :: "pInfo" ::: Ptr AccelerationStructureInfoNV
p -> ("pInfo" ::: Ptr AccelerationStructureInfoNV)
-> AccelerationStructureInfoNV -> IO b -> IO b
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 :: ("pInfo" ::: Ptr AccelerationStructureInfoNV)
-> AccelerationStructureInfoNV -> IO b -> IO b
pokeCStruct p :: "pInfo" ::: Ptr AccelerationStructureInfoNV
p AccelerationStructureInfoNV{..} f :: IO b
f = ContT b IO b -> IO b
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT b IO b -> IO b) -> ContT b IO b -> IO b
forall a b. (a -> b) -> a -> b
$ do
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr AccelerationStructureInfoNV
p ("pInfo" ::: Ptr AccelerationStructureInfoNV)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_ACCELERATION_STRUCTURE_INFO_NV)
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr ("data" ::: Ptr ()) -> ("data" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr AccelerationStructureInfoNV
p ("pInfo" ::: Ptr AccelerationStructureInfoNV)
-> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) ("data" ::: Ptr ()
forall a. Ptr a
nullPtr)
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr AccelerationStructureTypeKHR
-> AccelerationStructureTypeKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr AccelerationStructureInfoNV
p ("pInfo" ::: Ptr AccelerationStructureInfoNV)
-> Int -> Ptr AccelerationStructureTypeKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr AccelerationStructureTypeNV)) (AccelerationStructureTypeKHR
type')
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr BuildAccelerationStructureFlagBitsKHR
-> BuildAccelerationStructureFlagBitsKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr AccelerationStructureInfoNV
p ("pInfo" ::: Ptr AccelerationStructureInfoNV)
-> Int -> Ptr BuildAccelerationStructureFlagBitsKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr BuildAccelerationStructureFlagsNV)) (BuildAccelerationStructureFlagBitsKHR
flags)
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr ("shader" ::: Word32) -> ("shader" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr AccelerationStructureInfoNV
p ("pInfo" ::: Ptr AccelerationStructureInfoNV)
-> Int -> Ptr ("shader" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr Word32)) ("shader" ::: Word32
instanceCount)
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr ("shader" ::: Word32) -> ("shader" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr AccelerationStructureInfoNV
p ("pInfo" ::: Ptr AccelerationStructureInfoNV)
-> Int -> Ptr ("shader" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 28 :: Ptr Word32)) ((Int -> "shader" ::: Word32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Vector GeometryNV -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector GeometryNV -> Int) -> Vector GeometryNV -> Int
forall a b. (a -> b) -> a -> b
$ (Vector GeometryNV
geometries)) :: Word32))
    Ptr GeometryNV
pPGeometries' <- ((Ptr GeometryNV -> IO b) -> IO b) -> ContT b IO (Ptr GeometryNV)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr GeometryNV -> IO b) -> IO b) -> ContT b IO (Ptr GeometryNV))
-> ((Ptr GeometryNV -> IO b) -> IO b)
-> ContT b IO (Ptr GeometryNV)
forall a b. (a -> b) -> a -> b
$ Int -> Int -> (Ptr GeometryNV -> IO b) -> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned @GeometryNV ((Vector GeometryNV -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector GeometryNV
geometries)) Int -> Int -> Int
forall a. Num a => a -> a -> a
* 168) 8
    (Int -> GeometryNV -> ContT b IO ())
-> Vector GeometryNV -> ContT b IO ()
forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\i :: Int
i e :: GeometryNV
e -> ((() -> IO b) -> IO b) -> ContT b IO ()
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((() -> IO b) -> IO b) -> ContT b IO ())
-> ((() -> IO b) -> IO b) -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr GeometryNV -> GeometryNV -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct (Ptr GeometryNV
pPGeometries' Ptr GeometryNV -> Int -> Ptr GeometryNV
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (168 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr GeometryNV) (GeometryNV
e) (IO b -> IO b) -> ((() -> IO b) -> IO b) -> (() -> IO b) -> IO b
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((() -> IO b) -> () -> IO b
forall a b. (a -> b) -> a -> b
$ ())) (Vector GeometryNV
geometries)
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (Ptr GeometryNV) -> Ptr GeometryNV -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr AccelerationStructureInfoNV
p ("pInfo" ::: Ptr AccelerationStructureInfoNV)
-> Int -> Ptr (Ptr GeometryNV)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr (Ptr GeometryNV))) (Ptr GeometryNV
pPGeometries')
    IO b -> ContT b IO b
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO b -> ContT b IO b) -> IO b -> ContT b IO b
forall a b. (a -> b) -> a -> b
$ IO b
f
  cStructSize :: Int
cStructSize = 40
  cStructAlignment :: Int
cStructAlignment = 8
  pokeZeroCStruct :: ("pInfo" ::: Ptr AccelerationStructureInfoNV) -> IO b -> IO b
pokeZeroCStruct p :: "pInfo" ::: Ptr AccelerationStructureInfoNV
p f :: IO b
f = ContT b IO b -> IO b
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT b IO b -> IO b) -> ContT b IO b -> IO b
forall a b. (a -> b) -> a -> b
$ do
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr AccelerationStructureInfoNV
p ("pInfo" ::: Ptr AccelerationStructureInfoNV)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_ACCELERATION_STRUCTURE_INFO_NV)
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr ("data" ::: Ptr ()) -> ("data" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr AccelerationStructureInfoNV
p ("pInfo" ::: Ptr AccelerationStructureInfoNV)
-> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) ("data" ::: Ptr ()
forall a. Ptr a
nullPtr)
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr AccelerationStructureTypeKHR
-> AccelerationStructureTypeKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr AccelerationStructureInfoNV
p ("pInfo" ::: Ptr AccelerationStructureInfoNV)
-> Int -> Ptr AccelerationStructureTypeKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr AccelerationStructureTypeNV)) (AccelerationStructureTypeKHR
forall a. Zero a => a
zero)
    Ptr GeometryNV
pPGeometries' <- ((Ptr GeometryNV -> IO b) -> IO b) -> ContT b IO (Ptr GeometryNV)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr GeometryNV -> IO b) -> IO b) -> ContT b IO (Ptr GeometryNV))
-> ((Ptr GeometryNV -> IO b) -> IO b)
-> ContT b IO (Ptr GeometryNV)
forall a b. (a -> b) -> a -> b
$ Int -> Int -> (Ptr GeometryNV -> IO b) -> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned @GeometryNV ((Vector Any -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector Any
forall a. Monoid a => a
mempty)) Int -> Int -> Int
forall a. Num a => a -> a -> a
* 168) 8
    (Int -> GeometryNV -> ContT b IO ())
-> Vector GeometryNV -> ContT b IO ()
forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\i :: Int
i e :: GeometryNV
e -> ((() -> IO b) -> IO b) -> ContT b IO ()
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((() -> IO b) -> IO b) -> ContT b IO ())
-> ((() -> IO b) -> IO b) -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr GeometryNV -> GeometryNV -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct (Ptr GeometryNV
pPGeometries' Ptr GeometryNV -> Int -> Ptr GeometryNV
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (168 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr GeometryNV) (GeometryNV
e) (IO b -> IO b) -> ((() -> IO b) -> IO b) -> (() -> IO b) -> IO b
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((() -> IO b) -> () -> IO b
forall a b. (a -> b) -> a -> b
$ ())) (Vector GeometryNV
forall a. Monoid a => a
mempty)
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (Ptr GeometryNV) -> Ptr GeometryNV -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr AccelerationStructureInfoNV
p ("pInfo" ::: Ptr AccelerationStructureInfoNV)
-> Int -> Ptr (Ptr GeometryNV)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr (Ptr GeometryNV))) (Ptr GeometryNV
pPGeometries')
    IO b -> ContT b IO b
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO b -> ContT b IO b) -> IO b -> ContT b IO b
forall a b. (a -> b) -> a -> b
$ IO b
f

instance FromCStruct AccelerationStructureInfoNV where
  peekCStruct :: ("pInfo" ::: Ptr AccelerationStructureInfoNV)
-> IO AccelerationStructureInfoNV
peekCStruct p :: "pInfo" ::: Ptr AccelerationStructureInfoNV
p = do
    AccelerationStructureTypeKHR
type' <- Ptr AccelerationStructureTypeKHR -> IO AccelerationStructureTypeKHR
forall a. Storable a => Ptr a -> IO a
peek @AccelerationStructureTypeNV (("pInfo" ::: Ptr AccelerationStructureInfoNV
p ("pInfo" ::: Ptr AccelerationStructureInfoNV)
-> Int -> Ptr AccelerationStructureTypeKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr AccelerationStructureTypeNV))
    BuildAccelerationStructureFlagBitsKHR
flags <- Ptr BuildAccelerationStructureFlagBitsKHR
-> IO BuildAccelerationStructureFlagBitsKHR
forall a. Storable a => Ptr a -> IO a
peek @BuildAccelerationStructureFlagsNV (("pInfo" ::: Ptr AccelerationStructureInfoNV
p ("pInfo" ::: Ptr AccelerationStructureInfoNV)
-> Int -> Ptr BuildAccelerationStructureFlagBitsKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr BuildAccelerationStructureFlagsNV))
    "shader" ::: Word32
instanceCount <- Ptr ("shader" ::: Word32) -> IO ("shader" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 (("pInfo" ::: Ptr AccelerationStructureInfoNV
p ("pInfo" ::: Ptr AccelerationStructureInfoNV)
-> Int -> Ptr ("shader" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr Word32))
    "shader" ::: Word32
geometryCount <- Ptr ("shader" ::: Word32) -> IO ("shader" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 (("pInfo" ::: Ptr AccelerationStructureInfoNV
p ("pInfo" ::: Ptr AccelerationStructureInfoNV)
-> Int -> Ptr ("shader" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 28 :: Ptr Word32))
    Ptr GeometryNV
pGeometries <- Ptr (Ptr GeometryNV) -> IO (Ptr GeometryNV)
forall a. Storable a => Ptr a -> IO a
peek @(Ptr GeometryNV) (("pInfo" ::: Ptr AccelerationStructureInfoNV
p ("pInfo" ::: Ptr AccelerationStructureInfoNV)
-> Int -> Ptr (Ptr GeometryNV)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr (Ptr GeometryNV)))
    Vector GeometryNV
pGeometries' <- Int -> (Int -> IO GeometryNV) -> IO (Vector GeometryNV)
forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
generateM (("shader" ::: Word32) -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral "shader" ::: Word32
geometryCount) (\i :: Int
i -> Ptr GeometryNV -> IO GeometryNV
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @GeometryNV ((Ptr GeometryNV
pGeometries Ptr GeometryNV -> Int -> Ptr GeometryNV
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (168 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr GeometryNV)))
    AccelerationStructureInfoNV -> IO AccelerationStructureInfoNV
forall (f :: * -> *) a. Applicative f => a -> f a
pure (AccelerationStructureInfoNV -> IO AccelerationStructureInfoNV)
-> AccelerationStructureInfoNV -> IO AccelerationStructureInfoNV
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
           AccelerationStructureTypeKHR
forall a. Zero a => a
zero
           BuildAccelerationStructureFlagBitsKHR
forall a. Zero a => a
zero
           "shader" ::: Word32
forall a. Zero a => a
zero
           Vector GeometryNV
forall a. Monoid a => a
mempty


-- | VkAccelerationStructureCreateInfoNV - Structure specifying the
-- parameters of a newly created acceleration structure object
--
-- == Valid Usage
--
-- -   If @compactedSize@ is not @0@ then both @info.geometryCount@ and
--     @info.instanceCount@ /must/ be @0@
--
-- == Valid Usage (Implicit)
--
-- -   @sType@ /must/ be
--     'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_ACCELERATION_STRUCTURE_CREATE_INFO_NV'
--
-- -   @pNext@ /must/ be @NULL@
--
-- -   @info@ /must/ be a valid 'AccelerationStructureInfoNV' structure
--
-- = See Also
--
-- 'AccelerationStructureInfoNV', 'Vulkan.Core10.BaseType.DeviceSize',
-- 'Vulkan.Core10.Enums.StructureType.StructureType',
-- 'createAccelerationStructureNV'
data AccelerationStructureCreateInfoNV = AccelerationStructureCreateInfoNV
  { -- | @compactedSize@ is the size from the result of
    -- 'cmdWriteAccelerationStructuresPropertiesNV' if this acceleration
    -- structure is going to be the target of a compacting copy.
    AccelerationStructureCreateInfoNV
-> "instanceOffset" ::: DeviceSize
compactedSize :: DeviceSize
  , -- | @info@ is the 'AccelerationStructureInfoNV' structure specifying further
    -- parameters of the created acceleration structure.
    AccelerationStructureCreateInfoNV -> AccelerationStructureInfoNV
info :: AccelerationStructureInfoNV
  }
  deriving (Typeable)
deriving instance Show AccelerationStructureCreateInfoNV

instance ToCStruct AccelerationStructureCreateInfoNV where
  withCStruct :: AccelerationStructureCreateInfoNV
-> (("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoNV)
    -> IO b)
-> IO b
withCStruct x :: AccelerationStructureCreateInfoNV
x f :: ("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoNV) -> IO b
f = Int
-> Int
-> (("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoNV)
    -> IO b)
-> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 64 8 ((("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoNV)
  -> IO b)
 -> IO b)
-> (("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoNV)
    -> IO b)
-> IO b
forall a b. (a -> b) -> a -> b
$ \p :: "pCreateInfo" ::: Ptr AccelerationStructureCreateInfoNV
p -> ("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoNV)
-> AccelerationStructureCreateInfoNV -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pCreateInfo" ::: Ptr AccelerationStructureCreateInfoNV
p AccelerationStructureCreateInfoNV
x (("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoNV) -> IO b
f "pCreateInfo" ::: Ptr AccelerationStructureCreateInfoNV
p)
  pokeCStruct :: ("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoNV)
-> AccelerationStructureCreateInfoNV -> IO b -> IO b
pokeCStruct p :: "pCreateInfo" ::: Ptr AccelerationStructureCreateInfoNV
p AccelerationStructureCreateInfoNV{..} f :: IO b
f = ContT b IO b -> IO b
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT b IO b -> IO b) -> ContT b IO b -> IO b
forall a b. (a -> b) -> a -> b
$ do
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoNV
p ("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoNV)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_ACCELERATION_STRUCTURE_CREATE_INFO_NV)
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr ("data" ::: Ptr ()) -> ("data" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoNV
p ("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoNV)
-> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) ("data" ::: Ptr ()
forall a. Ptr a
nullPtr)
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr ("instanceOffset" ::: DeviceSize)
-> ("instanceOffset" ::: DeviceSize) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoNV
p ("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoNV)
-> Int -> Ptr ("instanceOffset" ::: DeviceSize)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr DeviceSize)) ("instanceOffset" ::: DeviceSize
compactedSize)
    ((() -> IO b) -> IO b) -> ContT b IO ()
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((() -> IO b) -> IO b) -> ContT b IO ())
-> ((() -> IO b) -> IO b) -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ ("pInfo" ::: Ptr AccelerationStructureInfoNV)
-> AccelerationStructureInfoNV -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct (("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoNV
p ("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoNV)
-> Int -> "pInfo" ::: Ptr AccelerationStructureInfoNV
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr AccelerationStructureInfoNV)) (AccelerationStructureInfoNV
info) (IO b -> IO b) -> ((() -> IO b) -> IO b) -> (() -> IO b) -> IO b
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((() -> IO b) -> () -> IO b
forall a b. (a -> b) -> a -> b
$ ())
    IO b -> ContT b IO b
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO b -> ContT b IO b) -> IO b -> ContT b IO b
forall a b. (a -> b) -> a -> b
$ IO b
f
  cStructSize :: Int
cStructSize = 64
  cStructAlignment :: Int
cStructAlignment = 8
  pokeZeroCStruct :: ("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoNV)
-> IO b -> IO b
pokeZeroCStruct p :: "pCreateInfo" ::: Ptr AccelerationStructureCreateInfoNV
p f :: IO b
f = ContT b IO b -> IO b
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT b IO b -> IO b) -> ContT b IO b -> IO b
forall a b. (a -> b) -> a -> b
$ do
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoNV
p ("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoNV)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_ACCELERATION_STRUCTURE_CREATE_INFO_NV)
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr ("data" ::: Ptr ()) -> ("data" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoNV
p ("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoNV)
-> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) ("data" ::: Ptr ()
forall a. Ptr a
nullPtr)
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr ("instanceOffset" ::: DeviceSize)
-> ("instanceOffset" ::: DeviceSize) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoNV
p ("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoNV)
-> Int -> Ptr ("instanceOffset" ::: DeviceSize)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr DeviceSize)) ("instanceOffset" ::: DeviceSize
forall a. Zero a => a
zero)
    ((() -> IO b) -> IO b) -> ContT b IO ()
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((() -> IO b) -> IO b) -> ContT b IO ())
-> ((() -> IO b) -> IO b) -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ ("pInfo" ::: Ptr AccelerationStructureInfoNV)
-> AccelerationStructureInfoNV -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct (("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoNV
p ("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoNV)
-> Int -> "pInfo" ::: Ptr AccelerationStructureInfoNV
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr AccelerationStructureInfoNV)) (AccelerationStructureInfoNV
forall a. Zero a => a
zero) (IO b -> IO b) -> ((() -> IO b) -> IO b) -> (() -> IO b) -> IO b
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((() -> IO b) -> () -> IO b
forall a b. (a -> b) -> a -> b
$ ())
    IO b -> ContT b IO b
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO b -> ContT b IO b) -> IO b -> ContT b IO b
forall a b. (a -> b) -> a -> b
$ IO b
f

instance FromCStruct AccelerationStructureCreateInfoNV where
  peekCStruct :: ("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoNV)
-> IO AccelerationStructureCreateInfoNV
peekCStruct p :: "pCreateInfo" ::: Ptr AccelerationStructureCreateInfoNV
p = do
    "instanceOffset" ::: DeviceSize
compactedSize <- Ptr ("instanceOffset" ::: DeviceSize)
-> IO ("instanceOffset" ::: DeviceSize)
forall a. Storable a => Ptr a -> IO a
peek @DeviceSize (("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoNV
p ("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoNV)
-> Int -> Ptr ("instanceOffset" ::: DeviceSize)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr DeviceSize))
    AccelerationStructureInfoNV
info <- ("pInfo" ::: Ptr AccelerationStructureInfoNV)
-> IO AccelerationStructureInfoNV
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @AccelerationStructureInfoNV (("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoNV
p ("pCreateInfo" ::: Ptr AccelerationStructureCreateInfoNV)
-> Int -> "pInfo" ::: Ptr AccelerationStructureInfoNV
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr AccelerationStructureInfoNV))
    AccelerationStructureCreateInfoNV
-> IO AccelerationStructureCreateInfoNV
forall (f :: * -> *) a. Applicative f => a -> f a
pure (AccelerationStructureCreateInfoNV
 -> IO AccelerationStructureCreateInfoNV)
-> AccelerationStructureCreateInfoNV
-> IO AccelerationStructureCreateInfoNV
forall a b. (a -> b) -> a -> b
$ ("instanceOffset" ::: DeviceSize)
-> AccelerationStructureInfoNV -> AccelerationStructureCreateInfoNV
AccelerationStructureCreateInfoNV
             "instanceOffset" ::: DeviceSize
compactedSize AccelerationStructureInfoNV
info

instance Zero AccelerationStructureCreateInfoNV where
  zero :: AccelerationStructureCreateInfoNV
zero = ("instanceOffset" ::: DeviceSize)
-> AccelerationStructureInfoNV -> AccelerationStructureCreateInfoNV
AccelerationStructureCreateInfoNV
           "instanceOffset" ::: DeviceSize
forall a. Zero a => a
zero
           AccelerationStructureInfoNV
forall a. Zero a => a
zero


-- | VkAccelerationStructureMemoryRequirementsInfoNV - Structure specifying
-- acceleration to query for memory requirements
--
-- == Valid Usage (Implicit)
--
-- = See Also
--
-- 'AccelerationStructureMemoryRequirementsTypeNV',
-- 'AccelerationStructureNV',
-- 'Vulkan.Core10.Enums.StructureType.StructureType',
-- 'getAccelerationStructureMemoryRequirementsNV'
data AccelerationStructureMemoryRequirementsInfoNV = AccelerationStructureMemoryRequirementsInfoNV
  { -- | @type@ /must/ be a valid 'AccelerationStructureMemoryRequirementsTypeNV'
    -- value
    AccelerationStructureMemoryRequirementsInfoNV
-> AccelerationStructureMemoryRequirementsTypeKHR
type' :: AccelerationStructureMemoryRequirementsTypeNV
  , -- | @accelerationStructure@ /must/ be a valid 'AccelerationStructureNV'
    -- handle
    AccelerationStructureMemoryRequirementsInfoNV
-> AccelerationStructureNV
accelerationStructure :: AccelerationStructureNV
  }
  deriving (Typeable)
deriving instance Show AccelerationStructureMemoryRequirementsInfoNV

instance ToCStruct AccelerationStructureMemoryRequirementsInfoNV where
  withCStruct :: AccelerationStructureMemoryRequirementsInfoNV
-> (("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV)
    -> IO b)
-> IO b
withCStruct x :: AccelerationStructureMemoryRequirementsInfoNV
x f :: ("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV)
-> IO b
f = Int
-> Int
-> (("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV)
    -> IO b)
-> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 32 8 ((("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV)
  -> IO b)
 -> IO b)
-> (("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV)
    -> IO b)
-> IO b
forall a b. (a -> b) -> a -> b
$ \p :: "pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV
p -> ("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV)
-> AccelerationStructureMemoryRequirementsInfoNV -> IO b -> IO b
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 :: ("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV)
-> AccelerationStructureMemoryRequirementsInfoNV -> IO b -> IO b
pokeCStruct p :: "pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV
p AccelerationStructureMemoryRequirementsInfoNV{..} f :: IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV
p ("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_INFO_NV)
    Ptr ("data" ::: Ptr ()) -> ("data" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV
p ("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV)
-> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) ("data" ::: Ptr ()
forall a. Ptr a
nullPtr)
    Ptr AccelerationStructureMemoryRequirementsTypeKHR
-> AccelerationStructureMemoryRequirementsTypeKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV
p ("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV)
-> Int -> Ptr AccelerationStructureMemoryRequirementsTypeKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr AccelerationStructureMemoryRequirementsTypeNV)) (AccelerationStructureMemoryRequirementsTypeKHR
type')
    ("pAccelerationStructure" ::: Ptr AccelerationStructureNV)
-> AccelerationStructureNV -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV
p ("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV)
-> Int -> "pAccelerationStructure" ::: Ptr AccelerationStructureNV
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr AccelerationStructureNV)) (AccelerationStructureNV
accelerationStructure)
    IO b
f
  cStructSize :: Int
cStructSize = 32
  cStructAlignment :: Int
cStructAlignment = 8
  pokeZeroCStruct :: ("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV)
-> IO b -> IO b
pokeZeroCStruct p :: "pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV
p f :: IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV
p ("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_INFO_NV)
    Ptr ("data" ::: Ptr ()) -> ("data" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV
p ("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV)
-> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) ("data" ::: Ptr ()
forall a. Ptr a
nullPtr)
    Ptr AccelerationStructureMemoryRequirementsTypeKHR
-> AccelerationStructureMemoryRequirementsTypeKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV
p ("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV)
-> Int -> Ptr AccelerationStructureMemoryRequirementsTypeKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr AccelerationStructureMemoryRequirementsTypeNV)) (AccelerationStructureMemoryRequirementsTypeKHR
forall a. Zero a => a
zero)
    ("pAccelerationStructure" ::: Ptr AccelerationStructureNV)
-> AccelerationStructureNV -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV
p ("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV)
-> Int -> "pAccelerationStructure" ::: Ptr AccelerationStructureNV
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr AccelerationStructureNV)) (AccelerationStructureNV
forall a. Zero a => a
zero)
    IO b
f

instance FromCStruct AccelerationStructureMemoryRequirementsInfoNV where
  peekCStruct :: ("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV)
-> IO AccelerationStructureMemoryRequirementsInfoNV
peekCStruct p :: "pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV
p = do
    AccelerationStructureMemoryRequirementsTypeKHR
type' <- Ptr AccelerationStructureMemoryRequirementsTypeKHR
-> IO AccelerationStructureMemoryRequirementsTypeKHR
forall a. Storable a => Ptr a -> IO a
peek @AccelerationStructureMemoryRequirementsTypeNV (("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV
p ("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV)
-> Int -> Ptr AccelerationStructureMemoryRequirementsTypeKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr AccelerationStructureMemoryRequirementsTypeNV))
    AccelerationStructureNV
accelerationStructure <- ("pAccelerationStructure" ::: Ptr AccelerationStructureNV)
-> IO AccelerationStructureNV
forall a. Storable a => Ptr a -> IO a
peek @AccelerationStructureNV (("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV
p ("pInfo" ::: Ptr AccelerationStructureMemoryRequirementsInfoNV)
-> Int -> "pAccelerationStructure" ::: Ptr AccelerationStructureNV
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr AccelerationStructureNV))
    AccelerationStructureMemoryRequirementsInfoNV
-> IO AccelerationStructureMemoryRequirementsInfoNV
forall (f :: * -> *) a. Applicative f => a -> f a
pure (AccelerationStructureMemoryRequirementsInfoNV
 -> IO AccelerationStructureMemoryRequirementsInfoNV)
-> AccelerationStructureMemoryRequirementsInfoNV
-> IO AccelerationStructureMemoryRequirementsInfoNV
forall a b. (a -> b) -> a -> b
$ AccelerationStructureMemoryRequirementsTypeKHR
-> AccelerationStructureNV
-> AccelerationStructureMemoryRequirementsInfoNV
AccelerationStructureMemoryRequirementsInfoNV
             AccelerationStructureMemoryRequirementsTypeKHR
type' AccelerationStructureNV
accelerationStructure

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

instance Zero AccelerationStructureMemoryRequirementsInfoNV where
  zero :: AccelerationStructureMemoryRequirementsInfoNV
zero = AccelerationStructureMemoryRequirementsTypeKHR
-> AccelerationStructureNV
-> AccelerationStructureMemoryRequirementsInfoNV
AccelerationStructureMemoryRequirementsInfoNV
           AccelerationStructureMemoryRequirementsTypeKHR
forall a. Zero a => a
zero
           AccelerationStructureNV
forall a. Zero a => a
zero


-- | VkPhysicalDeviceRayTracingPropertiesNV - Properties of the physical
-- device for ray tracing
--
-- = Description
--
-- If the 'PhysicalDeviceRayTracingPropertiesNV' structure is included in
-- the @pNext@ chain of
-- 'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.PhysicalDeviceProperties2',
-- it is filled with the implementation-dependent limits.
--
-- Limits specified by this structure /must/ match those specified with the
-- same name in
-- 'Vulkan.Extensions.VK_KHR_ray_tracing.PhysicalDeviceRayTracingPropertiesKHR'.
--
-- == Valid Usage (Implicit)
--
-- = See Also
--
-- 'Vulkan.Core10.Enums.StructureType.StructureType'
data PhysicalDeviceRayTracingPropertiesNV = PhysicalDeviceRayTracingPropertiesNV
  { -- | @shaderGroupHandleSize@ size in bytes of the shader header.
    PhysicalDeviceRayTracingPropertiesNV -> "shader" ::: Word32
shaderGroupHandleSize :: Word32
  , -- | @maxRecursionDepth@ is the maximum number of levels of recursion allowed
    -- in a trace command.
    PhysicalDeviceRayTracingPropertiesNV -> "shader" ::: Word32
maxRecursionDepth :: Word32
  , -- | @maxShaderGroupStride@ is the maximum stride in bytes allowed between
    -- shader groups in the SBT.
    PhysicalDeviceRayTracingPropertiesNV -> "shader" ::: Word32
maxShaderGroupStride :: Word32
  , -- | @shaderGroupBaseAlignment@ is the required alignment in bytes for the
    -- base of the SBTs.
    PhysicalDeviceRayTracingPropertiesNV -> "shader" ::: Word32
shaderGroupBaseAlignment :: Word32
  , -- | @maxGeometryCount@ is the maximum number of geometries in the bottom
    -- level acceleration structure.
    PhysicalDeviceRayTracingPropertiesNV
-> "instanceOffset" ::: DeviceSize
maxGeometryCount :: Word64
  , -- | @maxInstanceCount@ is the maximum number of instances in the top level
    -- acceleration structure.
    PhysicalDeviceRayTracingPropertiesNV
-> "instanceOffset" ::: DeviceSize
maxInstanceCount :: Word64
  , -- | @maxTriangleCount@ is the maximum number of triangles in all geometries
    -- in the bottom level acceleration structure.
    PhysicalDeviceRayTracingPropertiesNV
-> "instanceOffset" ::: DeviceSize
maxTriangleCount :: Word64
  , -- | @maxDescriptorSetAccelerationStructures@ is the maximum number of
    -- acceleration structure descriptors that are allowed in a descriptor set.
    PhysicalDeviceRayTracingPropertiesNV -> "shader" ::: Word32
maxDescriptorSetAccelerationStructures :: Word32
  }
  deriving (Typeable)
deriving instance Show PhysicalDeviceRayTracingPropertiesNV

instance ToCStruct PhysicalDeviceRayTracingPropertiesNV where
  withCStruct :: PhysicalDeviceRayTracingPropertiesNV
-> (Ptr PhysicalDeviceRayTracingPropertiesNV -> IO b) -> IO b
withCStruct x :: PhysicalDeviceRayTracingPropertiesNV
x f :: Ptr PhysicalDeviceRayTracingPropertiesNV -> IO b
f = Int
-> Int
-> (Ptr PhysicalDeviceRayTracingPropertiesNV -> IO b)
-> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 64 8 ((Ptr PhysicalDeviceRayTracingPropertiesNV -> IO b) -> IO b)
-> (Ptr PhysicalDeviceRayTracingPropertiesNV -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \p :: Ptr PhysicalDeviceRayTracingPropertiesNV
p -> Ptr PhysicalDeviceRayTracingPropertiesNV
-> PhysicalDeviceRayTracingPropertiesNV -> IO b -> IO b
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 :: Ptr PhysicalDeviceRayTracingPropertiesNV
-> PhysicalDeviceRayTracingPropertiesNV -> IO b -> IO b
pokeCStruct p :: Ptr PhysicalDeviceRayTracingPropertiesNV
p PhysicalDeviceRayTracingPropertiesNV{..} f :: IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPropertiesNV
p Ptr PhysicalDeviceRayTracingPropertiesNV
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PROPERTIES_NV)
    Ptr ("data" ::: Ptr ()) -> ("data" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPropertiesNV
p Ptr PhysicalDeviceRayTracingPropertiesNV
-> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) ("data" ::: Ptr ()
forall a. Ptr a
nullPtr)
    Ptr ("shader" ::: Word32) -> ("shader" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPropertiesNV
p Ptr PhysicalDeviceRayTracingPropertiesNV
-> Int -> Ptr ("shader" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Word32)) ("shader" ::: Word32
shaderGroupHandleSize)
    Ptr ("shader" ::: Word32) -> ("shader" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPropertiesNV
p Ptr PhysicalDeviceRayTracingPropertiesNV
-> Int -> Ptr ("shader" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr Word32)) ("shader" ::: Word32
maxRecursionDepth)
    Ptr ("shader" ::: Word32) -> ("shader" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPropertiesNV
p Ptr PhysicalDeviceRayTracingPropertiesNV
-> Int -> Ptr ("shader" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr Word32)) ("shader" ::: Word32
maxShaderGroupStride)
    Ptr ("shader" ::: Word32) -> ("shader" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPropertiesNV
p Ptr PhysicalDeviceRayTracingPropertiesNV
-> Int -> Ptr ("shader" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 28 :: Ptr Word32)) ("shader" ::: Word32
shaderGroupBaseAlignment)
    Ptr ("instanceOffset" ::: DeviceSize)
-> ("instanceOffset" ::: DeviceSize) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPropertiesNV
p Ptr PhysicalDeviceRayTracingPropertiesNV
-> Int -> Ptr ("instanceOffset" ::: DeviceSize)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr Word64)) ("instanceOffset" ::: DeviceSize
maxGeometryCount)
    Ptr ("instanceOffset" ::: DeviceSize)
-> ("instanceOffset" ::: DeviceSize) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPropertiesNV
p Ptr PhysicalDeviceRayTracingPropertiesNV
-> Int -> Ptr ("instanceOffset" ::: DeviceSize)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 40 :: Ptr Word64)) ("instanceOffset" ::: DeviceSize
maxInstanceCount)
    Ptr ("instanceOffset" ::: DeviceSize)
-> ("instanceOffset" ::: DeviceSize) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPropertiesNV
p Ptr PhysicalDeviceRayTracingPropertiesNV
-> Int -> Ptr ("instanceOffset" ::: DeviceSize)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 48 :: Ptr Word64)) ("instanceOffset" ::: DeviceSize
maxTriangleCount)
    Ptr ("shader" ::: Word32) -> ("shader" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPropertiesNV
p Ptr PhysicalDeviceRayTracingPropertiesNV
-> Int -> Ptr ("shader" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 56 :: Ptr Word32)) ("shader" ::: Word32
maxDescriptorSetAccelerationStructures)
    IO b
f
  cStructSize :: Int
cStructSize = 64
  cStructAlignment :: Int
cStructAlignment = 8
  pokeZeroCStruct :: Ptr PhysicalDeviceRayTracingPropertiesNV -> IO b -> IO b
pokeZeroCStruct p :: Ptr PhysicalDeviceRayTracingPropertiesNV
p f :: IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPropertiesNV
p Ptr PhysicalDeviceRayTracingPropertiesNV
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PROPERTIES_NV)
    Ptr ("data" ::: Ptr ()) -> ("data" ::: Ptr ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPropertiesNV
p Ptr PhysicalDeviceRayTracingPropertiesNV
-> Int -> Ptr ("data" ::: Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) ("data" ::: Ptr ()
forall a. Ptr a
nullPtr)
    Ptr ("shader" ::: Word32) -> ("shader" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPropertiesNV
p Ptr PhysicalDeviceRayTracingPropertiesNV
-> Int -> Ptr ("shader" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Word32)) ("shader" ::: Word32
forall a. Zero a => a
zero)
    Ptr ("shader" ::: Word32) -> ("shader" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPropertiesNV
p Ptr PhysicalDeviceRayTracingPropertiesNV
-> Int -> Ptr ("shader" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr Word32)) ("shader" ::: Word32
forall a. Zero a => a
zero)
    Ptr ("shader" ::: Word32) -> ("shader" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPropertiesNV
p Ptr PhysicalDeviceRayTracingPropertiesNV
-> Int -> Ptr ("shader" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr Word32)) ("shader" ::: Word32
forall a. Zero a => a
zero)
    Ptr ("shader" ::: Word32) -> ("shader" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPropertiesNV
p Ptr PhysicalDeviceRayTracingPropertiesNV
-> Int -> Ptr ("shader" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 28 :: Ptr Word32)) ("shader" ::: Word32
forall a. Zero a => a
zero)
    Ptr ("instanceOffset" ::: DeviceSize)
-> ("instanceOffset" ::: DeviceSize) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPropertiesNV
p Ptr PhysicalDeviceRayTracingPropertiesNV
-> Int -> Ptr ("instanceOffset" ::: DeviceSize)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr Word64)) ("instanceOffset" ::: DeviceSize
forall a. Zero a => a
zero)
    Ptr ("instanceOffset" ::: DeviceSize)
-> ("instanceOffset" ::: DeviceSize) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPropertiesNV
p Ptr PhysicalDeviceRayTracingPropertiesNV
-> Int -> Ptr ("instanceOffset" ::: DeviceSize)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 40 :: Ptr Word64)) ("instanceOffset" ::: DeviceSize
forall a. Zero a => a
zero)
    Ptr ("instanceOffset" ::: DeviceSize)
-> ("instanceOffset" ::: DeviceSize) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPropertiesNV
p Ptr PhysicalDeviceRayTracingPropertiesNV
-> Int -> Ptr ("instanceOffset" ::: DeviceSize)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 48 :: Ptr Word64)) ("instanceOffset" ::: DeviceSize
forall a. Zero a => a
zero)
    Ptr ("shader" ::: Word32) -> ("shader" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceRayTracingPropertiesNV
p Ptr PhysicalDeviceRayTracingPropertiesNV
-> Int -> Ptr ("shader" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 56 :: Ptr Word32)) ("shader" ::: Word32
forall a. Zero a => a
zero)
    IO b
f

instance FromCStruct PhysicalDeviceRayTracingPropertiesNV where
  peekCStruct :: Ptr PhysicalDeviceRayTracingPropertiesNV
-> IO PhysicalDeviceRayTracingPropertiesNV
peekCStruct p :: Ptr PhysicalDeviceRayTracingPropertiesNV
p = do
    "shader" ::: Word32
shaderGroupHandleSize <- Ptr ("shader" ::: Word32) -> IO ("shader" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceRayTracingPropertiesNV
p Ptr PhysicalDeviceRayTracingPropertiesNV
-> Int -> Ptr ("shader" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Word32))
    "shader" ::: Word32
maxRecursionDepth <- Ptr ("shader" ::: Word32) -> IO ("shader" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceRayTracingPropertiesNV
p Ptr PhysicalDeviceRayTracingPropertiesNV
-> Int -> Ptr ("shader" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr Word32))
    "shader" ::: Word32
maxShaderGroupStride <- Ptr ("shader" ::: Word32) -> IO ("shader" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceRayTracingPropertiesNV
p Ptr PhysicalDeviceRayTracingPropertiesNV
-> Int -> Ptr ("shader" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr Word32))
    "shader" ::: Word32
shaderGroupBaseAlignment <- Ptr ("shader" ::: Word32) -> IO ("shader" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceRayTracingPropertiesNV
p Ptr PhysicalDeviceRayTracingPropertiesNV
-> Int -> Ptr ("shader" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 28 :: Ptr Word32))
    "instanceOffset" ::: DeviceSize
maxGeometryCount <- Ptr ("instanceOffset" ::: DeviceSize)
-> IO ("instanceOffset" ::: DeviceSize)
forall a. Storable a => Ptr a -> IO a
peek @Word64 ((Ptr PhysicalDeviceRayTracingPropertiesNV
p Ptr PhysicalDeviceRayTracingPropertiesNV
-> Int -> Ptr ("instanceOffset" ::: DeviceSize)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32 :: Ptr Word64))
    "instanceOffset" ::: DeviceSize
maxInstanceCount <- Ptr ("instanceOffset" ::: DeviceSize)
-> IO ("instanceOffset" ::: DeviceSize)
forall a. Storable a => Ptr a -> IO a
peek @Word64 ((Ptr PhysicalDeviceRayTracingPropertiesNV
p Ptr PhysicalDeviceRayTracingPropertiesNV
-> Int -> Ptr ("instanceOffset" ::: DeviceSize)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 40 :: Ptr Word64))
    "instanceOffset" ::: DeviceSize
maxTriangleCount <- Ptr ("instanceOffset" ::: DeviceSize)
-> IO ("instanceOffset" ::: DeviceSize)
forall a. Storable a => Ptr a -> IO a
peek @Word64 ((Ptr PhysicalDeviceRayTracingPropertiesNV
p Ptr PhysicalDeviceRayTracingPropertiesNV
-> Int -> Ptr ("instanceOffset" ::: DeviceSize)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 48 :: Ptr Word64))
    "shader" ::: Word32
maxDescriptorSetAccelerationStructures <- Ptr ("shader" ::: Word32) -> IO ("shader" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceRayTracingPropertiesNV
p Ptr PhysicalDeviceRayTracingPropertiesNV
-> Int -> Ptr ("shader" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 56 :: Ptr Word32))
    PhysicalDeviceRayTracingPropertiesNV
-> IO PhysicalDeviceRayTracingPropertiesNV
forall (f :: * -> *) a. Applicative f => a -> f a
pure (PhysicalDeviceRayTracingPropertiesNV
 -> IO PhysicalDeviceRayTracingPropertiesNV)
-> PhysicalDeviceRayTracingPropertiesNV
-> IO PhysicalDeviceRayTracingPropertiesNV
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
_ = 64
  alignment :: PhysicalDeviceRayTracingPropertiesNV -> Int
alignment ~PhysicalDeviceRayTracingPropertiesNV
_ = 8
  peek :: Ptr PhysicalDeviceRayTracingPropertiesNV
-> IO PhysicalDeviceRayTracingPropertiesNV
peek = Ptr PhysicalDeviceRayTracingPropertiesNV
-> IO PhysicalDeviceRayTracingPropertiesNV
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
  poke :: Ptr PhysicalDeviceRayTracingPropertiesNV
-> PhysicalDeviceRayTracingPropertiesNV -> IO ()
poke ptr :: Ptr PhysicalDeviceRayTracingPropertiesNV
ptr poked :: PhysicalDeviceRayTracingPropertiesNV
poked = Ptr PhysicalDeviceRayTracingPropertiesNV
-> PhysicalDeviceRayTracingPropertiesNV -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceRayTracingPropertiesNV
ptr PhysicalDeviceRayTracingPropertiesNV
poked (() -> IO ()
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
           "shader" ::: Word32
forall a. Zero a => a
zero
           "shader" ::: Word32
forall a. Zero a => a
zero
           "shader" ::: Word32
forall a. Zero a => a
zero
           "shader" ::: Word32
forall a. Zero a => a
zero
           "instanceOffset" ::: DeviceSize
forall a. Zero a => a
zero
           "instanceOffset" ::: DeviceSize
forall a. Zero a => a
zero
           "instanceOffset" ::: DeviceSize
forall a. Zero a => a
zero
           "shader" ::: Word32
forall a. Zero a => a
zero


-- No documentation found for TopLevel "VkGeometryFlagsNV"
type GeometryFlagsNV = GeometryFlagsKHR


-- No documentation found for TopLevel "VkGeometryInstanceFlagsNV"
type GeometryInstanceFlagsNV = GeometryInstanceFlagsKHR


-- No documentation found for TopLevel "VkBuildAccelerationStructureFlagsNV"
type BuildAccelerationStructureFlagsNV = BuildAccelerationStructureFlagsKHR


-- No documentation found for TopLevel "VkAccelerationStructureNV"
type AccelerationStructureNV = AccelerationStructureKHR


-- No documentation found for TopLevel "VkGeometryFlagBitsNV"
type GeometryFlagBitsNV = GeometryFlagBitsKHR


-- No documentation found for TopLevel "VkGeometryInstanceFlagBitsNV"
type GeometryInstanceFlagBitsNV = GeometryInstanceFlagBitsKHR


-- No documentation found for TopLevel "VkBuildAccelerationStructureFlagBitsNV"
type BuildAccelerationStructureFlagBitsNV = BuildAccelerationStructureFlagBitsKHR


-- No documentation found for TopLevel "VkCopyAccelerationStructureModeNV"
type CopyAccelerationStructureModeNV = CopyAccelerationStructureModeKHR


-- No documentation found for TopLevel "VkAccelerationStructureTypeNV"
type AccelerationStructureTypeNV = AccelerationStructureTypeKHR


-- No documentation found for TopLevel "VkGeometryTypeNV"
type GeometryTypeNV = GeometryTypeKHR


-- No documentation found for TopLevel "VkRayTracingShaderGroupTypeNV"
type RayTracingShaderGroupTypeNV = RayTracingShaderGroupTypeKHR


-- No documentation found for TopLevel "VkAccelerationStructureMemoryRequirementsTypeNV"
type AccelerationStructureMemoryRequirementsTypeNV = AccelerationStructureMemoryRequirementsTypeKHR


-- No documentation found for TopLevel "VkBindAccelerationStructureMemoryInfoNV"
type BindAccelerationStructureMemoryInfoNV = BindAccelerationStructureMemoryInfoKHR


-- No documentation found for TopLevel "VkWriteDescriptorSetAccelerationStructureNV"
type WriteDescriptorSetAccelerationStructureNV = WriteDescriptorSetAccelerationStructureKHR


-- No documentation found for TopLevel "VkAabbPositionsNV"
type AabbPositionsNV = AabbPositionsKHR


-- No documentation found for TopLevel "VkTransformMatrixNV"
type TransformMatrixNV = TransformMatrixKHR


-- No documentation found for TopLevel "VkAccelerationStructureInstanceNV"
type AccelerationStructureInstanceNV = AccelerationStructureInstanceKHR


type NV_RAY_TRACING_SPEC_VERSION = 3

-- No documentation found for TopLevel "VK_NV_RAY_TRACING_SPEC_VERSION"
pattern NV_RAY_TRACING_SPEC_VERSION :: forall a . Integral a => a
pattern $bNV_RAY_TRACING_SPEC_VERSION :: a
$mNV_RAY_TRACING_SPEC_VERSION :: forall r a. Integral a => a -> (Void# -> r) -> (Void# -> r) -> r
NV_RAY_TRACING_SPEC_VERSION = 3


type NV_RAY_TRACING_EXTENSION_NAME = "VK_NV_ray_tracing"

-- No documentation found for TopLevel "VK_NV_RAY_TRACING_EXTENSION_NAME"
pattern NV_RAY_TRACING_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $bNV_RAY_TRACING_EXTENSION_NAME :: a
$mNV_RAY_TRACING_EXTENSION_NAME :: forall r a.
(Eq a, IsString a) =>
a -> (Void# -> r) -> (Void# -> r) -> r
NV_RAY_TRACING_EXTENSION_NAME = "VK_NV_ray_tracing"