radv: Raytracing implementation plan
This is a copy of Bas Nieuwenhuizen's implementation plan. I figured it would be a good idea to move it here to track the progress in a more public place.
Plan is that small, prioritizing correctness and then building up in features & performance.
-
Milestone 0: Simple rays tested using a self-written Vulkan test - This ensures we have the basic API bits together, should be enough to pass a first CTS test
-
Demo -
Deferred operations (!8545 (merged)) Non trivial implementation
-
CPU BVH build (https://gitlab.freedesktop.org/bnieuwenhuizen/mesa/-/tree/rt-accel-struct) -
Compilation of ray pipelines - Feedback: can use callables too to avoid BVH dependence
-
Running ray pipelines
-
Milestone 1: Quake RTX - This will give our first benchmark
- Another demo may be substituted if Quake RTX has some unforeseen difficulty
-
GPU BVH build -
Debugging
-
Milestone 2A: Better BVH build -
Port to GLSL (!17028 (merged)) -
LBVH for fast builds (!15648 (merged)) - See BVH build roadmap
-
-
Milestone 2B: Pipeline libraries - This is where proper ACO/NIR callables come into play
- WIP: https://gitlab.freedesktop.org/daniel-schuermann/mesa/-/tree/radv_rt_functions
-
Milestone 2C: Optimize traversal - https://gitlab.freedesktop.org/bnieuwenhuizen/mesa/-/wikis/Raytracing
-
Efficient ray traversal itself (!15030 (closed), !14897 (closed), !16650 (merged), !17301 (merged), !17663 (merged), !16593 (merged))
-
Milestone 2D: Feature backfill -
Full BVH options -
BVH serialization (!12840 (merged)) -
Traversal bits (opaque vs non-opaque, ray mask etc.) -
Indirect tracing (!15712 (merged)) -
Indirect builds -
VK_KHR_ray_tracing_maintenance1 (!16430 (merged)) -
rayTracingMaintenance1 -
rayTracingPipelineTraceRaysIndirect2
-
-
-
Milestone 3A: (vkd3d-proton) bringup - At this stage we should be able to run stuff
-
Control -
CP2077 (!21406 (merged) ) -
Doom Eternal -
vkd3d-proton tests (!16027 (merged)) -
Portal RTX (!20243 (merged))
-
Milestone 3B: inline raytracing (!14565 (merged)) -
Write up some documentation
BVH build roadmap
-
Remove the traversal depth constraint -
BVH IR - 2-ary tree (Not sure what additional information we might want)
- Refitting so builders don't have to worry about node bounds?
- Common kernel for converting to the hardware format
-
Fix LBVH (Build using one dispatch, more optimal splits) -
Opacity micromaps (WIP: https://gitlab.freedesktop.org/KonstantinSeurer/mesa/-/tree/radv-ext-opacity-micromap)