Safe Haskell | None |
---|---|
Language | Haskell2010 |
Name
VK_KHR_ray_tracing_pipeline - device extension
VK_KHR_ray_tracing_pipeline
- Name String
VK_KHR_ray_tracing_pipeline
- Extension Type
- Device extension
- Registered Extension Number
- 348
- Revision
- 1
- Extension and Version Dependencies
- Requires Vulkan 1.1
- Requires
VK_KHR_spirv_1_4
- Requires
VK_KHR_acceleration_structure
- Contact
Other Extension Metadata
- Last Modified Date
- 2020-11-12
- Interactions and External Dependencies
- This extension requires SPV_KHR_ray_tracing
- This extension provides API support for GLSL_EXT_ray_tracing
- This extension interacts with Vulkan 1.2 and VK_KHR_vulkan_memory_model, adding the shader-call-related relation of invocations, shader-call-order partial order of dynamic instances of instructions, and the ShaderCallKHR scope.
- This extension interacts with
VK_KHR_pipeline_library, enabling
pipeline libraries to be used with ray tracing pipelines and
enabling usage of
RayTracingPipelineInterfaceCreateInfoKHR
.
- Contributors
- Matthäus Chajdas, AMD
- Greg Grebe, AMD
- Nicolai Hähnle, AMD
- Tobias Hector, AMD
- Dave Oldcorn, AMD
- Skyler Saleh, AMD
- Mathieu Robart, Arm
- Marius Bjorge, Arm
- Tom Olson, Arm
- Sebastian Tafuri, EA
- Henrik Rydgard, Embark
- Juan Cañada, Epic Games
- Patrick Kelly, Epic Games
- Yuriy O’Donnell, Epic Games
- Michael Doggett, Facebook/Oculus
- Andrew Garrard, Imagination
- Don Scorgie, Imagination
- Dae Kim, Imagination
- Joshua Barczak, Intel
- Slawek Grajewski, Intel
- Jeff Bolz, NVIDIA
- Pascal Gautron, NVIDIA
- Daniel Koch, NVIDIA
- Christoph Kubisch, NVIDIA
- Ashwin Lele, NVIDIA
- Robert Stepinski, NVIDIA
- Martin Stich, NVIDIA
- Nuno Subtil, NVIDIA
- Eric Werness, NVIDIA
- Jon Leech, Khronos
- Jeroen van Schijndel, OTOY
- Juul Joosten, OTOY
- Alex Bourd, Qualcomm
- Roman Larionov, Qualcomm
- David McAllister, Qualcomm
- Spencer Fricke, Samsung
- Lewis Gordon, Samsung
- Ralph Potter, Samsung
- Jasper Bekkers, Traverse Research
- Jesse Barker, Unity
- Baldur Karlsson, Valve
Description
Rasterization has been the dominant method to produce interactive graphics, but increasing performance of graphics hardware has made ray tracing a viable option for interactive rendering. Being able to integrate ray tracing with traditional rasterization makes it easier for applications to incrementally add ray traced effects to existing applications or to do hybrid approaches with rasterization for primary visibility and ray tracing for secondary queries.
To enable ray tracing, this extension adds a few different categories of new functionality:
- A new ray tracing pipeline type with new shader domains: ray generation, intersection, any-hit, closest hit, miss, and callable
- A shader binding indirection table to link shader groups with acceleration structure items
- Trace ray commands which initiates the ray pipeline traversal and invocation of the various new shader domains depending on which traversal conditions are met
This extension adds support for the following SPIR-V extension in Vulkan:
SPV_KHR_ray_tracing
New Commands
cmdTraceRaysIndirectKHR
cmdTraceRaysKHR
createRayTracingPipelinesKHR
getRayTracingCaptureReplayShaderGroupHandlesKHR
getRayTracingShaderGroupHandlesKHR
getRayTracingShaderGroupStackSizeKHR
New Structures
RayTracingPipelineInterfaceCreateInfoKHR
RayTracingShaderGroupCreateInfoKHR
StridedDeviceAddressRegionKHR
TraceRaysIndirectCommandKHR
Extending
PhysicalDeviceFeatures2
,DeviceCreateInfo
:Extending
PhysicalDeviceProperties2
:
New Enums
New Enum Constants
KHR_RAY_TRACING_PIPELINE_SPEC_VERSION
SHADER_UNUSED_KHR
Extending
BufferUsageFlagBits
:Extending
DynamicState
:Extending
PipelineBindPoint
:Extending
PipelineCreateFlagBits
:PIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR
PIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR
PIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR
PIPELINE_CREATE_RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHR
PIPELINE_CREATE_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHR
PIPELINE_CREATE_RAY_TRACING_SKIP_AABBS_BIT_KHR
PIPELINE_CREATE_RAY_TRACING_SKIP_TRIANGLES_BIT_KHR
Extending
PipelineStageFlagBits
:Extending
ShaderStageFlagBits
:Extending
StructureType
:
New or Modified Built-In Variables
- LaunchSizeKHR
- WorldRayOriginKHR
- WorldRayDirectionKHR
- ObjectRayOriginKHR
- ObjectRayDirectionKHR
- RayTminKHR
- RayTmaxKHR
- InstanceCustomIndexKHR
- InstanceId
- ObjectToWorldKHR
- WorldToObjectKHR
- HitKindKHR
- IncomingRayFlagsKHR
- RayGeometryIndexKHR
- (modified)
PrimitiveId
New SPIR-V Capabilities
Issues
- How does this extension differ from VK_NV_ray_tracing?
DISCUSSION:
The following is a summary of the main functional differences between VK_KHR_ray_tracing_pipeline and VK_NV_ray_tracing:
- added support for indirect ray tracing (
cmdTraceRaysIndirectKHR
) uses SPV_KHR_ray_tracing instead of SPV_NV_ray_tracing
- refer to KHR SPIR-V enums instead of NV SPIR-V enums (which are functionally equivalent and aliased to the same values).
- added
RayGeometryIndexKHR
built-in
- removed vkCompileDeferredNV compilation functionality and replaced with deferred host operations interactions for ray tracing
- added
PhysicalDeviceRayTracingPipelineFeaturesKHR
structure extended
PhysicalDeviceRayTracingPipelinePropertiesKHR
structure- renamed
maxRecursionDepth
tomaxRayRecursionDepth
and it has a minimum of 1 instead of 31 - require
shaderGroupHandleSize
to be 32 bytes - added
maxRayDispatchInvocationCount
,shaderGroupHandleAlignment
andmaxRayHitAttributeSize
- renamed
- reworked geometry structures so they could be better shared between device, host, and indirect builds
- changed SBT parameters to a structure and added size
(
StridedDeviceAddressRegionKHR
) - add parameter for requesting memory requirements for host and/or device build
- added pipeline library support for ray tracing
- added watertightness guarantees
- added no-null-shader pipeline flags
(
VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_*_SHADERS_BIT_KHR
) - added memory model interactions with ray tracing and define how subgroups work and can be repacked
- Can you give a more detailed comparision of differences and similarities between VK_NV_ray_tracing and VK_KHR_ray_tracing_pipeline?
DISCUSSION:
The following is a more detailed comparision of which commands, structures, and enums are aliased, changed, or removed.
Aliased functionality — enums, structures, and commands that are considered equivalent:
Changed enums, structures, and commands:
RayTracingShaderGroupCreateInfoNV
→RayTracingShaderGroupCreateInfoKHR
(addedpShaderGroupCaptureReplayHandle
)RayTracingPipelineCreateInfoNV
→RayTracingPipelineCreateInfoKHR
(changed type ofpGroups
, addedlibraries
,pLibraryInterface
, andpDynamicState
)PhysicalDeviceRayTracingPropertiesNV
→ VkPhysicalDeviceRayTracingPropertiesKHR (renamedmaxTriangleCount
tomaxPrimitiveCount
, addedshaderGroupHandleCaptureReplaySize
)cmdTraceRaysNV
→cmdTraceRaysKHR
(params to struct)createRayTracingPipelinesNV
→createRayTracingPipelinesKHR
(different struct, changed functionality)
Added enums, structures and commands:
PIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR
PIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR
,PIPELINE_CREATE_RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHR
,PIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR
,PIPELINE_CREATE_RAY_TRACING_SKIP_TRIANGLES_BIT_KHR
,PIPELINE_CREATE_RAY_TRACING_SKIP_AABBS_BIT_KHR
toPipelineCreateFlagBits
PhysicalDeviceRayTracingPipelineFeaturesKHR
structureDeviceOrHostAddressKHR
andDeviceOrHostAddressConstKHR
unionsPipelineLibraryCreateInfoKHR
structRayTracingPipelineInterfaceCreateInfoKHR
structStridedDeviceAddressRegionKHR
structcmdTraceRaysIndirectKHR
command andTraceRaysIndirectCommandKHR
structgetRayTracingCaptureReplayShaderGroupHandlesKHR
(shader group capture/replay)cmdSetRayTracingPipelineStackSizeKHR
andgetRayTracingShaderGroupStackSizeKHR
commands for stack size control
Functionality removed:
PIPELINE_CREATE_DEFER_COMPILE_BIT_NV
compileDeferredNV
command (replaced with VK_KHR_deferred_host_operations)
- What are the changes between the public provisional (VK_KHR_ray_tracing v8) release and the internal provisional (VK_KHR_ray_tracing v9) release?
- Require Vulkan 1.1 and SPIR-V 1.4
- Added interactions with Vulkan 1.2 and VK_KHR_vulkan_memory_model
added creation time capture and replay flags
- replace
VkStridedBufferRegionKHR
withStridedDeviceAddressRegionKHR
and changecmdTraceRaysKHR
,cmdTraceRaysIndirectKHR
, to take these for the shader binding table and use device addresses instead of buffers. - require the shader binding table buffers to have the
VK_BUFFER_USAGE_RAY_TRACING_BIT_KHR
set - make VK_KHR_pipeline_library an interaction instead of required extension
- rename the
libraries
member ofRayTracingPipelineCreateInfoKHR
topLibraryInfo
and make it a pointer - make VK_KHR_deferred_host_operations an interaction instead of a required extension (later went back on this)
added explicit stack size management for ray tracing pipelines
- removed the
maxCallableSize
member ofRayTracingPipelineInterfaceCreateInfoKHR
- added the
pDynamicState
member toRayTracingPipelineCreateInfoKHR
- added
DYNAMIC_STATE_RAY_TRACING_PIPELINE_STACK_SIZE_KHR
dynamic state for ray tracing pipelines - added
getRayTracingShaderGroupStackSizeKHR
andcmdSetRayTracingPipelineStackSizeKHR
commands - added
ShaderGroupShaderKHR
enum
- removed the
- Added
maxRayDispatchInvocationCount
limit toPhysicalDeviceRayTracingPipelinePropertiesKHR
- Added
shaderGroupHandleAlignment
property toPhysicalDeviceRayTracingPipelinePropertiesKHR
- Added
maxRayHitAttributeSize
property toPhysicalDeviceRayTracingPipelinePropertiesKHR
Clarify deferred host ops for pipeline creation
DeferredOperationKHR
is now a top-level parameter forcreateRayTracingPipelinesKHR
- removed
VkDeferredOperationInfoKHR
structure - change deferred host creation/return parameter behavior such that the implementation can modify such parameters until the deferred host operation completes
- VK_KHR_deferred_host_operations is required again
- What are the changes between the internal provisional (VK_KHR_ray_tracing v9) release and the final (VK_KHR_acceleration_structure v11 / VK_KHR_ray_tracing_pipeline v1) release?
refactor VK_KHR_ray_tracing into 3 extensions, enabling implementation flexibility and decoupling ray query support from ray pipelines:
- VK_KHR_acceleration_structure (for acceleration structure operations)
- VK_KHR_ray_tracing_pipeline (for ray tracing pipeline and shader stages)
- VK_KHR_ray_query (for ray queries in existing shader stages)
Require
Volatile
for the following builtins in the ray generation, closest hit, miss, intersection, and callable shader stages:SubgroupSize
,SubgroupLocalInvocationId
,SubgroupEqMask
,SubgroupGeMask
,SubgroupGtMask
,SubgroupLeMask
,SubgroupLtMask
SMIDNV
,WarpIDNV
clarify buffer usage flags for ray tracing
BUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHR
is added as an alias ofBUFFER_USAGE_RAY_TRACING_BIT_NV
and is required on shader binding table buffersBUFFER_USAGE_STORAGE_BUFFER_BIT
is used in VK_KHR_acceleration_structure forscratchData
- rename
maxRecursionDepth
tomaxRayPipelineRecursionDepth
(pipeline creation) andmaxRayRecursionDepth
(limit) to reduce confusion - Add queryable
maxRayHitAttributeSize
limit and rename members ofRayTracingPipelineInterfaceCreateInfoKHR
tomaxPipelineRayPayloadSize
andmaxPipelineRayHitAttributeSize
for clarity - Update SPIRV capabilities to use
RayTracingKHR
- extension is no longer provisional
- define synchronization requirements for indirect trace rays and indirect buffer
- This extension adds gl_InstanceID for the intersection, any-hit, and closest hit shaders, but in KHR_vulkan_glsl, gl_InstanceID is replaced with gl_InstanceIndex. Which should be used for Vulkan in this extension?
RESOLVED: This extension uses gl_InstanceID and maps it to InstanceId
in SPIR-V. It is acknowledged that this is different than other shader
stages in Vulkan. There are two main reasons for the difference here:
- symmetry with gl_PrimitiveID which is also available in these shaders
- there is no "baseInstance" relevant for these shaders, and so ID makes it more obvious that this is zero-based.
Sample Code
Example ray generation GLSL shader
#version 450 core #extension GL_EXT_ray_tracing : require layout(set = 0, binding = 0, rgba8) uniform image2D image; layout(set = 0, binding = 1) uniform accelerationStructureEXT as; layout(location = 0) rayPayloadEXT float payload; void main() { vec4 col = vec4(0, 0, 0, 1); vec3 origin = vec3(float(gl_LaunchIDEXT.x)/float(gl_LaunchSizeEXT.x), float(gl_LaunchIDEXT.y)/float(gl_LaunchSizeEXT.y), 1.0); vec3 dir = vec3(0.0, 0.0, -1.0); traceRayEXT(as, 0, 0xff, 0, 1, 0, origin, 0.0, dir, 1000.0, 0); col.y = payload; imageStore(image, ivec2(gl_LaunchIDEXT.xy), col); }
Version History
Revision 1, 2020-11-12 (Mathieu Robart, Daniel Koch, Eric Werness, Tobias Hector)
- Decomposition of the specification, from VK_KHR_ray_tracing to VK_KHR_ray_tracing_pipeline (#1918,!3912)
- require certain subgroup and sm_shader_builtin shader builtins to be decorated as volatile in the ray generation, closest hit, miss, intersection, and callable stages (#1924,!3903,!3954)
- clarify buffer usage flags for ray tracing (#2181,!3939)
- rename maxRecursionDepth to maxRayPipelineRecursionDepth and maxRayRecursionDepth (#2203,!3937)
- add queriable maxRayHitAttributeSize and rename members of VkRayTracingPipelineInterfaceCreateInfoKHR (#2102,!3966)
- update to use
RayTracingKHR
SPIR-V capability - add VUs for matching hit group type against geometry type (#2245,!3994)
- require
RayTMaxKHR
be volatile in intersection shaders (#2268,!4030) - add numerical limits for ray parameters (#2235,!3960)
- fix SBT indexing rules for device addresses (#2308,!4079)
- relax formula for ray intersection candidate determination (#2322,!4080)
- add more details on
ShaderRecordBufferKHR
variables (#2230,!4083) - clarify valid bits for
InstanceCustomIndexKHR
(GLSL/GLSL#19,!4128) - allow at most one
IncomingRayPayloadKHR
,IncomingCallableDataKHR
, andHitAttributeKHR
(!4129) - add minimum for maxShaderGroupStride (#2353,!4131)
- require VK_KHR_pipeline_library extension to be supported (#2348,!4135)
- clarify meaning of 'geometry index' (#2272,!4137)
- restrict traces to TLAS (#2239,!4141)
- add note about maxPipelineRayPayloadSize (#2383,!4172)
- do not require raygen shader in pipeline libraries (!4185)
- define sync for indirect trace rays and indirect buffer (#2407,!4208)
See Also
SHADER_UNUSED_KHR
,
PhysicalDeviceRayTracingPipelineFeaturesKHR
,
PhysicalDeviceRayTracingPipelinePropertiesKHR
,
RayTracingPipelineCreateInfoKHR
,
RayTracingPipelineInterfaceCreateInfoKHR
,
RayTracingShaderGroupCreateInfoKHR
, RayTracingShaderGroupTypeKHR
,
ShaderGroupShaderKHR
, StridedDeviceAddressRegionKHR
,
TraceRaysIndirectCommandKHR
, cmdSetRayTracingPipelineStackSizeKHR
,
cmdTraceRaysIndirectKHR
, cmdTraceRaysKHR
,
createRayTracingPipelinesKHR
,
getRayTracingCaptureReplayShaderGroupHandlesKHR
,
getRayTracingShaderGroupHandlesKHR
,
getRayTracingShaderGroupStackSizeKHR
Document Notes
For more information, see the Vulkan Specification
This page is a generated document. Fixes and changes should be made to the generator scripts, not directly.
Synopsis
- cmdTraceRaysKHR :: forall io. MonadIO io => CommandBuffer -> ("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR) -> ("missShaderBindingTable" ::: StridedDeviceAddressRegionKHR) -> ("hitShaderBindingTable" ::: StridedDeviceAddressRegionKHR) -> ("callableShaderBindingTable" ::: StridedDeviceAddressRegionKHR) -> ("width" ::: Word32) -> ("height" ::: Word32) -> ("depth" ::: Word32) -> io ()
- getRayTracingShaderGroupHandlesKHR :: forall io. MonadIO io => Device -> Pipeline -> ("firstGroup" ::: Word32) -> ("groupCount" ::: Word32) -> ("dataSize" ::: Word64) -> ("data" ::: Ptr ()) -> io ()
- getRayTracingCaptureReplayShaderGroupHandlesKHR :: forall io. MonadIO io => Device -> Pipeline -> ("firstGroup" ::: Word32) -> ("groupCount" ::: Word32) -> ("dataSize" ::: Word64) -> ("data" ::: Ptr ()) -> io ()
- createRayTracingPipelinesKHR :: forall io. MonadIO io => Device -> DeferredOperationKHR -> PipelineCache -> ("createInfos" ::: Vector (SomeStruct RayTracingPipelineCreateInfoKHR)) -> ("allocator" ::: Maybe AllocationCallbacks) -> io (Result, "pipelines" ::: Vector Pipeline)
- withRayTracingPipelinesKHR :: forall io r. MonadIO io => Device -> DeferredOperationKHR -> PipelineCache -> Vector (SomeStruct RayTracingPipelineCreateInfoKHR) -> Maybe AllocationCallbacks -> (io (Result, Vector Pipeline) -> ((Result, Vector Pipeline) -> io ()) -> r) -> r
- cmdTraceRaysIndirectKHR :: forall io. MonadIO io => CommandBuffer -> ("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR) -> ("missShaderBindingTable" ::: StridedDeviceAddressRegionKHR) -> ("hitShaderBindingTable" ::: StridedDeviceAddressRegionKHR) -> ("callableShaderBindingTable" ::: StridedDeviceAddressRegionKHR) -> ("indirectDeviceAddress" ::: DeviceAddress) -> io ()
- getRayTracingShaderGroupStackSizeKHR :: forall io. MonadIO io => Device -> Pipeline -> ("group" ::: Word32) -> ShaderGroupShaderKHR -> io DeviceSize
- cmdSetRayTracingPipelineStackSizeKHR :: forall io. MonadIO io => CommandBuffer -> ("pipelineStackSize" ::: Word32) -> io ()
- data RayTracingShaderGroupCreateInfoKHR = RayTracingShaderGroupCreateInfoKHR {}
- data RayTracingPipelineCreateInfoKHR (es :: [Type]) = RayTracingPipelineCreateInfoKHR {
- next :: Chain es
- flags :: PipelineCreateFlags
- stages :: Vector (SomeStruct PipelineShaderStageCreateInfo)
- groups :: Vector RayTracingShaderGroupCreateInfoKHR
- maxPipelineRayRecursionDepth :: Word32
- libraryInfo :: Maybe PipelineLibraryCreateInfoKHR
- libraryInterface :: Maybe RayTracingPipelineInterfaceCreateInfoKHR
- dynamicState :: Maybe PipelineDynamicStateCreateInfo
- layout :: PipelineLayout
- basePipelineHandle :: Pipeline
- basePipelineIndex :: Int32
- data PhysicalDeviceRayTracingPipelineFeaturesKHR = PhysicalDeviceRayTracingPipelineFeaturesKHR {}
- data PhysicalDeviceRayTracingPipelinePropertiesKHR = PhysicalDeviceRayTracingPipelinePropertiesKHR {}
- data StridedDeviceAddressRegionKHR = StridedDeviceAddressRegionKHR {}
- data TraceRaysIndirectCommandKHR = TraceRaysIndirectCommandKHR {}
- data RayTracingPipelineInterfaceCreateInfoKHR = RayTracingPipelineInterfaceCreateInfoKHR {}
- newtype RayTracingShaderGroupTypeKHR where
- RayTracingShaderGroupTypeKHR Int32
- pattern RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_KHR :: RayTracingShaderGroupTypeKHR
- pattern RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR :: RayTracingShaderGroupTypeKHR
- pattern RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR :: RayTracingShaderGroupTypeKHR
- newtype ShaderGroupShaderKHR where
- type KHR_RAY_TRACING_PIPELINE_SPEC_VERSION = 1
- pattern KHR_RAY_TRACING_PIPELINE_SPEC_VERSION :: forall a. Integral a => a
- type KHR_RAY_TRACING_PIPELINE_EXTENSION_NAME = "VK_KHR_ray_tracing_pipeline"
- pattern KHR_RAY_TRACING_PIPELINE_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
- newtype DeferredOperationKHR = DeferredOperationKHR Word64
- data PipelineLibraryCreateInfoKHR = PipelineLibraryCreateInfoKHR {}
- type SHADER_UNUSED_KHR = 4294967295
- pattern SHADER_UNUSED_KHR :: Word32
Documentation
:: forall io. MonadIO io | |
=> CommandBuffer |
|
-> ("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR) |
|
-> ("missShaderBindingTable" ::: StridedDeviceAddressRegionKHR) |
|
-> ("hitShaderBindingTable" ::: StridedDeviceAddressRegionKHR) |
|
-> ("callableShaderBindingTable" ::: StridedDeviceAddressRegionKHR) |
|
-> ("width" ::: Word32) |
|
-> ("height" ::: Word32) |
|
-> ("depth" ::: Word32) |
|
-> io () |
vkCmdTraceRaysKHR - Initialize a ray tracing dispatch
Description
When the command is executed, a ray generation group of width
×
height
× depth
rays is assembled.
Valid Usage
- If a
Sampler
created withmagFilter
orminFilter
equal toFILTER_LINEAR
andcompareEnable
equal toFALSE
is used to sample aImageView
as a result of this command, then the image view’s format features must containFORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT
- If a
ImageView
is 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
ImageView
is sampled withFILTER_CUBIC_EXT
as a result of this command, then the image view’s format features must containFORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT
- Any
ImageView
being sampled withFILTER_CUBIC_EXT
as a result of this command must have aImageViewType
and format that supports cubic filtering, as specified byFilterCubicImageViewImageFormatPropertiesEXT
::filterCubic
returned bygetPhysicalDeviceImageFormatProperties2
- Any
ImageView
being sampled withFILTER_CUBIC_EXT
with a reduction mode of eitherSAMPLER_REDUCTION_MODE_MIN
orSAMPLER_REDUCTION_MODE_MAX
as a result of this command must have aImageViewType
and format that supports cubic filtering together with minmax filtering, as specified byFilterCubicImageViewImageFormatPropertiesEXT
::filterCubicMinmax
returned bygetPhysicalDeviceImageFormatProperties2
- Any
Image
created with aImageCreateInfo
::flags
containingIMAGE_CREATE_CORNER_SAMPLED_BIT_NV
sampled as a result of this command must only be sampled using aSamplerAddressMode
ofSAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE
- For each set n that is
statically used by the
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 aPipelineLayout
that is compatible for set n, with thePipelineLayout
used to create the currentPipeline
, as described in ??? - For each push constant that is
statically used by the
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 aPipelineLayout
that is compatible for push constants, with thePipelineLayout
used 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 thePipeline
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
Pipeline
object 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
Pipeline
object bound to the pipeline bind point used by this command, since that pipeline was bound - If the
Pipeline
object bound to the pipeline bind point used by this command accesses aSampler
object that uses unnormalized coordinates, that sampler must not be used to sample from anyImage
with aImageView
of the typeIMAGE_VIEW_TYPE_3D
,IMAGE_VIEW_TYPE_CUBE
,IMAGE_VIEW_TYPE_1D_ARRAY
,IMAGE_VIEW_TYPE_2D_ARRAY
orIMAGE_VIEW_TYPE_CUBE_ARRAY
, in any shader stage - If the
Pipeline
object bound to the pipeline bind point used by this command accesses aSampler
object that uses unnormalized coordinates, that sampler must not be used with any of the SPIR-VOpImageSample*
orOpImageSparseSample*
instructions withImplicitLod
,Dref
orProj
in their name, in any shader stage - If the
Pipeline
object bound to the pipeline bind point used by this command accesses aSampler
object 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
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
robust buffer access
feature is not enabled, and if the
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 thePipeline
object bound to the pipeline bind point used by this command must not be a protected resource - If a
ImageView
is accessed usingOpImageWrite
as a result of this command, then theType
of theTexel
operand of that instruction must have at least as many components as the image view’s format. - If a
BufferView
is accessed usingOpImageWrite
as a result of this command, then theType
of theTexel
operand of that instruction must have at least as many components as the image view’s format. - If a
ImageView
with aFormat
that has a 64-bit channel width is accessed as a result of this command, theSampledType
of theOpTypeImage
operand of that instruction must have aWidth
of 64. - If a
ImageView
with aFormat
that has a channel width less than 64-bit is accessed as a result of this command, theSampledType
of theOpTypeImage
operand of that instruction must have aWidth
of 32. - If a
BufferView
with aFormat
that has a 64-bit channel width is accessed as a result of this command, theSampledType
of theOpTypeImage
operand of that instruction must have aWidth
of 64. - If a
BufferView
with aFormat
that has a channel width less than 64-bit is accessed as a result of this command, theSampledType
of theOpTypeImage
operand of that instruction must have aWidth
of 32. - If the
sparseImageInt64Atomics
feature is not enabled,
Image
objects created with theIMAGE_CREATE_SPARSE_RESIDENCY_BIT
flag must not be accessed by atomic instructions through anOpTypeImage
with aSampledType
with aWidth
of 64 by this command. - If the
sparseImageInt64Atomics
feature is not enabled,
Buffer
objects created with theBUFFER_CREATE_SPARSE_RESIDENCY_BIT
flag must not be accessed by atomic instructions through anOpTypeImage
with aSampledType
with aWidth
of 64 by this command. - 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
recursion depth
greater than the value of
maxPipelineRayRecursionDepth
used to create the bound ray tracing pipeline - If the
buffer from which
pRayGenShaderBindingTable->deviceAddress
was queried is non-sparse then it must be bound completely and contiguously to a singleDeviceMemory
object - The buffer
from which the
pRayGenShaderBindingTable->deviceAddress
is queried must have been created with theBUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHR
usage flag -
pRayGenShaderBindingTable->deviceAddress
must be a multiple ofPhysicalDeviceRayTracingPipelinePropertiesKHR
::shaderGroupBaseAlignment
- The
size
member ofpRayGenShaderBindingTable
must be equal to itsstride
member - If the buffer
from which
pMissShaderBindingTable->deviceAddress
was queried is non-sparse then it must be bound completely and contiguously to a singleDeviceMemory
object - The buffer
from which the
pMissShaderBindingTable->deviceAddress
is queried must have been created with theBUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHR
usage flag -
pMissShaderBindingTable->deviceAddress
must be a multiple ofPhysicalDeviceRayTracingPipelinePropertiesKHR
::shaderGroupBaseAlignment
- The
stride
member ofpMissShaderBindingTable
must be a multiple ofPhysicalDeviceRayTracingPipelinePropertiesKHR
::shaderGroupHandleAlignment
- The
stride
member ofpMissShaderBindingTable
must be less than or equal toPhysicalDeviceRayTracingPipelinePropertiesKHR
::maxShaderGroupStride
- If the buffer
from which
pHitShaderBindingTable->deviceAddress
was queried is non-sparse then it must be bound completely and contiguously to a singleDeviceMemory
object - The buffer
from which the
pHitShaderBindingTable->deviceAddress
is queried must have been created with theBUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHR
usage flag -
pHitShaderBindingTable->deviceAddress
must be a multiple ofPhysicalDeviceRayTracingPipelinePropertiesKHR
::shaderGroupBaseAlignment
- The
stride
member ofpHitShaderBindingTable
must be a multiple ofPhysicalDeviceRayTracingPipelinePropertiesKHR
::shaderGroupHandleAlignment
- The
stride
member ofpHitShaderBindingTable
must be less than or equal toPhysicalDeviceRayTracingPipelinePropertiesKHR
::maxShaderGroupStride
- If the
buffer from which
pCallableShaderBindingTable->deviceAddress
was queried is non-sparse then it must be bound completely and contiguously to a singleDeviceMemory
object - The
buffer from which the
pCallableShaderBindingTable->deviceAddress
is queried must have been created with theBUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHR
usage flag -
pCallableShaderBindingTable->deviceAddress
must be a multiple ofPhysicalDeviceRayTracingPipelinePropertiesKHR
::shaderGroupBaseAlignment
- The
stride
member ofpCallableShaderBindingTable
must be a multiple ofPhysicalDeviceRayTracingPipelinePropertiesKHR
::shaderGroupHandleAlignment
- The
stride
member ofpCallableShaderBindingTable
must be less than or equal toPhysicalDeviceRayTracingPipelinePropertiesKHR
::maxShaderGroupStride
- If the currently bound ray
tracing pipeline was created with
flags
that includedPIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR
, thedeviceAddress
member ofpHitShaderBindingTable
must not be zero - If the currently bound ray
tracing pipeline was created with
flags
that includedPIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR
, thedeviceAddress
member ofpHitShaderBindingTable
must not be zero - If the currently bound ray
tracing pipeline was created with
flags
that includedPIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR
, thedeviceAddress
member ofpHitShaderBindingTable
must not be zero - If the currently bound ray
tracing pipeline was created with
flags
that includedPIPELINE_CREATE_RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHR
, the shader group handle identified bypMissShaderBindingTable
must contain a valid miss shader - If the currently bound ray
tracing pipeline was created with
flags
that includedPIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR
, entries inpHitShaderBindingTable
accessed as a result of this command in order to execute an any-hit shader must not be set to zero - If the currently bound ray
tracing pipeline was created with
flags
that includedPIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR
, entries inpHitShaderBindingTable
accessed as a result of this command in order to execute a closest hit shader must not be set to zero - If the currently bound ray
tracing pipeline was created with
flags
that includedPIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR
, entries inpHitShaderBindingTable
accessed as a result of this command in order to execute an intersection shader must not be set to zero - Any hit group
entries in
pHitShaderBindingTable
accessed by this call from a geometry with ageometryType
ofGEOMETRY_TYPE_TRIANGLES_KHR
must have been created withRAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR
- Any hit group
entries in
pHitShaderBindingTable
accessed by this call from a geometry with ageometryType
ofGEOMETRY_TYPE_AABBS_KHR
must have been created withRAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR
-
commandBuffer
must not be a protected command buffer -
width
must be less than or equal toPhysicalDeviceLimits
::maxComputeWorkGroupCount
[0] ×PhysicalDeviceLimits
::maxComputeWorkGroupSize
[0] -
height
must be less than or equal toPhysicalDeviceLimits
::maxComputeWorkGroupCount
[1] ×PhysicalDeviceLimits
::maxComputeWorkGroupSize
[1] -
depth
must be less than or equal toPhysicalDeviceLimits
::maxComputeWorkGroupCount
[2] ×PhysicalDeviceLimits
::maxComputeWorkGroupSize
[2] -
width
×height
×depth
must be less than or equal toPhysicalDeviceRayTracingPipelinePropertiesKHR
::maxRayDispatchInvocationCount
Valid Usage (Implicit)
-
commandBuffer
must be a validCommandBuffer
handle
-
pRaygenShaderBindingTable
must be a valid pointer to a validStridedDeviceAddressRegionKHR
structure -
pMissShaderBindingTable
must be a valid pointer to a validStridedDeviceAddressRegionKHR
structure -
pHitShaderBindingTable
must be a valid pointer to a validStridedDeviceAddressRegionKHR
structure -
pCallableShaderBindingTable
must be a valid pointer to a validStridedDeviceAddressRegionKHR
structure -
commandBuffer
must be in the recording state - The
CommandPool
thatcommandBuffer
was allocated from must support compute operations - This command must only be called outside of a render pass instance
Host Synchronization
- Host access to
commandBuffer
must be externally synchronized
- Host access to the
CommandPool
thatcommandBuffer
was 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
getRayTracingShaderGroupHandlesKHR Source #
:: forall io. MonadIO io | |
=> Device |
|
-> Pipeline |
|
-> ("firstGroup" ::: Word32) |
|
-> ("groupCount" ::: Word32) |
|
-> ("dataSize" ::: Word64) |
|
-> ("data" ::: Ptr ()) |
|
-> io () |
vkGetRayTracingShaderGroupHandlesKHR - Query ray tracing pipeline shader group handles
Valid Usage
-
firstGroup
must be less than the number of shader groups inpipeline
- The sum
of
firstGroup
andgroupCount
must be less than or equal to the number of shader groups inpipeline
-
dataSize
must be at leastPhysicalDeviceRayTracingPipelinePropertiesKHR
::shaderGroupHandleSize
×groupCount
-
pipeline
must have not been created withPIPELINE_CREATE_LIBRARY_BIT_KHR
Valid Usage (Implicit)
-
device
must be a validDevice
handle
-
pipeline
must be a validPipeline
handle -
pData
must be a valid pointer to an array ofdataSize
bytes -
dataSize
must be greater than0
-
pipeline
must have been created, allocated, or retrieved fromdevice
Return Codes
See Also
getRayTracingCaptureReplayShaderGroupHandlesKHR Source #
:: forall io. MonadIO io | |
=> Device |
|
-> Pipeline |
|
-> ("firstGroup" ::: Word32) |
|
-> ("groupCount" ::: Word32) |
|
-> ("dataSize" ::: Word64) |
|
-> ("data" ::: Ptr ()) |
|
-> io () |
vkGetRayTracingCaptureReplayShaderGroupHandlesKHR - Query ray tracing capture replay pipeline shader group handles
Valid Usage
-
firstGroup
must be less than the number of shader groups inpipeline
-
The sum of
firstGroup
andgroupCount
must be less than or equal to the number of shader groups inpipeline
-
dataSize
must be at leastPhysicalDeviceRayTracingPipelinePropertiesKHR
::shaderGroupHandleCaptureReplaySize
×groupCount
-
PhysicalDeviceRayTracingPipelineFeaturesKHR
::rayTracingPipelineShaderGroupHandleCaptureReplay
must be enabled to call this function -
pipeline
must have been created with aflags
that includedPIPELINE_CREATE_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHR
Valid Usage (Implicit)
-
device
must be a validDevice
handle
-
pipeline
must be a validPipeline
handle -
pData
must be a valid pointer to an array ofdataSize
bytes -
dataSize
must be greater than0
-
pipeline
must have been created, allocated, or retrieved fromdevice
Return Codes
See Also
createRayTracingPipelinesKHR Source #
:: forall io. MonadIO io | |
=> Device |
|
-> DeferredOperationKHR |
|
-> PipelineCache |
|
-> ("createInfos" ::: Vector (SomeStruct RayTracingPipelineCreateInfoKHR)) |
|
-> ("allocator" ::: Maybe AllocationCallbacks) |
|
-> io (Result, "pipelines" ::: Vector Pipeline) |
vkCreateRayTracingPipelinesKHR - Creates a new ray tracing pipeline object
Description
The ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS
error is returned if the implementation is unable to re-use the shader
group handles provided in
RayTracingShaderGroupCreateInfoKHR
::pShaderGroupCaptureReplayHandle
when
PhysicalDeviceRayTracingPipelineFeaturesKHR
::rayTracingPipelineShaderGroupHandleCaptureReplay
is enabled.
Valid Usage
- If the
flags
member of any element ofpCreateInfos
contains thePIPELINE_CREATE_DERIVATIVE_BIT
flag, and thebasePipelineIndex
member of that same element is not-1
,basePipelineIndex
must be less than the index intopCreateInfos
that corresponds to that element
- If the
flags
member of any element ofpCreateInfos
contains thePIPELINE_CREATE_DERIVATIVE_BIT
flag, the base pipeline must have been created with thePIPELINE_CREATE_ALLOW_DERIVATIVES_BIT
flag set -
flags
must not contain thePIPELINE_CREATE_DISPATCH_BASE
flag - If
pipelineCache
was created withPIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT_EXT
, host access topipelineCache
must be externally synchronized - If
deferredOperation
is notNULL_HANDLE
, it must be a validDeferredOperationKHR
object - Any
previous deferred operation that was associated with
deferredOperation
must be complete - The rayTracingPipeline feature must be enabled
- If
deferredOperation
is notNULL_HANDLE
, theflags
member of elements ofpCreateInfos
must not includePIPELINE_CREATE_EARLY_RETURN_ON_FAILURE_BIT_EXT
Valid Usage (Implicit)
-
device
must be a validDevice
handle
- If
deferredOperation
is notNULL_HANDLE
,deferredOperation
must be a validDeferredOperationKHR
handle - If
pipelineCache
is notNULL_HANDLE
,pipelineCache
must be a validPipelineCache
handle -
pCreateInfos
must be a valid pointer to an array ofcreateInfoCount
validRayTracingPipelineCreateInfoKHR
structures - If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validAllocationCallbacks
structure -
pPipelines
must be a valid pointer to an array ofcreateInfoCount
Pipeline
handles -
createInfoCount
must be greater than0
- If
deferredOperation
is a valid handle, it must have been created, allocated, or retrieved fromdevice
- If
pipelineCache
is a valid handle, it must have been created, allocated, or retrieved fromdevice
Return Codes
See Also
AllocationCallbacks
,
DeferredOperationKHR
,
Device
, Pipeline
,
PipelineCache
, RayTracingPipelineCreateInfoKHR
withRayTracingPipelinesKHR :: forall io r. MonadIO io => Device -> DeferredOperationKHR -> PipelineCache -> Vector (SomeStruct RayTracingPipelineCreateInfoKHR) -> Maybe AllocationCallbacks -> (io (Result, Vector Pipeline) -> ((Result, Vector Pipeline) -> io ()) -> r) -> r Source #
A convenience wrapper to make a compatible pair of calls to
createRayTracingPipelinesKHR
and destroyPipeline
To ensure that destroyPipeline
is always called: pass
bracket
(or the allocate function from your
favourite resource management library) as the last argument.
To just extract the pair pass (,)
as the last argument.
cmdTraceRaysIndirectKHR Source #
:: forall io. MonadIO io | |
=> CommandBuffer |
|
-> ("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR) |
|
-> ("missShaderBindingTable" ::: StridedDeviceAddressRegionKHR) |
|
-> ("hitShaderBindingTable" ::: StridedDeviceAddressRegionKHR) |
|
-> ("callableShaderBindingTable" ::: StridedDeviceAddressRegionKHR) |
|
-> ("indirectDeviceAddress" ::: DeviceAddress) |
|
-> io () |
vkCmdTraceRaysIndirectKHR - Initialize an indirect ray tracing dispatch
Description
cmdTraceRaysIndirectKHR
behaves similarly to cmdTraceRaysKHR
except
that the ray trace query dimensions are read by the device from
indirectDeviceAddress
during execution.
Valid Usage
- If a
Sampler
created withmagFilter
orminFilter
equal toFILTER_LINEAR
andcompareEnable
equal toFALSE
is used to sample aImageView
as a result of this command, then the image view’s format features must containFORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT
- If a
ImageView
is 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
ImageView
is sampled withFILTER_CUBIC_EXT
as a result of this command, then the image view’s format features must containFORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT
- Any
ImageView
being sampled withFILTER_CUBIC_EXT
as a result of this command must have aImageViewType
and format that supports cubic filtering, as specified byFilterCubicImageViewImageFormatPropertiesEXT
::filterCubic
returned bygetPhysicalDeviceImageFormatProperties2
- Any
ImageView
being sampled withFILTER_CUBIC_EXT
with a reduction mode of eitherSAMPLER_REDUCTION_MODE_MIN
orSAMPLER_REDUCTION_MODE_MAX
as a result of this command must have aImageViewType
and format that supports cubic filtering together with minmax filtering, as specified byFilterCubicImageViewImageFormatPropertiesEXT
::filterCubicMinmax
returned bygetPhysicalDeviceImageFormatProperties2
- Any
Image
created with aImageCreateInfo
::flags
containingIMAGE_CREATE_CORNER_SAMPLED_BIT_NV
sampled as a result of this command must only be sampled using aSamplerAddressMode
ofSAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE
- For each set n that is
statically used by the
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 aPipelineLayout
that is compatible for set n, with thePipelineLayout
used to create the currentPipeline
, as described in ??? - For each push constant
that is statically used by the
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 aPipelineLayout
that is compatible for push constants, with thePipelineLayout
used 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 thePipeline
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
Pipeline
object 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
Pipeline
object bound to the pipeline bind point used by this command, since that pipeline was bound - If the
Pipeline
object bound to the pipeline bind point used by this command accesses aSampler
object that uses unnormalized coordinates, that sampler must not be used to sample from anyImage
with aImageView
of the typeIMAGE_VIEW_TYPE_3D
,IMAGE_VIEW_TYPE_CUBE
,IMAGE_VIEW_TYPE_1D_ARRAY
,IMAGE_VIEW_TYPE_2D_ARRAY
orIMAGE_VIEW_TYPE_CUBE_ARRAY
, in any shader stage - If the
Pipeline
object bound to the pipeline bind point used by this command accesses aSampler
object that uses unnormalized coordinates, that sampler must not be used with any of the SPIR-VOpImageSample*
orOpImageSparseSample*
instructions withImplicitLod
,Dref
orProj
in their name, in any shader stage - If the
Pipeline
object bound to the pipeline bind point used by this command accesses aSampler
object 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
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
robust buffer access
feature is not enabled, and if the
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 thePipeline
object bound to the pipeline bind point used by this command must not be a protected resource - If a
ImageView
is accessed usingOpImageWrite
as a result of this command, then theType
of theTexel
operand of that instruction must have at least as many components as the image view’s format. - If a
BufferView
is accessed usingOpImageWrite
as a result of this command, then theType
of theTexel
operand of that instruction must have at least as many components as the image view’s format. - If a
ImageView
with aFormat
that has a 64-bit channel width is accessed as a result of this command, theSampledType
of theOpTypeImage
operand of that instruction must have aWidth
of 64. - If a
ImageView
with aFormat
that has a channel width less than 64-bit is accessed as a result of this command, theSampledType
of theOpTypeImage
operand of that instruction must have aWidth
of 32. - If a
BufferView
with aFormat
that has a 64-bit channel width is accessed as a result of this command, theSampledType
of theOpTypeImage
operand of that instruction must have aWidth
of 64. - If a
BufferView
with aFormat
that has a channel width less than 64-bit is accessed as a result of this command, theSampledType
of theOpTypeImage
operand of that instruction must have aWidth
of 32. - If
the
sparseImageInt64Atomics
feature is not enabled,
Image
objects created with theIMAGE_CREATE_SPARSE_RESIDENCY_BIT
flag must not be accessed by atomic instructions through anOpTypeImage
with aSampledType
with aWidth
of 64 by this command. - If
the
sparseImageInt64Atomics
feature is not enabled,
Buffer
objects created with theBUFFER_CREATE_SPARSE_RESIDENCY_BIT
flag must not be accessed by atomic instructions through anOpTypeImage
with aSampledType
with aWidth
of 64 by this command. - 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
recursion depth
greater than the value of
maxPipelineRayRecursionDepth
used to create the bound ray tracing pipeline - If
the buffer from which
pRayGenShaderBindingTable->deviceAddress
was queried is non-sparse then it must be bound completely and contiguously to a singleDeviceMemory
object - The
buffer from which the
pRayGenShaderBindingTable->deviceAddress
is queried must have been created with theBUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHR
usage flag -
pRayGenShaderBindingTable->deviceAddress
must be a multiple ofPhysicalDeviceRayTracingPipelinePropertiesKHR
::shaderGroupBaseAlignment
- The
size
member ofpRayGenShaderBindingTable
must be equal to itsstride
member - If
the buffer from which
pMissShaderBindingTable->deviceAddress
was queried is non-sparse then it must be bound completely and contiguously to a singleDeviceMemory
object - The
buffer from which the
pMissShaderBindingTable->deviceAddress
is queried must have been created with theBUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHR
usage flag -
pMissShaderBindingTable->deviceAddress
must be a multiple ofPhysicalDeviceRayTracingPipelinePropertiesKHR
::shaderGroupBaseAlignment
- The
stride
member ofpMissShaderBindingTable
must be a multiple ofPhysicalDeviceRayTracingPipelinePropertiesKHR
::shaderGroupHandleAlignment
- The
stride
member ofpMissShaderBindingTable
must be less than or equal toPhysicalDeviceRayTracingPipelinePropertiesKHR
::maxShaderGroupStride
- If the
buffer from which
pHitShaderBindingTable->deviceAddress
was queried is non-sparse then it must be bound completely and contiguously to a singleDeviceMemory
object - The
buffer from which the
pHitShaderBindingTable->deviceAddress
is queried must have been created with theBUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHR
usage flag -
pHitShaderBindingTable->deviceAddress
must be a multiple ofPhysicalDeviceRayTracingPipelinePropertiesKHR
::shaderGroupBaseAlignment
- The
stride
member ofpHitShaderBindingTable
must be a multiple ofPhysicalDeviceRayTracingPipelinePropertiesKHR
::shaderGroupHandleAlignment
- The
stride
member ofpHitShaderBindingTable
must be less than or equal toPhysicalDeviceRayTracingPipelinePropertiesKHR
::maxShaderGroupStride
-
If the buffer from which
pCallableShaderBindingTable->deviceAddress
was queried is non-sparse then it must be bound completely and contiguously to a singleDeviceMemory
object -
The buffer from which the
pCallableShaderBindingTable->deviceAddress
is queried must have been created with theBUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHR
usage flag -
pCallableShaderBindingTable->deviceAddress
must be a multiple ofPhysicalDeviceRayTracingPipelinePropertiesKHR
::shaderGroupBaseAlignment
- The
stride
member ofpCallableShaderBindingTable
must be a multiple ofPhysicalDeviceRayTracingPipelinePropertiesKHR
::shaderGroupHandleAlignment
- The
stride
member ofpCallableShaderBindingTable
must be less than or equal toPhysicalDeviceRayTracingPipelinePropertiesKHR
::maxShaderGroupStride
- If the currently bound
ray tracing pipeline was created with
flags
that includedPIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR
, thedeviceAddress
member ofpHitShaderBindingTable
must not be zero - If the currently bound
ray tracing pipeline was created with
flags
that includedPIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR
, thedeviceAddress
member ofpHitShaderBindingTable
must not be zero - If the currently bound
ray tracing pipeline was created with
flags
that includedPIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR
, thedeviceAddress
member ofpHitShaderBindingTable
must not be zero - If the currently bound
ray tracing pipeline was created with
flags
that includedPIPELINE_CREATE_RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHR
, the shader group handle identified bypMissShaderBindingTable
must contain a valid miss shader - If the currently bound
ray tracing pipeline was created with
flags
that includedPIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR
, entries inpHitShaderBindingTable
accessed as a result of this command in order to execute an any-hit shader must not be set to zero - If the currently bound
ray tracing pipeline was created with
flags
that includedPIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR
, entries inpHitShaderBindingTable
accessed as a result of this command in order to execute a closest hit shader must not be set to zero - If the currently bound
ray tracing pipeline was created with
flags
that includedPIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR
, entries inpHitShaderBindingTable
accessed as a result of this command in order to execute an intersection shader must not be set to zero - Any
hit group entries in
pHitShaderBindingTable
accessed by this call from a geometry with ageometryType
ofGEOMETRY_TYPE_TRIANGLES_KHR
must have been created withRAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR
- Any
hit group entries in
pHitShaderBindingTable
accessed by this call from a geometry with ageometryType
ofGEOMETRY_TYPE_AABBS_KHR
must have been created withRAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR
- If the
buffer from which
indirectDeviceAddress
was queried is non-sparse then it must be bound completely and contiguously to a singleDeviceMemory
object - The
buffer from which
indirectDeviceAddress
was queried must have been created with theBUFFER_USAGE_INDIRECT_BUFFER_BIT
bit set -
indirectDeviceAddress
must be a multiple of4
-
commandBuffer
must not be a protected command buffer - All
device addresses between
indirectDeviceAddress
andindirectDeviceAddress
+sizeof
(TraceRaysIndirectCommandKHR
) - 1 must be in the buffer device address range of the same buffer - the ::rayTracingPipelineTraceRaysIndirect feature must be enabled
Valid Usage (Implicit)
-
commandBuffer
must be a validCommandBuffer
handle
-
pRaygenShaderBindingTable
must be a valid pointer to a validStridedDeviceAddressRegionKHR
structure -
pMissShaderBindingTable
must be a valid pointer to a validStridedDeviceAddressRegionKHR
structure -
pHitShaderBindingTable
must be a valid pointer to a validStridedDeviceAddressRegionKHR
structure -
pCallableShaderBindingTable
must be a valid pointer to a validStridedDeviceAddressRegionKHR
structure -
commandBuffer
must be in the recording state - The
CommandPool
thatcommandBuffer
was allocated from must support compute operations - This command must only be called outside of a render pass instance
Host Synchronization
- Host access to
commandBuffer
must be externally synchronized
- Host access to the
CommandPool
thatcommandBuffer
was 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
getRayTracingShaderGroupStackSizeKHR Source #
:: forall io. MonadIO io | |
=> Device |
|
-> Pipeline |
|
-> ("group" ::: Word32) |
|
-> ShaderGroupShaderKHR |
|
-> io DeviceSize |
vkGetRayTracingShaderGroupStackSizeKHR - Query ray tracing pipeline shader group shader stack size
Description
The return value is the ray tracing pipeline stack size in bytes for the specified shader as called from the specified shader group.
Valid Usage
- The value
of
group
must be less than the number of shader groups inpipeline
- The
shader identified by
groupShader
ingroup
must not beSHADER_UNUSED_KHR
Valid Usage (Implicit)
-
device
must be a validDevice
handle
-
pipeline
must be a validPipeline
handle -
groupShader
must be a validShaderGroupShaderKHR
value -
pipeline
must have been created, allocated, or retrieved fromdevice
See Also
cmdSetRayTracingPipelineStackSizeKHR Source #
:: forall io. MonadIO io | |
=> CommandBuffer |
|
-> ("pipelineStackSize" ::: Word32) |
|
-> io () |
vkCmdSetRayTracingPipelineStackSizeKHR - Set the dynamic stack size for a ray tracing pipeline
Description
See
Ray Tracing Pipeline Stack
for more on computing pipelineStackSize
.
Valid Usage
-
pipelineStackSize
must be large enough for any dynamic execution through the shaders in the ray tracing pipeline used by a subsequent trace call
Valid Usage (Implicit)
-
commandBuffer
must be a validCommandBuffer
handle
-
commandBuffer
must be in the recording state -
The
CommandPool
thatcommandBuffer
was allocated from must support compute operations - This command must only be called outside of a render pass instance
Host Synchronization
- Host access to
commandBuffer
must be externally synchronized
- Host access to the
CommandPool
thatcommandBuffer
was 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
data RayTracingShaderGroupCreateInfoKHR Source #
VkRayTracingShaderGroupCreateInfoKHR - Structure specifying shaders in a shader group
Valid Usage
- If
type
isRAY_TRACING_SHADER_GROUP_TYPE_GENERAL_KHR
thengeneralShader
must be a valid index intoRayTracingPipelineCreateInfoKHR
::pStages
referring to a shader ofSHADER_STAGE_RAYGEN_BIT_KHR
,SHADER_STAGE_MISS_BIT_KHR
, orSHADER_STAGE_CALLABLE_BIT_KHR
- If
type
isRAY_TRACING_SHADER_GROUP_TYPE_GENERAL_KHR
thenclosestHitShader
,anyHitShader
, andintersectionShader
must beSHADER_UNUSED_KHR
- If
type
isRAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR
thenintersectionShader
must be a valid index intoRayTracingPipelineCreateInfoKHR
::pStages
referring to a shader ofSHADER_STAGE_INTERSECTION_BIT_KHR
- If
type
isRAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR
thenintersectionShader
must beSHADER_UNUSED_KHR
-
closestHitShader
must be eitherSHADER_UNUSED_KHR
or a valid index intoRayTracingPipelineCreateInfoKHR
::pStages
referring to a shader ofSHADER_STAGE_CLOSEST_HIT_BIT_KHR
-
anyHitShader
must be eitherSHADER_UNUSED_KHR
or a valid index intoRayTracingPipelineCreateInfoKHR
::pStages
referring to a shader ofSHADER_STAGE_ANY_HIT_BIT_KHR
-
If
PhysicalDeviceRayTracingPipelineFeaturesKHR
::rayTracingPipelineShaderGroupHandleCaptureReplayMixed
isFALSE
thenpShaderGroupCaptureReplayHandle
must not be provided if it has not been provided on a previous call to ray tracing pipeline creation -
If
PhysicalDeviceRayTracingPipelineFeaturesKHR
::rayTracingPipelineShaderGroupHandleCaptureReplayMixed
isFALSE
then the caller must guarantee that no ray tracing pipeline creation commands withpShaderGroupCaptureReplayHandle
provided execute simultaneously with ray tracing pipeline creation commands withoutpShaderGroupCaptureReplayHandle
provided
Valid Usage (Implicit)
-
sType
must beSTRUCTURE_TYPE_RAY_TRACING_SHADER_GROUP_CREATE_INFO_KHR
-
pNext
must beNULL
-
type
must be a validRayTracingShaderGroupTypeKHR
value
See Also
RayTracingPipelineCreateInfoKHR
, RayTracingShaderGroupTypeKHR
,
StructureType
RayTracingShaderGroupCreateInfoKHR | |
|
Instances
data RayTracingPipelineCreateInfoKHR (es :: [Type]) Source #
VkRayTracingPipelineCreateInfoKHR - Structure specifying parameters of a newly created ray tracing pipeline
Description
The parameters basePipelineHandle
and basePipelineIndex
are
described in more detail in
Pipeline Derivatives.
When
PIPELINE_CREATE_LIBRARY_BIT_KHR
is specified, this pipeline defines a pipeline library which cannot
be bound as a ray tracing pipeline directly. Instead, pipeline libraries
define common shaders and shader groups which can be included in
future pipeline creation.
If pipeline libraries are included in pLibraryInfo
, shaders defined in
those libraries are treated as if they were defined as additional
entries in pStages
, appended in the order they appear in the
pLibraries
array and in the pStages
array when those libraries were
defined.
When referencing shader groups in order to obtain a shader group handle,
groups defined in those libraries are treated as if they were defined as
additional entries in pGroups
, appended in the order they appear in
the pLibraries
array and in the pGroups
array when those libraries
were defined. The shaders these groups reference are set when the
pipeline library is created, referencing those specified in the pipeline
library, not in the pipeline that includes it.
The default stack size for a pipeline if
DYNAMIC_STATE_RAY_TRACING_PIPELINE_STACK_SIZE_KHR
is not provided is computed as described in
Ray Tracing Pipeline Stack.
Valid Usage
- If
flags
contains thePIPELINE_CREATE_DERIVATIVE_BIT
flag, andbasePipelineIndex
is-1
,basePipelineHandle
must be a valid handle to a ray tracingPipeline
- If
flags
contains thePIPELINE_CREATE_DERIVATIVE_BIT
flag, andbasePipelineHandle
isNULL_HANDLE
,basePipelineIndex
must be a valid index into the calling command’spCreateInfos
parameter - If
flags
contains thePIPELINE_CREATE_DERIVATIVE_BIT
flag, andbasePipelineIndex
is not-1
,basePipelineHandle
must beNULL_HANDLE
- If
flags
contains thePIPELINE_CREATE_DERIVATIVE_BIT
flag, andbasePipelineHandle
is notNULL_HANDLE
,basePipelineIndex
must be-1
- 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 -
layout
must be consistent with all shaders specified inpStages
- The number of
resources in
layout
accessible to each shader stage that is used by the pipeline must be less than or equal toPhysicalDeviceLimits
::maxPerStageResources
-
flags
must not includePIPELINE_CREATE_INDIRECT_BINDABLE_BIT_NV
-
If the
pipelineCreationCacheControl
feature is not enabled,
flags
must not includePIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT_EXT
orPIPELINE_CREATE_EARLY_RETURN_ON_FAILURE_BIT_EXT
- If
flags
does not includePIPELINE_CREATE_LIBRARY_BIT_KHR
, thestage
member of at least one element ofpStages
, including those implicitly added bypLibraryInfo
, must beSHADER_STAGE_RAYGEN_BIT_KHR
-
maxPipelineRayRecursionDepth
must be less than or equal toPhysicalDeviceRayTracingPipelinePropertiesKHR
::maxRayRecursionDepth
- If
flags
includesPIPELINE_CREATE_LIBRARY_BIT_KHR
,pLibraryInterface
must not beNULL
- If
pLibraryInfo
is notNULL
and itslibraryCount
member is greater than0
, itspLibraryInterface
member must not beNULL
- Each
element of the
pLibraries
member ofpLibraryInfo
must have been created with the value ofmaxPipelineRayRecursionDepth
equal to that in this pipeline - If
pLibraryInfo
is notNULL
, each element of itspLibraries
member must have been created with alayout
that is compatible with thelayout
in this pipeline - If
pLibraryInfo
is notNULL
, each element of itspLibraries
member must have been created with values of themaxPipelineRayPayloadSize
andmaxPipelineRayHitAttributeSize
members ofpLibraryInterface
equal to those in this pipeline - If
flags
includesPIPELINE_CREATE_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHR
, each element of thepLibraries
member oflibraries
must have been created with thePIPELINE_CREATE_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHR
bit set - If the
VK_KHR_pipeline_library extension is
not enabled,
pLibraryInfo
andpLibraryInterface
must beNULL
. - If
flags
includesPIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR
, for any element ofpGroups
with atype
ofRAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR
orRAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR
, theanyHitShader
of that element must not beSHADER_UNUSED_KHR
- If
flags
includesPIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR
, for any element ofpGroups
with atype
ofRAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR
orRAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR
, theclosestHitShader
of that element must not beSHADER_UNUSED_KHR
-
If the
rayTraversalPrimitiveCulling
feature is not enabled,
flags
must not includePIPELINE_CREATE_RAY_TRACING_SKIP_AABBS_BIT_KHR
-
If the
rayTraversalPrimitiveCulling
feature is not enabled,
flags
must not includePIPELINE_CREATE_RAY_TRACING_SKIP_TRIANGLES_BIT_KHR
- If
flags
includesPIPELINE_CREATE_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHR
, rayTracingPipelineShaderGroupHandleCaptureReplay must be enabled -
If
PhysicalDeviceRayTracingPipelineFeaturesKHR
::rayTracingPipelineShaderGroupHandleCaptureReplay
isTRUE
and thepShaderGroupCaptureReplayHandle
member of any element ofpGroups
is notNULL
,flags
must includePIPELINE_CREATE_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHR
- If
pLibraryInfo
is notNULL
and itslibraryCount
is0
,stageCount
must not be0
- If
pLibraryInfo
is notNULL
and itslibraryCount
is0
,groupCount
must not be0
- Any
element of the
pDynamicStates
member ofpDynamicState
must beDYNAMIC_STATE_RAY_TRACING_PIPELINE_STACK_SIZE_KHR
Valid Usage (Implicit)
-
sType
must beSTRUCTURE_TYPE_RAY_TRACING_PIPELINE_CREATE_INFO_KHR
-
pNext
must beNULL
or a pointer to a valid instance ofPipelineCreationFeedbackCreateInfoEXT
- The
sType
value of each struct in thepNext
chain must be unique -
flags
must be a valid combination ofPipelineCreateFlagBits
values - If
stageCount
is not0
,pStages
must be a valid pointer to an array ofstageCount
validPipelineShaderStageCreateInfo
structures - If
groupCount
is not0
,pGroups
must be a valid pointer to an array ofgroupCount
validRayTracingShaderGroupCreateInfoKHR
structures - If
pLibraryInfo
is notNULL
,pLibraryInfo
must be a valid pointer to a validPipelineLibraryCreateInfoKHR
structure -
If
pLibraryInterface
is notNULL
,pLibraryInterface
must be a valid pointer to a validRayTracingPipelineInterfaceCreateInfoKHR
structure - If
pDynamicState
is notNULL
,pDynamicState
must be a valid pointer to a validPipelineDynamicStateCreateInfo
structure -
layout
must be a validPipelineLayout
handle - Both of
basePipelineHandle
, andlayout
that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the sameDevice
See Also
Pipeline
,
PipelineCreateFlags
,
PipelineDynamicStateCreateInfo
,
PipelineLayout
,
PipelineLibraryCreateInfoKHR
,
PipelineShaderStageCreateInfo
,
RayTracingPipelineInterfaceCreateInfoKHR
,
RayTracingShaderGroupCreateInfoKHR
,
StructureType
,
createRayTracingPipelinesKHR
RayTracingPipelineCreateInfoKHR | |
|
Instances
data PhysicalDeviceRayTracingPipelineFeaturesKHR Source #
VkPhysicalDeviceRayTracingPipelineFeaturesKHR - Structure describing the ray tracing features that can be supported by an implementation
Members
The members of the PhysicalDeviceRayTracingPipelineFeaturesKHR
structure describe the following features:
Description
-
rayTracingPipeline
indicates whether the implementation supports the ray tracing pipeline functionality. See Ray Tracing.
-
rayTracingPipelineShaderGroupHandleCaptureReplay
indicates whether the implementation supports saving and reusing shader group handles, e.g. for trace capture and replay. -
rayTracingPipelineShaderGroupHandleCaptureReplayMixed
indicates whether the implementation supports reuse of shader group handles being arbitrarily mixed with creation of non-reused shader group handles. If this isFALSE
, all reused shader group handles must be specified before any non-reused handles may be created. -
rayTracingPipelineTraceRaysIndirect
indicates whether the implementation supports indirect trace ray commands, e.g.cmdTraceRaysIndirectKHR
. -
rayTraversalPrimitiveCulling
indicates whether the implementation supports primitive culling during ray traversal.
If the PhysicalDeviceRayTracingPipelineFeaturesKHR
structure is
included in the pNext
chain of
PhysicalDeviceFeatures2
,
it is filled with values indicating whether the feature is supported.
PhysicalDeviceRayTracingPipelineFeaturesKHR
can also be used in the
pNext
chain of DeviceCreateInfo
to enable the
features.
Valid Usage
-
If
rayTracingPipelineShaderGroupHandleCaptureReplayMixed
isTRUE
,rayTracingPipelineShaderGroupHandleCaptureReplay
must also beTRUE
Valid Usage (Implicit)
See Also
Instances
data PhysicalDeviceRayTracingPipelinePropertiesKHR Source #
VkPhysicalDeviceRayTracingPipelinePropertiesKHR - Properties of the physical device for ray tracing
Description
If the PhysicalDeviceRayTracingPipelinePropertiesKHR
structure is
included in the pNext
chain of
PhysicalDeviceProperties2
,
it is filled with the implementation-dependent limits.
Limits specified by this structure must match those specified with the
same name in
PhysicalDeviceRayTracingPropertiesNV
.
Valid Usage (Implicit)
See Also
PhysicalDeviceRayTracingPipelinePropertiesKHR | |
|
Instances
data StridedDeviceAddressRegionKHR Source #
VkStridedDeviceAddressRegionKHR - Structure specifying a region of device addresses with a stride
Valid Usage
- If
deviceAddress
is not zero, all addresses betweendeviceAddress
anddeviceAddress
+size
- 1 must be in the buffer device address range of the same buffer
- If
deviceAddress
is not zero,stride
must be less than the size of the buffer from whichdeviceAddress
was queried
See Also
DeviceAddress
,
DeviceSize
, cmdTraceRaysIndirectKHR
,
cmdTraceRaysKHR
StridedDeviceAddressRegionKHR | |
|
Instances
data TraceRaysIndirectCommandKHR Source #
VkTraceRaysIndirectCommandKHR - Structure specifying the parameters of an indirect trace ray command
Description
The members of TraceRaysIndirectCommandKHR
have the same meaning as
the similarly named parameters of cmdTraceRaysKHR
.
Valid Usage
See Also
No cross-references are available
TraceRaysIndirectCommandKHR | |
|
Instances
data RayTracingPipelineInterfaceCreateInfoKHR Source #
VkRayTracingPipelineInterfaceCreateInfoKHR - Structure specifying additional interface information when using libraries
Description
maxPipelineRayPayloadSize
is calculated as the maximum number of bytes
used by any block declared in the RayPayloadKHR
or
IncomingRayPayloadKHR
storage classes.
maxPipelineRayHitAttributeSize
is calculated as the maximum number of
bytes used by any block declared in the HitAttributeKHR
storage class.
As variables in these storage classes do not have explicit offsets, the
size should be calculated as if each variable has a
scalar alignment
equal to the largest scalar alignment of any of the block’s members.
Note
There is no explicit upper limit for maxPipelineRayPayloadSize
, but in
practice it should be kept as small as possible. Similar to invocation
local memory, it must be allocated for each shader invocation and for
devices which support many simultaneous invocations, this storage can
rapidly be exhausted, resulting in failure.
Valid Usage (Implicit)
See Also
RayTracingPipelineInterfaceCreateInfoKHR | |
|
Instances
newtype RayTracingShaderGroupTypeKHR Source #
VkRayTracingShaderGroupTypeKHR - 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
RayTracingShaderGroupCreateInfoKHR
,
RayTracingShaderGroupCreateInfoNV
pattern RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_KHR :: RayTracingShaderGroupTypeKHR |
|
pattern RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR :: RayTracingShaderGroupTypeKHR |
|
pattern RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR :: RayTracingShaderGroupTypeKHR |
|
Instances
newtype ShaderGroupShaderKHR Source #
pattern SHADER_GROUP_SHADER_GENERAL_KHR :: ShaderGroupShaderKHR |
|
pattern SHADER_GROUP_SHADER_CLOSEST_HIT_KHR :: ShaderGroupShaderKHR |
|
pattern SHADER_GROUP_SHADER_ANY_HIT_KHR :: ShaderGroupShaderKHR |
|
pattern SHADER_GROUP_SHADER_INTERSECTION_KHR :: ShaderGroupShaderKHR |
|
Instances
type KHR_RAY_TRACING_PIPELINE_SPEC_VERSION = 1 Source #
pattern KHR_RAY_TRACING_PIPELINE_SPEC_VERSION :: forall a. Integral a => a Source #
type KHR_RAY_TRACING_PIPELINE_EXTENSION_NAME = "VK_KHR_ray_tracing_pipeline" Source #
pattern KHR_RAY_TRACING_PIPELINE_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a Source #
newtype DeferredOperationKHR Source #
VkDeferredOperationKHR - A deferred operation
Description
This handle refers to a tracking structure which manages the execution state for a deferred command.
See Also
buildAccelerationStructuresKHR
,
copyAccelerationStructureKHR
,
copyAccelerationStructureToMemoryKHR
,
copyMemoryToAccelerationStructureKHR
,
createDeferredOperationKHR
,
createRayTracingPipelinesKHR
,
deferredOperationJoinKHR
,
destroyDeferredOperationKHR
,
getDeferredOperationMaxConcurrencyKHR
,
getDeferredOperationResultKHR
Instances
data PipelineLibraryCreateInfoKHR Source #
VkPipelineLibraryCreateInfoKHR - Structure specifying pipeline libraries to use when creating a pipeline
Valid Usage
- Each element
of
pLibraries
must have been created withPIPELINE_CREATE_LIBRARY_BIT_KHR
Valid Usage (Implicit)
-
sType
must beSTRUCTURE_TYPE_PIPELINE_LIBRARY_CREATE_INFO_KHR
-
pNext
must beNULL
- If
libraryCount
is not0
,pLibraries
must be a valid pointer to an array oflibraryCount
validPipeline
handles
See Also
Instances
type SHADER_UNUSED_KHR = 4294967295 Source #
pattern SHADER_UNUSED_KHR :: Word32 Source #