| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Vulkan.Extensions.VK_KHR_ray_tracing_pipeline
Description
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
cmdTraceRaysIndirectKHRcmdTraceRaysKHRcreateRayTracingPipelinesKHRgetRayTracingCaptureReplayShaderGroupHandlesKHRgetRayTracingShaderGroupHandlesKHRgetRayTracingShaderGroupStackSizeKHR
New Structures
RayTracingPipelineInterfaceCreateInfoKHRRayTracingShaderGroupCreateInfoKHRStridedDeviceAddressRegionKHRTraceRaysIndirectCommandKHRExtending
PhysicalDeviceFeatures2,DeviceCreateInfo:Extending
PhysicalDeviceProperties2:
New Enums
New Enum Constants
KHR_RAY_TRACING_PIPELINE_SPEC_VERSIONSHADER_UNUSED_KHRExtending
BufferUsageFlagBits:Extending
DynamicState:Extending
PipelineBindPoint:Extending
PipelineCreateFlagBits:PIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHRPIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHRPIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHRPIPELINE_CREATE_RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHRPIPELINE_CREATE_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHRPIPELINE_CREATE_RAY_TRACING_SKIP_AABBS_BIT_KHRPIPELINE_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
RayGeometryIndexKHRbuilt-in
- removed vkCompileDeferredNV compilation functionality and replaced with deferred host operations interactions for ray tracing
- added
PhysicalDeviceRayTracingPipelineFeaturesKHRstructure extended
PhysicalDeviceRayTracingPipelinePropertiesKHRstructure- renamed
maxRecursionDepthtomaxRayRecursionDepthand it has a minimum of 1 instead of 31 - require
shaderGroupHandleSizeto be 32 bytes - added
maxRayDispatchInvocationCount,shaderGroupHandleAlignmentandmaxRayHitAttributeSize
- 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 (renamedmaxTriangleCounttomaxPrimitiveCount, 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_KHRPIPELINE_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_KHRtoPipelineCreateFlagBitsPhysicalDeviceRayTracingPipelineFeaturesKHRstructureDeviceOrHostAddressKHRandDeviceOrHostAddressConstKHRunionsPipelineLibraryCreateInfoKHRstructRayTracingPipelineInterfaceCreateInfoKHRstructStridedDeviceAddressRegionKHRstructcmdTraceRaysIndirectKHRcommand andTraceRaysIndirectCommandKHRstructgetRayTracingCaptureReplayShaderGroupHandlesKHR(shader group capture/replay)cmdSetRayTracingPipelineStackSizeKHRandgetRayTracingShaderGroupStackSizeKHRcommands for stack size control
Functionality removed:
PIPELINE_CREATE_DEFER_COMPILE_BIT_NVcompileDeferredNVcommand (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
VkStridedBufferRegionKHRwithStridedDeviceAddressRegionKHRand 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_KHRset - make VK_KHR_pipeline_library an interaction instead of required extension
- rename the
librariesmember ofRayTracingPipelineCreateInfoKHRtopLibraryInfoand 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
maxCallableSizemember ofRayTracingPipelineInterfaceCreateInfoKHR - added the
pDynamicStatemember toRayTracingPipelineCreateInfoKHR - added
DYNAMIC_STATE_RAY_TRACING_PIPELINE_STACK_SIZE_KHRdynamic state for ray tracing pipelines - added
getRayTracingShaderGroupStackSizeKHRandcmdSetRayTracingPipelineStackSizeKHRcommands - added
ShaderGroupShaderKHRenum
- removed the
- Added
maxRayDispatchInvocationCountlimit toPhysicalDeviceRayTracingPipelinePropertiesKHR - Added
shaderGroupHandleAlignmentproperty toPhysicalDeviceRayTracingPipelinePropertiesKHR - Added
maxRayHitAttributeSizeproperty toPhysicalDeviceRayTracingPipelinePropertiesKHR Clarify deferred host ops for pipeline creation
DeferredOperationKHRis now a top-level parameter forcreateRayTracingPipelinesKHR- removed
VkDeferredOperationInfoKHRstructure - 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
Volatilefor the following builtins in the ray generation, closest hit, miss, intersection, and callable shader stages:SubgroupSize,SubgroupLocalInvocationId,SubgroupEqMask,SubgroupGeMask,SubgroupGtMask,SubgroupLeMask,SubgroupLtMaskSMIDNV,WarpIDNV
clarify buffer usage flags for ray tracing
BUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHRis added as an alias ofBUFFER_USAGE_RAY_TRACING_BIT_NVand is required on shader binding table buffersBUFFER_USAGE_STORAGE_BUFFER_BITis used in VK_KHR_acceleration_structure forscratchData
- rename
maxRecursionDepthtomaxRayPipelineRecursionDepth(pipeline creation) andmaxRayRecursionDepth(limit) to reduce confusion - Add queryable
maxRayHitAttributeSizelimit and rename members ofRayTracingPipelineInterfaceCreateInfoKHRtomaxPipelineRayPayloadSizeandmaxPipelineRayHitAttributeSizefor 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
RayTracingKHRSPIR-V capability - add VUs for matching hit group type against geometry type (#2245,!3994)
- require
RayTMaxKHRbe 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
ShaderRecordBufferKHRvariables (#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
Arguments
| :: 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
Samplercreated withmagFilterorminFilterequal toFILTER_LINEARandcompareEnableequal toFALSEis used to sample aImageViewas a result of this command, then the image view’s format features must containFORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT
- If a
Samplercreated withmipmapModeequal toSAMPLER_MIPMAP_MODE_LINEARandcompareEnableequal toFALSEis used to sample aImageViewas 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 or inherited 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 a
ImageViewis accessed usingOpImageWriteas a result of this command, then theTypeof theTexeloperand of that instruction must have at least as many components as the image view’s format. - If a
BufferViewis accessed usingOpImageWriteas a result of this command, then theTypeof theTexeloperand of that instruction must have at least as many components as the buffer view’s format. - If a
ImageViewwith aFormatthat has a 64-bit channel width is accessed as a result of this command, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 64. - If a
ImageViewwith aFormatthat has a channel width less than 64-bit is accessed as a result of this command, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 32. - If a
BufferViewwith aFormatthat has a 64-bit channel width is accessed as a result of this command, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 64. - If a
BufferViewwith aFormatthat has a channel width less than 64-bit is accessed as a result of this command, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 32. - If the
sparseImageInt64Atomics
feature is not enabled,
Imageobjects created with theIMAGE_CREATE_SPARSE_RESIDENCY_BITflag must not be accessed by atomic instructions through anOpTypeImagewith aSampledTypewith aWidthof 64 by this command. - If the
sparseImageInt64Atomics
feature is not enabled,
Bufferobjects created with theBUFFER_CREATE_SPARSE_RESIDENCY_BITflag must not be accessed by atomic instructions through anOpTypeImagewith aSampledTypewith aWidthof 64 by this command. - Any shader group handle referenced by this call must have been queried from the currently bound ray tracing 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
maxPipelineRayRecursionDepthused to create the bound ray tracing pipeline - If the
buffer from which
pRayGenShaderBindingTable->deviceAddresswas queried is non-sparse then it must be bound completely and contiguously to a singleDeviceMemoryobject - The buffer
from which the
pRayGenShaderBindingTable->deviceAddressis queried must have been created with theBUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHRusage flag -
pRayGenShaderBindingTable->deviceAddressmust be a multiple ofPhysicalDeviceRayTracingPipelinePropertiesKHR::shaderGroupBaseAlignment - The
sizemember ofpRayGenShaderBindingTablemust be equal to itsstridemember - If the buffer
from which
pMissShaderBindingTable->deviceAddresswas queried is non-sparse then it must be bound completely and contiguously to a singleDeviceMemoryobject - The buffer
from which the
pMissShaderBindingTable->deviceAddressis queried must have been created with theBUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHRusage flag -
pMissShaderBindingTable->deviceAddressmust be a multiple ofPhysicalDeviceRayTracingPipelinePropertiesKHR::shaderGroupBaseAlignment - The
stridemember ofpMissShaderBindingTablemust be a multiple ofPhysicalDeviceRayTracingPipelinePropertiesKHR::shaderGroupHandleAlignment - The
stridemember ofpMissShaderBindingTablemust be less than or equal toPhysicalDeviceRayTracingPipelinePropertiesKHR::maxShaderGroupStride - If the buffer
from which
pHitShaderBindingTable->deviceAddresswas queried is non-sparse then it must be bound completely and contiguously to a singleDeviceMemoryobject - The buffer
from which the
pHitShaderBindingTable->deviceAddressis queried must have been created with theBUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHRusage flag -
pHitShaderBindingTable->deviceAddressmust be a multiple ofPhysicalDeviceRayTracingPipelinePropertiesKHR::shaderGroupBaseAlignment - The
stridemember ofpHitShaderBindingTablemust be a multiple ofPhysicalDeviceRayTracingPipelinePropertiesKHR::shaderGroupHandleAlignment - The
stridemember ofpHitShaderBindingTablemust be less than or equal toPhysicalDeviceRayTracingPipelinePropertiesKHR::maxShaderGroupStride - If the
buffer from which
pCallableShaderBindingTable->deviceAddresswas queried is non-sparse then it must be bound completely and contiguously to a singleDeviceMemoryobject - The
buffer from which the
pCallableShaderBindingTable->deviceAddressis queried must have been created with theBUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHRusage flag -
pCallableShaderBindingTable->deviceAddressmust be a multiple ofPhysicalDeviceRayTracingPipelinePropertiesKHR::shaderGroupBaseAlignment - The
stridemember ofpCallableShaderBindingTablemust be a multiple ofPhysicalDeviceRayTracingPipelinePropertiesKHR::shaderGroupHandleAlignment - The
stridemember ofpCallableShaderBindingTablemust be less than or equal toPhysicalDeviceRayTracingPipelinePropertiesKHR::maxShaderGroupStride - If the currently bound ray
tracing pipeline was created with
flagsthat includedPIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR, thedeviceAddressmember ofpHitShaderBindingTablemust not be zero - If the currently bound ray
tracing pipeline was created with
flagsthat includedPIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR, thedeviceAddressmember ofpHitShaderBindingTablemust not be zero - If the currently bound ray
tracing pipeline was created with
flagsthat includedPIPELINE_CREATE_RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHR, the shader group handle identified bypMissShaderBindingTablemust contain a valid miss shader - If the currently bound ray
tracing pipeline was created with
flagsthat includedPIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR, entries inpHitShaderBindingTableaccessed 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
flagsthat includedPIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR, entries inpHitShaderBindingTableaccessed 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
flagsthat includedPIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR, entries inpHitShaderBindingTableaccessed as a result of this command in order to execute an intersection shader must not be set to zero - Any non-zero
hit group entries in
pHitShaderBindingTableaccessed by this call from a geometry with ageometryTypeofGEOMETRY_TYPE_TRIANGLES_KHRmust have been created withRAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR - Any non-zero
hit group entries in
pHitShaderBindingTableaccessed by this call from a geometry with ageometryTypeofGEOMETRY_TYPE_AABBS_KHRmust have been created withRAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR -
commandBuffermust not be a protected command buffer -
widthmust be less than or equal toPhysicalDeviceLimits::maxComputeWorkGroupCount[0] ×PhysicalDeviceLimits::maxComputeWorkGroupSize[0] -
heightmust be less than or equal toPhysicalDeviceLimits::maxComputeWorkGroupCount[1] ×PhysicalDeviceLimits::maxComputeWorkGroupSize[1] -
depthmust be less than or equal toPhysicalDeviceLimits::maxComputeWorkGroupCount[2] ×PhysicalDeviceLimits::maxComputeWorkGroupSize[2] -
width×height×depthmust be less than or equal toPhysicalDeviceRayTracingPipelinePropertiesKHR::maxRayDispatchInvocationCount
Valid Usage (Implicit)
-
commandBuffermust be a validCommandBufferhandle
-
pRaygenShaderBindingTablemust be a valid pointer to a validStridedDeviceAddressRegionKHRstructure -
pMissShaderBindingTablemust be a valid pointer to a validStridedDeviceAddressRegionKHRstructure -
pHitShaderBindingTablemust be a valid pointer to a validStridedDeviceAddressRegionKHRstructure -
pCallableShaderBindingTablemust be a valid pointer to a validStridedDeviceAddressRegionKHRstructure -
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
Host Synchronization
- Host access to
commandBuffermust be externally synchronized
- 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
getRayTracingShaderGroupHandlesKHR Source #
Arguments
| :: 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
-
firstGroupmust be less than the number of shader groups inpipeline - The sum
of
firstGroupandgroupCountmust be less than or equal to the number of shader groups inpipeline -
dataSizemust be at leastPhysicalDeviceRayTracingPipelinePropertiesKHR::shaderGroupHandleSize×groupCount -
pipelinemust have not been created withPIPELINE_CREATE_LIBRARY_BIT_KHR
Valid Usage (Implicit)
-
devicemust be a validDevicehandle
-
pipelinemust be a validPipelinehandle -
pDatamust be a valid pointer to an array ofdataSizebytes -
dataSizemust be greater than0 -
pipelinemust have been created, allocated, or retrieved fromdevice
Return Codes
See Also
getRayTracingCaptureReplayShaderGroupHandlesKHR Source #
Arguments
| :: 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
-
firstGroupmust be less than the number of shader groups inpipeline -
The sum of
firstGroupandgroupCountmust be less than or equal to the number of shader groups inpipeline -
dataSizemust be at leastPhysicalDeviceRayTracingPipelinePropertiesKHR::shaderGroupHandleCaptureReplaySize×groupCount -
PhysicalDeviceRayTracingPipelineFeaturesKHR::rayTracingPipelineShaderGroupHandleCaptureReplaymust be enabled to call this function -
pipelinemust have been created with aflagsthat includedPIPELINE_CREATE_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHR
Valid Usage (Implicit)
-
devicemust be a validDevicehandle
-
pipelinemust be a validPipelinehandle -
pDatamust be a valid pointer to an array ofdataSizebytes -
dataSizemust be greater than0 -
pipelinemust have been created, allocated, or retrieved fromdevice
Return Codes
See Also
createRayTracingPipelinesKHR Source #
Arguments
| :: 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
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 -
flagsmust not contain thePIPELINE_CREATE_DISPATCH_BASEflag - If
pipelineCachewas created withPIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT_EXT, host access topipelineCachemust be externally synchronized - If
deferredOperationis notNULL_HANDLE, it must be a validDeferredOperationKHRobject - Any
previous deferred operation that was associated with
deferredOperationmust be complete - The rayTracingPipeline feature must be enabled
- If
deferredOperationis notNULL_HANDLE, theflagsmember of elements ofpCreateInfosmust not includePIPELINE_CREATE_EARLY_RETURN_ON_FAILURE_BIT_EXT
Valid Usage (Implicit)
-
devicemust be a validDevicehandle
- If
deferredOperationis notNULL_HANDLE,deferredOperationmust be a validDeferredOperationKHRhandle - If
pipelineCacheis notNULL_HANDLE,pipelineCachemust be a validPipelineCachehandle -
pCreateInfosmust be a valid pointer to an array ofcreateInfoCountvalidRayTracingPipelineCreateInfoKHRstructures - If
pAllocatoris notNULL,pAllocatormust be a valid pointer to a validAllocationCallbacksstructure -
pPipelinesmust be a valid pointer to an array ofcreateInfoCountPipelinehandles -
createInfoCountmust be greater than0 - If
deferredOperationis a valid handle, it must have been created, allocated, or retrieved fromdevice - If
pipelineCacheis 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 #
Arguments
| :: 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
Samplercreated withmagFilterorminFilterequal toFILTER_LINEARandcompareEnableequal toFALSEis used to sample aImageViewas a result of this command, then the image view’s format features must containFORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT
- If a
Samplercreated withmipmapModeequal toSAMPLER_MIPMAP_MODE_LINEARandcompareEnableequal toFALSEis used to sample aImageViewas 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 or inherited 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 a
ImageViewis accessed usingOpImageWriteas a result of this command, then theTypeof theTexeloperand of that instruction must have at least as many components as the image view’s format. - If a
BufferViewis accessed usingOpImageWriteas a result of this command, then theTypeof theTexeloperand of that instruction must have at least as many components as the buffer view’s format. - If a
ImageViewwith aFormatthat has a 64-bit channel width is accessed as a result of this command, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 64. - If a
ImageViewwith aFormatthat has a channel width less than 64-bit is accessed as a result of this command, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 32. - If a
BufferViewwith aFormatthat has a 64-bit channel width is accessed as a result of this command, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 64. - If a
BufferViewwith aFormatthat has a channel width less than 64-bit is accessed as a result of this command, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 32. - If
the
sparseImageInt64Atomics
feature is not enabled,
Imageobjects created with theIMAGE_CREATE_SPARSE_RESIDENCY_BITflag must not be accessed by atomic instructions through anOpTypeImagewith aSampledTypewith aWidthof 64 by this command. - If
the
sparseImageInt64Atomics
feature is not enabled,
Bufferobjects created with theBUFFER_CREATE_SPARSE_RESIDENCY_BITflag must not be accessed by atomic instructions through anOpTypeImagewith aSampledTypewith aWidthof 64 by this command. - Any shader group handle referenced by this call must have been queried from the currently bound ray tracing 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
maxPipelineRayRecursionDepthused to create the bound ray tracing pipeline - If
the buffer from which
pRayGenShaderBindingTable->deviceAddresswas queried is non-sparse then it must be bound completely and contiguously to a singleDeviceMemoryobject - The
buffer from which the
pRayGenShaderBindingTable->deviceAddressis queried must have been created with theBUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHRusage flag -
pRayGenShaderBindingTable->deviceAddressmust be a multiple ofPhysicalDeviceRayTracingPipelinePropertiesKHR::shaderGroupBaseAlignment - The
sizemember ofpRayGenShaderBindingTablemust be equal to itsstridemember - If
the buffer from which
pMissShaderBindingTable->deviceAddresswas queried is non-sparse then it must be bound completely and contiguously to a singleDeviceMemoryobject - The
buffer from which the
pMissShaderBindingTable->deviceAddressis queried must have been created with theBUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHRusage flag -
pMissShaderBindingTable->deviceAddressmust be a multiple ofPhysicalDeviceRayTracingPipelinePropertiesKHR::shaderGroupBaseAlignment - The
stridemember ofpMissShaderBindingTablemust be a multiple ofPhysicalDeviceRayTracingPipelinePropertiesKHR::shaderGroupHandleAlignment - The
stridemember ofpMissShaderBindingTablemust be less than or equal toPhysicalDeviceRayTracingPipelinePropertiesKHR::maxShaderGroupStride - If the
buffer from which
pHitShaderBindingTable->deviceAddresswas queried is non-sparse then it must be bound completely and contiguously to a singleDeviceMemoryobject - The
buffer from which the
pHitShaderBindingTable->deviceAddressis queried must have been created with theBUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHRusage flag -
pHitShaderBindingTable->deviceAddressmust be a multiple ofPhysicalDeviceRayTracingPipelinePropertiesKHR::shaderGroupBaseAlignment - The
stridemember ofpHitShaderBindingTablemust be a multiple ofPhysicalDeviceRayTracingPipelinePropertiesKHR::shaderGroupHandleAlignment - The
stridemember ofpHitShaderBindingTablemust be less than or equal toPhysicalDeviceRayTracingPipelinePropertiesKHR::maxShaderGroupStride -
If the buffer from which
pCallableShaderBindingTable->deviceAddresswas queried is non-sparse then it must be bound completely and contiguously to a singleDeviceMemoryobject -
The buffer from which the
pCallableShaderBindingTable->deviceAddressis queried must have been created with theBUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHRusage flag -
pCallableShaderBindingTable->deviceAddressmust be a multiple ofPhysicalDeviceRayTracingPipelinePropertiesKHR::shaderGroupBaseAlignment - The
stridemember ofpCallableShaderBindingTablemust be a multiple ofPhysicalDeviceRayTracingPipelinePropertiesKHR::shaderGroupHandleAlignment - The
stridemember ofpCallableShaderBindingTablemust be less than or equal toPhysicalDeviceRayTracingPipelinePropertiesKHR::maxShaderGroupStride - If the currently bound
ray tracing pipeline was created with
flagsthat includedPIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR, thedeviceAddressmember ofpHitShaderBindingTablemust not be zero - If the currently bound
ray tracing pipeline was created with
flagsthat includedPIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR, thedeviceAddressmember ofpHitShaderBindingTablemust not be zero - If the currently bound
ray tracing pipeline was created with
flagsthat includedPIPELINE_CREATE_RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHR, the shader group handle identified bypMissShaderBindingTablemust contain a valid miss shader - If the currently bound
ray tracing pipeline was created with
flagsthat includedPIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR, entries inpHitShaderBindingTableaccessed 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
flagsthat includedPIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR, entries inpHitShaderBindingTableaccessed 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
flagsthat includedPIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR, entries inpHitShaderBindingTableaccessed as a result of this command in order to execute an intersection shader must not be set to zero - Any
non-zero hit group entries in
pHitShaderBindingTableaccessed by this call from a geometry with ageometryTypeofGEOMETRY_TYPE_TRIANGLES_KHRmust have been created withRAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR - Any
non-zero hit group entries in
pHitShaderBindingTableaccessed by this call from a geometry with ageometryTypeofGEOMETRY_TYPE_AABBS_KHRmust have been created withRAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR - If the
buffer from which
indirectDeviceAddresswas queried is non-sparse then it must be bound completely and contiguously to a singleDeviceMemoryobject - The
buffer from which
indirectDeviceAddresswas queried must have been created with theBUFFER_USAGE_INDIRECT_BUFFER_BITbit set -
indirectDeviceAddressmust be a multiple of4 -
commandBuffermust not be a protected command buffer - All
device addresses between
indirectDeviceAddressandindirectDeviceAddress+sizeof(TraceRaysIndirectCommandKHR) - 1 must be in the buffer device address range of the same buffer - The ::rayTracingPipelineTraceRaysIndirect feature must be enabled
Valid Usage (Implicit)
-
commandBuffermust be a validCommandBufferhandle
-
pRaygenShaderBindingTablemust be a valid pointer to a validStridedDeviceAddressRegionKHRstructure -
pMissShaderBindingTablemust be a valid pointer to a validStridedDeviceAddressRegionKHRstructure -
pHitShaderBindingTablemust be a valid pointer to a validStridedDeviceAddressRegionKHRstructure -
pCallableShaderBindingTablemust be a valid pointer to a validStridedDeviceAddressRegionKHRstructure -
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
Host Synchronization
- Host access to
commandBuffermust be externally synchronized
- 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
getRayTracingShaderGroupStackSizeKHR Source #
Arguments
| :: 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
groupmust be less than the number of shader groups inpipeline - The
shader identified by
groupShaderingroupmust not beSHADER_UNUSED_KHR
Valid Usage (Implicit)
-
devicemust be a validDevicehandle
-
pipelinemust be a validPipelinehandle -
groupShadermust be a validShaderGroupShaderKHRvalue -
pipelinemust have been created, allocated, or retrieved fromdevice
See Also
cmdSetRayTracingPipelineStackSizeKHR Source #
Arguments
| :: 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
-
pipelineStackSizemust be large enough for any dynamic execution through the shaders in the ray tracing pipeline used by a subsequent trace call
Valid Usage (Implicit)
-
commandBuffermust be a validCommandBufferhandle
-
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
Host Synchronization
- Host access to
commandBuffermust be externally synchronized
- 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
data RayTracingShaderGroupCreateInfoKHR Source #
VkRayTracingShaderGroupCreateInfoKHR - Structure specifying shaders in a shader group
Valid Usage
- If
typeisRAY_TRACING_SHADER_GROUP_TYPE_GENERAL_KHRthengeneralShadermust be a valid index intoRayTracingPipelineCreateInfoKHR::pStagesreferring to a shader ofSHADER_STAGE_RAYGEN_BIT_KHR,SHADER_STAGE_MISS_BIT_KHR, orSHADER_STAGE_CALLABLE_BIT_KHR
- If
typeisRAY_TRACING_SHADER_GROUP_TYPE_GENERAL_KHRthenclosestHitShader,anyHitShader, andintersectionShadermust beSHADER_UNUSED_KHR - If
typeisRAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHRthenintersectionShadermust be a valid index intoRayTracingPipelineCreateInfoKHR::pStagesreferring to a shader ofSHADER_STAGE_INTERSECTION_BIT_KHR - If
typeisRAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHRthenintersectionShadermust beSHADER_UNUSED_KHR -
closestHitShadermust be eitherSHADER_UNUSED_KHRor a valid index intoRayTracingPipelineCreateInfoKHR::pStagesreferring to a shader ofSHADER_STAGE_CLOSEST_HIT_BIT_KHR -
anyHitShadermust be eitherSHADER_UNUSED_KHRor a valid index intoRayTracingPipelineCreateInfoKHR::pStagesreferring to a shader ofSHADER_STAGE_ANY_HIT_BIT_KHR -
If
PhysicalDeviceRayTracingPipelineFeaturesKHR::rayTracingPipelineShaderGroupHandleCaptureReplayMixedisFALSEthenpShaderGroupCaptureReplayHandlemust not be provided if it has not been provided on a previous call to ray tracing pipeline creation -
If
PhysicalDeviceRayTracingPipelineFeaturesKHR::rayTracingPipelineShaderGroupHandleCaptureReplayMixedisFALSEthen the caller must guarantee that no ray tracing pipeline creation commands withpShaderGroupCaptureReplayHandleprovided execute simultaneously with ray tracing pipeline creation commands withoutpShaderGroupCaptureReplayHandleprovided
Valid Usage (Implicit)
-
sTypemust beSTRUCTURE_TYPE_RAY_TRACING_SHADER_GROUP_CREATE_INFO_KHR
-
pNextmust beNULL -
typemust be a validRayTracingShaderGroupTypeKHRvalue
See Also
RayTracingPipelineCreateInfoKHR, RayTracingShaderGroupTypeKHR,
StructureType
Constructors
| RayTracingShaderGroupCreateInfoKHR | |
Fields
| |
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
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 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 -
flagsmust not includePIPELINE_CREATE_INDIRECT_BINDABLE_BIT_NV -
If the
pipelineCreationCacheControl
feature is not enabled,
flagsmust not includePIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT_EXTorPIPELINE_CREATE_EARLY_RETURN_ON_FAILURE_BIT_EXT - If
flagsdoes not includePIPELINE_CREATE_LIBRARY_BIT_KHR, thestagemember of at least one element ofpStages, including those implicitly added bypLibraryInfo, must beSHADER_STAGE_RAYGEN_BIT_KHR -
maxPipelineRayRecursionDepthmust be less than or equal toPhysicalDeviceRayTracingPipelinePropertiesKHR::maxRayRecursionDepth - If
flagsincludesPIPELINE_CREATE_LIBRARY_BIT_KHR,pLibraryInterfacemust not beNULL - If
pLibraryInfois notNULLand itslibraryCountmember is greater than0, itspLibraryInterfacemember must not beNULL - Each
element of
pLibraryInfo->pLibrariesmust have been created with the value ofmaxPipelineRayRecursionDepthequal to that in this pipeline - If
pLibraryInfois notNULL, each element of itspLibrariesmember must have been created with alayoutthat is compatible with thelayoutin this pipeline - If
pLibraryInfois notNULL, each element of itspLibrariesmember must have been created with values of themaxPipelineRayPayloadSizeandmaxPipelineRayHitAttributeSizemembers ofpLibraryInterfaceequal to those in this pipeline - If
flagsincludesPIPELINE_CREATE_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHR, each element ofpLibraryInfo->pLibrariesmust have been created with thePIPELINE_CREATE_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHRbit set - If
flagsincludesPIPELINE_CREATE_RAY_TRACING_SKIP_AABBS_BIT_KHR, each element ofpLibraryInfo->pLibrariesmust have been created with thePIPELINE_CREATE_RAY_TRACING_SKIP_AABBS_BIT_KHRbit set - If
flagsincludesPIPELINE_CREATE_RAY_TRACING_SKIP_TRIANGLES_BIT_KHR, each element ofpLibraryInfo->pLibrariesmust have been created with thePIPELINE_CREATE_RAY_TRACING_SKIP_TRIANGLES_BIT_KHRbit set - If
flagsincludesPIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR, each element ofpLibraryInfo->pLibrariesmust have been created with thePIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHRbit set - If
flagsincludesPIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR, each element ofpLibraryInfo->pLibrariesmust have been created with thePIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHRbit set - If
flagsincludesPIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR, each element ofpLibraryInfo->pLibrariesmust have been created with thePIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHRbit set - If
flagsincludesPIPELINE_CREATE_RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHR, each element ofpLibraryInfo->pLibrariesmust have been created with thePIPELINE_CREATE_RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHRbit set - If the
VK_KHR_pipeline_library extension is
not enabled,
pLibraryInfoandpLibraryInterfacemust beNULL. - If
flagsincludesPIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR, for any element ofpGroupswith atypeofRAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHRorRAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR, theanyHitShaderof that element must not beSHADER_UNUSED_KHR - If
flagsincludesPIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR, for any element ofpGroupswith atypeofRAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHRorRAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR, theclosestHitShaderof that element must not beSHADER_UNUSED_KHR -
If the
rayTraversalPrimitiveCulling
feature is not enabled,
flagsmust not includePIPELINE_CREATE_RAY_TRACING_SKIP_AABBS_BIT_KHR -
If the
rayTraversalPrimitiveCulling
feature is not enabled,
flagsmust not includePIPELINE_CREATE_RAY_TRACING_SKIP_TRIANGLES_BIT_KHR - If
flagsincludesPIPELINE_CREATE_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHR, rayTracingPipelineShaderGroupHandleCaptureReplay must be enabled -
If
PhysicalDeviceRayTracingPipelineFeaturesKHR::rayTracingPipelineShaderGroupHandleCaptureReplayisTRUEand thepShaderGroupCaptureReplayHandlemember of any element ofpGroupsis notNULL,flagsmust includePIPELINE_CREATE_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHR - If
pLibraryInfois notNULLand itslibraryCountis0,stageCountmust not be0 - If
pLibraryInfois notNULLand itslibraryCountis0,groupCountmust not be0 - Any
element of the
pDynamicStatesmember ofpDynamicStatemust beDYNAMIC_STATE_RAY_TRACING_PIPELINE_STACK_SIZE_KHR
Valid Usage (Implicit)
-
sTypemust beSTRUCTURE_TYPE_RAY_TRACING_PIPELINE_CREATE_INFO_KHR
-
pNextmust beNULLor a pointer to a valid instance ofPipelineCreationFeedbackCreateInfoEXT - The
sTypevalue of each struct in thepNextchain must be unique -
flagsmust be a valid combination ofPipelineCreateFlagBitsvalues - If
stageCountis not0,pStagesmust be a valid pointer to an array ofstageCountvalidPipelineShaderStageCreateInfostructures - If
groupCountis not0,pGroupsmust be a valid pointer to an array ofgroupCountvalidRayTracingShaderGroupCreateInfoKHRstructures - If
pLibraryInfois notNULL,pLibraryInfomust be a valid pointer to a validPipelineLibraryCreateInfoKHRstructure -
If
pLibraryInterfaceis notNULL,pLibraryInterfacemust be a valid pointer to a validRayTracingPipelineInterfaceCreateInfoKHRstructure - If
pDynamicStateis notNULL,pDynamicStatemust be a valid pointer to a validPipelineDynamicStateCreateInfostructure -
layoutmust be a validPipelineLayouthandle - 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,
PipelineDynamicStateCreateInfo,
PipelineLayout,
PipelineLibraryCreateInfoKHR,
PipelineShaderStageCreateInfo,
RayTracingPipelineInterfaceCreateInfoKHR,
RayTracingShaderGroupCreateInfoKHR,
StructureType,
createRayTracingPipelinesKHR
Constructors
| RayTracingPipelineCreateInfoKHR | |
Fields
| |
Instances
data PhysicalDeviceRayTracingPipelineFeaturesKHR Source #
VkPhysicalDeviceRayTracingPipelineFeaturesKHR - Structure describing the ray tracing features that can be supported by an implementation
Members
This structure describes the following features:
Description
sTypeis the type of this structure.
pNextisNULLor a pointer to a structure extending this structure.-
rayTracingPipelineindicates whether the implementation supports the ray tracing pipeline functionality. See Ray Tracing. -
rayTracingPipelineShaderGroupHandleCaptureReplayindicates whether the implementation supports saving and reusing shader group handles, e.g. for trace capture and replay. -
rayTracingPipelineShaderGroupHandleCaptureReplayMixedindicates 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. -
rayTracingPipelineTraceRaysIndirectindicates whether the implementation supports indirect trace ray commands, e.g.cmdTraceRaysIndirectKHR. -
rayTraversalPrimitiveCullingindicates whether the implementation supports primitive culling during ray traversal.
If the PhysicalDeviceRayTracingPipelineFeaturesKHR structure is
included in the pNext chain of the
PhysicalDeviceFeatures2
structure passed to
getPhysicalDeviceFeatures2,
it is filled in to indicate whether each corresponding feature is
supported. PhysicalDeviceRayTracingPipelineFeaturesKHR can also be
used in the pNext chain of DeviceCreateInfo to
selectively enable these features.
Valid Usage
-
If
rayTracingPipelineShaderGroupHandleCaptureReplayMixedisTRUE,rayTracingPipelineShaderGroupHandleCaptureReplaymust also beTRUE
Valid Usage (Implicit)
See Also
Constructors
| PhysicalDeviceRayTracingPipelineFeaturesKHR | |
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 the
PhysicalDeviceProperties2
structure passed to
getPhysicalDeviceProperties2,
it is filled in with each corresponding implementation-dependent
property.
Limits specified by this structure must match those specified with the
same name in
PhysicalDeviceRayTracingPropertiesNV.
Valid Usage (Implicit)
See Also
Constructors
| PhysicalDeviceRayTracingPipelinePropertiesKHR | |
Fields
| |
Instances
data StridedDeviceAddressRegionKHR Source #
VkStridedDeviceAddressRegionKHR - Structure specifying a region of device addresses with a stride
Valid Usage
- If
sizeis not zero, all addresses betweendeviceAddressanddeviceAddress+size- 1 must be in the buffer device address range of the same buffer
- If
sizeis not zero,stridemust be less than or equal to the size of the buffer from whichdeviceAddresswas queried
See Also
DeviceAddress,
DeviceSize, cmdTraceRaysIndirectKHR,
cmdTraceRaysKHR
Constructors
| StridedDeviceAddressRegionKHR | |
Fields
| |
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
Constructors
| TraceRaysIndirectCommandKHR | |
Fields
| |
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
Constructors
| RayTracingPipelineInterfaceCreateInfoKHR | |
Fields
| |
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
Constructors
| RayTracingShaderGroupTypeKHR Int32 |
Bundled Patterns
| 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 #
Constructors
| ShaderGroupShaderKHR Int32 |
Bundled Patterns
| 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
Constructors
| DeferredOperationKHR Word64 |
Instances
data PipelineLibraryCreateInfoKHR Source #
VkPipelineLibraryCreateInfoKHR - Structure specifying pipeline libraries to use when creating a pipeline
Valid Usage
- Each element
of
pLibrariesmust have been created withPIPELINE_CREATE_LIBRARY_BIT_KHR
Valid Usage (Implicit)
-
sTypemust beSTRUCTURE_TYPE_PIPELINE_LIBRARY_CREATE_INFO_KHR
-
pNextmust beNULL - If
libraryCountis not0,pLibrariesmust be a valid pointer to an array oflibraryCountvalidPipelinehandles
See Also
Constructors
| PipelineLibraryCreateInfoKHR | |
Instances
| Show PipelineLibraryCreateInfoKHR Source # | |
Defined in Vulkan.Extensions.VK_KHR_pipeline_library Methods showsPrec :: Int -> PipelineLibraryCreateInfoKHR -> ShowS # show :: PipelineLibraryCreateInfoKHR -> String # showList :: [PipelineLibraryCreateInfoKHR] -> ShowS # | |
| FromCStruct PipelineLibraryCreateInfoKHR Source # | |
Defined in Vulkan.Extensions.VK_KHR_pipeline_library | |
| ToCStruct PipelineLibraryCreateInfoKHR Source # | |
Defined in Vulkan.Extensions.VK_KHR_pipeline_library Methods withCStruct :: PipelineLibraryCreateInfoKHR -> (Ptr PipelineLibraryCreateInfoKHR -> IO b) -> IO b Source # pokeCStruct :: Ptr PipelineLibraryCreateInfoKHR -> PipelineLibraryCreateInfoKHR -> IO b -> IO b Source # withZeroCStruct :: (Ptr PipelineLibraryCreateInfoKHR -> IO b) -> IO b Source # pokeZeroCStruct :: Ptr PipelineLibraryCreateInfoKHR -> IO b -> IO b Source # cStructSize :: Int Source # | |
| Zero PipelineLibraryCreateInfoKHR Source # | |
Defined in Vulkan.Extensions.VK_KHR_pipeline_library Methods | |
type SHADER_UNUSED_KHR = 4294967295 Source #
pattern SHADER_UNUSED_KHR :: Word32 Source #