radv: Add raytracing pipeline properties.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12592>
This commit is contained in:
Bas Nieuwenhuizen 2021-03-22 03:52:13 +01:00 committed by Marge Bot
parent 0f090a51b3
commit 8312b2232b
2 changed files with 28 additions and 0 deletions

View file

@ -90,4 +90,9 @@
/* Number of invocations in each subgroup. */
#define RADV_SUBGROUP_SIZE 64
/* The spec requires this to be 32. */
#define RADV_RT_HANDLE_SIZE 32
#define RADV_MAX_HIT_ATTRIB_SIZE 32
#endif /* RADV_CONSTANTS_H */

View file

@ -1718,6 +1718,16 @@ radv_GetPhysicalDeviceFeatures2(VkPhysicalDevice physicalDevice,
features->shaderIntegerDotProduct = true;
break;
}
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_FEATURES_KHR: {
VkPhysicalDeviceRayTracingPipelineFeaturesKHR *features =
(VkPhysicalDeviceRayTracingPipelineFeaturesKHR *)ext;
features->rayTracingPipeline = true;
features->rayTracingPipelineShaderGroupHandleCaptureReplay = false;
features->rayTracingPipelineShaderGroupHandleCaptureReplayMixed = false;
features->rayTracingPipelineTraceRaysIndirect = false;
features->rayTraversalPrimitiveCulling = false;
break;
}
default:
break;
}
@ -2469,6 +2479,19 @@ radv_GetPhysicalDeviceProperties2(VkPhysicalDevice physicalDevice,
props->integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated = false;
break;
}
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_PROPERTIES_KHR: {
VkPhysicalDeviceRayTracingPipelinePropertiesKHR *props =
(VkPhysicalDeviceRayTracingPipelinePropertiesKHR *)ext;
props->shaderGroupHandleSize = RADV_RT_HANDLE_SIZE;
props->maxRayRecursionDepth = 31; /* Minimum allowed for DXR. */
props->maxShaderGroupStride = 16384; /* dummy */
props->shaderGroupBaseAlignment = 16;
props->shaderGroupHandleCaptureReplaySize = 16;
props->maxRayDispatchInvocationCount = 1024 * 1024 * 64;
props->shaderGroupHandleAlignment = 16;
props->maxRayHitAttributeSize = RADV_MAX_HIT_ATTRIB_SIZE;
break;
}
default:
break;
}