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
Companion to the inline-RT epic in #1258. That issue is scoped to RayQuery / TraceRayInline inside a regular compute shader; the test framework already treats it as a Compute pipeline that happens to bind an acceleration structure. PSO-based raytracing is a different beast — it introduces an entirely new pipeline kind, new shader stages, a shader binding table, and the DispatchRays command. The framework has none of that today, so this issue tracks both the bring-up work and the shader-visible test surface that becomes unlockable as bring-up progresses.
Reuses the AS YAML / abstraction layers from the inline-RT bring-up (#1214, #1232, #1245), so this work starts above that line.
Legend:
Not started
In progress 🏗️
In review 👀
Finished (merged in main)
👍 testable on top of the bring-up below
🏗️ requires additional framework work first
Bring-up PRs (foundation for everything below)
Add ShaderPipelineKind::RayTracing, six new RT Stages, HitGroups / RayTracingPipelineConfig / ShaderBindingTable YAML schema, %dxc_target_lib substitution, the raytracing-pipeline lit feature, and a foundational XFAIL: * smoke test 👀
Metal backend: route through metal_irconverter for DXIL→AIR — it lowers DispatchRays into a compute dispatch backed by MTLVisibleFunctionTable / MTLIntersectionFunctionTable standing in for hit-groups, miss shaders, and callables. The backend work covers emitting the converter-expected compute dispatch and building those function tables. 👀 ([Metal] Add ray tracing pipeline, SBT, and DispatchRays bring-up #1281)
Shader binding table
Abstract ShaderBindingTable resource owned by the RT pipeline
YAML ShaderBindingTable: block describing raygen / miss / hit-group / callable records, each with ShaderName, optional local-root data 👀
Per-backend SBT builders:
D3D12: identifier from ID3D12StateObjectProperties::GetShaderIdentifier, 32-byte aligned records, programmer-managed stride
Vulkan: VkStridedDeviceAddressRegionKHR, alignment from rayTracingPipelineProperties
Metal: visible function tables / intersection function tables
Compute SBT record stride from declared local-root data size
DispatchRays command
New RayTracingEncoder (or extend ComputeEncoder) with dispatchRays(width, height, depth, sbt)
YAML dispatch parameters: RayTracingDispatch: { Width, Height, Depth } — currently reusing DispatchParameters.DispatchGroupCount as {Width, Height, Depth} for RT pipelines per Add RayTracing pipeline kind, shader stages, and YAML schema #1270; a dedicated RayTracingDispatch block can come later if useful.
Resource-state / barrier handling for SBT and AS reads
Resource binding parity
AS binding from raygen / miss / hit / callable stages (the inline-RT work only wires it up for compute)
UAV / SRV / CBV / sampler tables from each new stage
Verify cross-API root-signature layout matches between D3D12/Vulkan so the same DXIL works unmodified
Shader-observable spec surface
Each test asserts behavior visible from a raygen / miss / hit / callable shader. Coverage parallels the inline-RT epic where the same concept appears (e.g. ray flags), then adds the PSO-only surface (payloads, recursion, etc.).
Runs exactly once per accepted hit; payload mutation observable in raygen — 👍
Hit-side ray-system-values: all of the miss-side ones plus InstanceIndex, InstanceID, PrimitiveIndex, GeometryIndex, HitKind, ObjectRayOrigin/Direction, ObjectToWorld3x4/4x3, WorldToObject3x4/4x3 — 👍
BuiltInTriangleIntersectionAttributes.barycentrics at known points — 👍
Hit-group routing: distinct closest-hit per hit-group, selected by RayContributionToHitGroupIndex + instance contribution — 👍
Closest-hit calls TraceRay to spawn a secondary ray (recursion) — 👍
Any-hit shader ([shader("anyhit")])
Any-hit fires for non-opaque geometry only — 🏗️ (non-opaque YAML)
IgnoreHit() skips a candidate; closest-hit sees next hit — 🏗️
Companion to the inline-RT epic in #1258. That issue is scoped to
RayQuery/TraceRayInlineinside a regular compute shader; the test framework already treats it as aComputepipeline that happens to bind an acceleration structure. PSO-based raytracing is a different beast — it introduces an entirely new pipeline kind, new shader stages, a shader binding table, and theDispatchRayscommand. The framework has none of that today, so this issue tracks both the bring-up work and the shader-visible test surface that becomes unlockable as bring-up progresses.Reuses the AS YAML / abstraction layers from the inline-RT bring-up (#1214, #1232, #1245), so this work starts above that line.
Legend:
Bring-up PRs (foundation for everything below)
ShaderPipelineKind::RayTracing, six new RTStages, HitGroups / RayTracingPipelineConfig / ShaderBindingTable YAML schema,%dxc_target_libsubstitution, theraytracing-pipelinelit feature, and a foundationalXFAIL: *smoke test 👀dispatchRays(drops Vulkan from the smoke test's XFAIL list) 👀DispatchRays(drops DirectX from the smoke test's XFAIL list) 👀dispatchRaysviametal_irconverter(drops Metal from the smoke test's XFAIL list) 👀Framework bring-up
Pipeline / stage model
ShaderPipelineKind::RayTracingalongsideCompute/TraditionalRaster/MeshShaderRasterinSupport/Pipeline.h👀Stages:RayGeneration,Miss,ClosestHit,AnyHit,Intersection,Callable👀validatePipelineKindto require ≥1 raygen entry and at least one of {miss, hit-group} when the pipeline is RT 👀Shader compilation
lib_6_3(orlib_6_5) target soclang-dxc/dxcemits a DXIL library with multiple entry points%dxc_target_libsubstitution analogous to%dxc_target👀raytracing-pipeline(mirrorsacceleration-structure) gated on the device feature + library-target support 👀Hit groups, payloads, attributes, recursion config
HitGroups:list (Name,Type: Triangles|Procedural,ClosestHit, optionalAnyHit, optionalIntersection) 👀RayTracingPipelineConfig:block (MaxTraceRecursionDepth,MaxPayloadSizeInBytes,MaxAttributeSizeInBytes, optionalPipelineFlags) 👀State Object / RT pipeline creation
ID3D12StateObjectfrom the YAML (DXIL library subobject, hit-group subobjects, global/local root signatures, raytracing pipeline + shader config subobjects)VkRayTracingPipelineKHR+vkGetRayTracingShaderGroupHandlesKHR, pipeline-library plumbing if needed;VK_KHR_ray_tracing_pipelinefeature gatemetal_irconverterfor DXIL→AIR — it lowersDispatchRaysinto a compute dispatch backed byMTLVisibleFunctionTable/MTLIntersectionFunctionTablestanding in for hit-groups, miss shaders, and callables. The backend work covers emitting the converter-expected compute dispatch and building those function tables. 👀 ([Metal] Add ray tracing pipeline, SBT, and DispatchRays bring-up #1281)Shader binding table
ShaderBindingTableresource owned by the RT pipelineShaderBindingTable:block describing raygen / miss / hit-group / callable records, each withShaderName, optional local-root data 👀ID3D12StateObjectProperties::GetShaderIdentifier, 32-byte aligned records, programmer-managed strideVkStridedDeviceAddressRegionKHR, alignment fromrayTracingPipelinePropertiesDispatchRays command
RayTracingEncoder(or extendComputeEncoder) withdispatchRays(width, height, depth, sbt)RayTracingDispatch: { Width, Height, Depth }— currently reusingDispatchParameters.DispatchGroupCountas{Width, Height, Depth}for RT pipelines per Add RayTracing pipeline kind, shader stages, and YAML schema #1270; a dedicatedRayTracingDispatchblock can come later if useful.Resource binding parity
Shader-observable spec surface
Each test asserts behavior visible from a raygen / miss / hit / callable shader. Coverage parallels the inline-RT epic where the same concept appears (e.g. ray flags), then adds the PSO-only surface (payloads, recursion, etc.).
TraceRay(host-side intrinsic)RayFlagsparameter behaves the same as inRayQuery<>— re-run the same flag matrix from [EPIC]: Improve inline raytracing test coverage #1258 — 👍 once bring-up landsInstanceInclusionMaskfiltering — 👍RayContributionToHitGroupIndexselects the right hit-group record — 👍MultiplierForGeometryContributionToHitGroupIndex(per-geometry hit-group striding) — 🏗️ (multi-geometry BLAS)MissShaderIndexselects the right miss record — 👍RayDesccorners:TMin > 0,TMaxclip, NaN/Inf direction — 👍TraceRayup toMaxTraceRecursionDepth— 👍MaxTraceRecursionDepthis undefined; verify that the in-spec maximum value works — 👍Raygen shader (
[shader("raygeneration")])DispatchRaysIndex()matches the dispatch x/y/z lane — 👍DispatchRaysDimensions()echoes the host-side width/height/depth — 👍DispatchRaysIndex— 👍TraceRayand consumes the returned payload — 👍Miss shader (
[shader("miss")])MissShaderIndexselects between them — 👍WorldRayOrigin,WorldRayDirection,RayTMin,RayTCurrent,RayFlags,DispatchRaysIndex— 👍Closest-hit shader (
[shader("closesthit")])InstanceIndex,InstanceID,PrimitiveIndex,GeometryIndex,HitKind,ObjectRayOrigin/Direction,ObjectToWorld3x4/4x3,WorldToObject3x4/4x3— 👍BuiltInTriangleIntersectionAttributes.barycentricsat known points — 👍RayContributionToHitGroupIndex+ instance contribution — 👍TraceRayto spawn a secondary ray (recursion) — 👍Any-hit shader (
[shader("anyhit")])IgnoreHit()skips a candidate; closest-hit sees next hit — 🏗️AcceptHitAndEndSearch()ends traversal immediately — 🏗️IgnoreHit(and the mutation must be discarded per spec) — 🏗️NO_DUPLICATE_ANYHIT_INVOCATION— 🏗️ (geometry flag YAML)Intersection shader (
[shader("intersection")])ReportHit(t, kind, attrs)with custom hit-attribute struct — 🏗️ (procedural geometry)HitKindvalue flows through to closest-hit / any-hit — 🏗️ReportHitreturns true/false based on TMin/TMax + any-hit decision — 🏗️Callable shader (
[shader("callable")])CallShader(index, params)runs the right callable record — 👍DispatchRaysIndex/Dimensionsvisible inside callable — 👍Payload + attribute mechanics
uint) round-trip — 👍MaxPayloadSizeInBytes— 👍[payload]qualifierin/out/inoutsemantics — 👍Hit-group / SBT selection (shader-observable)
InstanceContributionToHitGroupIndexselects per-instance hit group — 🏗️ (YAML field shared with [EPIC]: Improve inline raytracing test coverage #1258)RayContributionToHitGroupIndexperTraceRaycall — 👍MultiplierForGeometryContributionToHitGroupIndexacross multi-geom BLAS — 🏗️ (multi-geom YAML)Shader control flow / vendor edges
TraceRay(lane mask) — 👍TraceRaywithRAY_FLAG_SKIP_CLOSEST_HIT_SHADER(PSO-only flag) — 👍Out of scope (intentionally)
SER(ShaderExecutionReordering) — future epic once base PSO RT works on all three backends.