Ray Tracing
Ray tracing uses a separate rendering pipeline from both the graphics and compute pipelines (see Ray Tracing Pipeline).
Interaction between the different shader stages in the ray tracing pipeline
Within the ray tracing pipeline, a pipeline trace ray instruction can be called to perform a ray traversal that invokes the various ray tracing shader stages during its
execution.
The relationship between the ray tracing pipeline object and the geometries
present in the acceleration structure traversed is passed into the ray
tracing command in a VkBuffer object known as a shader binding
table.
OpExecuteCallableKHR can also be used in ray tracing pipelines to
invoke a callable shader.
During execution, control alternates between scheduling and other operations. The scheduling functionality is implementation-specific and is responsible for workload execution. The shader stages are programmable. Traversal, which refers to the process of traversing acceleration structures to find potential intersections of rays with geometry, is fixed function.
The programmable portions of the pipeline are exposed in a single-ray
programming model, with each invocation handling one ray at a time.
Memory operations can be synchronized using standard memory barriers.
The Workgroup scope and variables with a storage class of
Workgroup must not be used in the ray tracing pipeline.
Shader Call Instructions
A shader call is an instruction which may cause execution to continue elsewhere by creating one or more invocations that execute a different shader stage.
The following table lists all shader call instructions and which stages each one can directly call.
| Instruction | Intersection | Any-Hit | Closest Hit | Miss | Callable |
|---|---|---|---|---|---|
|
X |
X |
X |
X |
|
|
X |
X |
X |
X |
|
|
X |
||||
|
X |
||||
|
X |
X |
|||
|
X |
X |
|||
|
X |
X |
|||
|
X |
X |
|||
|
X |
X |
|||
|
X |
X |
|||
|
X |
X |
X |
X |
|
|
X |
X |
|||
|
X |
X |
X |
X |
The invocations created by shader call instructions are grouped into subgroups by the implementation. Those subgroups may be unrelated to the subgroup of the parent invocation.
Pipeline trace ray instructions can be used recursively; invoked shaders
can themselves execute pipeline trace ray instructions, to a maximum depth
defined by the
maxRecursionDepth or
maxRayRecursionDepth limit.
Shaders directly invoked from the API always have a recursion depth of 0;
each shader executed by a pipeline trace ray instruction has a recursion
depth one higher than the recursion depth of the shader which invoked it.
Applications must not invoke a shader with a recursion depth greater than
the value of
maxRecursionDepth or
maxPipelineRayRecursionDepth specified in the pipeline.
There is no explicit recursion limit for other shader call instructions
which may recurse (e.g. OpExecuteCallableKHR) but there is an upper
bound determined by the stack size.
An invocation repack instruction is a ray tracing instruction where the
implementation may change the set of invocations that are executing.
When a repack instruction is encountered, the invocation is suspended and a
new invocation begins and executes the instruction.
After executing the repack instruction (which may result in other ray
tracing shader stages executing) the new invocation ends and the original
invocation is resumed, but it may be resumed in a different subgroup or at
a different SubgroupLocalInvocationId within the same subgroup.
When a subset of invocations in a subgroup execute the invocation repack
instruction, those that do not execute it remain in the same subgroup at the
same SubgroupLocalInvocationId.
The OpTraceRayKHR,
OpTraceRayMotionNV,
OpReorderThreadWithHintNV, OpReorderThreadWithHitObjectNV,
OpReorderThreadWithHintEXT, OpReorderThreadWithHitObjectEXT,
OpHitObjectTraceRayEXT, OpHitObjectReorderExecuteShaderEXT,
OpHitObjectTraceReorderExecuteEXT,
OpHitObjectTraceRayMotionEXT,
OpHitObjectTraceMotionReorderExecuteEXT,
OpReportIntersectionKHR, and OpExecuteCallableKHR instructions are
invocation repack instructions.
The invocations that are executing before a shader call instruction, after the instruction, or are created by the instruction, are shader-call-related.
If the implementation changes the composition of subgroups, the values of
SubgroupSize, SubgroupLocalInvocationId,
SMIDNV, WarpIDNV,
and builtin variables that are derived from them (SubgroupEqMask,
SubgroupGeMask, SubgroupGtMask, SubgroupLeMask,
SubgroupLtMask) must be changed accordingly by the invocation repack
instruction.
The application must use Volatile semantics on these BuiltIn variables when used in the ray generation,
closest hit, miss, intersection, and callable shaders.
Similarly, the application must use Volatile semantics on any
RayTmaxKHR decorated Builtin used in an intersection shader.
|
Subgroup operations are permitted in the programmable ray tracing shader stages. However, shader call instructions place a bound on where results of subgroup instructions or subgroup-scoped instructions that execute the dynamic instance of that instruction are potentially valid. For example, care must be taken when using the result of a ballot operation that was computed before an invocation repack instruction, after that repack instruction. The ballot may be incorrect as the set of invocations could have changed. While the For clock operations, the value of a |
When a ray tracing shader executes a dynamic instance of an invocation repack instruction which results in another ray tracing shader being invoked, their instructions are related by shader-call-order.
For ray tracing invocations that are shader-call-related:
-
memory operations on
StorageBuffer,Image, andShaderRecordBufferKHRstorage classes can be synchronized using theShaderCallKHRscope. -
the
CallableDataKHR,IncomingCallableDataKHR,RayPayloadKHR,HitAttributeKHR, andIncomingRayPayloadKHRstorage classes are system-synchronized and no application availability and visibility operations are required. -
memory operations within a single invocation before and after the shader call instruction are ordered by program-order and do not require explicit synchronization.
Ray Tracing Commands
Ray tracing commands provoke work in the ray tracing pipeline. Ray tracing commands are recorded into a command buffer and when executed by a queue will produce work that executes according to the bound ray tracing pipeline. A ray tracing pipeline must be bound to a command buffer before any ray tracing commands are recorded in that command buffer.
To dispatch ray tracing use:
// Provided by VK_KHR_ray_tracing_pipeline
void vkCmdTraceRaysKHR(
VkCommandBuffer commandBuffer,
const VkStridedDeviceAddressRegionKHR* pRaygenShaderBindingTable,
const VkStridedDeviceAddressRegionKHR* pMissShaderBindingTable,
const VkStridedDeviceAddressRegionKHR* pHitShaderBindingTable,
const VkStridedDeviceAddressRegionKHR* pCallableShaderBindingTable,
uint32_t width,
uint32_t height,
uint32_t depth);
-
commandBufferis the command buffer into which the command will be recorded. -
pRaygenShaderBindingTableis a VkStridedDeviceAddressRegionKHR that holds the shader binding table data for the ray generation shader stage. -
pMissShaderBindingTableis a VkStridedDeviceAddressRegionKHR that holds the shader binding table data for the miss shader stage. -
pHitShaderBindingTableis a VkStridedDeviceAddressRegionKHR that holds the shader binding table data for the hit shader stage. -
pCallableShaderBindingTableis a VkStridedDeviceAddressRegionKHR that holds the shader binding table data for the callable shader stage. -
widthis the width of the ray trace query dimensions. -
heightis height of the ray trace query dimensions. -
depthis depth of the ray trace query dimensions.
When the command is executed, a ray generation group of width
× height × depth rays is assembled.
-
VUID-vkCmdTraceRaysKHR-magFilter-04553
If a VkSampler created withmagFilterorminFilterequal to VK_FILTER_LINEAR,reductionModeequal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, andcompareEnableequal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT -
VUID-vkCmdTraceRaysKHR-magFilter-09598
If a VkSampler created withmagFilterorminFilterequal to VK_FILTER_LINEAR andreductionModeequal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT -
VUID-vkCmdTraceRaysKHR-mipmapMode-04770
If a VkSampler created withmipmapModeequal to VK_SAMPLER_MIPMAP_MODE_LINEAR,reductionModeequal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, andcompareEnableequal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT -
VUID-vkCmdTraceRaysKHR-mipmapMode-09599
If a VkSampler created withmipmapModeequal to VK_SAMPLER_MIPMAP_MODE_LINEAR andreductionModeequal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT -
VUID-vkCmdTraceRaysKHR-unnormalizedCoordinates-09635
If a VkSampler created withunnormalizedCoordinatesequal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’slevelCountandlayerCountmust be 1 -
VUID-vkCmdTraceRaysKHR-None-08609
If a VkSampler created withunnormalizedCoordinatesequal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’sviewTypemust be VK_IMAGE_VIEW_TYPE_1D or VK_IMAGE_VIEW_TYPE_2D -
VUID-vkCmdTraceRaysKHR-None-08610
If a VkSampler created withunnormalizedCoordinatesequal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-VOpImageSample*orOpImageSparseSample*instructions withImplicitLod,DreforProjin their name -
VUID-vkCmdTraceRaysKHR-None-08611
If a VkSampler created withunnormalizedCoordinatesequal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-VOpImageSample*orOpImageSparseSample*instructions that includes a LOD bias or any offset values -
VUID-vkCmdTraceRaysKHR-None-06479
If a VkImageView is sampled with depth comparison, the image view’s format features must contain VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT -
VUID-vkCmdTraceRaysKHR-None-02691
If a VkImageView is accessed using atomic operations as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT -
VUID-vkCmdTraceRaysKHR-None-07888
If a VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER descriptor is accessed using atomic operations as a result of this command, then the storage texel buffer’s format features must contain VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT -
VUID-vkCmdTraceRaysKHR-None-02692
If a VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT -
VUID-vkCmdTraceRaysKHR-None-02693
If the VK_EXT_filter_cubic extension is not enabled and any VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, it must not have a VkImageViewType of VK_IMAGE_VIEW_TYPE_3D, VK_IMAGE_VIEW_TYPE_CUBE, or VK_IMAGE_VIEW_TYPE_CUBE_ARRAY -
VUID-vkCmdTraceRaysKHR-filterCubic-02694
Any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have a VkImageViewType and format that supports cubic filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::filterCubicreturned by vkGetPhysicalDeviceImageFormatProperties2 -
VUID-vkCmdTraceRaysKHR-filterCubicMinmax-02695
Any VkImageView being sampled with VK_FILTER_CUBIC_EXT with a reduction mode of either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX as a result of this command must have a VkImageViewType and format that supports cubic filtering together with minmax filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::filterCubicMinmaxreturned by vkGetPhysicalDeviceImageFormatProperties2 -
VUID-vkCmdTraceRaysKHR-cubicRangeClamp-09212
If thecubicRangeClampfeature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must not have a VkSamplerReductionModeCreateInfo::reductionModeequal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM -
VUID-vkCmdTraceRaysKHR-reductionMode-09213
Any VkImageView being sampled with a VkSamplerReductionModeCreateInfo::reductionModeequal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM as a result of this command must sample with VK_FILTER_CUBIC_EXT -
VUID-vkCmdTraceRaysKHR-selectableCubicWeights-09214
If theselectableCubicWeightsfeature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have VkSamplerCubicWeightsCreateInfoQCOM::cubicWeightsequal to VK_CUBIC_FILTER_WEIGHTS_CATMULL_ROM_QCOM -
VUID-vkCmdTraceRaysKHR-flags-02696
Any VkImage created with a VkImageCreateInfo::flagscontaining VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV sampled as a result of this command must only be sampled using a VkSamplerAddressMode of VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE -
VUID-vkCmdTraceRaysKHR-OpTypeImage-07027
For any VkImageView being written as a storage image where the image format field of theOpTypeImageisUnknown, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT -
VUID-vkCmdTraceRaysKHR-OpTypeImage-07028
For any VkImageView being read as a storage image where the image format field of theOpTypeImageisUnknown, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT -
VUID-vkCmdTraceRaysKHR-OpTypeImage-07029
For any VkBufferView being written as a storage texel buffer where the image format field of theOpTypeImageisUnknown, the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT -
VUID-vkCmdTraceRaysKHR-OpTypeImage-07030
Any VkBufferView being read as a storage texel buffer where the image format field of theOpTypeImageisUnknownthen the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT -
VUID-vkCmdTraceRaysKHR-None-08600
If a a bound shader was created as a VkShaderEXT without the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline without the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, and that shader statically uses a set n, a descriptor set must have been bound to n at the same pipeline bind point, with a VkPipelineLayout that is compatible for set n, with the VkPipelineLayout used to create the current VkPipeline or the VkDescriptorSetLayout array used to create the current VkShaderEXT , as described in Pipeline Layout Compatibility -
VUID-vkCmdTraceRaysKHR-None-08601
If a a bound shader was created as a VkShaderEXT without the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline without the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, and that shader statically uses a push constant value, that value must have been set for the same pipeline bind point, with a VkPipelineLayout that is compatible for push constants with the VkPipelineLayout used to create the current VkPipeline or the VkDescriptorSetLayout array used to create the current VkShaderEXT -
VUID-vkCmdTraceRaysKHR-None-10068
For each array of resources that is used by a bound shader, the indices used to access members of the array must be less than the descriptor count for the identified binding in the descriptor sets used by this command -
VUID-vkCmdTraceRaysKHR-maintenance4-08602
If a a bound shader was created as a VkShaderEXT without the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline without the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, and that shader statically uses a push constant value, that value must have been set for the same pipeline bind point, with a VkPipelineLayout that is compatible for push constants with the VkPipelineLayout used to create the current VkPipeline or the VkDescriptorSetLayout and VkPushConstantRange arrays used to create the current VkShaderEXT -
VUID-vkCmdTraceRaysKHR-None-08114
Descriptors in each bound descriptor set, specified via vkCmdBindDescriptorSets, must be valid if they are accessed as described by descriptor validity by the VkPipeline bound to the pipeline bind point used by this command and the bound VkPipeline was not created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT -
VUID-vkCmdTraceRaysKHR-imageLayout-00344
If an image descriptor is accessed by a shader, the VkImageLayout must match the subresource accessible from the VkImageView as defined by the image layout matching rules -
VUID-vkCmdTraceRaysKHR-None-08115
If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdBindDescriptorSets, the bound VkPipeline must have been created without VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT -
VUID-vkCmdTraceRaysKHR-None-08116
Descriptors in bound descriptor buffers, specified via vkCmdSetDescriptorBufferOffsetsEXT, must be valid if they are dynamically used by the VkPipeline bound to the pipeline bind point used by this command and the bound VkPipeline was created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT -
VUID-vkCmdTraceRaysKHR-None-08604
Descriptors in bound descriptor buffers, specified via vkCmdSetDescriptorBufferOffsetsEXT, must be valid if they are dynamically used by any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command -
VUID-vkCmdTraceRaysKHR-None-08117
If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdSetDescriptorBufferOffsetsEXT, the bound VkPipeline must have been created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT -
VUID-vkCmdTraceRaysKHR-None-08119
If a descriptor is dynamically used with a VkPipeline created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident -
VUID-vkCmdTraceRaysKHR-None-08605
If a descriptor is dynamically used with a VkShaderEXT created with aVkDescriptorSetLayoutthat was created with VK_DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident -
VUID-vkCmdTraceRaysKHR-None-08606
If theshaderObjectfeature is not enabled, a valid pipeline must be bound to the pipeline bind point used by this command -
VUID-vkCmdTraceRaysKHR-None-08608
If a pipeline is bound to the pipeline bind point used by this command, there must not have been any calls to dynamic state setting commands for any state specified statically in the VkPipeline object bound to the pipeline bind point used by this command, since that pipeline was bound -
VUID-vkCmdTraceRaysKHR-uniformBuffers-06935
If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 foruniformBuffers, and therobustBufferAccessfeature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point -
VUID-vkCmdTraceRaysKHR-None-08612
If therobustBufferAccessfeature is not enabled, and any VkShaderEXT bound to a stage corresponding 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 -
VUID-vkCmdTraceRaysKHR-storageBuffers-06936
If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 forstorageBuffers, and therobustBufferAccessfeature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point -
VUID-vkCmdTraceRaysKHR-None-08613
If therobustBufferAccessfeature is not enabled, and any VkShaderEXT bound to a stage corresponding 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 -
VUID-vkCmdTraceRaysKHR-commandBuffer-02707
IfcommandBufferis an unprotected command buffer andprotectedNoFaultis not supported, any resource accessed by bound shaders must not be a protected resource -
VUID-vkCmdTraceRaysKHR-viewType-07752
If a VkImageView is accessed as a result of this command, then the image view’sviewTypemust match theDimoperand of theOpTypeImageas described in Compatibility Between SPIR-V Image Dimensions and Vulkan ImageView Types -
VUID-vkCmdTraceRaysKHR-format-07753
If a VkImageView or VkBufferView is accessed as a result of this command, then the numeric type of the view’sformatand theSampledTypeoperand of theOpTypeImagemust match -
VUID-vkCmdTraceRaysKHR-OpImageWrite-08795
If a VkImageView created with a format other than VK_FORMAT_A8_UNORM is 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 -
VUID-vkCmdTraceRaysKHR-OpImageWrite-08796
If a VkImageView created with the format VK_FORMAT_A8_UNORM is accessed usingOpImageWriteas a result of this command, then theTypeof theTexeloperand of that instruction must have four components -
VUID-vkCmdTraceRaysKHR-OpImageWrite-04469
If a VkBufferView is 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 -
VUID-vkCmdTraceRaysKHR-SampledType-04470
If a VkImageView with a VkFormat that has a 64-bit component width is accessed as a result of this command, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 64 -
VUID-vkCmdTraceRaysKHR-SampledType-04471
If a VkImageView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 32 -
VUID-vkCmdTraceRaysKHR-SampledType-04472
If a VkBufferView with a VkFormat that has a 64-bit component width is accessed as a result of this command, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 64 -
VUID-vkCmdTraceRaysKHR-SampledType-04473
If a VkBufferView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 32 -
VUID-vkCmdTraceRaysKHR-sparseImageInt64Atomics-04474
If thesparseImageInt64Atomicsfeature is not enabled, VkImage objects created with the VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through anOpTypeImagewith aSampledTypewith aWidthof 64 by this command -
VUID-vkCmdTraceRaysKHR-sparseImageInt64Atomics-04475
If thesparseImageInt64Atomicsfeature is not enabled, VkBuffer objects created with the VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through anOpTypeImagewith aSampledTypewith aWidthof 64 by this command -
VUID-vkCmdTraceRaysKHR-OpImageSampleWeightedQCOM-06971
IfOpImageSampleWeightedQCOMis used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_SAMPLED_IMAGE_BIT_QCOM -
VUID-vkCmdTraceRaysKHR-OpImageSampleWeightedQCOM-06972
IfOpImageSampleWeightedQCOMuses a VkImageView as a sample weight image as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_IMAGE_BIT_QCOM -
VUID-vkCmdTraceRaysKHR-OpImageBoxFilterQCOM-06973
IfOpImageBoxFilterQCOMis used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BOX_FILTER_SAMPLED_BIT_QCOM -
VUID-vkCmdTraceRaysKHR-OpImageBlockMatchSSDQCOM-06974
IfOpImageBlockMatchSSDQCOMis used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM -
VUID-vkCmdTraceRaysKHR-OpImageBlockMatchSADQCOM-06975
IfOpImageBlockMatchSADQCOMis used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM -
VUID-vkCmdTraceRaysKHR-OpImageBlockMatchSADQCOM-06976
IfOpImageBlockMatchSADQCOMor OpImageBlockMatchSSDQCOM is used to read from a reference image as result of this command, then the specified reference coordinates must not fail integer texel coordinate validation -
VUID-vkCmdTraceRaysKHR-OpImageSampleWeightedQCOM-06977
IfOpImageSampleWeightedQCOM,OpImageBoxFilterQCOM,OpImageBlockMatchWindowSSDQCOM,OpImageBlockMatchWindowSADQCOM,OpImageBlockMatchGatherSSDQCOM,OpImageBlockMatchGatherSADQCOM,OpImageBlockMatchSSDQCOM, orOpImageBlockMatchSADQCOMuses a VkSampler as a result of this command, then the sampler must have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM -
VUID-vkCmdTraceRaysKHR-OpImageSampleWeightedQCOM-06978
If any command other thanOpImageSampleWeightedQCOM,OpImageBoxFilterQCOM,OpImageBlockMatchWindowSSDQCOM,OpImageBlockMatchWindowSADQCOM,OpImageBlockMatchGatherSSDQCOM,OpImageBlockMatchGatherSADQCOM,OpImageBlockMatchSSDQCOM, orOpImageBlockMatchSADQCOMuses a VkSampler as a result of this command, then the sampler must not have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM -
VUID-vkCmdTraceRaysKHR-OpImageBlockMatchWindow-09215
If aOpImageBlockMatchWindow*QCOMorOpImageBlockMatchGather*QCOMinstruction is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM -
VUID-vkCmdTraceRaysKHR-OpImageBlockMatchWindow-09216
If aOpImageBlockMatchWindow*QCOMorOpImageBlockMatchGather*QCOMinstruction is used to read from an VkImageView as a result of this command, then the image view’s format must be a single-component format -
VUID-vkCmdTraceRaysKHR-OpImageBlockMatchWindow-09217
If aOpImageBlockMatchWindow*QCOMorOpImageBlockMatchGather*QCOMread from a reference image as result of this command, then the specified reference coordinates must not fail integer texel coordinate validation -
VUID-vkCmdTraceRaysKHR-None-07288
Any shader invocation executed by this command must terminate -
VUID-vkCmdTraceRaysKHR-None-09600
If a descriptor with type equal to any of VK_DESCRIPTOR_TYPE_SAMPLE_WEIGHT_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_BLOCK_MATCH_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, or VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT is accessed as a result of this command, all image subresources identified by that descriptor must be in the image layout identified when the descriptor was written -
VUID-vkCmdTraceRaysKHR-commandBuffer-10746
TheVkDeviceMemoryobject allocated from aVkMemoryHeapwith the VK_MEMORY_HEAP_TILE_MEMORY_BIT_QCOM property that is bound to a resource accessed as a result of this command must be the active bound bound tile memory object incommandBuffer -
VUID-vkCmdTraceRaysKHR-None-10678
If this command is recorded inside a tile shading render pass instance, the stages corresponding to the pipeline bind point used by this command must only include VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_FRAGMENT_BIT, and/or VK_SHADER_STAGE_COMPUTE_BIT -
VUID-vkCmdTraceRaysKHR-None-10679
If this command is recorded where per-tile execution model is enabled, there must be no access to any image while the image was be transitioned to the VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT layout -
VUID-vkCmdTraceRaysKHR-pDescription-09900
If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the underlying VkTensorARM object must have been created with the VK_TENSOR_USAGE_SHADER_BIT_ARM usage flag set -
VUID-vkCmdTraceRaysKHR-dimensionCount-09905
If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then theRankof theOpTypeTensorARMof the tensor resource variable must be equal to thedimensionCountprovided via VkTensorCreateInfoARM::pDescriptionwhen creating the underlying VkTensorARM object -
VUID-vkCmdTraceRaysKHR-OpTypeTensorARM-09906
If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the element type of theOpTypeTensorARMof the tensor resource variable must be compatible with the VkFormat of the VkTensorViewARM used for the access -
VUID-vkCmdTraceRaysKHR-None-11297
If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses aOpTypeStructdecorated withBlockorBufferBlockusing that mapping, the calculated offset for the resource heap must be a multiple ofbufferDescriptorAlignment -
VUID-vkCmdTraceRaysKHR-None-11298
If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses anOpTypeImageorOpTypeSampledImageusing that mapping, the calculated offset for the resource heap must be a multiple ofimageDescriptorAlignment -
VUID-vkCmdTraceRaysKHR-None-11299
If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses anOpTypeSamplerorOpTypeSampledImageusing that mapping, the calculated offset for the sampler heap must be a multiple ofsamplerDescriptorAlignment -
VUID-vkCmdTraceRaysKHR-None-11397
If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses anOpTypeTensorARMusing that mapping, the calculated offset for the resource heap must be a multiple oftensorDescriptorAlignment -
VUID-vkCmdTraceRaysKHR-None-11300
If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 4 -
VUID-vkCmdTraceRaysKHR-None-11301
If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a validVkDeviceAddressbacked by physical memory at every offset specified by each mapping -
VUID-vkCmdTraceRaysKHR-None-11302
If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a validVkDeviceAddress -
VUID-vkCmdTraceRaysKHR-None-11304
If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 8 -
VUID-vkCmdTraceRaysKHR-None-11305
If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a validVkDeviceAddressbacked by physical memory at every offset specified by each mapping -
VUID-vkCmdTraceRaysKHR-None-11306
If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address pointed to by the address in push data must be a validVkDeviceAddress -
VUID-vkCmdTraceRaysKHR-None-11308
For each descriptor heap that is statically used by a bound shader, either directly or via a descriptor mapping, a valid descriptor heap must be bound -
VUID-vkCmdTraceRaysKHR-None-11309
If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, execution of this command must not result in any descriptor read accessing data outside of the user range of the respective heap bound byvkCmdBind*HeapEXTcommands -
VUID-vkCmdTraceRaysKHR-None-11372
If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer or uniform texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 foruniformBuffers, therobustBufferAccess2feature is not enabled, and therobustBufferAccessfeature is not enabled, that stage must not access values outside of the range of the descriptor specified via VkDeviceAddressRangeEXT when the descriptor was written -
VUID-vkCmdTraceRaysKHR-None-11373
If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer or storage texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 forstorageBuffers, therobustBufferAccess2feature is not enabled, and therobustBufferAccessfeature is not enabled, that stage must not access values outside of the range of the descriptor specified by VkDeviceAddressRangeEXT when the descriptor was written -
VUID-vkCmdTraceRaysKHR-None-11374
If therobustBufferAccess2feature is not enabled, therobustBufferAccessfeature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, uniform texel buffer, storage buffer, or storage texel buffer, that shader must not access values outside of the range of the buffer as specified by VkDeviceAddressRangeEXT when the descriptor was written -
VUID-vkCmdTraceRaysKHR-pBindInfo-11375
If any bound shader uses an embedded sampler via a descriptor mapping, the value ofpBindInfo->reservedRangeSizeset for vkCmdBindSamplerHeapEXT must be greater than or equal tominSamplerHeapReservedRangeWithEmbedded -
VUID-vkCmdTraceRaysKHR-None-11376
If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, and that shader statically uses a push constant value, that value must have been set by vkCmdPushDataEXT -
VUID-vkCmdTraceRaysKHR-None-11398
If a bound shader was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the access must not be out of bounds -
VUID-vkCmdTraceRaysKHR-None-11437
If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the buffer from which the address in push data was queried must have been created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set -
VUID-vkCmdTraceRaysKHR-None-11438
If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set -
VUID-vkCmdTraceRaysKHR-None-11441
If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must be aligned tominUniformBufferOffsetAlignment -
VUID-vkCmdTraceRaysKHR-None-11439
If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_STORAGE_BUFFER_BIT usage flag set -
VUID-vkCmdTraceRaysKHR-None-11442
If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must be aligned tominStorageBufferOffsetAlignment -
VUID-vkCmdTraceRaysKHR-None-11485
If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses an acceleration structure using that mapping, the address that the acceleration structure is mapped to must be an acceleration structure address retrieved from a VkAccelerationStructureKHR object via vkGetAccelerationStructureDeviceAddressKHR or handle retrieved from a VkAccelerationStructureNV object via vkGetAccelerationStructureHandleNV -
VUID-vkCmdTraceRaysKHR-index-11450
If a shader uses a sampler descriptor to sample an image as a result of this command, and that sampler descriptor uses a custom border color with an index defined by VkSamplerCustomBorderColorIndexCreateInfoEXT, the value of VkSamplerCustomBorderColorIndexCreateInfoEXT::indexmust have been registered before this command was recorded, and still be registered during the sampling operation, with an identically defined color -
VUID-vkCmdTraceRaysKHR-protectedNoFault-11455
IfprotectedNoFaultis not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, the address that the resource is mapped to must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set -
VUID-vkCmdTraceRaysKHR-protectedNoFault-11456
IfprotectedNoFaultis not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, the address of the indirect memory must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set -
VUID-vkCmdTraceRaysKHR-None-03429
Any shader group handle referenced by this call must have been queried from the bound ray tracing pipeline -
VUID-vkCmdTraceRaysKHR-None-09458
If the bound ray tracing pipeline state was created with the VK_DYNAMIC_STATE_RAY_TRACING_PIPELINE_STACK_SIZE_KHR dynamic state enabled then vkCmdSetRayTracingPipelineStackSizeKHR must have been called in the current command buffer prior to this trace command -
VUID-vkCmdTraceRaysKHR-None-11319
If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, the value of the address at the expected location in shader record data must be a valid address
-
VUID-vkCmdTraceRaysKHR-maxPipelineRayRecursionDepth-03679
This command must not cause a shader call instruction to be executed from a shader invocation with a recursion depth greater than the value ofmaxPipelineRayRecursionDepthused to create the bound ray tracing pipeline -
VUID-vkCmdTraceRaysKHR-commandBuffer-03635
commandBuffermust not be a protected command buffer
-
VUID-vkCmdTraceRaysKHR-pRayGenShaderBindingTable-03681
pRayGenShaderBindingTable->deviceAddressmust be a device address allocated to the application from a buffer created with the VK_BUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHR usage flag set -
VUID-vkCmdTraceRaysKHR-pRayGenShaderBindingTable-03682
pRayGenShaderBindingTable->deviceAddressmust be a multiple ofVkPhysicalDeviceRayTracingPipelinePropertiesKHR::shaderGroupBaseAlignment -
VUID-vkCmdTraceRaysKHR-pMissShaderBindingTable-03684
pMissShaderBindingTable->deviceAddressmust be a device address allocated to the application from a buffer created with the VK_BUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHR usage flag set -
VUID-vkCmdTraceRaysKHR-pMissShaderBindingTable-03685
pMissShaderBindingTable->deviceAddressmust be a multiple ofVkPhysicalDeviceRayTracingPipelinePropertiesKHR::shaderGroupBaseAlignment -
VUID-vkCmdTraceRaysKHR-stride-03686
pMissShaderBindingTable->stridemust be a multiple ofVkPhysicalDeviceRayTracingPipelinePropertiesKHR::shaderGroupHandleAlignment -
VUID-vkCmdTraceRaysKHR-stride-04029
pMissShaderBindingTable->stridemust be less than or equal toVkPhysicalDeviceRayTracingPipelinePropertiesKHR::maxShaderGroupStride -
VUID-vkCmdTraceRaysKHR-pHitShaderBindingTable-03688
pHitShaderBindingTable->deviceAddressmust be a device address allocated to the application from a buffer created with the VK_BUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHR usage flag set -
VUID-vkCmdTraceRaysKHR-pHitShaderBindingTable-03689
pHitShaderBindingTable->deviceAddressmust be a multiple ofVkPhysicalDeviceRayTracingPipelinePropertiesKHR::shaderGroupBaseAlignment -
VUID-vkCmdTraceRaysKHR-stride-03690
pHitShaderBindingTable->stridemust be a multiple ofVkPhysicalDeviceRayTracingPipelinePropertiesKHR::shaderGroupHandleAlignment -
VUID-vkCmdTraceRaysKHR-stride-04035
pHitShaderBindingTable->stridemust be less than or equal toVkPhysicalDeviceRayTracingPipelinePropertiesKHR::maxShaderGroupStride -
VUID-vkCmdTraceRaysKHR-pCallableShaderBindingTable-03692
pCallableShaderBindingTable->deviceAddressmust be a device address allocated to the application from a buffer created with the VK_BUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHR usage flag set -
VUID-vkCmdTraceRaysKHR-pCallableShaderBindingTable-03693
pCallableShaderBindingTable->deviceAddressmust be a multiple ofVkPhysicalDeviceRayTracingPipelinePropertiesKHR::shaderGroupBaseAlignment -
VUID-vkCmdTraceRaysKHR-stride-03694
pCallableShaderBindingTable->stridemust be a multiple ofVkPhysicalDeviceRayTracingPipelinePropertiesKHR::shaderGroupHandleAlignment -
VUID-vkCmdTraceRaysKHR-stride-04041
pCallableShaderBindingTable->stridemust be less than or equal toVkPhysicalDeviceRayTracingPipelinePropertiesKHR::maxShaderGroupStride -
VUID-vkCmdTraceRaysKHR-flags-03511
If the bound ray tracing pipeline was created withflagsthat included VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHR, the entries in the table identified bypMissShaderBindingTable->deviceAddressaccessed as a result of this command in order to execute a miss shader must not be zero -
VUID-vkCmdTraceRaysKHR-flags-03512
If the bound ray tracing pipeline was created withflagsthat included VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR, entries in the table identified bypHitShaderBindingTable->deviceAddressaccessed as a result of this command in order to execute an any-hit shader must not be zero -
VUID-vkCmdTraceRaysKHR-flags-03513
If the bound ray tracing pipeline was created withflagsthat included VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR, entries in the table identified bypHitShaderBindingTable->deviceAddressaccessed as a result of this command in order to execute a closest hit shader must not be zero -
VUID-vkCmdTraceRaysKHR-flags-03514
If the bound ray tracing pipeline was created withflagsthat included VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR, entries in the table identified bypHitShaderBindingTable->deviceAddressaccessed as a result of this command in order to execute an intersection shader must not be zero -
VUID-vkCmdTraceRaysKHR-pHitShaderBindingTable-04735
Any non-zero hit shader group entries in the table identified bypHitShaderBindingTable->deviceAddressaccessed by this call from a geometry with ageometryTypeof VK_GEOMETRY_TYPE_TRIANGLES_KHR must have been created with VK_RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR -
VUID-vkCmdTraceRaysKHR-pHitShaderBindingTable-04736
Any non-zero hit shader group entries in the table identified bypHitShaderBindingTable->deviceAddressaccessed by this call from a geometry with ageometryTypeof VK_GEOMETRY_TYPE_AABBS_KHR must have been created with VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR
-
VUID-vkCmdTraceRaysKHR-width-03638
widthmust be less than or equal toVkPhysicalDeviceLimits::maxComputeWorkGroupCount[0] ×VkPhysicalDeviceLimits::maxComputeWorkGroupSize[0] -
VUID-vkCmdTraceRaysKHR-height-03639
heightmust be less than or equal toVkPhysicalDeviceLimits::maxComputeWorkGroupCount[1] ×VkPhysicalDeviceLimits::maxComputeWorkGroupSize[1] -
VUID-vkCmdTraceRaysKHR-depth-03640
depthmust be less than or equal toVkPhysicalDeviceLimits::maxComputeWorkGroupCount[2] ×VkPhysicalDeviceLimits::maxComputeWorkGroupSize[2] -
VUID-vkCmdTraceRaysKHR-width-03641
width×height×depthmust be less than or equal toVkPhysicalDeviceRayTracingPipelinePropertiesKHR::maxRayDispatchInvocationCount
-
VUID-vkCmdTraceRaysKHR-allowClusterAccelerationStructure-10578
If the traced geometry contains a cluster acceleration structure, then VkRayTracingPipelineClusterAccelerationStructureCreateInfoNV::allowClusterAccelerationStructuremust have been set for that pipeline
-
VUID-vkCmdTraceRaysKHR-commandBuffer-parameter
commandBuffermust be a valid VkCommandBuffer handle -
VUID-vkCmdTraceRaysKHR-pRaygenShaderBindingTable-parameter
pRaygenShaderBindingTablemust be a valid pointer to a valid VkStridedDeviceAddressRegionKHR structure -
VUID-vkCmdTraceRaysKHR-pMissShaderBindingTable-parameter
pMissShaderBindingTablemust be a valid pointer to a valid VkStridedDeviceAddressRegionKHR structure -
VUID-vkCmdTraceRaysKHR-pHitShaderBindingTable-parameter
pHitShaderBindingTablemust be a valid pointer to a valid VkStridedDeviceAddressRegionKHR structure -
VUID-vkCmdTraceRaysKHR-pCallableShaderBindingTable-parameter
pCallableShaderBindingTablemust be a valid pointer to a valid VkStridedDeviceAddressRegionKHR structure -
VUID-vkCmdTraceRaysKHR-commandBuffer-recording
commandBuffermust be in the recording state -
VUID-vkCmdTraceRaysKHR-commandBuffer-cmdpool
TheVkCommandPoolthatcommandBufferwas allocated from must support VK_QUEUE_COMPUTE_BIT operations -
VUID-vkCmdTraceRaysKHR-renderpass
This command must only be called outside of a render pass instance -
VUID-vkCmdTraceRaysKHR-suspended
This command must not be called between suspended render pass instances -
VUID-vkCmdTraceRaysKHR-videocoding
This command must only be called outside of a video coding scope
-
Host access to
commandBuffermust be externally synchronized -
Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
| Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type |
|---|---|---|---|---|
Primary |
Outside |
Outside |
VK_QUEUE_COMPUTE_BIT |
Action |
vkCmdTraceRaysKHR is not affected by conditional rendering
When invocation mask image usage is enabled in the bound ray tracing pipeline, the pipeline uses an invocation mask image specified by the command:
// Provided by VK_HUAWEI_invocation_mask
void vkCmdBindInvocationMaskHUAWEI(
VkCommandBuffer commandBuffer,
VkImageView imageView,
VkImageLayout imageLayout);
-
commandBufferis the command buffer into which the command will be recorded -
imageViewis an image view handle specifying the invocation mask imageimageViewmay be VK_NULL_HANDLE, which is equivalent to specifying a view of an image filled with ones value. -
imageLayoutis the layout that the image subresources accessible fromimageViewwill be in when the invocation mask image is accessed
-
VUID-vkCmdBindInvocationMaskHUAWEI-None-04976
TheinvocationMaskfeature must be enabled -
VUID-vkCmdBindInvocationMaskHUAWEI-imageView-04977
IfimageViewis not VK_NULL_HANDLE, it must be a valid VkImageView handle of type VK_IMAGE_VIEW_TYPE_2D -
VUID-vkCmdBindInvocationMaskHUAWEI-imageView-04978
IfimageViewis not VK_NULL_HANDLE, it must have a format of VK_FORMAT_R8_UINT -
VUID-vkCmdBindInvocationMaskHUAWEI-imageView-04979
IfimageViewis not VK_NULL_HANDLE, it must have been created with the VK_IMAGE_USAGE_INVOCATION_MASK_BIT_HUAWEI usage flag set -
VUID-vkCmdBindInvocationMaskHUAWEI-imageView-04980
IfimageViewis not VK_NULL_HANDLE,imageLayoutmust be VK_IMAGE_LAYOUT_GENERAL -
VUID-vkCmdBindInvocationMaskHUAWEI-width-04981
Thread mask image resolution must match thewidthandheightin vkCmdTraceRaysKHR -
VUID-vkCmdBindInvocationMaskHUAWEI-None-04982
Each element in the invocation mask image must have the value0or1. The value 1 means the invocation is active -
VUID-vkCmdBindInvocationMaskHUAWEI-depth-04983
depthin vkCmdTraceRaysKHR must be 1
-
VUID-vkCmdBindInvocationMaskHUAWEI-commandBuffer-parameter
commandBuffermust be a valid VkCommandBuffer handle -
VUID-vkCmdBindInvocationMaskHUAWEI-imageView-parameter
IfimageViewis not VK_NULL_HANDLE,imageViewmust be a valid VkImageView handle -
VUID-vkCmdBindInvocationMaskHUAWEI-imageLayout-parameter
imageLayoutmust be a valid VkImageLayout value -
VUID-vkCmdBindInvocationMaskHUAWEI-commandBuffer-recording
commandBuffermust be in the recording state -
VUID-vkCmdBindInvocationMaskHUAWEI-commandBuffer-cmdpool
TheVkCommandPoolthatcommandBufferwas allocated from must support VK_QUEUE_COMPUTE_BIT operations -
VUID-vkCmdBindInvocationMaskHUAWEI-renderpass
This command must only be called outside of a render pass instance -
VUID-vkCmdBindInvocationMaskHUAWEI-videocoding
This command must only be called outside of a video coding scope -
VUID-vkCmdBindInvocationMaskHUAWEI-commonparent
Both ofcommandBuffer, andimageViewthat are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same VkDevice
-
Host access to
commandBuffermust be externally synchronized -
Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
| Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type |
|---|---|---|---|---|
Primary |
Outside |
Outside |
VK_QUEUE_COMPUTE_BIT |
State |
vkCmdBindInvocationMaskHUAWEI is not affected by conditional rendering
To dispatch ray tracing, with some parameters sourced on the device, use:
// Provided by VK_KHR_ray_tracing_pipeline
void vkCmdTraceRaysIndirectKHR(
VkCommandBuffer commandBuffer,
const VkStridedDeviceAddressRegionKHR* pRaygenShaderBindingTable,
const VkStridedDeviceAddressRegionKHR* pMissShaderBindingTable,
const VkStridedDeviceAddressRegionKHR* pHitShaderBindingTable,
const VkStridedDeviceAddressRegionKHR* pCallableShaderBindingTable,
VkDeviceAddress indirectDeviceAddress);
-
commandBufferis the command buffer into which the command will be recorded. -
pRaygenShaderBindingTableis a VkStridedDeviceAddressRegionKHR that holds the shader binding table data for the ray generation shader stage. -
pMissShaderBindingTableis a VkStridedDeviceAddressRegionKHR that holds the shader binding table data for the miss shader stage. -
pHitShaderBindingTableis a VkStridedDeviceAddressRegionKHR that holds the shader binding table data for the hit shader stage. -
pCallableShaderBindingTableis a VkStridedDeviceAddressRegionKHR that holds the shader binding table data for the callable shader stage. -
indirectDeviceAddressis a buffer device address which is a pointer to a VkTraceRaysIndirectCommandKHR structure containing the trace ray parameters.
vkCmdTraceRaysIndirectKHR behaves similarly to vkCmdTraceRaysKHR
except that the ray trace query dimensions are read by the device from
indirectDeviceAddress during execution.
-
VUID-vkCmdTraceRaysIndirectKHR-magFilter-04553
If a VkSampler created withmagFilterorminFilterequal to VK_FILTER_LINEAR,reductionModeequal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, andcompareEnableequal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT -
VUID-vkCmdTraceRaysIndirectKHR-magFilter-09598
If a VkSampler created withmagFilterorminFilterequal to VK_FILTER_LINEAR andreductionModeequal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT -
VUID-vkCmdTraceRaysIndirectKHR-mipmapMode-04770
If a VkSampler created withmipmapModeequal to VK_SAMPLER_MIPMAP_MODE_LINEAR,reductionModeequal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, andcompareEnableequal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT -
VUID-vkCmdTraceRaysIndirectKHR-mipmapMode-09599
If a VkSampler created withmipmapModeequal to VK_SAMPLER_MIPMAP_MODE_LINEAR andreductionModeequal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT -
VUID-vkCmdTraceRaysIndirectKHR-unnormalizedCoordinates-09635
If a VkSampler created withunnormalizedCoordinatesequal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’slevelCountandlayerCountmust be 1 -
VUID-vkCmdTraceRaysIndirectKHR-None-08609
If a VkSampler created withunnormalizedCoordinatesequal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’sviewTypemust be VK_IMAGE_VIEW_TYPE_1D or VK_IMAGE_VIEW_TYPE_2D -
VUID-vkCmdTraceRaysIndirectKHR-None-08610
If a VkSampler created withunnormalizedCoordinatesequal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-VOpImageSample*orOpImageSparseSample*instructions withImplicitLod,DreforProjin their name -
VUID-vkCmdTraceRaysIndirectKHR-None-08611
If a VkSampler created withunnormalizedCoordinatesequal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-VOpImageSample*orOpImageSparseSample*instructions that includes a LOD bias or any offset values -
VUID-vkCmdTraceRaysIndirectKHR-None-06479
If a VkImageView is sampled with depth comparison, the image view’s format features must contain VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT -
VUID-vkCmdTraceRaysIndirectKHR-None-02691
If a VkImageView is accessed using atomic operations as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT -
VUID-vkCmdTraceRaysIndirectKHR-None-07888
If a VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER descriptor is accessed using atomic operations as a result of this command, then the storage texel buffer’s format features must contain VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT -
VUID-vkCmdTraceRaysIndirectKHR-None-02692
If a VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT -
VUID-vkCmdTraceRaysIndirectKHR-None-02693
If the VK_EXT_filter_cubic extension is not enabled and any VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, it must not have a VkImageViewType of VK_IMAGE_VIEW_TYPE_3D, VK_IMAGE_VIEW_TYPE_CUBE, or VK_IMAGE_VIEW_TYPE_CUBE_ARRAY -
VUID-vkCmdTraceRaysIndirectKHR-filterCubic-02694
Any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have a VkImageViewType and format that supports cubic filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::filterCubicreturned by vkGetPhysicalDeviceImageFormatProperties2 -
VUID-vkCmdTraceRaysIndirectKHR-filterCubicMinmax-02695
Any VkImageView being sampled with VK_FILTER_CUBIC_EXT with a reduction mode of either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX as a result of this command must have a VkImageViewType and format that supports cubic filtering together with minmax filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::filterCubicMinmaxreturned by vkGetPhysicalDeviceImageFormatProperties2 -
VUID-vkCmdTraceRaysIndirectKHR-cubicRangeClamp-09212
If thecubicRangeClampfeature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must not have a VkSamplerReductionModeCreateInfo::reductionModeequal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM -
VUID-vkCmdTraceRaysIndirectKHR-reductionMode-09213
Any VkImageView being sampled with a VkSamplerReductionModeCreateInfo::reductionModeequal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM as a result of this command must sample with VK_FILTER_CUBIC_EXT -
VUID-vkCmdTraceRaysIndirectKHR-selectableCubicWeights-09214
If theselectableCubicWeightsfeature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have VkSamplerCubicWeightsCreateInfoQCOM::cubicWeightsequal to VK_CUBIC_FILTER_WEIGHTS_CATMULL_ROM_QCOM -
VUID-vkCmdTraceRaysIndirectKHR-flags-02696
Any VkImage created with a VkImageCreateInfo::flagscontaining VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV sampled as a result of this command must only be sampled using a VkSamplerAddressMode of VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE -
VUID-vkCmdTraceRaysIndirectKHR-OpTypeImage-07027
For any VkImageView being written as a storage image where the image format field of theOpTypeImageisUnknown, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT -
VUID-vkCmdTraceRaysIndirectKHR-OpTypeImage-07028
For any VkImageView being read as a storage image where the image format field of theOpTypeImageisUnknown, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT -
VUID-vkCmdTraceRaysIndirectKHR-OpTypeImage-07029
For any VkBufferView being written as a storage texel buffer where the image format field of theOpTypeImageisUnknown, the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT -
VUID-vkCmdTraceRaysIndirectKHR-OpTypeImage-07030
Any VkBufferView being read as a storage texel buffer where the image format field of theOpTypeImageisUnknownthen the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT -
VUID-vkCmdTraceRaysIndirectKHR-None-08600
If a a bound shader was created as a VkShaderEXT without the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline without the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, and that shader statically uses a set n, a descriptor set must have been bound to n at the same pipeline bind point, with a VkPipelineLayout that is compatible for set n, with the VkPipelineLayout used to create the current VkPipeline or the VkDescriptorSetLayout array used to create the current VkShaderEXT , as described in Pipeline Layout Compatibility -
VUID-vkCmdTraceRaysIndirectKHR-None-08601
If a a bound shader was created as a VkShaderEXT without the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline without the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, and that shader statically uses a push constant value, that value must have been set for the same pipeline bind point, with a VkPipelineLayout that is compatible for push constants with the VkPipelineLayout used to create the current VkPipeline or the VkDescriptorSetLayout array used to create the current VkShaderEXT -
VUID-vkCmdTraceRaysIndirectKHR-None-10068
For each array of resources that is used by a bound shader, the indices used to access members of the array must be less than the descriptor count for the identified binding in the descriptor sets used by this command -
VUID-vkCmdTraceRaysIndirectKHR-maintenance4-08602
If a a bound shader was created as a VkShaderEXT without the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline without the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, and that shader statically uses a push constant value, that value must have been set for the same pipeline bind point, with a VkPipelineLayout that is compatible for push constants with the VkPipelineLayout used to create the current VkPipeline or the VkDescriptorSetLayout and VkPushConstantRange arrays used to create the current VkShaderEXT -
VUID-vkCmdTraceRaysIndirectKHR-None-08114
Descriptors in each bound descriptor set, specified via vkCmdBindDescriptorSets, must be valid if they are accessed as described by descriptor validity by the VkPipeline bound to the pipeline bind point used by this command and the bound VkPipeline was not created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT -
VUID-vkCmdTraceRaysIndirectKHR-imageLayout-00344
If an image descriptor is accessed by a shader, the VkImageLayout must match the subresource accessible from the VkImageView as defined by the image layout matching rules -
VUID-vkCmdTraceRaysIndirectKHR-None-08115
If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdBindDescriptorSets, the bound VkPipeline must have been created without VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT -
VUID-vkCmdTraceRaysIndirectKHR-None-08116
Descriptors in bound descriptor buffers, specified via vkCmdSetDescriptorBufferOffsetsEXT, must be valid if they are dynamically used by the VkPipeline bound to the pipeline bind point used by this command and the bound VkPipeline was created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT -
VUID-vkCmdTraceRaysIndirectKHR-None-08604
Descriptors in bound descriptor buffers, specified via vkCmdSetDescriptorBufferOffsetsEXT, must be valid if they are dynamically used by any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command -
VUID-vkCmdTraceRaysIndirectKHR-None-08117
If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdSetDescriptorBufferOffsetsEXT, the bound VkPipeline must have been created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT -
VUID-vkCmdTraceRaysIndirectKHR-None-08119
If a descriptor is dynamically used with a VkPipeline created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident -
VUID-vkCmdTraceRaysIndirectKHR-None-08605
If a descriptor is dynamically used with a VkShaderEXT created with aVkDescriptorSetLayoutthat was created with VK_DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident -
VUID-vkCmdTraceRaysIndirectKHR-None-08606
If theshaderObjectfeature is not enabled, a valid pipeline must be bound to the pipeline bind point used by this command -
VUID-vkCmdTraceRaysIndirectKHR-None-08608
If a pipeline is bound to the pipeline bind point used by this command, there must not have been any calls to dynamic state setting commands for any state specified statically in the VkPipeline object bound to the pipeline bind point used by this command, since that pipeline was bound -
VUID-vkCmdTraceRaysIndirectKHR-uniformBuffers-06935
If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 foruniformBuffers, and therobustBufferAccessfeature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point -
VUID-vkCmdTraceRaysIndirectKHR-None-08612
If therobustBufferAccessfeature is not enabled, and any VkShaderEXT bound to a stage corresponding 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 -
VUID-vkCmdTraceRaysIndirectKHR-storageBuffers-06936
If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 forstorageBuffers, and therobustBufferAccessfeature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point -
VUID-vkCmdTraceRaysIndirectKHR-None-08613
If therobustBufferAccessfeature is not enabled, and any VkShaderEXT bound to a stage corresponding 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 -
VUID-vkCmdTraceRaysIndirectKHR-commandBuffer-02707
IfcommandBufferis an unprotected command buffer andprotectedNoFaultis not supported, any resource accessed by bound shaders must not be a protected resource -
VUID-vkCmdTraceRaysIndirectKHR-viewType-07752
If a VkImageView is accessed as a result of this command, then the image view’sviewTypemust match theDimoperand of theOpTypeImageas described in Compatibility Between SPIR-V Image Dimensions and Vulkan ImageView Types -
VUID-vkCmdTraceRaysIndirectKHR-format-07753
If a VkImageView or VkBufferView is accessed as a result of this command, then the numeric type of the view’sformatand theSampledTypeoperand of theOpTypeImagemust match -
VUID-vkCmdTraceRaysIndirectKHR-OpImageWrite-08795
If a VkImageView created with a format other than VK_FORMAT_A8_UNORM is 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 -
VUID-vkCmdTraceRaysIndirectKHR-OpImageWrite-08796
If a VkImageView created with the format VK_FORMAT_A8_UNORM is accessed usingOpImageWriteas a result of this command, then theTypeof theTexeloperand of that instruction must have four components -
VUID-vkCmdTraceRaysIndirectKHR-OpImageWrite-04469
If a VkBufferView is 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 -
VUID-vkCmdTraceRaysIndirectKHR-SampledType-04470
If a VkImageView with a VkFormat that has a 64-bit component width is accessed as a result of this command, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 64 -
VUID-vkCmdTraceRaysIndirectKHR-SampledType-04471
If a VkImageView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 32 -
VUID-vkCmdTraceRaysIndirectKHR-SampledType-04472
If a VkBufferView with a VkFormat that has a 64-bit component width is accessed as a result of this command, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 64 -
VUID-vkCmdTraceRaysIndirectKHR-SampledType-04473
If a VkBufferView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 32 -
VUID-vkCmdTraceRaysIndirectKHR-sparseImageInt64Atomics-04474
If thesparseImageInt64Atomicsfeature is not enabled, VkImage objects created with the VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through anOpTypeImagewith aSampledTypewith aWidthof 64 by this command -
VUID-vkCmdTraceRaysIndirectKHR-sparseImageInt64Atomics-04475
If thesparseImageInt64Atomicsfeature is not enabled, VkBuffer objects created with the VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through anOpTypeImagewith aSampledTypewith aWidthof 64 by this command -
VUID-vkCmdTraceRaysIndirectKHR-OpImageSampleWeightedQCOM-06971
IfOpImageSampleWeightedQCOMis used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_SAMPLED_IMAGE_BIT_QCOM -
VUID-vkCmdTraceRaysIndirectKHR-OpImageSampleWeightedQCOM-06972
IfOpImageSampleWeightedQCOMuses a VkImageView as a sample weight image as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_IMAGE_BIT_QCOM -
VUID-vkCmdTraceRaysIndirectKHR-OpImageBoxFilterQCOM-06973
IfOpImageBoxFilterQCOMis used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BOX_FILTER_SAMPLED_BIT_QCOM -
VUID-vkCmdTraceRaysIndirectKHR-OpImageBlockMatchSSDQCOM-06974
IfOpImageBlockMatchSSDQCOMis used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM -
VUID-vkCmdTraceRaysIndirectKHR-OpImageBlockMatchSADQCOM-06975
IfOpImageBlockMatchSADQCOMis used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM -
VUID-vkCmdTraceRaysIndirectKHR-OpImageBlockMatchSADQCOM-06976
IfOpImageBlockMatchSADQCOMor OpImageBlockMatchSSDQCOM is used to read from a reference image as result of this command, then the specified reference coordinates must not fail integer texel coordinate validation -
VUID-vkCmdTraceRaysIndirectKHR-OpImageSampleWeightedQCOM-06977
IfOpImageSampleWeightedQCOM,OpImageBoxFilterQCOM,OpImageBlockMatchWindowSSDQCOM,OpImageBlockMatchWindowSADQCOM,OpImageBlockMatchGatherSSDQCOM,OpImageBlockMatchGatherSADQCOM,OpImageBlockMatchSSDQCOM, orOpImageBlockMatchSADQCOMuses a VkSampler as a result of this command, then the sampler must have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM -
VUID-vkCmdTraceRaysIndirectKHR-OpImageSampleWeightedQCOM-06978
If any command other thanOpImageSampleWeightedQCOM,OpImageBoxFilterQCOM,OpImageBlockMatchWindowSSDQCOM,OpImageBlockMatchWindowSADQCOM,OpImageBlockMatchGatherSSDQCOM,OpImageBlockMatchGatherSADQCOM,OpImageBlockMatchSSDQCOM, orOpImageBlockMatchSADQCOMuses a VkSampler as a result of this command, then the sampler must not have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM -
VUID-vkCmdTraceRaysIndirectKHR-OpImageBlockMatchWindow-09215
If aOpImageBlockMatchWindow*QCOMorOpImageBlockMatchGather*QCOMinstruction is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM -
VUID-vkCmdTraceRaysIndirectKHR-OpImageBlockMatchWindow-09216
If aOpImageBlockMatchWindow*QCOMorOpImageBlockMatchGather*QCOMinstruction is used to read from an VkImageView as a result of this command, then the image view’s format must be a single-component format -
VUID-vkCmdTraceRaysIndirectKHR-OpImageBlockMatchWindow-09217
If aOpImageBlockMatchWindow*QCOMorOpImageBlockMatchGather*QCOMread from a reference image as result of this command, then the specified reference coordinates must not fail integer texel coordinate validation -
VUID-vkCmdTraceRaysIndirectKHR-None-07288
Any shader invocation executed by this command must terminate -
VUID-vkCmdTraceRaysIndirectKHR-None-09600
If a descriptor with type equal to any of VK_DESCRIPTOR_TYPE_SAMPLE_WEIGHT_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_BLOCK_MATCH_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, or VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT is accessed as a result of this command, all image subresources identified by that descriptor must be in the image layout identified when the descriptor was written -
VUID-vkCmdTraceRaysIndirectKHR-commandBuffer-10746
TheVkDeviceMemoryobject allocated from aVkMemoryHeapwith the VK_MEMORY_HEAP_TILE_MEMORY_BIT_QCOM property that is bound to a resource accessed as a result of this command must be the active bound bound tile memory object incommandBuffer -
VUID-vkCmdTraceRaysIndirectKHR-None-10678
If this command is recorded inside a tile shading render pass instance, the stages corresponding to the pipeline bind point used by this command must only include VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_FRAGMENT_BIT, and/or VK_SHADER_STAGE_COMPUTE_BIT -
VUID-vkCmdTraceRaysIndirectKHR-None-10679
If this command is recorded where per-tile execution model is enabled, there must be no access to any image while the image was be transitioned to the VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT layout -
VUID-vkCmdTraceRaysIndirectKHR-pDescription-09900
If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the underlying VkTensorARM object must have been created with the VK_TENSOR_USAGE_SHADER_BIT_ARM usage flag set -
VUID-vkCmdTraceRaysIndirectKHR-dimensionCount-09905
If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then theRankof theOpTypeTensorARMof the tensor resource variable must be equal to thedimensionCountprovided via VkTensorCreateInfoARM::pDescriptionwhen creating the underlying VkTensorARM object -
VUID-vkCmdTraceRaysIndirectKHR-OpTypeTensorARM-09906
If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the element type of theOpTypeTensorARMof the tensor resource variable must be compatible with the VkFormat of the VkTensorViewARM used for the access -
VUID-vkCmdTraceRaysIndirectKHR-None-11297
If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses aOpTypeStructdecorated withBlockorBufferBlockusing that mapping, the calculated offset for the resource heap must be a multiple ofbufferDescriptorAlignment -
VUID-vkCmdTraceRaysIndirectKHR-None-11298
If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses anOpTypeImageorOpTypeSampledImageusing that mapping, the calculated offset for the resource heap must be a multiple ofimageDescriptorAlignment -
VUID-vkCmdTraceRaysIndirectKHR-None-11299
If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses anOpTypeSamplerorOpTypeSampledImageusing that mapping, the calculated offset for the sampler heap must be a multiple ofsamplerDescriptorAlignment -
VUID-vkCmdTraceRaysIndirectKHR-None-11397
If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses anOpTypeTensorARMusing that mapping, the calculated offset for the resource heap must be a multiple oftensorDescriptorAlignment -
VUID-vkCmdTraceRaysIndirectKHR-None-11300
If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 4 -
VUID-vkCmdTraceRaysIndirectKHR-None-11301
If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a validVkDeviceAddressbacked by physical memory at every offset specified by each mapping -
VUID-vkCmdTraceRaysIndirectKHR-None-11302
If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a validVkDeviceAddress -
VUID-vkCmdTraceRaysIndirectKHR-None-11304
If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 8 -
VUID-vkCmdTraceRaysIndirectKHR-None-11305
If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a validVkDeviceAddressbacked by physical memory at every offset specified by each mapping -
VUID-vkCmdTraceRaysIndirectKHR-None-11306
If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address pointed to by the address in push data must be a validVkDeviceAddress -
VUID-vkCmdTraceRaysIndirectKHR-None-11308
For each descriptor heap that is statically used by a bound shader, either directly or via a descriptor mapping, a valid descriptor heap must be bound -
VUID-vkCmdTraceRaysIndirectKHR-None-11309
If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, execution of this command must not result in any descriptor read accessing data outside of the user range of the respective heap bound byvkCmdBind*HeapEXTcommands -
VUID-vkCmdTraceRaysIndirectKHR-None-11372
If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer or uniform texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 foruniformBuffers, therobustBufferAccess2feature is not enabled, and therobustBufferAccessfeature is not enabled, that stage must not access values outside of the range of the descriptor specified via VkDeviceAddressRangeEXT when the descriptor was written -
VUID-vkCmdTraceRaysIndirectKHR-None-11373
If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer or storage texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 forstorageBuffers, therobustBufferAccess2feature is not enabled, and therobustBufferAccessfeature is not enabled, that stage must not access values outside of the range of the descriptor specified by VkDeviceAddressRangeEXT when the descriptor was written -
VUID-vkCmdTraceRaysIndirectKHR-None-11374
If therobustBufferAccess2feature is not enabled, therobustBufferAccessfeature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, uniform texel buffer, storage buffer, or storage texel buffer, that shader must not access values outside of the range of the buffer as specified by VkDeviceAddressRangeEXT when the descriptor was written -
VUID-vkCmdTraceRaysIndirectKHR-pBindInfo-11375
If any bound shader uses an embedded sampler via a descriptor mapping, the value ofpBindInfo->reservedRangeSizeset for vkCmdBindSamplerHeapEXT must be greater than or equal tominSamplerHeapReservedRangeWithEmbedded -
VUID-vkCmdTraceRaysIndirectKHR-None-11376
If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, and that shader statically uses a push constant value, that value must have been set by vkCmdPushDataEXT -
VUID-vkCmdTraceRaysIndirectKHR-None-11398
If a bound shader was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the access must not be out of bounds -
VUID-vkCmdTraceRaysIndirectKHR-None-11437
If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the buffer from which the address in push data was queried must have been created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set -
VUID-vkCmdTraceRaysIndirectKHR-None-11438
If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set -
VUID-vkCmdTraceRaysIndirectKHR-None-11441
If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must be aligned tominUniformBufferOffsetAlignment -
VUID-vkCmdTraceRaysIndirectKHR-None-11439
If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_STORAGE_BUFFER_BIT usage flag set -
VUID-vkCmdTraceRaysIndirectKHR-None-11442
If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must be aligned tominStorageBufferOffsetAlignment -
VUID-vkCmdTraceRaysIndirectKHR-None-11485
If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses an acceleration structure using that mapping, the address that the acceleration structure is mapped to must be an acceleration structure address retrieved from a VkAccelerationStructureKHR object via vkGetAccelerationStructureDeviceAddressKHR or handle retrieved from a VkAccelerationStructureNV object via vkGetAccelerationStructureHandleNV -
VUID-vkCmdTraceRaysIndirectKHR-index-11450
If a shader uses a sampler descriptor to sample an image as a result of this command, and that sampler descriptor uses a custom border color with an index defined by VkSamplerCustomBorderColorIndexCreateInfoEXT, the value of VkSamplerCustomBorderColorIndexCreateInfoEXT::indexmust have been registered before this command was recorded, and still be registered during the sampling operation, with an identically defined color -
VUID-vkCmdTraceRaysIndirectKHR-protectedNoFault-11455
IfprotectedNoFaultis not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, the address that the resource is mapped to must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set -
VUID-vkCmdTraceRaysIndirectKHR-protectedNoFault-11456
IfprotectedNoFaultis not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, the address of the indirect memory must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set -
VUID-vkCmdTraceRaysIndirectKHR-None-03429
Any shader group handle referenced by this call must have been queried from the bound ray tracing pipeline -
VUID-vkCmdTraceRaysIndirectKHR-None-09458
If the bound ray tracing pipeline state was created with the VK_DYNAMIC_STATE_RAY_TRACING_PIPELINE_STACK_SIZE_KHR dynamic state enabled then vkCmdSetRayTracingPipelineStackSizeKHR must have been called in the current command buffer prior to this trace command -
VUID-vkCmdTraceRaysIndirectKHR-None-11319
If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, the value of the address at the expected location in shader record data must be a valid address
-
VUID-vkCmdTraceRaysIndirectKHR-maxPipelineRayRecursionDepth-03679
This command must not cause a shader call instruction to be executed from a shader invocation with a recursion depth greater than the value ofmaxPipelineRayRecursionDepthused to create the bound ray tracing pipeline -
VUID-vkCmdTraceRaysIndirectKHR-commandBuffer-03635
commandBuffermust not be a protected command buffer
-
VUID-vkCmdTraceRaysIndirectKHR-pRayGenShaderBindingTable-03681
pRayGenShaderBindingTable->deviceAddressmust be a device address allocated to the application from a buffer created with the VK_BUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHR usage flag set -
VUID-vkCmdTraceRaysIndirectKHR-pRayGenShaderBindingTable-03682
pRayGenShaderBindingTable->deviceAddressmust be a multiple ofVkPhysicalDeviceRayTracingPipelinePropertiesKHR::shaderGroupBaseAlignment -
VUID-vkCmdTraceRaysIndirectKHR-pMissShaderBindingTable-03684
pMissShaderBindingTable->deviceAddressmust be a device address allocated to the application from a buffer created with the VK_BUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHR usage flag set -
VUID-vkCmdTraceRaysIndirectKHR-pMissShaderBindingTable-03685
pMissShaderBindingTable->deviceAddressmust be a multiple ofVkPhysicalDeviceRayTracingPipelinePropertiesKHR::shaderGroupBaseAlignment -
VUID-vkCmdTraceRaysIndirectKHR-stride-03686
pMissShaderBindingTable->stridemust be a multiple ofVkPhysicalDeviceRayTracingPipelinePropertiesKHR::shaderGroupHandleAlignment -
VUID-vkCmdTraceRaysIndirectKHR-stride-04029
pMissShaderBindingTable->stridemust be less than or equal toVkPhysicalDeviceRayTracingPipelinePropertiesKHR::maxShaderGroupStride -
VUID-vkCmdTraceRaysIndirectKHR-pHitShaderBindingTable-03688
pHitShaderBindingTable->deviceAddressmust be a device address allocated to the application from a buffer created with the VK_BUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHR usage flag set -
VUID-vkCmdTraceRaysIndirectKHR-pHitShaderBindingTable-03689
pHitShaderBindingTable->deviceAddressmust be a multiple ofVkPhysicalDeviceRayTracingPipelinePropertiesKHR::shaderGroupBaseAlignment -
VUID-vkCmdTraceRaysIndirectKHR-stride-03690
pHitShaderBindingTable->stridemust be a multiple ofVkPhysicalDeviceRayTracingPipelinePropertiesKHR::shaderGroupHandleAlignment -
VUID-vkCmdTraceRaysIndirectKHR-stride-04035
pHitShaderBindingTable->stridemust be less than or equal toVkPhysicalDeviceRayTracingPipelinePropertiesKHR::maxShaderGroupStride -
VUID-vkCmdTraceRaysIndirectKHR-pCallableShaderBindingTable-03692
pCallableShaderBindingTable->deviceAddressmust be a device address allocated to the application from a buffer created with the VK_BUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHR usage flag set -
VUID-vkCmdTraceRaysIndirectKHR-pCallableShaderBindingTable-03693
pCallableShaderBindingTable->deviceAddressmust be a multiple ofVkPhysicalDeviceRayTracingPipelinePropertiesKHR::shaderGroupBaseAlignment -
VUID-vkCmdTraceRaysIndirectKHR-stride-03694
pCallableShaderBindingTable->stridemust be a multiple ofVkPhysicalDeviceRayTracingPipelinePropertiesKHR::shaderGroupHandleAlignment -
VUID-vkCmdTraceRaysIndirectKHR-stride-04041
pCallableShaderBindingTable->stridemust be less than or equal toVkPhysicalDeviceRayTracingPipelinePropertiesKHR::maxShaderGroupStride -
VUID-vkCmdTraceRaysIndirectKHR-flags-03511
If the bound ray tracing pipeline was created withflagsthat included VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHR, the entries in the table identified bypMissShaderBindingTable->deviceAddressaccessed as a result of this command in order to execute a miss shader must not be zero -
VUID-vkCmdTraceRaysIndirectKHR-flags-03512
If the bound ray tracing pipeline was created withflagsthat included VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR, entries in the table identified bypHitShaderBindingTable->deviceAddressaccessed as a result of this command in order to execute an any-hit shader must not be zero -
VUID-vkCmdTraceRaysIndirectKHR-flags-03513
If the bound ray tracing pipeline was created withflagsthat included VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR, entries in the table identified bypHitShaderBindingTable->deviceAddressaccessed as a result of this command in order to execute a closest hit shader must not be zero -
VUID-vkCmdTraceRaysIndirectKHR-flags-03514
If the bound ray tracing pipeline was created withflagsthat included VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR, entries in the table identified bypHitShaderBindingTable->deviceAddressaccessed as a result of this command in order to execute an intersection shader must not be zero -
VUID-vkCmdTraceRaysIndirectKHR-pHitShaderBindingTable-04735
Any non-zero hit shader group entries in the table identified bypHitShaderBindingTable->deviceAddressaccessed by this call from a geometry with ageometryTypeof VK_GEOMETRY_TYPE_TRIANGLES_KHR must have been created with VK_RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR -
VUID-vkCmdTraceRaysIndirectKHR-pHitShaderBindingTable-04736
Any non-zero hit shader group entries in the table identified bypHitShaderBindingTable->deviceAddressaccessed by this call from a geometry with ageometryTypeof VK_GEOMETRY_TYPE_AABBS_KHR must have been created with VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR
-
VUID-vkCmdTraceRaysIndirectKHR-indirectDeviceAddress-03633
indirectDeviceAddressmust be a device address allocated to the application from a buffer created with the VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT usage flag set -
VUID-vkCmdTraceRaysIndirectKHR-indirectDeviceAddress-03634
indirectDeviceAddressmust be a multiple of4 -
VUID-vkCmdTraceRaysIndirectKHR-indirectDeviceAddress-03636
All device addresses betweenindirectDeviceAddressandindirectDeviceAddress+sizeof(VkTraceRaysIndirectCommandKHR) - 1 must be in the buffer device address range of the same buffer -
VUID-vkCmdTraceRaysIndirectKHR-rayTracingPipelineTraceRaysIndirect-03637
TherayTracingPipelineTraceRaysIndirectfeature must be enabled -
VUID-vkCmdTraceRaysIndirectKHR-rayTracingMotionBlurPipelineTraceRaysIndirect-04951
If the bound ray tracing pipeline was created with VK_PIPELINE_CREATE_RAY_TRACING_ALLOW_MOTION_BIT_NVVkPhysicalDeviceRayTracingMotionBlurFeaturesNV::rayTracingMotionBlurPipelineTraceRaysIndirectfeature must be enabled
-
VUID-vkCmdTraceRaysIndirectKHR-commandBuffer-parameter
commandBuffermust be a valid VkCommandBuffer handle -
VUID-vkCmdTraceRaysIndirectKHR-pRaygenShaderBindingTable-parameter
pRaygenShaderBindingTablemust be a valid pointer to a valid VkStridedDeviceAddressRegionKHR structure -
VUID-vkCmdTraceRaysIndirectKHR-pMissShaderBindingTable-parameter
pMissShaderBindingTablemust be a valid pointer to a valid VkStridedDeviceAddressRegionKHR structure -
VUID-vkCmdTraceRaysIndirectKHR-pHitShaderBindingTable-parameter
pHitShaderBindingTablemust be a valid pointer to a valid VkStridedDeviceAddressRegionKHR structure -
VUID-vkCmdTraceRaysIndirectKHR-pCallableShaderBindingTable-parameter
pCallableShaderBindingTablemust be a valid pointer to a valid VkStridedDeviceAddressRegionKHR structure -
VUID-vkCmdTraceRaysIndirectKHR-indirectDeviceAddress-parameter
indirectDeviceAddressmust be a validVkDeviceAddressvalue -
VUID-vkCmdTraceRaysIndirectKHR-commandBuffer-recording
commandBuffermust be in the recording state -
VUID-vkCmdTraceRaysIndirectKHR-commandBuffer-cmdpool
TheVkCommandPoolthatcommandBufferwas allocated from must support VK_QUEUE_COMPUTE_BIT operations -
VUID-vkCmdTraceRaysIndirectKHR-renderpass
This command must only be called outside of a render pass instance -
VUID-vkCmdTraceRaysIndirectKHR-suspended
This command must not be called between suspended render pass instances -
VUID-vkCmdTraceRaysIndirectKHR-videocoding
This command must only be called outside of a video coding scope
-
Host access to
commandBuffermust be externally synchronized -
Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
| Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type |
|---|---|---|---|---|
Primary |
Outside |
Outside |
VK_QUEUE_COMPUTE_BIT |
Action |
vkCmdTraceRaysIndirectKHR is not affected by conditional rendering
The VkTraceRaysIndirectCommandKHR structure is defined as:
// Provided by VK_KHR_ray_tracing_pipeline
typedef struct VkTraceRaysIndirectCommandKHR {
uint32_t width;
uint32_t height;
uint32_t depth;
} VkTraceRaysIndirectCommandKHR;
-
widthis the width of the ray trace query dimensions. -
heightis height of the ray trace query dimensions. -
depthis depth of the ray trace query dimensions.
The members of VkTraceRaysIndirectCommandKHR have the same meaning as
the similarly named parameters of vkCmdTraceRaysKHR.
-
VUID-VkTraceRaysIndirectCommandKHR-width-03638
widthmust be less than or equal toVkPhysicalDeviceLimits::maxComputeWorkGroupCount[0] ×VkPhysicalDeviceLimits::maxComputeWorkGroupSize[0] -
VUID-VkTraceRaysIndirectCommandKHR-height-03639
heightmust be less than or equal toVkPhysicalDeviceLimits::maxComputeWorkGroupCount[1] ×VkPhysicalDeviceLimits::maxComputeWorkGroupSize[1] -
VUID-VkTraceRaysIndirectCommandKHR-depth-03640
depthmust be less than or equal toVkPhysicalDeviceLimits::maxComputeWorkGroupCount[2] ×VkPhysicalDeviceLimits::maxComputeWorkGroupSize[2] -
VUID-VkTraceRaysIndirectCommandKHR-width-03641
width×height×depthmust be less than or equal toVkPhysicalDeviceRayTracingPipelinePropertiesKHR::maxRayDispatchInvocationCount
To dispatch ray tracing, with some parameters sourced on the device, use:
// Provided by VK_KHR_ray_tracing_maintenance1 with VK_KHR_ray_tracing_pipeline
void vkCmdTraceRaysIndirect2KHR(
VkCommandBuffer commandBuffer,
VkDeviceAddress indirectDeviceAddress);
-
commandBufferis the command buffer into which the command will be recorded. -
indirectDeviceAddressis a buffer device address which is a pointer to a VkTraceRaysIndirectCommand2KHR structure containing the trace ray parameters.
vkCmdTraceRaysIndirect2KHR behaves similarly to
vkCmdTraceRaysIndirectKHR except that shader binding table parameters
as well as dispatch dimensions are read by the device from
indirectDeviceAddress during execution.
-
VUID-vkCmdTraceRaysIndirect2KHR-magFilter-04553
If a VkSampler created withmagFilterorminFilterequal to VK_FILTER_LINEAR,reductionModeequal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, andcompareEnableequal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT -
VUID-vkCmdTraceRaysIndirect2KHR-magFilter-09598
If a VkSampler created withmagFilterorminFilterequal to VK_FILTER_LINEAR andreductionModeequal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT -
VUID-vkCmdTraceRaysIndirect2KHR-mipmapMode-04770
If a VkSampler created withmipmapModeequal to VK_SAMPLER_MIPMAP_MODE_LINEAR,reductionModeequal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, andcompareEnableequal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT -
VUID-vkCmdTraceRaysIndirect2KHR-mipmapMode-09599
If a VkSampler created withmipmapModeequal to VK_SAMPLER_MIPMAP_MODE_LINEAR andreductionModeequal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT -
VUID-vkCmdTraceRaysIndirect2KHR-unnormalizedCoordinates-09635
If a VkSampler created withunnormalizedCoordinatesequal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’slevelCountandlayerCountmust be 1 -
VUID-vkCmdTraceRaysIndirect2KHR-None-08609
If a VkSampler created withunnormalizedCoordinatesequal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’sviewTypemust be VK_IMAGE_VIEW_TYPE_1D or VK_IMAGE_VIEW_TYPE_2D -
VUID-vkCmdTraceRaysIndirect2KHR-None-08610
If a VkSampler created withunnormalizedCoordinatesequal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-VOpImageSample*orOpImageSparseSample*instructions withImplicitLod,DreforProjin their name -
VUID-vkCmdTraceRaysIndirect2KHR-None-08611
If a VkSampler created withunnormalizedCoordinatesequal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-VOpImageSample*orOpImageSparseSample*instructions that includes a LOD bias or any offset values -
VUID-vkCmdTraceRaysIndirect2KHR-None-06479
If a VkImageView is sampled with depth comparison, the image view’s format features must contain VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT -
VUID-vkCmdTraceRaysIndirect2KHR-None-02691
If a VkImageView is accessed using atomic operations as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT -
VUID-vkCmdTraceRaysIndirect2KHR-None-07888
If a VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER descriptor is accessed using atomic operations as a result of this command, then the storage texel buffer’s format features must contain VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT -
VUID-vkCmdTraceRaysIndirect2KHR-None-02692
If a VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT -
VUID-vkCmdTraceRaysIndirect2KHR-None-02693
If the VK_EXT_filter_cubic extension is not enabled and any VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, it must not have a VkImageViewType of VK_IMAGE_VIEW_TYPE_3D, VK_IMAGE_VIEW_TYPE_CUBE, or VK_IMAGE_VIEW_TYPE_CUBE_ARRAY -
VUID-vkCmdTraceRaysIndirect2KHR-filterCubic-02694
Any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have a VkImageViewType and format that supports cubic filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::filterCubicreturned by vkGetPhysicalDeviceImageFormatProperties2 -
VUID-vkCmdTraceRaysIndirect2KHR-filterCubicMinmax-02695
Any VkImageView being sampled with VK_FILTER_CUBIC_EXT with a reduction mode of either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX as a result of this command must have a VkImageViewType and format that supports cubic filtering together with minmax filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::filterCubicMinmaxreturned by vkGetPhysicalDeviceImageFormatProperties2 -
VUID-vkCmdTraceRaysIndirect2KHR-cubicRangeClamp-09212
If thecubicRangeClampfeature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must not have a VkSamplerReductionModeCreateInfo::reductionModeequal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM -
VUID-vkCmdTraceRaysIndirect2KHR-reductionMode-09213
Any VkImageView being sampled with a VkSamplerReductionModeCreateInfo::reductionModeequal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM as a result of this command must sample with VK_FILTER_CUBIC_EXT -
VUID-vkCmdTraceRaysIndirect2KHR-selectableCubicWeights-09214
If theselectableCubicWeightsfeature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have VkSamplerCubicWeightsCreateInfoQCOM::cubicWeightsequal to VK_CUBIC_FILTER_WEIGHTS_CATMULL_ROM_QCOM -
VUID-vkCmdTraceRaysIndirect2KHR-flags-02696
Any VkImage created with a VkImageCreateInfo::flagscontaining VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV sampled as a result of this command must only be sampled using a VkSamplerAddressMode of VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE -
VUID-vkCmdTraceRaysIndirect2KHR-OpTypeImage-07027
For any VkImageView being written as a storage image where the image format field of theOpTypeImageisUnknown, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT -
VUID-vkCmdTraceRaysIndirect2KHR-OpTypeImage-07028
For any VkImageView being read as a storage image where the image format field of theOpTypeImageisUnknown, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT -
VUID-vkCmdTraceRaysIndirect2KHR-OpTypeImage-07029
For any VkBufferView being written as a storage texel buffer where the image format field of theOpTypeImageisUnknown, the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT -
VUID-vkCmdTraceRaysIndirect2KHR-OpTypeImage-07030
Any VkBufferView being read as a storage texel buffer where the image format field of theOpTypeImageisUnknownthen the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT -
VUID-vkCmdTraceRaysIndirect2KHR-None-08600
If a a bound shader was created as a VkShaderEXT without the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline without the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, and that shader statically uses a set n, a descriptor set must have been bound to n at the same pipeline bind point, with a VkPipelineLayout that is compatible for set n, with the VkPipelineLayout used to create the current VkPipeline or the VkDescriptorSetLayout array used to create the current VkShaderEXT , as described in Pipeline Layout Compatibility -
VUID-vkCmdTraceRaysIndirect2KHR-None-08601
If a a bound shader was created as a VkShaderEXT without the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline without the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, and that shader statically uses a push constant value, that value must have been set for the same pipeline bind point, with a VkPipelineLayout that is compatible for push constants with the VkPipelineLayout used to create the current VkPipeline or the VkDescriptorSetLayout array used to create the current VkShaderEXT -
VUID-vkCmdTraceRaysIndirect2KHR-None-10068
For each array of resources that is used by a bound shader, the indices used to access members of the array must be less than the descriptor count for the identified binding in the descriptor sets used by this command -
VUID-vkCmdTraceRaysIndirect2KHR-maintenance4-08602
If a a bound shader was created as a VkShaderEXT without the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline without the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, and that shader statically uses a push constant value, that value must have been set for the same pipeline bind point, with a VkPipelineLayout that is compatible for push constants with the VkPipelineLayout used to create the current VkPipeline or the VkDescriptorSetLayout and VkPushConstantRange arrays used to create the current VkShaderEXT -
VUID-vkCmdTraceRaysIndirect2KHR-None-08114
Descriptors in each bound descriptor set, specified via vkCmdBindDescriptorSets, must be valid if they are accessed as described by descriptor validity by the VkPipeline bound to the pipeline bind point used by this command and the bound VkPipeline was not created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT -
VUID-vkCmdTraceRaysIndirect2KHR-imageLayout-00344
If an image descriptor is accessed by a shader, the VkImageLayout must match the subresource accessible from the VkImageView as defined by the image layout matching rules -
VUID-vkCmdTraceRaysIndirect2KHR-None-08115
If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdBindDescriptorSets, the bound VkPipeline must have been created without VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT -
VUID-vkCmdTraceRaysIndirect2KHR-None-08116
Descriptors in bound descriptor buffers, specified via vkCmdSetDescriptorBufferOffsetsEXT, must be valid if they are dynamically used by the VkPipeline bound to the pipeline bind point used by this command and the bound VkPipeline was created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT -
VUID-vkCmdTraceRaysIndirect2KHR-None-08604
Descriptors in bound descriptor buffers, specified via vkCmdSetDescriptorBufferOffsetsEXT, must be valid if they are dynamically used by any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command -
VUID-vkCmdTraceRaysIndirect2KHR-None-08117
If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdSetDescriptorBufferOffsetsEXT, the bound VkPipeline must have been created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT -
VUID-vkCmdTraceRaysIndirect2KHR-None-08119
If a descriptor is dynamically used with a VkPipeline created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident -
VUID-vkCmdTraceRaysIndirect2KHR-None-08605
If a descriptor is dynamically used with a VkShaderEXT created with aVkDescriptorSetLayoutthat was created with VK_DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident -
VUID-vkCmdTraceRaysIndirect2KHR-None-08606
If theshaderObjectfeature is not enabled, a valid pipeline must be bound to the pipeline bind point used by this command -
VUID-vkCmdTraceRaysIndirect2KHR-None-08608
If a pipeline is bound to the pipeline bind point used by this command, there must not have been any calls to dynamic state setting commands for any state specified statically in the VkPipeline object bound to the pipeline bind point used by this command, since that pipeline was bound -
VUID-vkCmdTraceRaysIndirect2KHR-uniformBuffers-06935
If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 foruniformBuffers, and therobustBufferAccessfeature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point -
VUID-vkCmdTraceRaysIndirect2KHR-None-08612
If therobustBufferAccessfeature is not enabled, and any VkShaderEXT bound to a stage corresponding 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 -
VUID-vkCmdTraceRaysIndirect2KHR-storageBuffers-06936
If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 forstorageBuffers, and therobustBufferAccessfeature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point -
VUID-vkCmdTraceRaysIndirect2KHR-None-08613
If therobustBufferAccessfeature is not enabled, and any VkShaderEXT bound to a stage corresponding 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 -
VUID-vkCmdTraceRaysIndirect2KHR-commandBuffer-02707
IfcommandBufferis an unprotected command buffer andprotectedNoFaultis not supported, any resource accessed by bound shaders must not be a protected resource -
VUID-vkCmdTraceRaysIndirect2KHR-viewType-07752
If a VkImageView is accessed as a result of this command, then the image view’sviewTypemust match theDimoperand of theOpTypeImageas described in Compatibility Between SPIR-V Image Dimensions and Vulkan ImageView Types -
VUID-vkCmdTraceRaysIndirect2KHR-format-07753
If a VkImageView or VkBufferView is accessed as a result of this command, then the numeric type of the view’sformatand theSampledTypeoperand of theOpTypeImagemust match -
VUID-vkCmdTraceRaysIndirect2KHR-OpImageWrite-08795
If a VkImageView created with a format other than VK_FORMAT_A8_UNORM is 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 -
VUID-vkCmdTraceRaysIndirect2KHR-OpImageWrite-08796
If a VkImageView created with the format VK_FORMAT_A8_UNORM is accessed usingOpImageWriteas a result of this command, then theTypeof theTexeloperand of that instruction must have four components -
VUID-vkCmdTraceRaysIndirect2KHR-OpImageWrite-04469
If a VkBufferView is 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 -
VUID-vkCmdTraceRaysIndirect2KHR-SampledType-04470
If a VkImageView with a VkFormat that has a 64-bit component width is accessed as a result of this command, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 64 -
VUID-vkCmdTraceRaysIndirect2KHR-SampledType-04471
If a VkImageView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 32 -
VUID-vkCmdTraceRaysIndirect2KHR-SampledType-04472
If a VkBufferView with a VkFormat that has a 64-bit component width is accessed as a result of this command, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 64 -
VUID-vkCmdTraceRaysIndirect2KHR-SampledType-04473
If a VkBufferView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 32 -
VUID-vkCmdTraceRaysIndirect2KHR-sparseImageInt64Atomics-04474
If thesparseImageInt64Atomicsfeature is not enabled, VkImage objects created with the VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through anOpTypeImagewith aSampledTypewith aWidthof 64 by this command -
VUID-vkCmdTraceRaysIndirect2KHR-sparseImageInt64Atomics-04475
If thesparseImageInt64Atomicsfeature is not enabled, VkBuffer objects created with the VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through anOpTypeImagewith aSampledTypewith aWidthof 64 by this command -
VUID-vkCmdTraceRaysIndirect2KHR-OpImageSampleWeightedQCOM-06971
IfOpImageSampleWeightedQCOMis used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_SAMPLED_IMAGE_BIT_QCOM -
VUID-vkCmdTraceRaysIndirect2KHR-OpImageSampleWeightedQCOM-06972
IfOpImageSampleWeightedQCOMuses a VkImageView as a sample weight image as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_IMAGE_BIT_QCOM -
VUID-vkCmdTraceRaysIndirect2KHR-OpImageBoxFilterQCOM-06973
IfOpImageBoxFilterQCOMis used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BOX_FILTER_SAMPLED_BIT_QCOM -
VUID-vkCmdTraceRaysIndirect2KHR-OpImageBlockMatchSSDQCOM-06974
IfOpImageBlockMatchSSDQCOMis used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM -
VUID-vkCmdTraceRaysIndirect2KHR-OpImageBlockMatchSADQCOM-06975
IfOpImageBlockMatchSADQCOMis used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM -
VUID-vkCmdTraceRaysIndirect2KHR-OpImageBlockMatchSADQCOM-06976
IfOpImageBlockMatchSADQCOMor OpImageBlockMatchSSDQCOM is used to read from a reference image as result of this command, then the specified reference coordinates must not fail integer texel coordinate validation -
VUID-vkCmdTraceRaysIndirect2KHR-OpImageSampleWeightedQCOM-06977
IfOpImageSampleWeightedQCOM,OpImageBoxFilterQCOM,OpImageBlockMatchWindowSSDQCOM,OpImageBlockMatchWindowSADQCOM,OpImageBlockMatchGatherSSDQCOM,OpImageBlockMatchGatherSADQCOM,OpImageBlockMatchSSDQCOM, orOpImageBlockMatchSADQCOMuses a VkSampler as a result of this command, then the sampler must have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM -
VUID-vkCmdTraceRaysIndirect2KHR-OpImageSampleWeightedQCOM-06978
If any command other thanOpImageSampleWeightedQCOM,OpImageBoxFilterQCOM,OpImageBlockMatchWindowSSDQCOM,OpImageBlockMatchWindowSADQCOM,OpImageBlockMatchGatherSSDQCOM,OpImageBlockMatchGatherSADQCOM,OpImageBlockMatchSSDQCOM, orOpImageBlockMatchSADQCOMuses a VkSampler as a result of this command, then the sampler must not have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM -
VUID-vkCmdTraceRaysIndirect2KHR-OpImageBlockMatchWindow-09215
If aOpImageBlockMatchWindow*QCOMorOpImageBlockMatchGather*QCOMinstruction is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM -
VUID-vkCmdTraceRaysIndirect2KHR-OpImageBlockMatchWindow-09216
If aOpImageBlockMatchWindow*QCOMorOpImageBlockMatchGather*QCOMinstruction is used to read from an VkImageView as a result of this command, then the image view’s format must be a single-component format -
VUID-vkCmdTraceRaysIndirect2KHR-OpImageBlockMatchWindow-09217
If aOpImageBlockMatchWindow*QCOMorOpImageBlockMatchGather*QCOMread from a reference image as result of this command, then the specified reference coordinates must not fail integer texel coordinate validation -
VUID-vkCmdTraceRaysIndirect2KHR-None-07288
Any shader invocation executed by this command must terminate -
VUID-vkCmdTraceRaysIndirect2KHR-None-09600
If a descriptor with type equal to any of VK_DESCRIPTOR_TYPE_SAMPLE_WEIGHT_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_BLOCK_MATCH_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, or VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT is accessed as a result of this command, all image subresources identified by that descriptor must be in the image layout identified when the descriptor was written -
VUID-vkCmdTraceRaysIndirect2KHR-commandBuffer-10746
TheVkDeviceMemoryobject allocated from aVkMemoryHeapwith the VK_MEMORY_HEAP_TILE_MEMORY_BIT_QCOM property that is bound to a resource accessed as a result of this command must be the active bound bound tile memory object incommandBuffer -
VUID-vkCmdTraceRaysIndirect2KHR-None-10678
If this command is recorded inside a tile shading render pass instance, the stages corresponding to the pipeline bind point used by this command must only include VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_FRAGMENT_BIT, and/or VK_SHADER_STAGE_COMPUTE_BIT -
VUID-vkCmdTraceRaysIndirect2KHR-None-10679
If this command is recorded where per-tile execution model is enabled, there must be no access to any image while the image was be transitioned to the VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT layout -
VUID-vkCmdTraceRaysIndirect2KHR-pDescription-09900
If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the underlying VkTensorARM object must have been created with the VK_TENSOR_USAGE_SHADER_BIT_ARM usage flag set -
VUID-vkCmdTraceRaysIndirect2KHR-dimensionCount-09905
If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then theRankof theOpTypeTensorARMof the tensor resource variable must be equal to thedimensionCountprovided via VkTensorCreateInfoARM::pDescriptionwhen creating the underlying VkTensorARM object -
VUID-vkCmdTraceRaysIndirect2KHR-OpTypeTensorARM-09906
If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the element type of theOpTypeTensorARMof the tensor resource variable must be compatible with the VkFormat of the VkTensorViewARM used for the access -
VUID-vkCmdTraceRaysIndirect2KHR-None-11297
If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses aOpTypeStructdecorated withBlockorBufferBlockusing that mapping, the calculated offset for the resource heap must be a multiple ofbufferDescriptorAlignment -
VUID-vkCmdTraceRaysIndirect2KHR-None-11298
If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses anOpTypeImageorOpTypeSampledImageusing that mapping, the calculated offset for the resource heap must be a multiple ofimageDescriptorAlignment -
VUID-vkCmdTraceRaysIndirect2KHR-None-11299
If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses anOpTypeSamplerorOpTypeSampledImageusing that mapping, the calculated offset for the sampler heap must be a multiple ofsamplerDescriptorAlignment -
VUID-vkCmdTraceRaysIndirect2KHR-None-11397
If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses anOpTypeTensorARMusing that mapping, the calculated offset for the resource heap must be a multiple oftensorDescriptorAlignment -
VUID-vkCmdTraceRaysIndirect2KHR-None-11300
If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 4 -
VUID-vkCmdTraceRaysIndirect2KHR-None-11301
If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a validVkDeviceAddressbacked by physical memory at every offset specified by each mapping -
VUID-vkCmdTraceRaysIndirect2KHR-None-11302
If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a validVkDeviceAddress -
VUID-vkCmdTraceRaysIndirect2KHR-None-11304
If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 8 -
VUID-vkCmdTraceRaysIndirect2KHR-None-11305
If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a validVkDeviceAddressbacked by physical memory at every offset specified by each mapping -
VUID-vkCmdTraceRaysIndirect2KHR-None-11306
If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address pointed to by the address in push data must be a validVkDeviceAddress -
VUID-vkCmdTraceRaysIndirect2KHR-None-11308
For each descriptor heap that is statically used by a bound shader, either directly or via a descriptor mapping, a valid descriptor heap must be bound -
VUID-vkCmdTraceRaysIndirect2KHR-None-11309
If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, execution of this command must not result in any descriptor read accessing data outside of the user range of the respective heap bound byvkCmdBind*HeapEXTcommands -
VUID-vkCmdTraceRaysIndirect2KHR-None-11372
If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer or uniform texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 foruniformBuffers, therobustBufferAccess2feature is not enabled, and therobustBufferAccessfeature is not enabled, that stage must not access values outside of the range of the descriptor specified via VkDeviceAddressRangeEXT when the descriptor was written -
VUID-vkCmdTraceRaysIndirect2KHR-None-11373
If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer or storage texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 forstorageBuffers, therobustBufferAccess2feature is not enabled, and therobustBufferAccessfeature is not enabled, that stage must not access values outside of the range of the descriptor specified by VkDeviceAddressRangeEXT when the descriptor was written -
VUID-vkCmdTraceRaysIndirect2KHR-None-11374
If therobustBufferAccess2feature is not enabled, therobustBufferAccessfeature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, uniform texel buffer, storage buffer, or storage texel buffer, that shader must not access values outside of the range of the buffer as specified by VkDeviceAddressRangeEXT when the descriptor was written -
VUID-vkCmdTraceRaysIndirect2KHR-pBindInfo-11375
If any bound shader uses an embedded sampler via a descriptor mapping, the value ofpBindInfo->reservedRangeSizeset for vkCmdBindSamplerHeapEXT must be greater than or equal tominSamplerHeapReservedRangeWithEmbedded -
VUID-vkCmdTraceRaysIndirect2KHR-None-11376
If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, and that shader statically uses a push constant value, that value must have been set by vkCmdPushDataEXT -
VUID-vkCmdTraceRaysIndirect2KHR-None-11398
If a bound shader was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the access must not be out of bounds -
VUID-vkCmdTraceRaysIndirect2KHR-None-11437
If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the buffer from which the address in push data was queried must have been created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set -
VUID-vkCmdTraceRaysIndirect2KHR-None-11438
If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set -
VUID-vkCmdTraceRaysIndirect2KHR-None-11441
If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must be aligned tominUniformBufferOffsetAlignment -
VUID-vkCmdTraceRaysIndirect2KHR-None-11439
If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_STORAGE_BUFFER_BIT usage flag set -
VUID-vkCmdTraceRaysIndirect2KHR-None-11442
If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must be aligned tominStorageBufferOffsetAlignment -
VUID-vkCmdTraceRaysIndirect2KHR-None-11485
If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses an acceleration structure using that mapping, the address that the acceleration structure is mapped to must be an acceleration structure address retrieved from a VkAccelerationStructureKHR object via vkGetAccelerationStructureDeviceAddressKHR or handle retrieved from a VkAccelerationStructureNV object via vkGetAccelerationStructureHandleNV -
VUID-vkCmdTraceRaysIndirect2KHR-index-11450
If a shader uses a sampler descriptor to sample an image as a result of this command, and that sampler descriptor uses a custom border color with an index defined by VkSamplerCustomBorderColorIndexCreateInfoEXT, the value of VkSamplerCustomBorderColorIndexCreateInfoEXT::indexmust have been registered before this command was recorded, and still be registered during the sampling operation, with an identically defined color -
VUID-vkCmdTraceRaysIndirect2KHR-protectedNoFault-11455
IfprotectedNoFaultis not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, the address that the resource is mapped to must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set -
VUID-vkCmdTraceRaysIndirect2KHR-protectedNoFault-11456
IfprotectedNoFaultis not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, the address of the indirect memory must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set -
VUID-vkCmdTraceRaysIndirect2KHR-None-03429
Any shader group handle referenced by this call must have been queried from the bound ray tracing pipeline -
VUID-vkCmdTraceRaysIndirect2KHR-None-09458
If the bound ray tracing pipeline state was created with the VK_DYNAMIC_STATE_RAY_TRACING_PIPELINE_STACK_SIZE_KHR dynamic state enabled then vkCmdSetRayTracingPipelineStackSizeKHR must have been called in the current command buffer prior to this trace command -
VUID-vkCmdTraceRaysIndirect2KHR-None-11319
If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, the value of the address at the expected location in shader record data must be a valid address
-
VUID-vkCmdTraceRaysIndirect2KHR-maxPipelineRayRecursionDepth-03679
This command must not cause a shader call instruction to be executed from a shader invocation with a recursion depth greater than the value ofmaxPipelineRayRecursionDepthused to create the bound ray tracing pipeline -
VUID-vkCmdTraceRaysIndirect2KHR-commandBuffer-03635
commandBuffermust not be a protected command buffer
-
VUID-vkCmdTraceRaysIndirect2KHR-indirectDeviceAddress-03633
indirectDeviceAddressmust be a device address allocated to the application from a buffer created with the VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT usage flag set -
VUID-vkCmdTraceRaysIndirect2KHR-indirectDeviceAddress-03634
indirectDeviceAddressmust be a multiple of4 -
VUID-vkCmdTraceRaysIndirect2KHR-indirectDeviceAddress-03636
All device addresses betweenindirectDeviceAddressandindirectDeviceAddress+sizeof(VkTraceRaysIndirectCommand2KHR) - 1 must be in the buffer device address range of the same buffer -
VUID-vkCmdTraceRaysIndirect2KHR-rayTracingPipelineTraceRaysIndirect2-03637
TherayTracingPipelineTraceRaysIndirect2feature must be enabled -
VUID-vkCmdTraceRaysIndirect2KHR-rayTracingMotionBlurPipelineTraceRaysIndirect-04951
If the bound ray tracing pipeline was created with VK_PIPELINE_CREATE_RAY_TRACING_ALLOW_MOTION_BIT_NVVkPhysicalDeviceRayTracingMotionBlurFeaturesNV::rayTracingMotionBlurPipelineTraceRaysIndirectfeature must be enabled
-
VUID-vkCmdTraceRaysIndirect2KHR-commandBuffer-parameter
commandBuffermust be a valid VkCommandBuffer handle -
VUID-vkCmdTraceRaysIndirect2KHR-indirectDeviceAddress-parameter
indirectDeviceAddressmust be a validVkDeviceAddressvalue -
VUID-vkCmdTraceRaysIndirect2KHR-commandBuffer-recording
commandBuffermust be in the recording state -
VUID-vkCmdTraceRaysIndirect2KHR-commandBuffer-cmdpool
TheVkCommandPoolthatcommandBufferwas allocated from must support VK_QUEUE_COMPUTE_BIT operations -
VUID-vkCmdTraceRaysIndirect2KHR-renderpass
This command must only be called outside of a render pass instance -
VUID-vkCmdTraceRaysIndirect2KHR-suspended
This command must not be called between suspended render pass instances -
VUID-vkCmdTraceRaysIndirect2KHR-videocoding
This command must only be called outside of a video coding scope
-
Host access to
commandBuffermust be externally synchronized -
Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
| Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type |
|---|---|---|---|---|
Primary |
Outside |
Outside |
VK_QUEUE_COMPUTE_BIT |
Action |
vkCmdTraceRaysIndirect2KHR is not affected by conditional rendering
The VkTraceRaysIndirectCommand2KHR structure is defined as:
// Provided by VK_KHR_ray_tracing_maintenance1 with VK_KHR_ray_tracing_pipeline
typedef struct VkTraceRaysIndirectCommand2KHR {
VkDeviceAddress raygenShaderRecordAddress;
VkDeviceSize raygenShaderRecordSize;
VkDeviceAddress missShaderBindingTableAddress;
VkDeviceSize missShaderBindingTableSize;
VkDeviceSize missShaderBindingTableStride;
VkDeviceAddress hitShaderBindingTableAddress;
VkDeviceSize hitShaderBindingTableSize;
VkDeviceSize hitShaderBindingTableStride;
VkDeviceAddress callableShaderBindingTableAddress;
VkDeviceSize callableShaderBindingTableSize;
VkDeviceSize callableShaderBindingTableStride;
uint32_t width;
uint32_t height;
uint32_t depth;
} VkTraceRaysIndirectCommand2KHR;
-
raygenShaderRecordAddressis aVkDeviceAddressof the ray generation shader binding table record used by this command. -
raygenShaderRecordSizeis aVkDeviceSizenumber of bytes corresponding to the ray generation shader binding table record at base addressraygenShaderRecordAddress. -
missShaderBindingTableAddressis aVkDeviceAddressof the first record in the miss shader binding table used by this command. -
missShaderBindingTableSizeis aVkDeviceSizenumber of bytes corresponding to the total size of the miss shader binding table atmissShaderBindingTableAddressthat may be accessed by this command. -
missShaderBindingTableStrideis aVkDeviceSizenumber of bytes between records of the miss shader binding table. -
hitShaderBindingTableAddressis aVkDeviceAddressof the first record in the hit shader binding table used by this command. -
hitShaderBindingTableSizeis aVkDeviceSizenumber of bytes corresponding to the total size of the hit shader binding table athitShaderBindingTableAddressthat may be accessed by this command. -
hitShaderBindingTableStrideis aVkDeviceSizenumber of bytes between records of the hit shader binding table. -
callableShaderBindingTableAddressis aVkDeviceAddressof the first record in the callable shader binding table used by this command. -
callableShaderBindingTableSizeis aVkDeviceSizenumber of bytes corresponding to the total size of the callable shader binding table atcallableShaderBindingTableAddressthat may be accessed by this command. -
callableShaderBindingTableStrideis aVkDeviceSizenumber of bytes between records of the callable shader binding table. -
widthis the width of the ray trace query dimensions. -
heightis height of the ray trace query dimensions. -
depthis depth of the ray trace query dimensions.
The members of VkTraceRaysIndirectCommand2KHR have the same meaning as
the similarly named parameters of vkCmdTraceRaysKHR.
Indirect shader binding table buffer parameters must satisfy the same memory alignment and binding requirements as their counterparts in vkCmdTraceRaysIndirectKHR and vkCmdTraceRaysKHR.
-
VUID-VkTraceRaysIndirectCommand2KHR-pRayGenShaderBindingTable-03681
raygenShaderRecordAddressmust be a device address allocated to the application from a buffer created with the VK_BUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHR usage flag set -
VUID-VkTraceRaysIndirectCommand2KHR-pRayGenShaderBindingTable-03682
raygenShaderRecordAddressmust be a multiple ofVkPhysicalDeviceRayTracingPipelinePropertiesKHR::shaderGroupBaseAlignment -
VUID-VkTraceRaysIndirectCommand2KHR-pMissShaderBindingTable-03684
missShaderBindingTableAddressmust be a device address allocated to the application from a buffer created with the VK_BUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHR usage flag set -
VUID-VkTraceRaysIndirectCommand2KHR-pMissShaderBindingTable-03685
missShaderBindingTableAddressmust be a multiple ofVkPhysicalDeviceRayTracingPipelinePropertiesKHR::shaderGroupBaseAlignment -
VUID-VkTraceRaysIndirectCommand2KHR-stride-03686
missShaderBindingTableStridemust be a multiple ofVkPhysicalDeviceRayTracingPipelinePropertiesKHR::shaderGroupHandleAlignment -
VUID-VkTraceRaysIndirectCommand2KHR-stride-04029
missShaderBindingTableStridemust be less than or equal toVkPhysicalDeviceRayTracingPipelinePropertiesKHR::maxShaderGroupStride -
VUID-VkTraceRaysIndirectCommand2KHR-pHitShaderBindingTable-03688
hitShaderBindingTableAddressmust be a device address allocated to the application from a buffer created with the VK_BUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHR usage flag set -
VUID-VkTraceRaysIndirectCommand2KHR-pHitShaderBindingTable-03689
hitShaderBindingTableAddressmust be a multiple ofVkPhysicalDeviceRayTracingPipelinePropertiesKHR::shaderGroupBaseAlignment -
VUID-VkTraceRaysIndirectCommand2KHR-stride-03690
hitShaderBindingTableStridemust be a multiple ofVkPhysicalDeviceRayTracingPipelinePropertiesKHR::shaderGroupHandleAlignment -
VUID-VkTraceRaysIndirectCommand2KHR-stride-04035
hitShaderBindingTableStridemust be less than or equal toVkPhysicalDeviceRayTracingPipelinePropertiesKHR::maxShaderGroupStride -
VUID-VkTraceRaysIndirectCommand2KHR-pCallableShaderBindingTable-03692
callableShaderBindingTableAddressmust be a device address allocated to the application from a buffer created with the VK_BUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHR usage flag set -
VUID-VkTraceRaysIndirectCommand2KHR-pCallableShaderBindingTable-03693
callableShaderBindingTableAddressmust be a multiple ofVkPhysicalDeviceRayTracingPipelinePropertiesKHR::shaderGroupBaseAlignment -
VUID-VkTraceRaysIndirectCommand2KHR-stride-03694
callableShaderBindingTableStridemust be a multiple ofVkPhysicalDeviceRayTracingPipelinePropertiesKHR::shaderGroupHandleAlignment -
VUID-VkTraceRaysIndirectCommand2KHR-stride-04041
callableShaderBindingTableStridemust be less than or equal toVkPhysicalDeviceRayTracingPipelinePropertiesKHR::maxShaderGroupStride -
VUID-VkTraceRaysIndirectCommand2KHR-flags-03511
If the bound ray tracing pipeline was created withflagsthat included VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHR, the entries in the table identified bymissShaderBindingTableAddressaccessed as a result of this command in order to execute a miss shader must not be zero -
VUID-VkTraceRaysIndirectCommand2KHR-flags-03512
If the bound ray tracing pipeline was created withflagsthat included VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR, entries in the table identified byhitShaderBindingTableAddressaccessed as a result of this command in order to execute an any-hit shader must not be zero -
VUID-VkTraceRaysIndirectCommand2KHR-flags-03513
If the bound ray tracing pipeline was created withflagsthat included VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR, entries in the table identified byhitShaderBindingTableAddressaccessed as a result of this command in order to execute a closest hit shader must not be zero -
VUID-VkTraceRaysIndirectCommand2KHR-flags-03514
If the bound ray tracing pipeline was created withflagsthat included VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR, entries in the table identified byhitShaderBindingTableAddressaccessed as a result of this command in order to execute an intersection shader must not be zero -
VUID-VkTraceRaysIndirectCommand2KHR-pHitShaderBindingTable-04735
Any non-zero hit shader group entries in the table identified byhitShaderBindingTableAddressaccessed by this call from a geometry with ageometryTypeof VK_GEOMETRY_TYPE_TRIANGLES_KHR must have been created with VK_RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR -
VUID-VkTraceRaysIndirectCommand2KHR-pHitShaderBindingTable-04736
Any non-zero hit shader group entries in the table identified byhitShaderBindingTableAddressaccessed by this call from a geometry with ageometryTypeof VK_GEOMETRY_TYPE_AABBS_KHR must have been created with VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR
-
VUID-VkTraceRaysIndirectCommand2KHR-width-03638
widthmust be less than or equal toVkPhysicalDeviceLimits::maxComputeWorkGroupCount[0] ×VkPhysicalDeviceLimits::maxComputeWorkGroupSize[0] -
VUID-VkTraceRaysIndirectCommand2KHR-height-03639
heightmust be less than or equal toVkPhysicalDeviceLimits::maxComputeWorkGroupCount[1] ×VkPhysicalDeviceLimits::maxComputeWorkGroupSize[1] -
VUID-VkTraceRaysIndirectCommand2KHR-depth-03640
depthmust be less than or equal toVkPhysicalDeviceLimits::maxComputeWorkGroupCount[2] ×VkPhysicalDeviceLimits::maxComputeWorkGroupSize[2] -
VUID-VkTraceRaysIndirectCommand2KHR-width-03641
width×height×depthmust be less than or equal toVkPhysicalDeviceRayTracingPipelinePropertiesKHR::maxRayDispatchInvocationCount
-
VUID-VkTraceRaysIndirectCommand2KHR-raygenShaderRecordAddress-parameter
raygenShaderRecordAddressmust be a validVkDeviceAddressvalue -
VUID-VkTraceRaysIndirectCommand2KHR-missShaderBindingTableAddress-parameter
missShaderBindingTableAddressmust be a validVkDeviceAddressvalue -
VUID-VkTraceRaysIndirectCommand2KHR-hitShaderBindingTableAddress-parameter
hitShaderBindingTableAddressmust be a validVkDeviceAddressvalue -
VUID-VkTraceRaysIndirectCommand2KHR-callableShaderBindingTableAddress-parameter
callableShaderBindingTableAddressmust be a validVkDeviceAddressvalue
To dispatch ray tracing for the VK_NV_ray_tracing extension use:
// Provided by VK_NV_ray_tracing
void vkCmdTraceRaysNV(
VkCommandBuffer commandBuffer,
VkBuffer raygenShaderBindingTableBuffer,
VkDeviceSize raygenShaderBindingOffset,
VkBuffer missShaderBindingTableBuffer,
VkDeviceSize missShaderBindingOffset,
VkDeviceSize missShaderBindingStride,
VkBuffer hitShaderBindingTableBuffer,
VkDeviceSize hitShaderBindingOffset,
VkDeviceSize hitShaderBindingStride,
VkBuffer callableShaderBindingTableBuffer,
VkDeviceSize callableShaderBindingOffset,
VkDeviceSize callableShaderBindingStride,
uint32_t width,
uint32_t height,
uint32_t depth);
-
commandBufferis the command buffer into which the command will be recorded. -
raygenShaderBindingTableBufferis the buffer object that holds the shader binding table data for the ray generation shader stage. -
raygenShaderBindingOffsetis the offset in bytes (relative toraygenShaderBindingTableBuffer) of the ray generation shader being used for the trace. -
missShaderBindingTableBufferis the buffer object that holds the shader binding table data for the miss shader stage. -
missShaderBindingOffsetis the offset in bytes (relative tomissShaderBindingTableBuffer) of the miss shader being used for the trace. -
missShaderBindingStrideis the size in bytes of each shader binding table record inmissShaderBindingTableBuffer. -
hitShaderBindingTableBufferis the buffer object that holds the shader binding table data for the hit shader stages. -
hitShaderBindingOffsetis the offset in bytes (relative tohitShaderBindingTableBuffer) of the hit shader group being used for the trace. -
hitShaderBindingStrideis the size in bytes of each shader binding table record inhitShaderBindingTableBuffer. -
callableShaderBindingTableBufferis the buffer object that holds the shader binding table data for the callable shader stage. -
callableShaderBindingOffsetis the offset in bytes (relative tocallableShaderBindingTableBuffer) of the callable shader being used for the trace. -
callableShaderBindingStrideis the size in bytes of each shader binding table record incallableShaderBindingTableBuffer. -
widthis the width of the ray trace query dimensions. -
heightis height of the ray trace query dimensions. -
depthis depth of the ray trace query dimensions.
When the command is executed, a ray generation group of width
× height × depth rays is assembled.
-
VUID-vkCmdTraceRaysNV-magFilter-04553
If a VkSampler created withmagFilterorminFilterequal to VK_FILTER_LINEAR,reductionModeequal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, andcompareEnableequal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT -
VUID-vkCmdTraceRaysNV-magFilter-09598
If a VkSampler created withmagFilterorminFilterequal to VK_FILTER_LINEAR andreductionModeequal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT -
VUID-vkCmdTraceRaysNV-mipmapMode-04770
If a VkSampler created withmipmapModeequal to VK_SAMPLER_MIPMAP_MODE_LINEAR,reductionModeequal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, andcompareEnableequal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT -
VUID-vkCmdTraceRaysNV-mipmapMode-09599
If a VkSampler created withmipmapModeequal to VK_SAMPLER_MIPMAP_MODE_LINEAR andreductionModeequal to either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX is used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT -
VUID-vkCmdTraceRaysNV-unnormalizedCoordinates-09635
If a VkSampler created withunnormalizedCoordinatesequal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’slevelCountandlayerCountmust be 1 -
VUID-vkCmdTraceRaysNV-None-08609
If a VkSampler created withunnormalizedCoordinatesequal to VK_TRUE is used to sample a VkImageView as a result of this command, then the image view’sviewTypemust be VK_IMAGE_VIEW_TYPE_1D or VK_IMAGE_VIEW_TYPE_2D -
VUID-vkCmdTraceRaysNV-None-08610
If a VkSampler created withunnormalizedCoordinatesequal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-VOpImageSample*orOpImageSparseSample*instructions withImplicitLod,DreforProjin their name -
VUID-vkCmdTraceRaysNV-None-08611
If a VkSampler created withunnormalizedCoordinatesequal to VK_TRUE is used to sample a VkImageView as a result of this command, then the sampler must not be used with any of the SPIR-VOpImageSample*orOpImageSparseSample*instructions that includes a LOD bias or any offset values -
VUID-vkCmdTraceRaysNV-None-06479
If a VkImageView is sampled with depth comparison, the image view’s format features must contain VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT -
VUID-vkCmdTraceRaysNV-None-02691
If a VkImageView is accessed using atomic operations as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT -
VUID-vkCmdTraceRaysNV-None-07888
If a VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER descriptor is accessed using atomic operations as a result of this command, then the storage texel buffer’s format features must contain VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT -
VUID-vkCmdTraceRaysNV-None-02692
If a VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT -
VUID-vkCmdTraceRaysNV-None-02693
If the VK_EXT_filter_cubic extension is not enabled and any VkImageView is sampled with VK_FILTER_CUBIC_EXT as a result of this command, it must not have a VkImageViewType of VK_IMAGE_VIEW_TYPE_3D, VK_IMAGE_VIEW_TYPE_CUBE, or VK_IMAGE_VIEW_TYPE_CUBE_ARRAY -
VUID-vkCmdTraceRaysNV-filterCubic-02694
Any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have a VkImageViewType and format that supports cubic filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::filterCubicreturned by vkGetPhysicalDeviceImageFormatProperties2 -
VUID-vkCmdTraceRaysNV-filterCubicMinmax-02695
Any VkImageView being sampled with VK_FILTER_CUBIC_EXT with a reduction mode of either VK_SAMPLER_REDUCTION_MODE_MIN or VK_SAMPLER_REDUCTION_MODE_MAX as a result of this command must have a VkImageViewType and format that supports cubic filtering together with minmax filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::filterCubicMinmaxreturned by vkGetPhysicalDeviceImageFormatProperties2 -
VUID-vkCmdTraceRaysNV-cubicRangeClamp-09212
If thecubicRangeClampfeature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must not have a VkSamplerReductionModeCreateInfo::reductionModeequal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM -
VUID-vkCmdTraceRaysNV-reductionMode-09213
Any VkImageView being sampled with a VkSamplerReductionModeCreateInfo::reductionModeequal to VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM as a result of this command must sample with VK_FILTER_CUBIC_EXT -
VUID-vkCmdTraceRaysNV-selectableCubicWeights-09214
If theselectableCubicWeightsfeature is not enabled, then any VkImageView being sampled with VK_FILTER_CUBIC_EXT as a result of this command must have VkSamplerCubicWeightsCreateInfoQCOM::cubicWeightsequal to VK_CUBIC_FILTER_WEIGHTS_CATMULL_ROM_QCOM -
VUID-vkCmdTraceRaysNV-flags-02696
Any VkImage created with a VkImageCreateInfo::flagscontaining VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV sampled as a result of this command must only be sampled using a VkSamplerAddressMode of VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE -
VUID-vkCmdTraceRaysNV-OpTypeImage-07027
For any VkImageView being written as a storage image where the image format field of theOpTypeImageisUnknown, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT -
VUID-vkCmdTraceRaysNV-OpTypeImage-07028
For any VkImageView being read as a storage image where the image format field of theOpTypeImageisUnknown, the view’s format features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT -
VUID-vkCmdTraceRaysNV-OpTypeImage-07029
For any VkBufferView being written as a storage texel buffer where the image format field of theOpTypeImageisUnknown, the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT -
VUID-vkCmdTraceRaysNV-OpTypeImage-07030
Any VkBufferView being read as a storage texel buffer where the image format field of theOpTypeImageisUnknownthen the view’s buffer features must contain VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT -
VUID-vkCmdTraceRaysNV-None-08600
If a a bound shader was created as a VkShaderEXT without the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline without the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, and that shader statically uses a set n, a descriptor set must have been bound to n at the same pipeline bind point, with a VkPipelineLayout that is compatible for set n, with the VkPipelineLayout used to create the current VkPipeline or the VkDescriptorSetLayout array used to create the current VkShaderEXT , as described in Pipeline Layout Compatibility -
VUID-vkCmdTraceRaysNV-None-08601
If a a bound shader was created as a VkShaderEXT without the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline without the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, and that shader statically uses a push constant value, that value must have been set for the same pipeline bind point, with a VkPipelineLayout that is compatible for push constants with the VkPipelineLayout used to create the current VkPipeline or the VkDescriptorSetLayout array used to create the current VkShaderEXT -
VUID-vkCmdTraceRaysNV-None-10068
For each array of resources that is used by a bound shader, the indices used to access members of the array must be less than the descriptor count for the identified binding in the descriptor sets used by this command -
VUID-vkCmdTraceRaysNV-maintenance4-08602
If a a bound shader was created as a VkShaderEXT without the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline without the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, and that shader statically uses a push constant value, that value must have been set for the same pipeline bind point, with a VkPipelineLayout that is compatible for push constants with the VkPipelineLayout used to create the current VkPipeline or the VkDescriptorSetLayout and VkPushConstantRange arrays used to create the current VkShaderEXT -
VUID-vkCmdTraceRaysNV-None-08114
Descriptors in each bound descriptor set, specified via vkCmdBindDescriptorSets, must be valid if they are accessed as described by descriptor validity by the VkPipeline bound to the pipeline bind point used by this command and the bound VkPipeline was not created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT -
VUID-vkCmdTraceRaysNV-imageLayout-00344
If an image descriptor is accessed by a shader, the VkImageLayout must match the subresource accessible from the VkImageView as defined by the image layout matching rules -
VUID-vkCmdTraceRaysNV-None-08115
If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdBindDescriptorSets, the bound VkPipeline must have been created without VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT -
VUID-vkCmdTraceRaysNV-None-08116
Descriptors in bound descriptor buffers, specified via vkCmdSetDescriptorBufferOffsetsEXT, must be valid if they are dynamically used by the VkPipeline bound to the pipeline bind point used by this command and the bound VkPipeline was created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT -
VUID-vkCmdTraceRaysNV-None-08604
Descriptors in bound descriptor buffers, specified via vkCmdSetDescriptorBufferOffsetsEXT, must be valid if they are dynamically used by any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command -
VUID-vkCmdTraceRaysNV-None-08117
If the descriptors used by the VkPipeline bound to the pipeline bind point were specified via vkCmdSetDescriptorBufferOffsetsEXT, the bound VkPipeline must have been created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT -
VUID-vkCmdTraceRaysNV-None-08119
If a descriptor is dynamically used with a VkPipeline created with VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident -
VUID-vkCmdTraceRaysNV-None-08605
If a descriptor is dynamically used with a VkShaderEXT created with aVkDescriptorSetLayoutthat was created with VK_DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident -
VUID-vkCmdTraceRaysNV-None-08606
If theshaderObjectfeature is not enabled, a valid pipeline must be bound to the pipeline bind point used by this command -
VUID-vkCmdTraceRaysNV-None-08608
If a pipeline is bound to the pipeline bind point used by this command, there must not have been any calls to dynamic state setting commands for any state specified statically in the VkPipeline object bound to the pipeline bind point used by this command, since that pipeline was bound -
VUID-vkCmdTraceRaysNV-uniformBuffers-06935
If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 foruniformBuffers, and therobustBufferAccessfeature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point -
VUID-vkCmdTraceRaysNV-None-08612
If therobustBufferAccessfeature is not enabled, and any VkShaderEXT bound to a stage corresponding 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 -
VUID-vkCmdTraceRaysNV-storageBuffers-06936
If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer, and that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 forstorageBuffers, and therobustBufferAccessfeature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point -
VUID-vkCmdTraceRaysNV-None-08613
If therobustBufferAccessfeature is not enabled, and any VkShaderEXT bound to a stage corresponding 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 -
VUID-vkCmdTraceRaysNV-commandBuffer-02707
IfcommandBufferis an unprotected command buffer andprotectedNoFaultis not supported, any resource accessed by bound shaders must not be a protected resource -
VUID-vkCmdTraceRaysNV-viewType-07752
If a VkImageView is accessed as a result of this command, then the image view’sviewTypemust match theDimoperand of theOpTypeImageas described in Compatibility Between SPIR-V Image Dimensions and Vulkan ImageView Types -
VUID-vkCmdTraceRaysNV-format-07753
If a VkImageView or VkBufferView is accessed as a result of this command, then the numeric type of the view’sformatand theSampledTypeoperand of theOpTypeImagemust match -
VUID-vkCmdTraceRaysNV-OpImageWrite-08795
If a VkImageView created with a format other than VK_FORMAT_A8_UNORM is 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 -
VUID-vkCmdTraceRaysNV-OpImageWrite-08796
If a VkImageView created with the format VK_FORMAT_A8_UNORM is accessed usingOpImageWriteas a result of this command, then theTypeof theTexeloperand of that instruction must have four components -
VUID-vkCmdTraceRaysNV-OpImageWrite-04469
If a VkBufferView is 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 -
VUID-vkCmdTraceRaysNV-SampledType-04470
If a VkImageView with a VkFormat that has a 64-bit component width is accessed as a result of this command, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 64 -
VUID-vkCmdTraceRaysNV-SampledType-04471
If a VkImageView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 32 -
VUID-vkCmdTraceRaysNV-SampledType-04472
If a VkBufferView with a VkFormat that has a 64-bit component width is accessed as a result of this command, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 64 -
VUID-vkCmdTraceRaysNV-SampledType-04473
If a VkBufferView with a VkFormat that has a component width less than 64-bit is accessed as a result of this command, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 32 -
VUID-vkCmdTraceRaysNV-sparseImageInt64Atomics-04474
If thesparseImageInt64Atomicsfeature is not enabled, VkImage objects created with the VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through anOpTypeImagewith aSampledTypewith aWidthof 64 by this command -
VUID-vkCmdTraceRaysNV-sparseImageInt64Atomics-04475
If thesparseImageInt64Atomicsfeature is not enabled, VkBuffer objects created with the VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through anOpTypeImagewith aSampledTypewith aWidthof 64 by this command -
VUID-vkCmdTraceRaysNV-OpImageSampleWeightedQCOM-06971
IfOpImageSampleWeightedQCOMis used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_SAMPLED_IMAGE_BIT_QCOM -
VUID-vkCmdTraceRaysNV-OpImageSampleWeightedQCOM-06972
IfOpImageSampleWeightedQCOMuses a VkImageView as a sample weight image as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_WEIGHT_IMAGE_BIT_QCOM -
VUID-vkCmdTraceRaysNV-OpImageBoxFilterQCOM-06973
IfOpImageBoxFilterQCOMis used to sample a VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BOX_FILTER_SAMPLED_BIT_QCOM -
VUID-vkCmdTraceRaysNV-OpImageBlockMatchSSDQCOM-06974
IfOpImageBlockMatchSSDQCOMis used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM -
VUID-vkCmdTraceRaysNV-OpImageBlockMatchSADQCOM-06975
IfOpImageBlockMatchSADQCOMis used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM -
VUID-vkCmdTraceRaysNV-OpImageBlockMatchSADQCOM-06976
IfOpImageBlockMatchSADQCOMor OpImageBlockMatchSSDQCOM is used to read from a reference image as result of this command, then the specified reference coordinates must not fail integer texel coordinate validation -
VUID-vkCmdTraceRaysNV-OpImageSampleWeightedQCOM-06977
IfOpImageSampleWeightedQCOM,OpImageBoxFilterQCOM,OpImageBlockMatchWindowSSDQCOM,OpImageBlockMatchWindowSADQCOM,OpImageBlockMatchGatherSSDQCOM,OpImageBlockMatchGatherSADQCOM,OpImageBlockMatchSSDQCOM, orOpImageBlockMatchSADQCOMuses a VkSampler as a result of this command, then the sampler must have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM -
VUID-vkCmdTraceRaysNV-OpImageSampleWeightedQCOM-06978
If any command other thanOpImageSampleWeightedQCOM,OpImageBoxFilterQCOM,OpImageBlockMatchWindowSSDQCOM,OpImageBlockMatchWindowSADQCOM,OpImageBlockMatchGatherSSDQCOM,OpImageBlockMatchGatherSADQCOM,OpImageBlockMatchSSDQCOM, orOpImageBlockMatchSADQCOMuses a VkSampler as a result of this command, then the sampler must not have been created with VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM -
VUID-vkCmdTraceRaysNV-OpImageBlockMatchWindow-09215
If aOpImageBlockMatchWindow*QCOMorOpImageBlockMatchGather*QCOMinstruction is used to read from an VkImageView as a result of this command, then the image view’s format features must contain VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM -
VUID-vkCmdTraceRaysNV-OpImageBlockMatchWindow-09216
If aOpImageBlockMatchWindow*QCOMorOpImageBlockMatchGather*QCOMinstruction is used to read from an VkImageView as a result of this command, then the image view’s format must be a single-component format -
VUID-vkCmdTraceRaysNV-OpImageBlockMatchWindow-09217
If aOpImageBlockMatchWindow*QCOMorOpImageBlockMatchGather*QCOMread from a reference image as result of this command, then the specified reference coordinates must not fail integer texel coordinate validation -
VUID-vkCmdTraceRaysNV-None-07288
Any shader invocation executed by this command must terminate -
VUID-vkCmdTraceRaysNV-None-09600
If a descriptor with type equal to any of VK_DESCRIPTOR_TYPE_SAMPLE_WEIGHT_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_BLOCK_MATCH_IMAGE_QCOM, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, or VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT is accessed as a result of this command, all image subresources identified by that descriptor must be in the image layout identified when the descriptor was written -
VUID-vkCmdTraceRaysNV-commandBuffer-10746
TheVkDeviceMemoryobject allocated from aVkMemoryHeapwith the VK_MEMORY_HEAP_TILE_MEMORY_BIT_QCOM property that is bound to a resource accessed as a result of this command must be the active bound bound tile memory object incommandBuffer -
VUID-vkCmdTraceRaysNV-None-10678
If this command is recorded inside a tile shading render pass instance, the stages corresponding to the pipeline bind point used by this command must only include VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_FRAGMENT_BIT, and/or VK_SHADER_STAGE_COMPUTE_BIT -
VUID-vkCmdTraceRaysNV-None-10679
If this command is recorded where per-tile execution model is enabled, there must be no access to any image while the image was be transitioned to the VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT layout -
VUID-vkCmdTraceRaysNV-pDescription-09900
If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the underlying VkTensorARM object must have been created with the VK_TENSOR_USAGE_SHADER_BIT_ARM usage flag set -
VUID-vkCmdTraceRaysNV-dimensionCount-09905
If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then theRankof theOpTypeTensorARMof the tensor resource variable must be equal to thedimensionCountprovided via VkTensorCreateInfoARM::pDescriptionwhen creating the underlying VkTensorARM object -
VUID-vkCmdTraceRaysNV-OpTypeTensorARM-09906
If a VK_DESCRIPTOR_TYPE_TENSOR_ARM descriptor is accessed as a result of this command, then the element type of theOpTypeTensorARMof the tensor resource variable must be compatible with the VkFormat of the VkTensorViewARM used for the access -
VUID-vkCmdTraceRaysNV-None-11297
If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses aOpTypeStructdecorated withBlockorBufferBlockusing that mapping, the calculated offset for the resource heap must be a multiple ofbufferDescriptorAlignment -
VUID-vkCmdTraceRaysNV-None-11298
If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses anOpTypeImageorOpTypeSampledImageusing that mapping, the calculated offset for the resource heap must be a multiple ofimageDescriptorAlignment -
VUID-vkCmdTraceRaysNV-None-11299
If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses anOpTypeSamplerorOpTypeSampledImageusing that mapping, the calculated offset for the sampler heap must be a multiple ofsamplerDescriptorAlignment -
VUID-vkCmdTraceRaysNV-None-11397
If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses anOpTypeTensorARMusing that mapping, the calculated offset for the resource heap must be a multiple oftensorDescriptorAlignment -
VUID-vkCmdTraceRaysNV-None-11300
If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 4 -
VUID-vkCmdTraceRaysNV-None-11301
If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a validVkDeviceAddressbacked by physical memory at every offset specified by each mapping -
VUID-vkCmdTraceRaysNV-None-11302
If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a validVkDeviceAddress -
VUID-vkCmdTraceRaysNV-None-11304
If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 8 -
VUID-vkCmdTraceRaysNV-None-11305
If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a validVkDeviceAddressbacked by physical memory at every offset specified by each mapping -
VUID-vkCmdTraceRaysNV-None-11306
If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address pointed to by the address in push data must be a validVkDeviceAddress -
VUID-vkCmdTraceRaysNV-None-11308
For each descriptor heap that is statically used by a bound shader, either directly or via a descriptor mapping, a valid descriptor heap must be bound -
VUID-vkCmdTraceRaysNV-None-11309
If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, execution of this command must not result in any descriptor read accessing data outside of the user range of the respective heap bound byvkCmdBind*HeapEXTcommands -
VUID-vkCmdTraceRaysNV-None-11372
If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a uniform buffer or uniform texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 foruniformBuffers, therobustBufferAccess2feature is not enabled, and therobustBufferAccessfeature is not enabled, that stage must not access values outside of the range of the descriptor specified via VkDeviceAddressRangeEXT when the descriptor was written -
VUID-vkCmdTraceRaysNV-None-11373
If any stage of the VkPipeline object bound to the pipeline bind point used by this command accesses a storage buffer or storage texel buffer through a descriptor in the bound resource heap, that stage was created without enabling either VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS or VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 forstorageBuffers, therobustBufferAccess2feature is not enabled, and therobustBufferAccessfeature is not enabled, that stage must not access values outside of the range of the descriptor specified by VkDeviceAddressRangeEXT when the descriptor was written -
VUID-vkCmdTraceRaysNV-None-11374
If therobustBufferAccess2feature is not enabled, therobustBufferAccessfeature is not enabled, and any VkShaderEXT bound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, uniform texel buffer, storage buffer, or storage texel buffer, that shader must not access values outside of the range of the buffer as specified by VkDeviceAddressRangeEXT when the descriptor was written -
VUID-vkCmdTraceRaysNV-pBindInfo-11375
If any bound shader uses an embedded sampler via a descriptor mapping, the value ofpBindInfo->reservedRangeSizeset for vkCmdBindSamplerHeapEXT must be greater than or equal tominSamplerHeapReservedRangeWithEmbedded -
VUID-vkCmdTraceRaysNV-None-11376
If a bound shader was created as a VkShaderEXT with the VK_SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT flag or as part of a pipeline with the VK_PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT flag, and that shader statically uses a push constant value, that value must have been set by vkCmdPushDataEXT -
VUID-vkCmdTraceRaysNV-None-11398
If a bound shader was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_DATA_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the access must not be out of bounds -
VUID-vkCmdTraceRaysNV-None-11437
If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the buffer from which the address in push data was queried must have been created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set -
VUID-vkCmdTraceRaysNV-None-11438
If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT usage flag set -
VUID-vkCmdTraceRaysNV-None-11441
If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must be aligned tominUniformBufferOffsetAlignment -
VUID-vkCmdTraceRaysNV-None-11439
If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must have been queried from a buffer created with the VK_BUFFER_USAGE_STORAGE_BUFFER_BIT usage flag set -
VUID-vkCmdTraceRaysNV-None-11442
If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must be aligned tominStorageBufferOffsetAlignment -
VUID-vkCmdTraceRaysNV-None-11485
If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses an acceleration structure using that mapping, the address that the acceleration structure is mapped to must be an acceleration structure address retrieved from a VkAccelerationStructureKHR object via vkGetAccelerationStructureDeviceAddressKHR or handle retrieved from a VkAccelerationStructureNV object via vkGetAccelerationStructureHandleNV -
VUID-vkCmdTraceRaysNV-index-11450
If a shader uses a sampler descriptor to sample an image as a result of this command, and that sampler descriptor uses a custom border color with an index defined by VkSamplerCustomBorderColorIndexCreateInfoEXT, the value of VkSamplerCustomBorderColorIndexCreateInfoEXT::indexmust have been registered before this command was recorded, and still be registered during the sampling operation, with an identically defined color -
VUID-vkCmdTraceRaysNV-protectedNoFault-11455
IfprotectedNoFaultis not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, or VK_DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, the address that the resource is mapped to must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set -
VUID-vkCmdTraceRaysNV-protectedNoFault-11456
IfprotectedNoFaultis not supported, a pipeline is bound to the pipeline bind point used by this command, or a shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT or VK_DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, the address of the indirect memory must have been queried from a buffer created without the VK_BUFFER_CREATE_PROTECTED_BIT create flag set -
VUID-vkCmdTraceRaysNV-None-03429
Any shader group handle referenced by this call must have been queried from the bound ray tracing pipeline -
VUID-vkCmdTraceRaysNV-None-09458
If the bound ray tracing pipeline state was created with the VK_DYNAMIC_STATE_RAY_TRACING_PIPELINE_STACK_SIZE_KHR dynamic state enabled then vkCmdSetRayTracingPipelineStackSizeKHR must have been called in the current command buffer prior to this trace command -
VUID-vkCmdTraceRaysNV-None-11319
If a pipeline is bound to the pipeline bind point used by this command, or shader is bound to a shader stage used by this command, and it was created with a descriptor mapping using VK_DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, the value of the address at the expected location in shader record data must be a valid address -
VUID-vkCmdTraceRaysNV-commandBuffer-04624
commandBuffermust not be a protected command buffer -
VUID-vkCmdTraceRaysNV-maxRecursionDepth-03625
This command must not cause a pipeline trace ray instruction to be executed from a shader invocation with a recursion depth greater than the value ofmaxRecursionDepthused to create the bound ray tracing pipeline -
VUID-vkCmdTraceRaysNV-raygenShaderBindingTableBuffer-04042
IfraygenShaderBindingTableBufferis non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemoryobject -
VUID-vkCmdTraceRaysNV-raygenShaderBindingOffset-02455
raygenShaderBindingOffsetmust be less than the size ofraygenShaderBindingTableBuffer -
VUID-vkCmdTraceRaysNV-raygenShaderBindingOffset-02456
raygenShaderBindingOffsetmust be a multiple ofVkPhysicalDeviceRayTracingPropertiesNV::shaderGroupBaseAlignment -
VUID-vkCmdTraceRaysNV-missShaderBindingTableBuffer-04043
IfmissShaderBindingTableBufferis non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemoryobject -
VUID-vkCmdTraceRaysNV-missShaderBindingOffset-02457
missShaderBindingOffsetmust be less than the size ofmissShaderBindingTableBuffer -
VUID-vkCmdTraceRaysNV-missShaderBindingOffset-02458
missShaderBindingOffsetmust be a multiple ofVkPhysicalDeviceRayTracingPropertiesNV::shaderGroupBaseAlignment -
VUID-vkCmdTraceRaysNV-hitShaderBindingTableBuffer-04044
IfhitShaderBindingTableBufferis non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemoryobject -
VUID-vkCmdTraceRaysNV-hitShaderBindingOffset-02459
hitShaderBindingOffsetmust be less than the size ofhitShaderBindingTableBuffer -
VUID-vkCmdTraceRaysNV-hitShaderBindingOffset-02460
hitShaderBindingOffsetmust be a multiple ofVkPhysicalDeviceRayTracingPropertiesNV::shaderGroupBaseAlignment -
VUID-vkCmdTraceRaysNV-callableShaderBindingTableBuffer-04045
IfcallableShaderBindingTableBufferis non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemoryobject -
VUID-vkCmdTraceRaysNV-callableShaderBindingOffset-02461
callableShaderBindingOffsetmust be less than the size ofcallableShaderBindingTableBuffer -
VUID-vkCmdTraceRaysNV-callableShaderBindingOffset-02462
callableShaderBindingOffsetmust be a multiple ofVkPhysicalDeviceRayTracingPropertiesNV::shaderGroupBaseAlignment -
VUID-vkCmdTraceRaysNV-missShaderBindingStride-02463
missShaderBindingStridemust be a multiple ofVkPhysicalDeviceRayTracingPropertiesNV::shaderGroupHandleSize -
VUID-vkCmdTraceRaysNV-hitShaderBindingStride-02464
hitShaderBindingStridemust be a multiple ofVkPhysicalDeviceRayTracingPropertiesNV::shaderGroupHandleSize -
VUID-vkCmdTraceRaysNV-callableShaderBindingStride-02465
callableShaderBindingStridemust be a multiple ofVkPhysicalDeviceRayTracingPropertiesNV::shaderGroupHandleSize -
VUID-vkCmdTraceRaysNV-missShaderBindingStride-02466
missShaderBindingStridemust be less than or equal toVkPhysicalDeviceRayTracingPropertiesNV::maxShaderGroupStride -
VUID-vkCmdTraceRaysNV-hitShaderBindingStride-02467
hitShaderBindingStridemust be less than or equal toVkPhysicalDeviceRayTracingPropertiesNV::maxShaderGroupStride -
VUID-vkCmdTraceRaysNV-callableShaderBindingStride-02468
callableShaderBindingStridemust be less than or equal toVkPhysicalDeviceRayTracingPropertiesNV::maxShaderGroupStride -
VUID-vkCmdTraceRaysNV-width-02469
widthmust be less than or equal toVkPhysicalDeviceLimits::maxComputeWorkGroupCount[0] -
VUID-vkCmdTraceRaysNV-height-02470
heightmust be less than or equal toVkPhysicalDeviceLimits::maxComputeWorkGroupCount[1] -
VUID-vkCmdTraceRaysNV-depth-02471
depthmust be less than or equal toVkPhysicalDeviceLimits::maxComputeWorkGroupCount[2] -
VUID-vkCmdTraceRaysNV-allowClusterAccelerationStructure-10577
If the traced geometry contains a cluster acceleration structure, then VkRayTracingPipelineClusterAccelerationStructureCreateInfoNV::allowClusterAccelerationStructuremust have been set for that pipeline
-
VUID-vkCmdTraceRaysNV-commandBuffer-parameter
commandBuffermust be a valid VkCommandBuffer handle -
VUID-vkCmdTraceRaysNV-raygenShaderBindingTableBuffer-parameter
raygenShaderBindingTableBuffermust be a valid VkBuffer handle -
VUID-vkCmdTraceRaysNV-missShaderBindingTableBuffer-parameter
IfmissShaderBindingTableBufferis not VK_NULL_HANDLE,missShaderBindingTableBuffermust be a valid VkBuffer handle -
VUID-vkCmdTraceRaysNV-hitShaderBindingTableBuffer-parameter
IfhitShaderBindingTableBufferis not VK_NULL_HANDLE,hitShaderBindingTableBuffermust be a valid VkBuffer handle -
VUID-vkCmdTraceRaysNV-callableShaderBindingTableBuffer-parameter
IfcallableShaderBindingTableBufferis not VK_NULL_HANDLE,callableShaderBindingTableBuffermust be a valid VkBuffer handle -
VUID-vkCmdTraceRaysNV-commandBuffer-recording
commandBuffermust be in the recording state -
VUID-vkCmdTraceRaysNV-commandBuffer-cmdpool
TheVkCommandPoolthatcommandBufferwas allocated from must support VK_QUEUE_COMPUTE_BIT operations -
VUID-vkCmdTraceRaysNV-renderpass
This command must only be called outside of a render pass instance -
VUID-vkCmdTraceRaysNV-suspended
This command must not be called between suspended render pass instances -
VUID-vkCmdTraceRaysNV-videocoding
This command must only be called outside of a video coding scope -
VUID-vkCmdTraceRaysNV-commonparent
Each ofcallableShaderBindingTableBuffer,commandBuffer,hitShaderBindingTableBuffer,missShaderBindingTableBuffer, andraygenShaderBindingTableBufferthat are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same VkDevice
-
Host access to
commandBuffermust be externally synchronized -
Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
| Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type |
|---|---|---|---|---|
Primary |
Outside |
Outside |
VK_QUEUE_COMPUTE_BIT |
Action |
vkCmdTraceRaysNV is not affected by conditional rendering
Shader Binding Table
A shader binding table is a resource which establishes the relationship between the ray tracing pipeline and the acceleration structures that were built for the ray tracing pipeline. It indicates the shaders that operate on each geometry in an acceleration structure. In addition, it contains the resources accessed by each shader, including indices of textures, buffer device addresses, and constants. The application allocates and manages shader binding tables as VkBuffer objects.
Each entry in the shader binding table consists of
shaderGroupHandleSize bytes of data, either as queried by
vkGetRayTracingShaderGroupHandlesKHR to refer to those specified
shaders, or all zeros to refer to a zero shader group.
A zero shader group behaves as though it is a shader group consisting
entirely of VK_SHADER_UNUSED_KHR.
The remainder of the data specified by the stride is application-visible
data that can be referenced by a ShaderRecordBufferKHR block in the
shader.
The shader binding tables to use in a ray tracing pipeline are passed to the vkCmdTraceRaysNV , vkCmdTraceRaysKHR, or vkCmdTraceRaysIndirectKHR commands. Shader binding tables are read-only in shaders that are executing on the ray tracing pipeline.
Shader variables identified with the ShaderRecordBufferKHR storage
class are used to access the provided shader binding table.
Such variables must be:
-
typed as
OpTypeStruct, or an array of this type, -
identified with a
Blockdecoration, and -
laid out explicitly using the
Offset,ArrayStride, andMatrixStridedecorations as specified in Offset and Stride Assignment.
The Offset decoration for any member of a Block-decorated variable
in the ShaderRecordBufferKHR storage class must not cause the space
required for that variable to extend outside the range [0,
maxStorageBufferRange).
Accesses to the shader binding table from ray tracing pipelines must be synchronized with the VK_PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_KHR pipeline stage and an access type of VK_ACCESS_SHADER_READ_BIT.
|
Because different shader record buffers can be associated with the same
shader, a shader variable with |
Indexing Rules
In order to execute the correct shaders and access the correct resources during a ray tracing dispatch, the implementation must be able to locate shader binding table entries at various stages of execution. This is accomplished by defining a set of indexing rules that compute shader binding table record positions relative to the buffer’s base address in memory. The application must organize the contents of the shader binding table’s memory in a way that application of the indexing rules will lead to correct records.
Ray Generation Shaders
Only one ray generation shader is executed per ray tracing dispatch.
For vkCmdTraceRaysKHR, the location of the ray generation shader is
specified by the pRaygenShaderBindingTable->deviceAddress parameter — there is no indexing.
All data accessed must be less than pRaygenShaderBindingTable->size
bytes from deviceAddress.
pRaygenShaderBindingTable->stride is unused, and must be equal to
pRaygenShaderBindingTable->size.
For vkCmdTraceRaysNV, the location of the ray generation shader is
specified by the raygenShaderBindingTableBuffer and
raygenShaderBindingOffset parameters — there is no indexing.
Hit Shaders
The base for the computation of intersection, any-hit, and closest hit
shader locations is the instanceShaderBindingTableRecordOffset value
stored with each instance of a top-level acceleration structure
(VkAccelerationStructureInstanceKHR).
This value determines the beginning of the shader binding table records for
a given instance.
In the following rule, geometryIndex refers to the
geometry index of the intersected
geometry within the instance.
The sbtRecordOffset and sbtRecordStride values are passed in as
parameters to
traceNV()
or
traceRayEXT()
calls made in the shaders.
See Section 8.19 (Ray Tracing Functions) of the OpenGL Shading Language
Specification for more details.
In SPIR-V, these correspond to the SBTOffset and SBTStride
parameters to the pipeline trace ray
instructions.
The result of this computation is then added to
pHitShaderBindingTable->deviceAddress, a device address passed to
vkCmdTraceRaysKHR
, or
hitShaderBindingOffset, a base offset passed to vkCmdTraceRaysNV
.
For vkCmdTraceRaysKHR, the complete rule to compute a hit shader
binding table record address in the pHitShaderBindingTable is:
-
pHitShaderBindingTable->deviceAddress+pHitShaderBindingTable->stride× (instanceShaderBindingTableRecordOffset+geometryIndex×sbtRecordStride+sbtRecordOffset)
All data accessed must be less than pHitShaderBindingTable->size
bytes from the base address.
For vkCmdTraceRaysNV, the offset and stride come from direct
parameters, so the full rule to compute a hit shader binding table record
address in the hitShaderBindingTableBuffer is:
-
hitShaderBindingOffset+hitShaderBindingStride× (instanceShaderBindingTableRecordOffset+geometryIndex×sbtRecordStride+sbtRecordOffset)
Miss Shaders
A miss shader is executed whenever a ray query fails to find an intersection for the given scene geometry. Multiple miss shaders may be executed throughout a ray tracing dispatch.
The base for the computation of miss shader locations is
pMissShaderBindingTable->deviceAddress, a device address passed into
vkCmdTraceRaysKHR
, or
missShaderBindingOffset, a base offset passed into
vkCmdTraceRaysNV
.
The missIndex value is passed in as a parameter to
traceNV()
or
traceRayEXT()
calls made in the shaders.
See Section 8.19 (Ray Tracing Functions) of the OpenGL Shading Language
Specification for more details.
In SPIR-V, this corresponds to the MissIndex parameter to the
pipeline trace ray instructions.
For vkCmdTraceRaysKHR, the complete rule to compute a miss shader
binding table record address in the pMissShaderBindingTable is:
-
pMissShaderBindingTable->deviceAddress+pMissShaderBindingTable->stride×missIndex
All data accessed must be less than pMissShaderBindingTable->size
bytes from the base address.
For vkCmdTraceRaysNV, the offset and stride come from direct
parameters, so the full rule to compute a miss shader binding table record
address in the missShaderBindingTableBuffer is:
-
missShaderBindingOffset+missShaderBindingStride×missIndex
Callable Shaders
A callable shader is executed when requested by a ray tracing shader. Multiple callable shaders may be executed throughout a ray tracing dispatch.
The base for the computation of callable shader locations is
pCallableShaderBindingTable->deviceAddress, a device address passed
into vkCmdTraceRaysKHR
, or
callableShaderBindingOffset, a base offset passed into
vkCmdTraceRaysNV
.
The sbtRecordIndex value is passed in as a parameter to
executeCallableNV()
or
executeCallableEXT()
calls made in the shaders.
See Section 8.19 (Ray Tracing Functions) of the OpenGL Shading Language
Specification for more details.
In SPIR-V, this corresponds to the SBTIndex parameter to the
OpExecuteCallableNV
or
OpExecuteCallableKHR
instruction.
For vkCmdTraceRaysKHR, the complete rule to compute a callable shader
binding table record address in the pCallableShaderBindingTable is:
-
pCallableShaderBindingTable->deviceAddress+pCallableShaderBindingTable->stride×sbtRecordIndex
All data accessed must be less than pCallableShaderBindingTable->size
bytes from the base address.
For vkCmdTraceRaysNV, the offset and stride come from direct
parameters, so the full rule to compute a callable shader binding table
record address in the callableShaderBindingTableBuffer is:
-
callableShaderBindingOffset+callableShaderBindingStride×sbtRecordIndex
Ray Tracing Pipeline Stack
Ray tracing pipelines have a potentially large set of shaders which may be invoked in various call chain combinations to perform ray tracing. To store parameters for a given shader execution, an implementation may use a stack of data in memory. This stack must be sized to the sum of the stack sizes of all shaders in any call chain executed by the application.
If the stack size is not set explicitly, the stack size for a pipeline is:
-
rayGenStackMax + min(1,
maxPipelineRayRecursionDepth) × max(closestHitStackMax, missStackMax, intersectionStackMax + anyHitStackMax) + max(0,maxPipelineRayRecursionDepth-1) × max(closestHitStackMax, missStackMax) + 2 × callableStackMax
where rayGenStackMax, closestHitStackMax, missStackMax, anyHitStackMax, intersectionStackMax, and callableStackMax are the maximum stack values queried by the respective shader stages for any shaders in any shader groups defined by the pipeline.
This stack size is potentially significant, so an application may want to provide a more accurate stack size after pipeline compilation. The value that the application provides is the maximum value of the sum of all shaders in a call chain across all possible call chains, taking into account any application specific knowledge about the properties of the call chains.
|
For example, if an application has two types of closest hit and miss shaders that it can use but the first level of rays will only use the first kind (possibly reflection) and the second level will only use the second kind (occlusion or shadow ray, for example) then the application can compute the stack size by something similar to:
This is guaranteed to be no larger than the default stack size computation which assumes that both call levels may be the larger of the two. |
Ray Tracing Capture Replay
In a similar way to
bufferDeviceAddressCaptureReplay,
the rayTracingPipelineShaderGroupHandleCaptureReplay feature allows the
querying of opaque data which can be used in a future replay.
During the capture phase, capture/replay tools are expected to query opaque data for shader group handle replay using vkGetRayTracingCaptureReplayShaderGroupHandlesKHR.
Providing the opaque data during replay, using
VkRayTracingShaderGroupCreateInfoKHR::pShaderGroupCaptureReplayHandle
at pipeline creation time, causes the implementation to generate identical
shader group handles to those in the capture phase, allowing capture/replay
tools to reuse previously recorded shader binding table buffer contents or
to obtain the same handles by calling
vkGetRayTracingCaptureReplayShaderGroupHandlesKHR again.
Ray Tracing Validation
Ray tracing validation can help root cause application issues and improve performance. Unlike existing validation layers, ray tracing validation performs checks at an implementation level, which helps identify potential problems that may not be caught by the layer.
By enabling the ray tracing validation feature, warnings and errors can be delivered straight from a ray tracing implementation to the application through a messenger callback registered with the implementation, where they can be processed through existing application-side debugging or logging systems.