You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add RayTracing pipeline kind, shader stages, and YAML schema (llvm#1270)
Depends on llvm#1245
## Summary
Foundational PR in the PSO-based raytracing bring-up series tracked in
llvm#1268. Stacks on top of llvm#1245 (which depends on llvm#1244, which depends on
llvm#1232) — only the top commit on this branch is new; the rest are the
inline-RT bring-up already in review.
Lays out the framework-side surface needed by the upcoming backend PRs:
- `ShaderPipelineKind::RayTracing` plus six new `Stages` —
`RayGeneration`, `Miss`, `ClosestHit`, `AnyHit`, `Intersection`,
`Callable` — with `isRayTracingStage` / `Pipeline::isRayTracing()`
helpers.
- YAML schema for an RT pipeline: `HitGroup` (Triangles | Procedural,
ClosestHit + optional AnyHit / Intersection), `RayTracingPipelineConfig`
(MaxTraceRecursionDepth, MaxPayloadSizeInBytes, MaxAttributeSizeInBytes,
optional PipelineFlags), and `ShaderBindingTable` (raygen / miss /
hit-group / callable records, each with optional reserved LocalRootData
bytes).
- `validatePipelineKind` allows duplicate RT stages (a pipeline can have
several miss / hit-group shaders, which the existing duplicate check
would have rejected), requires at least one RayGeneration, and rejects
mixing with Compute/Vertex/Mesh. The reverse check rejects HitGroups /
RTConfig / SBT on any non-RT pipeline. `validateDispatchParameters`
reinterprets `DispatchGroupCount` as `{Width, Height, Depth}` for the
upcoming DispatchRays and forbids VertexCount on RT.
- Existing `Stages` switches across the backends grow the six RT cases —
Vulkan maps each one to its `VK_SHADER_STAGE_*_KHR` bit ready for PR 2;
Metal unreachables on RT (`metal_irconverter` takes a different route);
raster pipeline `setShader` (Traditional + MeshShader variants) adds
them to the existing unreachable group.
- Each backend's `executeProgram` gets a terminal `else if
(P.isRayTracing())` that returns a "not yet supported on <backend>"
error so PR2/3/4 just have to replace it.
- `%dxc_target_lib` lit substitution (same compiler binary, separate
name for `-T lib_6_x` library targets); `raytracing-pipeline`
available-feature gated on DX `RaytracingTier >= 1.0` and the Vulkan
`VK_KHR_ray_tracing_pipeline` extension being reported by the device.
- Foundational `test/Feature/RT/raygen-roundtrip.test` exercising the
full schema (raygen+miss+CH, BLAS/TLAS, HitGroups, RTConfig, SBT). Gated
on `raytracing-pipeline` and `XFAIL: *` until each backend bring-up
lands.
## Test plan
Local on an NVIDIA RTX 3060:
- [x] Linux Vulkan (native `offloader`)
- [ ] Linux D3D12 (Wine + vkd3d-proton + cross-compiled `offloader.exe`)
- [ ] Windows Vulkan (native `offloader.exe`)
- [ ] Windows D3D12 (native `offloader.exe`)
CI (RT-capable runners):
- [ ] windows-nvidia D3D12 (`RaytracingTier 1.2`)
- [ ] windows-intel VK (`VK_KHR_ray_tracing_pipeline`)
- [x] macOS Metal (`supportsRaytracing`)
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: EmilioLaiso <emilio@traverseresearch.nl>
0 commit comments