Cover PSO-only RT surface: recursion, RAY_FLAG_SKIP_CLOSEST_HIT_SHADER, callables#1279
Open
MarijnS95 wants to merge 1 commit into
Open
Cover PSO-only RT surface: recursion, RAY_FLAG_SKIP_CLOSEST_HIT_SHADER, callables#1279MarijnS95 wants to merge 1 commit into
MarijnS95 wants to merge 1 commit into
Conversation
This was referenced Jun 3, 2026
MarijnS95
force-pushed
the
rt-pso-tests-pso-only
branch
from
June 3, 2026 13:24
30927e1 to
58737b6
Compare
7 tasks
MarijnS95
force-pushed
the
rt-pso-tests-pso-only
branch
from
June 8, 2026 12:42
58737b6 to
7d5167d
Compare
EmilioLaiso
force-pushed
the
rt-pso-tests-pso-only
branch
from
June 24, 2026 08:12
7d5167d to
866edb0
Compare
EmilioLaiso
marked this pull request as ready for review
June 24, 2026 08:12
EmilioLaiso
force-pushed
the
rt-pso-tests-pso-only
branch
from
June 26, 2026 13:53
866edb0 to
3241fb5
Compare
EmilioLaiso
approved these changes
Jun 29, 2026
MarijnS95
force-pushed
the
rt-pso-tests-pso-only
branch
from
July 1, 2026 10:04
3241fb5 to
a59e78f
Compare
Three tests stacked on llvm#1275 covering features that inline RT (RayQuery in compute) physically can't express — they're only reachable through a DispatchRays-driven RT pipeline. - `trace-ray-recursion.test` — closest-hit fires a secondary TraceRay from an above-the-triangle origin. First-level CH sees payload=0 → bumps to 0x1 → calls TraceRay. Second-level CH sees payload!=0 → writes 0x10. Unwinds: first-level OR's in 0x100. Final payload 0x110 (272 decimal). `RayTracingPipelineConfig.MaxTraceRecursion- Depth: 2` so both TraceRay calls are within budget. - `ray-flag-skip-closest-hit.test` — two lanes fire identical rays at the same triangle. Lane 0 uses RAY_FLAG_NONE so CH runs and writes 0xBEEF. Lane 1 uses RAY_FLAG_SKIP_CLOSEST_HIT_SHADER (PSO-only — inline RT has no equivalent) so CH is skipped and payload keeps its initial 0xAAAA. Output [0xBEEF, 0xAAAA]. - `callable-shader.test` — two callable shaders writing distinct sentinels (0xAAAA / 0xBBBB). Each lane calls `CallShader(Idx, ...)` so the SBT callable region's per-record routing is exercised independently of the hit-group / miss routing already covered in llvm#1277. Callable shaders themselves don't exist in inline RT. This test stays `# XFAIL: Clang, Vulkan` because DXC's `-spirv` backend lists every callable's IncomingCallableDataKHR variable in every callable entry point's interface, violating VUID-Standalone- Spirv-IncomingCallableDataKHR-04706 and getting rejected by vk- CreateShaderModule. The framework's Vulkan SBT / callable path is correct — running `spirv-opt --remove-unused-interface-variables` on the DXC output cleans the SPIR-V and the test passes natively. Track upstream. All three pass on Metal once the bring-up PR ahead of this commit sets the raygen pipeline's `setMaxCallStackDepth(MaxTraceRecursionDepth)` so nested TraceRay actually unwinds (with the default of 1, the second TraceRay was silently dropped and the recursion test produced 0x1 instead of 0x110). Locally verified on the user's Linux box: - Vulkan via the native offloader: recursion + skip-CH PASS; callable PASSes after spirv-opt cleanup (XFAILs from raw DXC SPIR-V as documented above). - D3D12 via Wine + vkd3d-proton + cross-compiled offloader.exe: all three PASS. And on macOS 15 / metal-irconverter 3.1.1 via the native offloader: - All three PASS (recursion + skip-CH + callable). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
MarijnS95
force-pushed
the
rt-pso-tests-pso-only
branch
from
July 16, 2026 20:24
a59e78f to
7b8162f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Depends on #1281
Summary
Three tests stacked on #1275 covering features that inline RT (
RayQueryin compute) physically can't express — they're only reachable through aDispatchRays-driven RT pipeline.trace-ray-recursion.test— closest-hit fires a secondaryTraceRayfrom an above-the-triangle origin. First-level CH sees payload=0 → bumps to 0x1 → callsTraceRay. Second-level CH sees payload!=0 → writes 0x10. Unwinds: first-level OR's in 0x100. Final payload 0x110 (272 decimal).RayTracingPipelineConfig.MaxTraceRecursionDepth: 2so both TraceRay calls are within budget.ray-flag-skip-closest-hit.test— two lanes fire identical rays at the same triangle. Lane 0 usesRAY_FLAG_NONEso CH runs and writes 0xBEEF. Lane 1 usesRAY_FLAG_SKIP_CLOSEST_HIT_SHADER(PSO-only — inline RT has no equivalent) so CH is skipped and payload keeps its initial 0xAAAA. Output[0xBEEF, 0xAAAA].callable-shader.test— two callable shaders writing distinct sentinels (0xAAAA / 0xBBBB). Each lane callsCallShader(Idx, ...)so the SBT callable region's per-record routing is exercised independently of the hit-group / miss routing already covered in Cover DispatchRays index/dimensions + SBT miss/hit-group routing #1277. Callable shaders themselves don't exist in inline RT.This test stays
# XFAIL: Clang, Vulkanbecause DXC's-spirvbackend lists every callable'sIncomingCallableDataKHRvariable in every callable entry point's interface, violatingVUID-StandaloneSpirv-IncomingCallableDataKHR-04706and getting rejected byvkCreateShaderModule. The framework's Vulkan SBT / callable path is correct — runningspirv-opt --remove-unused-interface-variableson the DXC output cleans the SPIR-V and the test passes natively. Tracking the DXC fix upstream.All three pass on Metal once the Metal bring-up (#1281) sets
setMaxCallStackDepth(MaxTraceRecursionDepth)so nestedTraceRayactually unwinds; with the default of 1 the second TraceRay was silently dropped and the recursion test produced 0x1 instead of 0x110. With #1281 rebased underneath,Metalis dropped from the XFAIL list on all three tests.Test plan
Local on an NVIDIA RTX 3060:
offloader)offloader.exe)offloader.exe)offloader.exe)CI (RT-capable runners):
RaytracingTier 1.2)VK_KHR_ray_tracing_pipeline)supportsRaytracing)