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
Foundational bring-up for PSO-based raytracing tracked in
#1268. Lays out the
framework-side surface (stage enums, pipeline kind, YAML schema, lit
infrastructure) so subsequent per-backend bring-up PRs (VK → DX12 →
Metal) only have to fill in pipeline-state-object creation, SBT
construction, and DispatchRays. No backend can run an RT pipeline yet —
each one's executeProgram gains a terminal `else if (P.isRayTracing())`
that returns a "not yet supported" error.
Pipeline.h gets six new Stages (RayGeneration, Miss, ClosestHit, AnyHit,
Intersection, Callable), `ShaderPipelineKind::RayTracing`, an
`isRayTracingStage` predicate, and `Pipeline::isRayTracing()`. The
declarative YAML schema for an RT pipeline lives alongside the existing
AccelerationStructureDescs: a `HitGroup` (Triangles | Procedural, with
ClosestHit + optional AnyHit / Intersection entries), a
`RayTracingPipelineConfig` block (MaxTraceRecursionDepth,
MaxPayloadSizeInBytes, MaxAttributeSizeInBytes, optional PipelineFlags),
and a `ShaderBindingTable` block with raygen / miss / hit-group /
callable record arrays. SBTEntry carries an optional `LocalRootData`
byte array reserved for the upcoming local-root-signature work.
validatePipelineKind grows an RT branch: it allows multiple shaders of
the same RT stage (a pipeline can have several misses or hit groups —
the existing duplicate check would have rejected them), requires at
least one RayGeneration, and rejects mixing RT 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 eventual DispatchRays and forbids
VertexCount on RT.
Existing Stages switches grow the six new cases:
* VK: getShaderStageFlag maps each RT stage to its
VK_SHADER_STAGE_*_KHR bit so PR 2 can build
VkPipelineShaderStageCreateInfos for the RT pipeline.
* Metal: getShaderStage unreachables on RT (the metal-irconverter RT
path takes a different route from the IRShaderStage one).
* TraditionalRasterPipelineCreateDesc::setShader adds the RT stages to
its existing "not a raster stage" unreachable group.
test/lit.cfg.py adds a `%dxc_target_lib` substitution (same compiler,
distinct name to signal `-T lib_6_x` library targets at a glance) and a
`raytracing-pipeline` available-feature. On DX it tracks
RaytracingTier >= 1.0; on Vulkan it aliases off the
VK_KHR_ray_tracing_pipeline extension already reported by the device.
The extension isn't enabled on the VkDevice yet — that lands in PR 2 —
but the lit-level capability detection is independent of what the
backend currently consumes, so a developer on a VK box can already see
the foundational test routed through the RT path.
The foundational test `Feature/RT/raygen-roundtrip.test` exercises the
full RT YAML schema in one shape: raygen + miss + closest-hit shaders,
a BLAS/TLAS pair, a HitGroups list, RayTracingPipelineConfig, and a
ShaderBindingTable. `# REQUIRES: raytracing-pipeline` and `# XFAIL: *`
keep it expectedly failing until the per-backend PRs drop entries from
the XFAIL list as each one starts dispatching real rays.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments