victory-shader: DXR 1.1 RayQuery traversal-loop lifter behind VICTORY_HW_RT=1 (#339) #354
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/354"
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?
Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-12-02T15:40:38Z.
Phase 3 PR #7 for #339 (stacked on #352).
Summary
RayQuerylifter undercrates/victory-shader/src/emit/lower/rayquery/(rayquery.rs,analyze.rs,attrs.rs,emit_rq.rs), gated onVICTORY_HW_RT=1(off by default; zero RT-off impact).image_bvh64_intersect_ray) and Template B (image_bvh_intersect_raywave-shared TLAS + per-lane BLAS), non-opaque candidate callbacks, committed/candidate attribute load lifting, cross-query merge dispatch, and automatic software-BVH forced-miss fallback (bvh_miss,VICTORY_HW_RT_LIFT=0, or lowering fallback).RayQueriesmetadata onHostShaderandLowered, plushw_rt(),hw_rt_lift(),bvh_miss(), andprogram_key().emit::hostand testHostShaderliterals (includingvictory-gpu/src/shader_cache.rsfield initialization).dxil.dllvalidation tests inemit/rayquery_tests.rs.Verification
cargo +1.98.1-x86_64-pc-windows-gnu run -p xtask -- policy --staged(20 files ok)cargo +1.98.1-x86_64-pc-windows-gnu test -p victory-shader --lib emit::rayquery -- --test-threads=1(11 passed; 0 failed)cargo +1.98.1-x86_64-pc-windows-gnu test -p victory-gpu --lib shader_cache::tests(2 passed; 0 failed)cargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets -- -D warnings(0 warnings)cargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets --all-features -- -D warnings(0 warnings)GPL-3.0 references:
TrustNo1-Coder/Darner,readmet3xt-lab/foxhoundImported from Androtim/MiniVI. Originally posted by Androtim on 2026-12-02T16:03:58Z.
Automated triage for the maintainers (not an approval).
Verdict:
needs-gpu-test· CI (check):passingReview Summary
CI is passing and the visible changes look structurally sound and cleanly gated behind
VICTORY_HW_RT=1(off by default, returning an emptyPlaninrayquery::analyzewhen disabled).Verified Changes
crates/victory-shader/src/emit/lower.rs: Integratesrayquery::analyze, adds automatic fallback to unlifted lowering iflower_with_planfails on an active plan (lowering_refused), excludes eliminated instructions (rq.is_eliminated) frominsts()/LDS/s_barrierchecks, declares lifted root TLAS SRVs viaroot_tlas_handle, lowers lifted headers viaemit_ray_query, and wiresrq_merge_phisand header back-edge skipping in PHI patching.crates/victory-shader/src/emit/lower/rayquery.rs&analyze.rs: Cleanly separates Template A (image_bvh64_intersect_ray) and Template B (image_bvh_intersect_ray) structural analysis from fixed-point multi-query live-out/attribute verification.crates/victory-shader/src/emit/intersect.rs: Forcesbvh_miss()totruewhencrate::emit::hw_rt()is enabled so unlifted loops miss/occlude instead of reading unpopulated console BVH memory.crates/victory-shader/src/emit/host.rs: Chainss.ray_queries.tlas_srvsinto root SRV parameters inHost::root_signature_for.crates/victory-gpu/src/shader_cache.rs: Initializesray_queries: Default::default()indecodeandtests::shader(full cache serialization is deferred to stacked PR #357).Notes / Minor Observations
attrs.rs,emit_rq.rs,rayquery_tests.rs,emit.rs, and the lower half ofanalyze.rswere not directly inspected here; CI anddxil.dllvalidation tests pass on the full diff.shader_cache::decodesetsray_queries: Default::default()in this PR, ensure PR #357 lands alongside it before relying on disk-cached shaders underVICTORY_HW_RT=1.crates/victory-shader/src/emit/intersect_tests.rs(build_compute_shader) setsray_queries: Default::default()instead of forwardinglowered.ray_queries.crates/victory-shader/src/emit/lower/rayquery/analyze.rsbuildsall_active_blocksin the fixed-point loop and discards it (let _ = &all_active_blocks;).rayquery::lowering_refusedandPlan::skippedcalls.truncate(96)on aString; safe for ASCII messages, thoughfloor_char_boundarywould avoid any UTF-8 boundary risk.Verdict
needs-gpu-test— touches DXIL shader lowering (emit/lower.rs,emit/intersect.rs,emit/lower/rayquery/*) and D3D12 root signatures (emit/host.rs), warranting a local real-GPU DXR 1.1 smoke test (and RT-off regression check) before merging. (Automated review; not formal maintainer approval.)Generated with Antigravity CLI (
agy).Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-12-02T17:04:28Z.
Holding merge (
triage: needs work) per Deep Static Audit Pass #2 (#282comment7352688269, DXR 1.1 P0/P1 findings #1–#20 routed to#339; note#354must not merge without#357'sshader_cache.rskey isolation #10).Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-12-03T00:04:02Z.
Merged into main (
b0efcacc) via the Audit Pass #5 green-lit superset PR #357 (complete #339 DXR 1.1 RayQuery stack behind VICTORY_HW_RT=1, zero non-RT impact).Pull request closed