fix(victory-gpu): align RT pass gating, avoid builder_runs stall in ambient, and add synthetic occluder test #472
No reviewers
Labels
No labels
accessibility
bloqué : binaire console
bug
chargeur
console-dll
cpu
documentation
duplicate
enhancement
good first issue
gpu
help wanted
invalid
performance
question
runtime-gdk
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/LooperSalty--AnyXboxX!472
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-472"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@mauroalvare on GitHub · 2026-11-27 01:04 UTC · original
mauroalvare:rt/passes/activation-and-gating→main· +1196 −51 · 5 files · 1 commits · openChange
Fixes three issues along the ray-tracing pass activation and lighting-handoff path in
third_party/victory/crates/victory-gpu, and adds a synthetic end-to-end D3D12 GPU test and timing harness with a movable occluder (no game files):pipeline/make.rs):VICTORY_RT_RESOLVE=1withoutVICTORY_BVH_BUILDER=1enabledCS_RaytracingResolvewhile still silently skippingCS_ScreenProbes_ActivateRaysunlessVICTORY_ACTIVATE_RAYS=1was also set, leaving zero screen-probe rays activated.VICTORY_BVH_BUILDER=1ignored an explicitVICTORY_RT_RESOLVE=0(inconsistent withVICTORY_ACTIVATE_RAYS=0).make::missing()now reportsp.left_outinstead of misreporting skipped RT pipelines as"being made".ambient::on()/builder_runs()(pipeline.rs,ambient.rs):ambient::on()andambient::bounds()calledpipeline::builder_runs()on everyCS_CacheScreenSpaceRadiance,CS_ScreenProbes_TemporalResolve, andCS_AccumulateLocalLightInscatteringVolumedispatch.b.off == b.pipelines.len()(0 == 0) returnedfalse, wrongly enabling the ambient stand-in on early RT frames.b.whole == false, callingambient::on()on a lighting recording thread acquired the globalBUILDERmutex and synchronously compiled all builder pipelines serially on that thread.pipeline::builder_active()query forambient, added lock-free atomic fast paths inbuilder_runs(), and updatedbuilder_runs()to release theBUILDERmutex and enqueue missing builder pipelines in parallel acrossVICTORY_PIPELINE_WORKERSbefore joining.rt_passes_tests.rs):ActivateRays-> indirect dispatch argument clamp ->ExecuteIndirectRayTraceagainst a movable box occluder ->ResolveintoR9G9B9E5(R32_UINT) on the host GPU.ActivateRaysleaves rays unlaunched and loses occlusion.Verification
Tested locally on Windows x64 with NVIDIA GeForce RTX 5070 Ti (driver 621.40, Wave32, SM 6.6):
Synthetic 1920x1080 RT Enable Cost (RTX 5070 Ti, hardware D3D12 timestamps, 2,073,600 rays/frame, 30 FPS budget = 33.333 ms)
Oracle and test data
rt_passes_tests.rs(no game files or assets).pipeline::make::tests::rt_pass_left_out_policy_keeps_activation_and_resolve_consistentfails onLeftOutPolicy::from_values(false, Some("1"), None)andLeftOutPolicy::from_values(true, Some("0"), None).pipeline::make::tests::missing_reports_left_out_reason_instead_of_being_madefails (returned"being made").pipeline::tests::builder_active_follows_enable_and_failure_stateandrt_passes_tests::movable_occluder_changes_rt_lighting_outputverify both activation gating and producer-consumer lighting updates.Checklist
E_NOTIMPL), never a fake success.AGENTS.mdallows (shader names already present inpipeline/make.rsandambient.rs).Made with AI assistance (Antigravity / Gemini).
@mauroalvare on GitHub · 2026-11-27 01:19 UTC · original
Independently verified
a40ed684341fbd2cc6d27c171af9ae27bbc56018on the RTX 5070 Ti, driver 621.40, release.pipeline::make::passed 7 tests,ambient::passed 4, andmovable_occluder_changes_rt_lighting_outputpassed. The published benchmark gave 0.0187 ms RT off and 0.2675 ms RT on at the GPU median.I saved this as the first functional synthetic pass baseline. Using the same HLSL fixture with timing and readback instrumentation, both modes used the same alternating occluder placements at 1920×1080 and 2,073,600 rays. Each mode had 24 warmups and 120 measured frames. Outputs were read in separate verification frames.
The RT-on GPU medians were 0.2124 ms activation, 0.0023 ms clamp, 0.0557 ms tracing and 0.0114 ms resolve. Sampled process-local DXGI peak was 102.7 MiB and CPU peak working set was 83.8 MiB.
The lit and shadowed samples switched from 0.1001 / 2.1016 to 2.1016 / 0.1001 when the occluder moved. Full RT-on output BLAKE3 was
22f8beb01be67227ed63aff7f42ac8a55abc5d741151534fb94cd05c1746fff3for the left occluder and50b0cb322893fb71d3e3fd9647dcb2e6720de76cd7e647dcd384a5ea85dab9ecfor the right.The local shared registry holds
pr472-percentiles.patchand the per-framepr472-functional-baselinelog. After applying that test-only patch to this SHA, the corresponding filter isrt_passes_tests::rt_passes_validation_baselinewith--exact --ignored --nocapture --test-threads=1.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.