1// Copyright 2019-2023 The Khronos Group Inc. 2// 3// SPDX-License-Identifier: CC-BY-4.0 4 5// Common Valid Usage 6// Common to KHR trace rays SBT commands/structures 7 8 * [[VUID-{refpage}-pRayGenShaderBindingTable-03680]] 9 If the buffer from which {rayGenShaderBindingTableAddress} was queried 10 is non-sparse then it must: be bound completely and contiguously to a 11 single sname:VkDeviceMemory object 12 * [[VUID-{refpage}-pRayGenShaderBindingTable-03681]] 13 The buffer from which the {rayGenShaderBindingTableAddress} is queried 14 must: have been created with the 15 ename:VK_BUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHR usage flag 16 * [[VUID-{refpage}-pRayGenShaderBindingTable-03682]] 17 {rayGenShaderBindingTableAddress} must: be a multiple of 18 sname:VkPhysicalDeviceRayTracingPipelinePropertiesKHR::pname:shaderGroupBaseAlignment 19 * [[VUID-{refpage}-pMissShaderBindingTable-03683]] 20 If the buffer from which {missShaderBindingTableAddress} was queried is 21 non-sparse then it must: be bound completely and contiguously to a 22 single sname:VkDeviceMemory object 23 * [[VUID-{refpage}-pMissShaderBindingTable-03684]] 24 The buffer from which the {missShaderBindingTableAddress} is queried 25 must: have been created with the 26 ename:VK_BUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHR usage flag 27 * [[VUID-{refpage}-pMissShaderBindingTable-03685]] 28 {missShaderBindingTableAddress} must: be a multiple of 29 sname:VkPhysicalDeviceRayTracingPipelinePropertiesKHR::pname:shaderGroupBaseAlignment 30 * [[VUID-{refpage}-stride-03686]] 31 {missShaderBindingTableStride} must: be a multiple of 32 sname:VkPhysicalDeviceRayTracingPipelinePropertiesKHR::pname:shaderGroupHandleAlignment 33 * [[VUID-{refpage}-stride-04029]] 34 {missShaderBindingTableStride} must: be less than or equal to 35 sname:VkPhysicalDeviceRayTracingPipelinePropertiesKHR::pname:maxShaderGroupStride 36 * [[VUID-{refpage}-pHitShaderBindingTable-03687]] 37 If the buffer from which {hitShaderBindingTableAddress} was queried is 38 non-sparse then it must: be bound completely and contiguously to a 39 single sname:VkDeviceMemory object 40 * [[VUID-{refpage}-pHitShaderBindingTable-03688]] 41 The buffer from which the {hitShaderBindingTableAddress} is queried 42 must: have been created with the 43 ename:VK_BUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHR usage flag 44 * [[VUID-{refpage}-pHitShaderBindingTable-03689]] 45 {hitShaderBindingTableAddress} must: be a multiple of 46 sname:VkPhysicalDeviceRayTracingPipelinePropertiesKHR::pname:shaderGroupBaseAlignment 47 * [[VUID-{refpage}-stride-03690]] 48 {hitShaderBindingTableStride} must: be a multiple of 49 sname:VkPhysicalDeviceRayTracingPipelinePropertiesKHR::pname:shaderGroupHandleAlignment 50 * [[VUID-{refpage}-stride-04035]] 51 {hitShaderBindingTableStride} must: be less than or equal to 52 sname:VkPhysicalDeviceRayTracingPipelinePropertiesKHR::pname:maxShaderGroupStride 53 * [[VUID-{refpage}-pCallableShaderBindingTable-03691]] 54 If the buffer from which {callableShaderBindingTableAddress} was queried 55 is non-sparse then it must: be bound completely and contiguously to a 56 single sname:VkDeviceMemory object 57 * [[VUID-{refpage}-pCallableShaderBindingTable-03692]] 58 The buffer from which the {callableShaderBindingTableAddress} is queried 59 must: have been created with the 60 ename:VK_BUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHR usage flag 61 * [[VUID-{refpage}-pCallableShaderBindingTable-03693]] 62 {callableShaderBindingTableAddress} must: be a multiple of 63 sname:VkPhysicalDeviceRayTracingPipelinePropertiesKHR::pname:shaderGroupBaseAlignment 64 * [[VUID-{refpage}-stride-03694]] 65 {callableShaderBindingTableStride} must: be a multiple of 66 sname:VkPhysicalDeviceRayTracingPipelinePropertiesKHR::pname:shaderGroupHandleAlignment 67 * [[VUID-{refpage}-stride-04041]] 68 {callableShaderBindingTableStride} must: be less than or equal to 69 sname:VkPhysicalDeviceRayTracingPipelinePropertiesKHR::pname:maxShaderGroupStride 70 * [[VUID-{refpage}-flags-03696]] 71 If the currently bound ray tracing pipeline was created with pname:flags 72 that included 73 ename:VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR, 74 {hitShaderBindingTableAddress} must: not be zero 75 * [[VUID-{refpage}-flags-03697]] 76 If the currently bound ray tracing pipeline was created with pname:flags 77 that included 78 ename:VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR, 79 {hitShaderBindingTableAddress} must: not be zero 80 * [[VUID-{refpage}-flags-03511]] 81 If the currently bound ray tracing pipeline was created with pname:flags 82 that included 83 ename:VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHR, the 84 shader group handle identified by {missShaderBindingTableAddress} must: 85 not be set to zero 86 * [[VUID-{refpage}-flags-03512]] 87 If the currently bound ray tracing pipeline was created with pname:flags 88 that included 89 ename:VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR, 90 entries in the table identified by {hitShaderBindingTableAddress} 91 accessed as a result of this command in order to execute an any-hit 92 shader must: not be set to zero 93 * [[VUID-{refpage}-flags-03513]] 94 If the currently bound ray tracing pipeline was created with pname:flags 95 that included 96 ename:VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR, 97 entries in the table identified by {hitShaderBindingTableAddress} 98 accessed as a result of this command in order to execute a closest hit 99 shader must: not be set to zero 100 * [[VUID-{refpage}-flags-03514]] 101 If the currently bound ray tracing pipeline was created with pname:flags 102 that included 103 ename:VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR, 104 entries in the table identified by {hitShaderBindingTableAddress} 105 accessed as a result of this command in order to execute an intersection 106 shader must: not be set to zero 107 * [[VUID-{refpage}-pHitShaderBindingTable-04735]] 108 Any non-zero hit shader group entries in the table identified by 109 {hitShaderBindingTableAddress} accessed by this call from a geometry 110 with a pname:geometryType of ename:VK_GEOMETRY_TYPE_TRIANGLES_KHR must: 111 have been created with 112 ename:VK_RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR 113 * [[VUID-{refpage}-pHitShaderBindingTable-04736]] 114 Any non-zero hit shader group entries in the table identified by 115 {hitShaderBindingTableAddress} accessed by this call from a geometry 116 with a pname:geometryType of ename:VK_GEOMETRY_TYPE_AABBS_KHR must: have 117 been created with 118 ename:VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR 119 120// Common Valid Usage 121