| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Graphics.Vulkan.Extensions.VK_NV_ray_tracing
Synopsis
- compileDeferredNV :: forall io. MonadIO io => Device -> Pipeline -> ("shader" ::: Word32) -> io ()
- createAccelerationStructureNV :: forall io. MonadIO io => Device -> AccelerationStructureCreateInfoNV -> ("allocator" ::: Maybe AllocationCallbacks) -> io AccelerationStructureNV
- withAccelerationStructureNV :: forall r. Device -> AccelerationStructureCreateInfoNV -> Maybe AllocationCallbacks -> (AccelerationStructureNV -> IO r) -> IO r
- destroyAccelerationStructureNV :: forall io. MonadIO io => Device -> AccelerationStructureNV -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()
- getAccelerationStructureMemoryRequirementsNV :: forall a io. (PokeChain a, PeekChain a, MonadIO io) => Device -> AccelerationStructureMemoryRequirementsInfoNV -> io (MemoryRequirements2KHR a)
- bindAccelerationStructureMemoryNV :: forall io. MonadIO io => Device -> ("bindInfos" ::: Vector BindAccelerationStructureMemoryInfoNV) -> io ()
- cmdCopyAccelerationStructureNV :: forall io. MonadIO io => CommandBuffer -> ("dst" ::: AccelerationStructureNV) -> ("src" ::: AccelerationStructureNV) -> CopyAccelerationStructureModeNV -> io ()
- cmdWriteAccelerationStructuresPropertiesNV :: forall io. MonadIO io => CommandBuffer -> ("accelerationStructures" ::: Vector AccelerationStructureNV) -> QueryType -> QueryPool -> ("firstQuery" ::: Word32) -> io ()
- cmdBuildAccelerationStructureNV :: forall io. MonadIO io => CommandBuffer -> AccelerationStructureInfoNV -> ("instanceData" ::: Buffer) -> ("instanceOffset" ::: DeviceSize) -> ("update" ::: Bool) -> ("dst" ::: AccelerationStructureNV) -> ("src" ::: AccelerationStructureNV) -> ("scratch" ::: Buffer) -> ("scratchOffset" ::: DeviceSize) -> io ()
- cmdTraceRaysNV :: forall io. MonadIO io => CommandBuffer -> ("raygenShaderBindingTableBuffer" ::: Buffer) -> ("raygenShaderBindingOffset" ::: DeviceSize) -> ("missShaderBindingTableBuffer" ::: Buffer) -> ("missShaderBindingOffset" ::: DeviceSize) -> ("missShaderBindingStride" ::: DeviceSize) -> ("hitShaderBindingTableBuffer" ::: Buffer) -> ("hitShaderBindingOffset" ::: DeviceSize) -> ("hitShaderBindingStride" ::: DeviceSize) -> ("callableShaderBindingTableBuffer" ::: Buffer) -> ("callableShaderBindingOffset" ::: DeviceSize) -> ("callableShaderBindingStride" ::: DeviceSize) -> ("width" ::: Word32) -> ("height" ::: Word32) -> ("depth" ::: Word32) -> io ()
- getRayTracingShaderGroupHandlesNV :: forall io. MonadIO io => Device -> Pipeline -> ("firstGroup" ::: Word32) -> ("groupCount" ::: Word32) -> ("dataSize" ::: Word64) -> ("data" ::: Ptr ()) -> io ()
- getAccelerationStructureHandleNV :: forall io. MonadIO io => Device -> AccelerationStructureNV -> ("dataSize" ::: Word64) -> ("data" ::: Ptr ()) -> io ()
- createRayTracingPipelinesNV :: forall a io. (PokeChain a, MonadIO io) => Device -> PipelineCache -> ("createInfos" ::: Vector (RayTracingPipelineCreateInfoNV a)) -> ("allocator" ::: Maybe AllocationCallbacks) -> io ("pipelines" ::: Vector Pipeline)
- data RayTracingShaderGroupCreateInfoNV = RayTracingShaderGroupCreateInfoNV {}
- data RayTracingPipelineCreateInfoNV (es :: [Type]) = RayTracingPipelineCreateInfoNV {}
- data GeometryTrianglesNV = GeometryTrianglesNV {}
- data GeometryAABBNV = GeometryAABBNV {}
- data GeometryDataNV = GeometryDataNV {}
- data GeometryNV = GeometryNV {}
- data AccelerationStructureInfoNV = AccelerationStructureInfoNV {}
- data AccelerationStructureCreateInfoNV = AccelerationStructureCreateInfoNV {}
- data BindAccelerationStructureMemoryInfoNV = BindAccelerationStructureMemoryInfoNV {}
- data WriteDescriptorSetAccelerationStructureNV = WriteDescriptorSetAccelerationStructureNV {}
- data AccelerationStructureMemoryRequirementsInfoNV = AccelerationStructureMemoryRequirementsInfoNV {}
- data PhysicalDeviceRayTracingPropertiesNV = PhysicalDeviceRayTracingPropertiesNV {}
- newtype GeometryInstanceFlagBitsNV where
- GeometryInstanceFlagBitsNV Flags
- pattern GEOMETRY_INSTANCE_TRIANGLE_CULL_DISABLE_BIT_NV :: GeometryInstanceFlagBitsNV
- pattern GEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_NV :: GeometryInstanceFlagBitsNV
- pattern GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_NV :: GeometryInstanceFlagBitsNV
- pattern GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_NV :: GeometryInstanceFlagBitsNV
- type GeometryInstanceFlagsNV = GeometryInstanceFlagBitsNV
- newtype GeometryFlagBitsNV where
- type GeometryFlagsNV = GeometryFlagBitsNV
- newtype BuildAccelerationStructureFlagBitsNV where
- BuildAccelerationStructureFlagBitsNV Flags
- pattern BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_NV :: BuildAccelerationStructureFlagBitsNV
- pattern BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_NV :: BuildAccelerationStructureFlagBitsNV
- pattern BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_NV :: BuildAccelerationStructureFlagBitsNV
- pattern BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_NV :: BuildAccelerationStructureFlagBitsNV
- pattern BUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_NV :: BuildAccelerationStructureFlagBitsNV
- type BuildAccelerationStructureFlagsNV = BuildAccelerationStructureFlagBitsNV
- newtype CopyAccelerationStructureModeNV where
- newtype AccelerationStructureTypeNV where
- newtype GeometryTypeNV where
- GeometryTypeNV Int32
- pattern GEOMETRY_TYPE_TRIANGLES_NV :: GeometryTypeNV
- pattern GEOMETRY_TYPE_AABBS_NV :: GeometryTypeNV
- newtype AccelerationStructureMemoryRequirementsTypeNV where
- AccelerationStructureMemoryRequirementsTypeNV Int32
- pattern ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_OBJECT_NV :: AccelerationStructureMemoryRequirementsTypeNV
- pattern ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_BUILD_SCRATCH_NV :: AccelerationStructureMemoryRequirementsTypeNV
- pattern ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_UPDATE_SCRATCH_NV :: AccelerationStructureMemoryRequirementsTypeNV
- newtype RayTracingShaderGroupTypeNV where
- type NV_RAY_TRACING_SPEC_VERSION = 3
- pattern NV_RAY_TRACING_SPEC_VERSION :: forall a. Integral a => a
- type NV_RAY_TRACING_EXTENSION_NAME = "VK_NV_ray_tracing"
- pattern NV_RAY_TRACING_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
- newtype AccelerationStructureNV = AccelerationStructureNV Word64
- newtype DebugReportObjectTypeEXT where
- DebugReportObjectTypeEXT Int32
- pattern DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_BUFFER_VIEW_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_IMAGE_VIEW_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_PIPELINE_CACHE_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_SAMPLER_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_DISPLAY_KHR_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_DISPLAY_MODE_KHR_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_OBJECT_TABLE_NVX_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_ACCELERATION_STRUCTURE_NV_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_EXT :: DebugReportObjectTypeEXT
- type SHADER_UNUSED_NV = 4294967295
- pattern SHADER_UNUSED_NV :: Word32
Documentation
compileDeferredNV :: forall io. MonadIO io => Device -> Pipeline -> ("shader" ::: Word32) -> io () Source #
vkCompileDeferredNV - Deferred compilation of shaders
Parameters
deviceis the logical device containing the ray tracing pipeline.
pipelineis the ray tracing pipeline object containing the shaders.shaderis the index of the shader to compile.
Return Codes
See Also
createAccelerationStructureNV :: forall io. MonadIO io => Device -> AccelerationStructureCreateInfoNV -> ("allocator" ::: Maybe AllocationCallbacks) -> io AccelerationStructureNV Source #
vkCreateAccelerationStructureNV - Create a new acceleration structure object
Parameters
deviceis the logical device that creates the buffer object.
pCreateInfois a pointer to aAccelerationStructureCreateInfoNVstructure containing parameters affecting creation of the acceleration structure.pAllocatorcontrols host memory allocation as described in the Memory Allocation chapter.pAccelerationStructureis a pointer to aAccelerationStructureNVhandle 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)
devicemust be a validDevicehandle
pCreateInfomust be a valid pointer to a validAccelerationStructureCreateInfoNVstructure- If
pAllocatoris notNULL,pAllocatormust be a valid pointer to a validAllocationCallbacksstructure pAccelerationStructuremust be a valid pointer to aAccelerationStructureNVhandle
Return Codes
See Also
AccelerationStructureCreateInfoNV,
AccelerationStructureNV,
AllocationCallbacks,
Device
withAccelerationStructureNV :: forall r. Device -> AccelerationStructureCreateInfoNV -> Maybe AllocationCallbacks -> (AccelerationStructureNV -> IO r) -> IO r Source #
A safe wrapper for createAccelerationStructureNV and
destroyAccelerationStructureNV using bracket
The allocated value must not be returned from the provided computation
destroyAccelerationStructureNV :: forall io. MonadIO io => Device -> AccelerationStructureNV -> ("allocator" ::: Maybe AllocationCallbacks) -> io () Source #
vkDestroyAccelerationStructureNV - Destroy an acceleration structure object
Parameters
deviceis the logical device that destroys the buffer.
accelerationStructureis the acceleration structure to destroy.pAllocatorcontrols host memory allocation as described in the Memory Allocation chapter.
Valid Usage
- All submitted commands that refer to
accelerationStructuremust have completed execution
- If
AllocationCallbackswere provided whenaccelerationStructurewas created, a compatible set of callbacks must be provided here - If no
AllocationCallbackswere provided whenaccelerationStructurewas created,pAllocatormust beNULL
Valid Usage (Implicit)
devicemust be a validDevicehandle
accelerationStructuremust be a validAccelerationStructureNVhandle- If
pAllocatoris notNULL,pAllocatormust be a valid pointer to a validAllocationCallbacksstructure accelerationStructuremust have been created, allocated, or retrieved fromdevice
See Also
getAccelerationStructureMemoryRequirementsNV :: forall a io. (PokeChain a, PeekChain a, MonadIO io) => Device -> AccelerationStructureMemoryRequirementsInfoNV -> io (MemoryRequirements2KHR a) Source #
vkGetAccelerationStructureMemoryRequirementsNV - Get acceleration structure memory requirements
Parameters
deviceis the logical device on which the acceleration structure was created.
pInfospecifies the acceleration structure to get memory requirements for.pMemoryRequirementsreturns the requested acceleration structure memory requirements.
Valid Usage (Implicit)
See Also
AccelerationStructureMemoryRequirementsInfoNV,
Device,
MemoryRequirements2KHR
bindAccelerationStructureMemoryNV :: forall io. MonadIO io => Device -> ("bindInfos" ::: Vector BindAccelerationStructureMemoryInfoNV) -> io () Source #
vkBindAccelerationStructureMemoryNV - Bind acceleration structure memory
Parameters
deviceis the logical device that owns the acceleration structures and memory.
bindInfoCountis the number of elements inpBindInfos.pBindInfosis a pointer to an array ofBindAccelerationStructureMemoryInfoNVstructures describing images and memory to bind.
Return Codes
See Also
cmdCopyAccelerationStructureNV :: forall io. MonadIO io => CommandBuffer -> ("dst" ::: AccelerationStructureNV) -> ("src" ::: AccelerationStructureNV) -> CopyAccelerationStructureModeNV -> io () Source #
vkCmdCopyAccelerationStructureNV - Copy an acceleration structure
Parameters
commandBufferis the command buffer into which the command will be recorded.
dstis a pointer to the target acceleration structure for the copy.srcis a pointer to the source acceleration structure for the copy.modeis aCopyAccelerationStructureModeNVvalue specifying additional operations to perform during the copy.
Valid Usage
modemust beCOPY_ACCELERATION_STRUCTURE_MODE_COMPACT_NVorCOPY_ACCELERATION_STRUCTURE_MODE_CLONE_NV
srcmust have been built withBUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_NVifmodeisCOPY_ACCELERATION_STRUCTURE_MODE_COMPACT_NV
Valid Usage (Implicit)
commandBuffermust be a validCommandBufferhandle
dstmust be a validAccelerationStructureNVhandlesrcmust be a validAccelerationStructureNVhandlemodemust be a validCopyAccelerationStructureModeNVvaluecommandBuffermust be in the recording state- The
CommandPoolthatcommandBufferwas allocated from must support compute operations - This command must only be called outside of a render pass instance
- Each of
commandBuffer,dst, andsrcmust have been created, allocated, or retrieved from the sameDevice
Host Synchronization
- Host access to the
CommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
'
| Command Buffer Levels | Render Pass Scope | Supported Queue Types | Pipeline Type |
|---|---|---|---|
| Primary Secondary | Outside | Compute |
See Also
AccelerationStructureNV,
CommandBuffer,
CopyAccelerationStructureModeNV
cmdWriteAccelerationStructuresPropertiesNV :: forall io. MonadIO io => CommandBuffer -> ("accelerationStructures" ::: Vector AccelerationStructureNV) -> QueryType -> QueryPool -> ("firstQuery" ::: Word32) -> io () Source #
vkCmdWriteAccelerationStructuresPropertiesNV - Write acceleration structure result parameters to query results.
Parameters
commandBufferis the command buffer into which the command will be recorded.
accelerationStructureCountis the count of acceleration structures for which to query the property.pAccelerationStructuresis a pointer to an array of existing previously built acceleration structures.queryTypeis aQueryTypevalue specifying the type of queries managed by the pool.queryPoolis the query pool that will manage the results of the query.firstQueryis the first query index within the query pool that will contain theaccelerationStructureCountnumber of results.
Valid Usage
queryTypemust beQUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_NV
queryPoolmust have been created with aqueryTypematchingqueryType- The queries identified by
queryPoolandfirstQuerymust be unavailable - All acceleration structures in
accelerationStructuresmust have been built withBUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_NVifqueryTypeisQUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_NV
Valid Usage (Implicit)
commandBuffermust be a validCommandBufferhandle
pAccelerationStructuresmust be a valid pointer to an array ofaccelerationStructureCountvalidAccelerationStructureNVhandlesqueryTypemust be a validQueryTypevaluequeryPoolmust be a validQueryPoolhandlecommandBuffermust be in the recording state- The
CommandPoolthatcommandBufferwas allocated from must support compute operations - This command must only be called outside of a render pass instance
accelerationStructureCountmust be greater than0- Each of
commandBuffer,queryPool, and the elements ofpAccelerationStructuresmust have been created, allocated, or retrieved from the sameDevice
Host Synchronization
- Host access to the
CommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
'
| Command Buffer Levels | Render Pass Scope | Supported Queue Types | Pipeline Type |
|---|---|---|---|
| Primary Secondary | Outside | Compute |
See Also
AccelerationStructureNV,
CommandBuffer,
QueryPool,
QueryType
cmdBuildAccelerationStructureNV :: forall io. MonadIO io => CommandBuffer -> AccelerationStructureInfoNV -> ("instanceData" ::: Buffer) -> ("instanceOffset" ::: DeviceSize) -> ("update" ::: Bool) -> ("dst" ::: AccelerationStructureNV) -> ("src" ::: AccelerationStructureNV) -> ("scratch" ::: Buffer) -> ("scratchOffset" ::: DeviceSize) -> io () Source #
vkCmdBuildAccelerationStructureNV - Build an acceleration structure
Parameters
commandBufferis the command buffer into which the command will be recorded.
pInfocontains the shared information for the acceleration structure’s structure.instanceDatais the buffer containing instance data that will be used to build the acceleration structure as described in Accelerator structure instances. This parameter must beNULLfor bottom level acceleration structures.instanceOffsetis the offset in bytes (relative to the start ofinstanceData) at which the instance data is located.updatespecifies whether to update thedstacceleration structure with the data insrc.dstis a pointer to the target acceleration structure for the build.srcis a pointer to an existing acceleration structure that is to be used to update thedstacceleration structure.scratchis theBufferthat will be used as scratch memory for the build.scratchOffsetis the offset in bytes relative to the start ofscratchthat will be used as a scratch memory.
Valid Usage
geometryCountmust be less than or equal toPhysicalDeviceRayTracingPropertiesNV::maxGeometryCount
dstmust have been created with compatibleAccelerationStructureInfoNVwhereAccelerationStructureInfoNV::typeandAccelerationStructureInfoNV::flagsare identical,AccelerationStructureInfoNV::instanceCountandAccelerationStructureInfoNV::geometryCountfordstare greater than or equal to the build size and each geometry inAccelerationStructureInfoNV::pGeometriesfordsthas greater than or equal to the number of vertices, indices, and AABBs.- If
updateisTRUE,srcmust not beNULL_HANDLE - If
updateisTRUE,srcmust have been built before withBUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_NVset inAccelerationStructureInfoNV::flags - If
updateisFALSE, Thesizemember of theMemoryRequirementsstructure returned from a call togetAccelerationStructureMemoryRequirementsNVwithAccelerationStructureMemoryRequirementsInfoNV::accelerationStructureset todstandAccelerationStructureMemoryRequirementsInfoNV::typeset toACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_BUILD_SCRATCH_NVmust be less than or equal to the size ofscratchminusscratchOffset - If
updateisTRUE, Thesizemember of theMemoryRequirementsstructure returned from a call togetAccelerationStructureMemoryRequirementsNVwithAccelerationStructureMemoryRequirementsInfoNV::accelerationStructureset todstandAccelerationStructureMemoryRequirementsInfoNV::typeset toACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_UPDATE_SCRATCH_NVmust be less than or equal to the size ofscratchminusscratchOffset
Valid Usage (Implicit)
commandBuffermust be a validCommandBufferhandle
pInfomust be a valid pointer to a validAccelerationStructureInfoNVstructure- If
instanceDatais notNULL_HANDLE,instanceDatamust be a validBufferhandle dstmust be a validAccelerationStructureNVhandle- If
srcis notNULL_HANDLE,srcmust be a validAccelerationStructureNVhandle scratchmust be a validBufferhandlecommandBuffermust be in the recording state- The
CommandPoolthatcommandBufferwas allocated from must support compute operations - This command must only be called outside of a render pass instance
- Each of
commandBuffer,dst,instanceData,scratch, andsrcthat are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the sameDevice
Host Synchronization
- Host access to the
CommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
'
| Command Buffer Levels | Render Pass Scope | Supported Queue Types | Pipeline Type |
|---|---|---|---|
| Primary Secondary | Outside | Compute |
See Also
AccelerationStructureInfoNV,
AccelerationStructureNV,
Bool32,
Buffer,
CommandBuffer,
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 () Source #
vkCmdTraceRaysNV - Initialize a ray tracing dispatch
Parameters
commandBufferis the command buffer into which the command will be recorded.
raygenShaderBindingTableBufferis the buffer object that holds the shader binding table data for the ray generation shader stage.raygenShaderBindingOffsetis the offset in bytes (relative toraygenShaderBindingTableBuffer) of the ray generation shader being used for the trace.missShaderBindingTableBufferis the buffer object that holds the shader binding table data for the miss shader stage.missShaderBindingOffsetis the offset in bytes (relative tomissShaderBindingTableBuffer) of the miss shader being used for the trace.missShaderBindingStrideis the size in bytes of each shader binding table record inmissShaderBindingTableBuffer.hitShaderBindingTableBufferis the buffer object that holds the shader binding table data for the hit shader stages.hitShaderBindingOffsetis the offset in bytes (relative tohitShaderBindingTableBuffer) of the hit shader group being used for the trace.hitShaderBindingStrideis the size in bytes of each shader binding table record inhitShaderBindingTableBuffer.callableShaderBindingTableBufferis the buffer object that holds the shader binding table data for the callable shader stage.callableShaderBindingOffsetis the offset in bytes (relative tocallableShaderBindingTableBuffer) of the callable shader being used for the trace.callableShaderBindingStrideis the size in bytes of each shader binding table record incallableShaderBindingTableBuffer.widthis the width of the ray trace query dimensions.heightis height of the ray trace query dimensions.depthis 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
ImageViewis sampled withFILTER_LINEARas a result of this command, then the image view’s format features must containFORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT
- If a
ImageViewis accessed using atomic operations as a result of this command, then the image view’s format features must containFORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT - If a
ImageViewis sampled withFILTER_CUBIC_EXTas a result of this command, then the image view’s format features must containFORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT - Any
ImageViewbeing sampled withFILTER_CUBIC_EXTas a result of this command must have aImageViewTypeand format that supports cubic filtering, as specified byFilterCubicImageViewImageFormatPropertiesEXT::filterCubicreturned bygetPhysicalDeviceImageFormatProperties2 - Any
ImageViewbeing sampled withFILTER_CUBIC_EXTwith a reduction mode of eitherSAMPLER_REDUCTION_MODE_MINorSAMPLER_REDUCTION_MODE_MAXas a result of this command must have aImageViewTypeand format that supports cubic filtering together with minmax filtering, as specified byFilterCubicImageViewImageFormatPropertiesEXT::filterCubicMinmaxreturned bygetPhysicalDeviceImageFormatProperties2 - Any
Imagecreated with aImageCreateInfo::flagscontainingIMAGE_CREATE_CORNER_SAMPLED_BIT_NVsampled as a result of this command must only be sampled using aSamplerAddressModeofSAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE. - For each set n that is statically used by the
Pipelinebound 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 aPipelineLayoutthat is compatible for set n, with thePipelineLayoutused to create the currentPipeline, as described in ??? - For each push constant that is statically used by the
Pipelinebound to the pipeline bind point used by this command, a push constant value must have been set for the same pipeline bind point, with aPipelineLayoutthat is compatible for push constants, with thePipelineLayoutused to create the currentPipeline, as described in ??? - Descriptors in each bound descriptor set, specified via
cmdBindDescriptorSets, must be valid if they are statically used by thePipelinebound 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
Pipelineobject bound to the pipeline bind point used by this command requires any dynamic state, that state must have been set forcommandBuffer, 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
Pipelineobject bound to the pipeline bind point used by this command, since that pipeline was bound - If the
Pipelineobject bound to the pipeline bind point used by this command accesses aSamplerobject that uses unnormalized coordinates, that sampler must not be used to sample from anyImagewith aImageViewof the typeIMAGE_VIEW_TYPE_3D,IMAGE_VIEW_TYPE_CUBE,IMAGE_VIEW_TYPE_1D_ARRAY,IMAGE_VIEW_TYPE_2D_ARRAYorIMAGE_VIEW_TYPE_CUBE_ARRAY, in any shader stage - If the
Pipelineobject bound to the pipeline bind point used by this command accesses aSamplerobject that uses unnormalized coordinates, that sampler must not be used with any of the SPIR-VOpImageSample*orOpImageSparseSample*instructions withImplicitLod,DreforProjin their name, in any shader stage - If the
Pipelineobject bound to the pipeline bind point used by this command accesses aSamplerobject that uses unnormalized coordinates, that sampler must not be used with any of the SPIR-VOpImageSample*orOpImageSparseSample*instructions that includes a LOD bias or any offset values, in any shader stage - If the
robust buffer access
feature is not enabled, and if the
Pipelineobject 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
robust buffer access
feature is not enabled, and if the
Pipelineobject 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
commandBufferis an unprotected command buffer, any resource accessed by thePipelineobject bound to the pipeline bind point used by this command must not be a protected resource - If
commandBufferis a protected command buffer, any resource written to by thePipelineobject bound to the pipeline bind point used by this command must not be an unprotected resource - If
commandBufferis a protected command buffer, pipeline stages other than the framebuffer-space and compute stages in thePipelineobject bound to the pipeline bind point must not write to any resource raygenShaderBindingOffsetmust be less than the size ofraygenShaderBindingTableBufferraygenShaderBindingOffsetmust be a multiple ofPhysicalDeviceRayTracingPropertiesNV::shaderGroupBaseAlignmentmissShaderBindingOffsetmust be less than the size ofmissShaderBindingTableBuffermissShaderBindingOffsetmust be a multiple ofPhysicalDeviceRayTracingPropertiesNV::shaderGroupBaseAlignmenthitShaderBindingOffsetmust be less than the size ofhitShaderBindingTableBufferhitShaderBindingOffsetmust be a multiple ofPhysicalDeviceRayTracingPropertiesNV::shaderGroupBaseAlignmentcallableShaderBindingOffsetmust be less than the size ofcallableShaderBindingTableBuffercallableShaderBindingOffsetmust be a multiple ofPhysicalDeviceRayTracingPropertiesNV::shaderGroupBaseAlignmentmissShaderBindingStridemust be a multiple ofPhysicalDeviceRayTracingPropertiesNV::shaderGroupHandleSizehitShaderBindingStridemust be a multiple ofPhysicalDeviceRayTracingPropertiesNV::shaderGroupHandleSizecallableShaderBindingStridemust be a multiple ofPhysicalDeviceRayTracingPropertiesNV::shaderGroupHandleSizemissShaderBindingStridemust be a less than or equal toPhysicalDeviceRayTracingPropertiesNV::maxShaderGroupStridehitShaderBindingStridemust be a less than or equal toPhysicalDeviceRayTracingPropertiesNV::maxShaderGroupStridecallableShaderBindingStridemust be a less than or equal toPhysicalDeviceRayTracingPropertiesNV::maxShaderGroupStridewidthmust be less than or equal toPhysicalDeviceLimits::maxComputeWorkGroupCount[0]heightmust be less than or equal toPhysicalDeviceLimits::maxComputeWorkGroupCount[1]depthmust be less than or equal toPhysicalDeviceLimits::maxComputeWorkGroupCount[2]
Valid Usage (Implicit)
commandBuffermust be a validCommandBufferhandle
raygenShaderBindingTableBuffermust be a validBufferhandle- If
missShaderBindingTableBufferis notNULL_HANDLE,missShaderBindingTableBuffermust be a validBufferhandle - If
hitShaderBindingTableBufferis notNULL_HANDLE,hitShaderBindingTableBuffermust be a validBufferhandle - If
callableShaderBindingTableBufferis notNULL_HANDLE,callableShaderBindingTableBuffermust be a validBufferhandle commandBuffermust be in the recording state- The
CommandPoolthatcommandBufferwas allocated from must support compute operations - This command must only be called outside of a render pass instance
- Each of
callableShaderBindingTableBuffer,commandBuffer,hitShaderBindingTableBuffer,missShaderBindingTableBuffer, andraygenShaderBindingTableBufferthat are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the sameDevice
Host Synchronization
- Host access to the
CommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
'
| Command Buffer Levels | Render Pass Scope | Supported Queue Types | Pipeline Type |
|---|---|---|---|
| Primary Secondary | Outside | Compute |
See Also
getRayTracingShaderGroupHandlesNV :: forall io. MonadIO io => Device -> Pipeline -> ("firstGroup" ::: Word32) -> ("groupCount" ::: Word32) -> ("dataSize" ::: Word64) -> ("data" ::: Ptr ()) -> io () Source #
vkGetRayTracingShaderGroupHandlesNV - Query ray tracing pipeline shader group handles
Parameters
deviceis the logical device containing the ray tracing pipeline.
pipelineis the ray tracing pipeline object containing the shaders.firstGroupis the index of the first group to retrieve a handle for from theRayTracingShaderGroupCreateInfoNV::pGroupsarray.groupCountis the number of shader handles to retrieve.dataSizeis the size in bytes of the buffer pointed to bypData.pDatais a pointer to a user-allocated buffer where the results will be written.
Valid Usage
- The sum of
firstGroupandgroupCountmust be less than the number of shader groups inpipeline.
dataSizemust be at leastPhysicalDeviceRayTracingPropertiesNV::shaderGroupHandleSize×groupCount
Valid Usage (Implicit)
devicemust be a validDevicehandle
pipelinemust be a validPipelinehandlepDatamust be a valid pointer to an array ofdataSizebytesdataSizemust be greater than0pipelinemust have been created, allocated, or retrieved fromdevice
Return Codes
See Also
getAccelerationStructureHandleNV :: forall io. MonadIO io => Device -> AccelerationStructureNV -> ("dataSize" ::: Word64) -> ("data" ::: Ptr ()) -> io () Source #
vkGetAccelerationStructureHandleNV - Get opaque acceleration structure handle
Parameters
deviceis the logical device that owns the acceleration structures.
accelerationStructureis the acceleration structure.dataSizeis the size in bytes of the buffer pointed to bypData.pDatais a pointer to a user-allocated buffer where the results will be written.
Return Codes
See Also
createRayTracingPipelinesNV :: forall a io. (PokeChain a, MonadIO io) => Device -> PipelineCache -> ("createInfos" ::: Vector (RayTracingPipelineCreateInfoNV a)) -> ("allocator" ::: Maybe AllocationCallbacks) -> io ("pipelines" ::: Vector Pipeline) Source #
vkCreateRayTracingPipelinesNV - Creates a new ray tracing pipeline object
Parameters
deviceis the logical device that creates the ray tracing pipelines.
pipelineCacheis eitherNULL_HANDLE, indicating that pipeline caching is disabled, or the handle of a valid pipeline cache object, in which case use of that cache is enabled for the duration of the command.createInfoCountis the length of thepCreateInfosandpPipelinesarrays.pCreateInfosis a pointer to an array ofRayTracingPipelineCreateInfoNVstructures.pAllocatorcontrols host memory allocation as described in the Memory Allocation chapter.pPipelinesis a pointer to an array in which the resulting ray tracing pipeline objects are returned.
Valid Usage
- If the
flagsmember of any element ofpCreateInfoscontains thePIPELINE_CREATE_DERIVATIVE_BITflag, and thebasePipelineIndexmember of that same element is not-1,basePipelineIndexmust be less than the index intopCreateInfosthat corresponds to that element
- If the
flagsmember of any element ofpCreateInfoscontains thePIPELINE_CREATE_DERIVATIVE_BITflag, the base pipeline must have been created with thePIPELINE_CREATE_ALLOW_DERIVATIVES_BITflag set
Valid Usage (Implicit)
devicemust be a validDevicehandle
- If
pipelineCacheis notNULL_HANDLE,pipelineCachemust be a validPipelineCachehandle pCreateInfosmust be a valid pointer to an array ofcreateInfoCountvalidRayTracingPipelineCreateInfoNVstructures- If
pAllocatoris notNULL,pAllocatormust be a valid pointer to a validAllocationCallbacksstructure pPipelinesmust be a valid pointer to an array ofcreateInfoCountPipelinehandlescreateInfoCountmust be greater than0- If
pipelineCacheis a valid handle, it must have been created, allocated, or retrieved fromdevice
Return Codes
See Also
AllocationCallbacks,
Device,
Pipeline,
PipelineCache,
RayTracingPipelineCreateInfoNV
data RayTracingShaderGroupCreateInfoNV Source #
VkRayTracingShaderGroupCreateInfoNV - Structure specifying shaders in a shader group
Valid Usage
- If
typeisRAY_TRACING_SHADER_GROUP_TYPE_GENERAL_NVthengeneralShadermust be a valid index intopStagesreferring to a shader ofSHADER_STAGE_RAYGEN_BIT_NV,SHADER_STAGE_MISS_BIT_NV, orSHADER_STAGE_CALLABLE_BIT_NV
- If
typeisRAY_TRACING_SHADER_GROUP_TYPE_GENERAL_NVthenclosestHitShader,anyHitShader, andintersectionShadermust beSHADER_UNUSED_NV - If
typeisRAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_NVthenintersectionShadermust be a valid index intopStagesreferring to a shader ofSHADER_STAGE_INTERSECTION_BIT_NV - If
typeisRAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_NVthenintersectionShadermust beSHADER_UNUSED_NV closestHitShadermust be eitherSHADER_UNUSED_NVor a valid index intopStagesreferring to a shader ofSHADER_STAGE_CLOSEST_HIT_BIT_NVanyHitShadermust be eitherSHADER_UNUSED_NVor a valid index intopStagesreferring to a shader ofSHADER_STAGE_ANY_HIT_BIT_NV
Valid Usage (Implicit)
sTypemust beSTRUCTURE_TYPE_RAY_TRACING_SHADER_GROUP_CREATE_INFO_NV
pNextmust beNULLtypemust be a validRayTracingShaderGroupTypeNVvalue
See Also
RayTracingPipelineCreateInfoNV, RayTracingShaderGroupTypeNV,
StructureType
Constructors
| RayTracingShaderGroupCreateInfoNV | |
Fields
| |
Instances
data RayTracingPipelineCreateInfoNV (es :: [Type]) Source #
VkRayTracingPipelineCreateInfoNV - Structure specifying parameters of a newly created ray tracing pipeline
Description
The parameters basePipelineHandle and basePipelineIndex are
described in more detail in
Pipeline Derivatives.
Valid Usage
- If
flagscontains thePIPELINE_CREATE_DERIVATIVE_BITflag, andbasePipelineIndexis-1,basePipelineHandlemust be a valid handle to a ray tracingPipeline
- If
flagscontains thePIPELINE_CREATE_DERIVATIVE_BITflag, andbasePipelineHandleisNULL_HANDLE,basePipelineIndexmust be a valid index into the calling command’spCreateInfosparameter - If
flagscontains thePIPELINE_CREATE_DERIVATIVE_BITflag, andbasePipelineIndexis not-1,basePipelineHandlemust beNULL_HANDLE - If
flagscontains thePIPELINE_CREATE_DERIVATIVE_BITflag, andbasePipelineHandleis notNULL_HANDLE,basePipelineIndexmust be-1 - The
stagemember of one element ofpStagesmust beSHADER_STAGE_RAYGEN_BIT_NV - 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 Shader Interfaces chapter layoutmust be consistent with all shaders specified inpStages- The number of resources in
layoutaccessible to each shader stage that is used by the pipeline must be less than or equal toPhysicalDeviceLimits::maxPerStageResources maxRecursionDepthmust be less than or equal toPhysicalDeviceRayTracingPropertiesNV::maxRecursionDepth
Valid Usage (Implicit)
sTypemust beSTRUCTURE_TYPE_RAY_TRACING_PIPELINE_CREATE_INFO_NV
pNextmust beNULLor a pointer to a valid instance ofPipelineCreationFeedbackCreateInfoEXT- The
sTypevalue of each struct in thepNextchain must be unique flagsmust be a valid combination ofPipelineCreateFlagBitsvaluespStagesmust be a valid pointer to an array ofstageCountvalidPipelineShaderStageCreateInfostructurespGroupsmust be a valid pointer to an array ofgroupCountvalidRayTracingShaderGroupCreateInfoNVstructureslayoutmust be a validPipelineLayouthandlestageCountmust be greater than0groupCountmust be greater than0- Both of
basePipelineHandle, andlayoutthat are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the sameDevice
See Also
Pipeline,
PipelineCreateFlags,
PipelineLayout,
PipelineShaderStageCreateInfo,
RayTracingShaderGroupCreateInfoNV,
StructureType,
createRayTracingPipelinesNV
Constructors
| RayTracingPipelineCreateInfoNV | |
Fields
| |
Instances
data GeometryTrianglesNV Source #
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
vertexOffsetmust be less than the size ofvertexData
vertexOffsetmust be a multiple of the component size ofvertexFormatvertexFormatmust be one ofFORMAT_R32G32B32_SFLOAT,FORMAT_R32G32_SFLOAT,FORMAT_R16G16B16_SFLOAT,FORMAT_R16G16_SFLOAT,FORMAT_R16G16_SNORM, orFORMAT_R16G16B16_SNORMindexOffsetmust be less than the size ofindexDataindexOffsetmust be a multiple of the element size ofindexTypeindexTypemust beINDEX_TYPE_UINT16,INDEX_TYPE_UINT32, orINDEX_TYPE_NONE_NVindexDatamust beNULL_HANDLEifindexTypeisINDEX_TYPE_NONE_NVindexDatamust be a validBufferhandle ifindexTypeis notINDEX_TYPE_NONE_NVindexCountmust be0ifindexTypeisINDEX_TYPE_NONE_NVtransformOffsetmust be less than the size oftransformDatatransformOffsetmust be a multiple of16
Valid Usage (Implicit)
sTypemust beSTRUCTURE_TYPE_GEOMETRY_TRIANGLES_NV
pNextmust beNULL- If
vertexDatais notNULL_HANDLE,vertexDatamust be a validBufferhandle vertexFormatmust be a validFormatvalue- If
indexDatais notNULL_HANDLE,indexDatamust be a validBufferhandle indexTypemust be a validIndexTypevalue- If
transformDatais notNULL_HANDLE,transformDatamust be a validBufferhandle - Each of
indexData,transformData, andvertexDatathat are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the sameDevice
See Also
Buffer,
DeviceSize,
Format, GeometryDataNV,
IndexType,
StructureType
Constructors
| GeometryTrianglesNV | |
Fields
| |
Instances
data GeometryAABBNV Source #
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
offsetmust be less than the size ofaabbData
offsetmust be a multiple of8stridemust be a multiple of8
Valid Usage (Implicit)
sTypemust beSTRUCTURE_TYPE_GEOMETRY_AABB_NV
pNextmust beNULL- If
aabbDatais notNULL_HANDLE,aabbDatamust be a validBufferhandle
See Also
Constructors
| GeometryAABBNV | |
Fields
| |
Instances
data GeometryDataNV Source #
VkGeometryDataNV - Structure specifying geometry in a bottom-level acceleration structure
Valid Usage (Implicit)
See Also
Constructors
| GeometryDataNV | |
Fields
| |
Instances
| Show GeometryDataNV Source # | |
Defined in Graphics.Vulkan.Extensions.VK_NV_ray_tracing Methods showsPrec :: Int -> GeometryDataNV -> ShowS # show :: GeometryDataNV -> String # showList :: [GeometryDataNV] -> ShowS # | |
| FromCStruct GeometryDataNV Source # | |
Defined in Graphics.Vulkan.Extensions.VK_NV_ray_tracing Methods peekCStruct :: Ptr GeometryDataNV -> IO GeometryDataNV Source # | |
| ToCStruct GeometryDataNV Source # | |
Defined in Graphics.Vulkan.Extensions.VK_NV_ray_tracing Methods withCStruct :: GeometryDataNV -> (Ptr GeometryDataNV -> IO b) -> IO b Source # pokeCStruct :: Ptr GeometryDataNV -> GeometryDataNV -> IO b -> IO b Source # withZeroCStruct :: (Ptr GeometryDataNV -> IO b) -> IO b Source # pokeZeroCStruct :: Ptr GeometryDataNV -> IO b -> IO b Source # cStructSize :: Int Source # | |
| Zero GeometryDataNV Source # | |
Defined in Graphics.Vulkan.Extensions.VK_NV_ray_tracing Methods | |
data GeometryNV Source #
VkGeometryNV - Structure specifying a geometry in a bottom-level acceleration structure
Valid Usage (Implicit)
See Also
AccelerationStructureInfoNV, GeometryDataNV, GeometryFlagsNV,
GeometryTypeNV,
StructureType
Constructors
| GeometryNV | |
Fields
| |
Instances
| Show GeometryNV Source # | |
Defined in Graphics.Vulkan.Extensions.VK_NV_ray_tracing Methods showsPrec :: Int -> GeometryNV -> ShowS # show :: GeometryNV -> String # showList :: [GeometryNV] -> ShowS # | |
| FromCStruct GeometryNV Source # | |
Defined in Graphics.Vulkan.Extensions.VK_NV_ray_tracing Methods peekCStruct :: Ptr GeometryNV -> IO GeometryNV Source # | |
| ToCStruct GeometryNV Source # | |
Defined in Graphics.Vulkan.Extensions.VK_NV_ray_tracing Methods withCStruct :: GeometryNV -> (Ptr GeometryNV -> IO b) -> IO b Source # pokeCStruct :: Ptr GeometryNV -> GeometryNV -> IO b -> IO b Source # withZeroCStruct :: (Ptr GeometryNV -> IO b) -> IO b Source # pokeZeroCStruct :: Ptr GeometryNV -> IO b -> IO b Source # cStructSize :: Int Source # | |
| Zero GeometryNV Source # | |
Defined in Graphics.Vulkan.Extensions.VK_NV_ray_tracing Methods zero :: GeometryNV Source # | |
data AccelerationStructureInfoNV Source #
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
geometryCountmust be less than or equal toPhysicalDeviceRayTracingPropertiesNV::maxGeometryCount
instanceCountmust be less than or equal toPhysicalDeviceRayTracingPropertiesNV::maxInstanceCount- The total number of triangles in all geometries must be less than
or equal to
PhysicalDeviceRayTracingPropertiesNV::maxTriangleCount - If
typeisACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_NVthengeometryCountmust be0 - If
typeisACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_NVtheninstanceCountmust be0 - If
typeisACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_NVthen thegeometryTypemember of each geometry inpGeometriesmust be the same - If
flagshas theBUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_NVbit set, then it must not have theBUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_NVbit set scratchmust have been created withBUFFER_USAGE_RAY_TRACING_BIT_NVusage flag- If
instanceDatais notNULL_HANDLE,instanceDatamust have been created withBUFFER_USAGE_RAY_TRACING_BIT_NVusage flag
Valid Usage (Implicit)
sTypemust beSTRUCTURE_TYPE_ACCELERATION_STRUCTURE_INFO_NV
pNextmust beNULLtypemust be a validAccelerationStructureTypeNVvalueflagsmust be a valid combination ofBuildAccelerationStructureFlagBitsNVvalues- If
geometryCountis not0,pGeometriesmust be a valid pointer to an array ofgeometryCountvalidGeometryNVstructures
See Also
AccelerationStructureCreateInfoNV, AccelerationStructureTypeNV,
BuildAccelerationStructureFlagsNV, GeometryNV,
StructureType,
cmdBuildAccelerationStructureNV
Constructors
| AccelerationStructureInfoNV | |
Fields
| |
Instances
| Show AccelerationStructureInfoNV Source # | |
Defined in Graphics.Vulkan.Extensions.VK_NV_ray_tracing Methods showsPrec :: Int -> AccelerationStructureInfoNV -> ShowS # show :: AccelerationStructureInfoNV -> String # showList :: [AccelerationStructureInfoNV] -> ShowS # | |
| FromCStruct AccelerationStructureInfoNV Source # | |
Defined in Graphics.Vulkan.Extensions.VK_NV_ray_tracing | |
| ToCStruct AccelerationStructureInfoNV Source # | |
Defined in Graphics.Vulkan.Extensions.VK_NV_ray_tracing Methods withCStruct :: AccelerationStructureInfoNV -> (Ptr AccelerationStructureInfoNV -> IO b) -> IO b Source # pokeCStruct :: Ptr AccelerationStructureInfoNV -> AccelerationStructureInfoNV -> IO b -> IO b Source # withZeroCStruct :: (Ptr AccelerationStructureInfoNV -> IO b) -> IO b Source # pokeZeroCStruct :: Ptr AccelerationStructureInfoNV -> IO b -> IO b Source # cStructSize :: Int Source # | |
| Zero AccelerationStructureInfoNV Source # | |
Defined in Graphics.Vulkan.Extensions.VK_NV_ray_tracing Methods | |
data AccelerationStructureCreateInfoNV Source #
VkAccelerationStructureCreateInfoNV - Structure specifying the parameters of a newly created acceleration structure object
Valid Usage
- If
compactedSizeis not0then bothinfo.geometryCountandinfo.instanceCountmust be0
Valid Usage (Implicit)
sTypemust beSTRUCTURE_TYPE_ACCELERATION_STRUCTURE_CREATE_INFO_NV
pNextmust beNULLinfomust be a validAccelerationStructureInfoNVstructure
See Also
AccelerationStructureInfoNV,
DeviceSize,
StructureType,
createAccelerationStructureNV
Constructors
| AccelerationStructureCreateInfoNV | |
Fields
| |
Instances
| Show AccelerationStructureCreateInfoNV Source # | |
Defined in Graphics.Vulkan.Extensions.VK_NV_ray_tracing Methods showsPrec :: Int -> AccelerationStructureCreateInfoNV -> ShowS # | |
| FromCStruct AccelerationStructureCreateInfoNV Source # | |
| ToCStruct AccelerationStructureCreateInfoNV Source # | |
Defined in Graphics.Vulkan.Extensions.VK_NV_ray_tracing Methods withCStruct :: AccelerationStructureCreateInfoNV -> (Ptr AccelerationStructureCreateInfoNV -> IO b) -> IO b Source # pokeCStruct :: Ptr AccelerationStructureCreateInfoNV -> AccelerationStructureCreateInfoNV -> IO b -> IO b Source # withZeroCStruct :: (Ptr AccelerationStructureCreateInfoNV -> IO b) -> IO b Source # pokeZeroCStruct :: Ptr AccelerationStructureCreateInfoNV -> IO b -> IO b Source # cStructSize :: Int Source # | |
| Zero AccelerationStructureCreateInfoNV Source # | |
Defined in Graphics.Vulkan.Extensions.VK_NV_ray_tracing Methods | |
data BindAccelerationStructureMemoryInfoNV Source #
VkBindAccelerationStructureMemoryInfoNV - Structure specifying acceleration structure memory binding
Valid Usage
accelerationStructuremust not already be backed by a memory object
memoryOffsetmust be less than the size ofmemorymemorymust have been allocated using one of the memory types allowed in thememoryTypeBitsmember of theMemoryRequirementsstructure returned from a call togetAccelerationStructureMemoryRequirementsNVwithaccelerationStructureandtypeofACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_OBJECT_NVmemoryOffsetmust be an integer multiple of thealignmentmember of theMemoryRequirementsstructure returned from a call togetAccelerationStructureMemoryRequirementsNVwithaccelerationStructureandtypeofACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_OBJECT_NV- The
sizemember of theMemoryRequirementsstructure returned from a call togetAccelerationStructureMemoryRequirementsNVwithaccelerationStructureandtypeofACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_OBJECT_NVmust be less than or equal to the size ofmemoryminusmemoryOffset
Valid Usage (Implicit)
pNextmust beNULLaccelerationStructuremust be a validAccelerationStructureNVhandlememorymust be a validDeviceMemoryhandle- If
deviceIndexCountis not0,pDeviceIndicesmust be a valid pointer to an array ofdeviceIndexCountuint32_tvalues - Both of
accelerationStructure, andmemorymust have been created, allocated, or retrieved from the sameDevice
See Also
AccelerationStructureNV,
DeviceMemory,
DeviceSize,
StructureType,
bindAccelerationStructureMemoryNV
Constructors
| BindAccelerationStructureMemoryInfoNV | |
Fields
| |
Instances
data WriteDescriptorSetAccelerationStructureNV Source #
VkWriteDescriptorSetAccelerationStructureNV - Structure specifying acceleration structure descriptor info
Valid Usage
accelerationStructureCountmust be equal todescriptorCountin the extended structure
- Each acceleration structure in
pAccelerationStructuresmust have been created withACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_NV
Valid Usage (Implicit)
pAccelerationStructuresmust be a valid pointer to an array ofaccelerationStructureCountvalidAccelerationStructureNVhandlesaccelerationStructureCountmust be greater than0
See Also
Constructors
| WriteDescriptorSetAccelerationStructureNV | |
Fields
| |
Instances
data AccelerationStructureMemoryRequirementsInfoNV Source #
VkAccelerationStructureMemoryRequirementsInfoNV - Structure specifying acceleration to query for memory requirements
Valid Usage (Implicit)
See Also
AccelerationStructureMemoryRequirementsTypeNV,
AccelerationStructureNV,
StructureType,
getAccelerationStructureMemoryRequirementsNV
Constructors
| AccelerationStructureMemoryRequirementsInfoNV | |
Fields
| |
Instances
data PhysicalDeviceRayTracingPropertiesNV Source #
VkPhysicalDeviceRayTracingPropertiesNV - Properties of the physical device for ray tracing
Description
If the PhysicalDeviceRayTracingPropertiesNV structure is included in
the pNext chain of
PhysicalDeviceProperties2,
it is filled with the implementation-dependent limits.
Valid Usage (Implicit)
See Also
Constructors
| PhysicalDeviceRayTracingPropertiesNV | |
Fields
| |
Instances
newtype GeometryInstanceFlagBitsNV Source #
VkGeometryInstanceFlagBitsNV - Instance flag bits
Description
GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_NV and
GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_NV must not be used in the same
flag.
See Also
Constructors
| GeometryInstanceFlagBitsNV Flags |
Bundled Patterns
| pattern GEOMETRY_INSTANCE_TRIANGLE_CULL_DISABLE_BIT_NV :: GeometryInstanceFlagBitsNV |
|
| pattern GEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_NV :: GeometryInstanceFlagBitsNV |
|
| pattern GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_NV :: GeometryInstanceFlagBitsNV |
|
| pattern GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_NV :: GeometryInstanceFlagBitsNV |
|
Instances
newtype GeometryFlagBitsNV Source #
VkGeometryFlagBitsNV - Bitmask specifying additional parameters for a geometry
See Also
Constructors
| GeometryFlagBitsNV Flags |
Bundled Patterns
| pattern GEOMETRY_OPAQUE_BIT_NV :: GeometryFlagBitsNV |
|
| pattern GEOMETRY_NO_DUPLICATE_ANY_HIT_INVOCATION_BIT_NV :: GeometryFlagBitsNV |
|
Instances
type GeometryFlagsNV = GeometryFlagBitsNV Source #
newtype BuildAccelerationStructureFlagBitsNV Source #
VkBuildAccelerationStructureFlagBitsNV - Bitmask specifying additional parameters for acceleration structure builds
Description
Note
BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_NV and
BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_NV may take more
time and memory than a normal build, and so should only be used when
those features are used.
See Also
Constructors
| BuildAccelerationStructureFlagBitsNV Flags |
Bundled Patterns
Instances
newtype CopyAccelerationStructureModeNV Source #
VkCopyAccelerationStructureModeNV - Acceleration structure copy mode
See Also
Constructors
| CopyAccelerationStructureModeNV Int32 |
Bundled Patterns
| pattern COPY_ACCELERATION_STRUCTURE_MODE_CLONE_NV :: CopyAccelerationStructureModeNV |
|
| pattern COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_NV :: CopyAccelerationStructureModeNV |
|
Instances
newtype AccelerationStructureTypeNV Source #
Constructors
| AccelerationStructureTypeNV Int32 |
Bundled Patterns
| pattern ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_NV :: AccelerationStructureTypeNV |
|
| pattern ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_NV :: AccelerationStructureTypeNV |
|
Instances
newtype GeometryTypeNV Source #
Constructors
| GeometryTypeNV Int32 |
Bundled Patterns
| pattern GEOMETRY_TYPE_TRIANGLES_NV :: GeometryTypeNV |
|
| pattern GEOMETRY_TYPE_AABBS_NV :: GeometryTypeNV |
|
Instances
newtype AccelerationStructureMemoryRequirementsTypeNV Source #
VkAccelerationStructureMemoryRequirementsTypeNV - Acceleration structure memory requirement type
See Also
Constructors
| AccelerationStructureMemoryRequirementsTypeNV Int32 |
Bundled Patterns
| pattern ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_OBJECT_NV :: AccelerationStructureMemoryRequirementsTypeNV |
|
| pattern ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_BUILD_SCRATCH_NV :: AccelerationStructureMemoryRequirementsTypeNV |
|
| pattern ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_UPDATE_SCRATCH_NV :: AccelerationStructureMemoryRequirementsTypeNV |
|
Instances
newtype RayTracingShaderGroupTypeNV Source #
VkRayTracingShaderGroupTypeNV - Shader group types
Description
Note
For current group types, the hit group type could be inferred from the presence or absence of the intersection shader, but we provide the type explicitly for future hit groups that do not have that property.
See Also
Constructors
| RayTracingShaderGroupTypeNV Int32 |
Bundled Patterns
| pattern RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_NV :: RayTracingShaderGroupTypeNV |
|
| pattern RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_NV :: RayTracingShaderGroupTypeNV |
|
| pattern RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_NV :: RayTracingShaderGroupTypeNV |
|
Instances
type NV_RAY_TRACING_SPEC_VERSION = 3 Source #
pattern NV_RAY_TRACING_SPEC_VERSION :: forall a. Integral a => a Source #
type NV_RAY_TRACING_EXTENSION_NAME = "VK_NV_ray_tracing" Source #
pattern NV_RAY_TRACING_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a Source #
newtype AccelerationStructureNV Source #
VkAccelerationStructureNV - Opaque handle to an acceleration structure object
See Also
AccelerationStructureMemoryRequirementsInfoNV,
BindAccelerationStructureMemoryInfoNV,
WriteDescriptorSetAccelerationStructureNV,
cmdBuildAccelerationStructureNV,
cmdCopyAccelerationStructureNV,
cmdWriteAccelerationStructuresPropertiesNV,
createAccelerationStructureNV,
destroyAccelerationStructureNV,
getAccelerationStructureHandleNV
Constructors
| AccelerationStructureNV Word64 |
Instances
newtype DebugReportObjectTypeEXT Source #
VkDebugReportObjectTypeEXT - Specify the type of an object handle
Description
'
VkDebugReportObjectTypeEXT and Vulkan Handle Relationship
Note
The primary expected use of
ERROR_VALIDATION_FAILED_EXT is for
validation layer testing. It is not expected that an application would
see this error code during normal use of the validation layers.
See Also
DebugMarkerObjectNameInfoEXT,
DebugMarkerObjectTagInfoEXT,
debugReportMessageEXT
Constructors
| DebugReportObjectTypeEXT Int32 |
Bundled Patterns
Instances
type SHADER_UNUSED_NV = 4294967295 Source #
pattern SHADER_UNUSED_NV :: Word32 Source #