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