// Copyright 2019-2024 The Khronos Group Inc. // // SPDX-License-Identifier: CC-BY-4.0 // Common Valid Usage // Common to KHR trace rays SBT commands/structures * [[VUID-{refpage}-pRayGenShaderBindingTable-03680]] If the buffer from which {rayGenShaderBindingTableAddress} was queried is non-sparse then it must: be bound completely and contiguously to a single sname:VkDeviceMemory object * [[VUID-{refpage}-pRayGenShaderBindingTable-03681]] The buffer from which the {rayGenShaderBindingTableAddress} is queried must: have been created with the ename:VK_BUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHR usage flag * [[VUID-{refpage}-pRayGenShaderBindingTable-03682]] {rayGenShaderBindingTableAddress} must: be a multiple of sname:VkPhysicalDeviceRayTracingPipelinePropertiesKHR::pname:shaderGroupBaseAlignment * [[VUID-{refpage}-pMissShaderBindingTable-03683]] If the buffer from which {missShaderBindingTableAddress} was queried is non-sparse then it must: be bound completely and contiguously to a single sname:VkDeviceMemory object * [[VUID-{refpage}-pMissShaderBindingTable-03684]] The buffer from which the {missShaderBindingTableAddress} is queried must: have been created with the ename:VK_BUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHR usage flag * [[VUID-{refpage}-pMissShaderBindingTable-03685]] {missShaderBindingTableAddress} must: be a multiple of sname:VkPhysicalDeviceRayTracingPipelinePropertiesKHR::pname:shaderGroupBaseAlignment * [[VUID-{refpage}-stride-03686]] {missShaderBindingTableStride} must: be a multiple of sname:VkPhysicalDeviceRayTracingPipelinePropertiesKHR::pname:shaderGroupHandleAlignment * [[VUID-{refpage}-stride-04029]] {missShaderBindingTableStride} must: be less than or equal to sname:VkPhysicalDeviceRayTracingPipelinePropertiesKHR::pname:maxShaderGroupStride * [[VUID-{refpage}-pHitShaderBindingTable-03687]] If the buffer from which {hitShaderBindingTableAddress} was queried is non-sparse then it must: be bound completely and contiguously to a single sname:VkDeviceMemory object * [[VUID-{refpage}-pHitShaderBindingTable-03688]] The buffer from which the {hitShaderBindingTableAddress} is queried must: have been created with the ename:VK_BUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHR usage flag * [[VUID-{refpage}-pHitShaderBindingTable-03689]] {hitShaderBindingTableAddress} must: be a multiple of sname:VkPhysicalDeviceRayTracingPipelinePropertiesKHR::pname:shaderGroupBaseAlignment * [[VUID-{refpage}-stride-03690]] {hitShaderBindingTableStride} must: be a multiple of sname:VkPhysicalDeviceRayTracingPipelinePropertiesKHR::pname:shaderGroupHandleAlignment * [[VUID-{refpage}-stride-04035]] {hitShaderBindingTableStride} must: be less than or equal to sname:VkPhysicalDeviceRayTracingPipelinePropertiesKHR::pname:maxShaderGroupStride * [[VUID-{refpage}-pCallableShaderBindingTable-03691]] If the buffer from which {callableShaderBindingTableAddress} was queried is non-sparse then it must: be bound completely and contiguously to a single sname:VkDeviceMemory object * [[VUID-{refpage}-pCallableShaderBindingTable-03692]] The buffer from which the {callableShaderBindingTableAddress} is queried must: have been created with the ename:VK_BUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHR usage flag * [[VUID-{refpage}-pCallableShaderBindingTable-03693]] {callableShaderBindingTableAddress} must: be a multiple of sname:VkPhysicalDeviceRayTracingPipelinePropertiesKHR::pname:shaderGroupBaseAlignment * [[VUID-{refpage}-stride-03694]] {callableShaderBindingTableStride} must: be a multiple of sname:VkPhysicalDeviceRayTracingPipelinePropertiesKHR::pname:shaderGroupHandleAlignment * [[VUID-{refpage}-stride-04041]] {callableShaderBindingTableStride} must: be less than or equal to sname:VkPhysicalDeviceRayTracingPipelinePropertiesKHR::pname:maxShaderGroupStride * [[VUID-{refpage}-flags-03696]] If the currently bound ray tracing pipeline was created with pname:flags that included ename:VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR, {hitShaderBindingTableAddress} must: not be zero * [[VUID-{refpage}-flags-03697]] If the currently bound ray tracing pipeline was created with pname:flags that included ename:VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR, {hitShaderBindingTableAddress} must: not be zero * [[VUID-{refpage}-flags-03511]] If the currently bound ray tracing pipeline was created with pname:flags that included ename:VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHR, the shader group handle identified by {missShaderBindingTableAddress} must: not be set to zero * [[VUID-{refpage}-flags-03512]] If the currently bound ray tracing pipeline was created with pname:flags that included ename:VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR, entries in the table identified by {hitShaderBindingTableAddress} accessed as a result of this command in order to execute an any-hit shader must: not be set to zero * [[VUID-{refpage}-flags-03513]] If the currently bound ray tracing pipeline was created with pname:flags that included ename:VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR, entries in the table identified by {hitShaderBindingTableAddress} accessed as a result of this command in order to execute a closest hit shader must: not be set to zero * [[VUID-{refpage}-flags-03514]] If the currently bound ray tracing pipeline was created with pname:flags that included ename:VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR, entries in the table identified by {hitShaderBindingTableAddress} accessed as a result of this command in order to execute an intersection shader must: not be set to zero * [[VUID-{refpage}-pHitShaderBindingTable-04735]] Any non-zero hit shader group entries in the table identified by {hitShaderBindingTableAddress} accessed by this call from a geometry with a pname:geometryType of ename:VK_GEOMETRY_TYPE_TRIANGLES_KHR must: have been created with ename:VK_RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR * [[VUID-{refpage}-pHitShaderBindingTable-04736]] Any non-zero hit shader group entries in the table identified by {hitShaderBindingTableAddress} accessed by this call from a geometry with a pname:geometryType of ename:VK_GEOMETRY_TYPE_AABBS_KHR must: have been created with ename:VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR // Common Valid Usage