DXR 1.1 for the image_bvh_* node tests #1310

Open
opened 2026-11-26 13:36:53 +00:00 by github-bot · 3 comments
Owner

@⁠liuycsbxbxn on GitHub · 2026-11-26 13:35 UTC · original

Split out of #1273.

Suggested labels: shader / raytracing
Verification cost: [GPU] [TITLE]

What the meta-issue says

Only 17 shaders which contain image_bvh_... instructions, at least some of them can be trivially made to use DXR 1.1.

Current shape

crates/victory-shader/src/emit/intersect.rs lowers image_bvh_intersect_ray / image_bvh64_intersect_ray to inline DXIL, because the host has no equivalent instruction (lower.rs dispatches on Fields::Image + name.starts_with("image_bvh")). pipeline.rs detects pipelines that carry one of these instructions.

Acceptance

  1. Which of the 17 are expressible as a DXR 1.1 ray query (RayQuery / inline RayQuery intrinsics) without changing the node-test ABI.
  2. A per-shader switch, and the translated module still validates with the DXC validator.
  3. A before/after card-time measurement on the 17 programs, not the whole corpus.

**@⁠liuycsbxbxn** on GitHub · 2026-11-26 13:35 UTC · [original](https://github.com/fxceless/victory-fork/issues/1310) Split out of #1273. **Suggested labels:** shader / raytracing **Verification cost:** `[GPU]` `[TITLE]` ### What the meta-issue says > Only 17 shaders which contain `image_bvh_...` instructions, at least some of them can be trivially made to use DXR 1.1. ### Current shape `crates/victory-shader/src/emit/intersect.rs` lowers `image_bvh_intersect_ray` / `image_bvh64_intersect_ray` to **inline DXIL**, because the host has no equivalent instruction (`lower.rs` dispatches on `Fields::Image` + `name.starts_with("image_bvh")`). `pipeline.rs` detects pipelines that carry one of these instructions. ### Acceptance 1. Which of the 17 are expressible as a DXR 1.1 ray query (`RayQuery` / inline `RayQuery` intrinsics) without changing the node-test ABI. 2. A per-shader switch, and the translated module still validates with the DXC validator. 3. A before/after card-time measurement on the 17 programs, not the whole corpus. ### Cross-links - xcl-dev/xcl#1751, fxceless/victory-fork#17. ---
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 13:36:53 +00:00
Author
Owner

@⁠JayFoxRox on GitHub · 2026-11-26 18:48 UTC · original

There's a victory fork with this: https://github.com/maren-halv/VIctory-DXR
Do you plan to upstream this @⁠maren-halv ?

**@⁠JayFoxRox** on GitHub · 2026-11-26 18:48 UTC · [original](https://github.com/fxceless/victory-fork/issues/1310#issuecomment-7200883008) There's a victory fork with this: https://github.com/maren-halv/VIctory-DXR Do you plan to upstream this @⁠maren-halv ?
Author
Owner

@⁠liuycsbxbxn on GitHub · 2026-11-26 19:04 UTC · original

Worth noting what that fork already covers, because it changes what this issue should be: VIctory-DXR already implements the lift at runtime - crates/victory-shader/src/emit/rayquery_lift.rs plus crates/victory-gpu/src/dxr.rs, with an XboxBvhBuilder HLE - which is past what #1310 asks for.

So if it lands upstream, #1310 can shrink to the part still missing: the image_bvh_* node tests. Concretely - which of the 17 programs actually produce a ray-query-shaped loop, a per-shader switch to compare lifted output against the loop, and a parity check that the lifted DXIL validates and agrees with the software path.

We cannot help with the measurements (no RT-capable card here), but we can write that harness and review the lifter against the RDNA2 inputs of those 17 shaders, so the tests exist whether or not the implementation lands. Would that be useful, @⁠maren-halv, or would you rather carry the tests alongside the implementation?

And a question for @⁠JayFoxRox: is the intended upstream this repo or Marvisak/VIctory, given VIctory-DXR describes itself as a fork of the latter?

**@⁠liuycsbxbxn** on GitHub · 2026-11-26 19:04 UTC · [original](https://github.com/fxceless/victory-fork/issues/1310#issuecomment-7201168853) Worth noting what that fork already covers, because it changes what this issue should be: VIctory-DXR already implements the lift at runtime - `crates/victory-shader/src/emit/rayquery_lift.rs` plus `crates/victory-gpu/src/dxr.rs`, with an XboxBvhBuilder HLE - which is past what #1310 asks for. So if it lands upstream, #1310 can shrink to the part still missing: the `image_bvh_*` node tests. Concretely - which of the 17 programs actually produce a ray-query-shaped loop, a per-shader switch to compare lifted output against the loop, and a parity check that the lifted DXIL validates and agrees with the software path. We cannot help with the measurements (no RT-capable card here), but we can write that harness and review the lifter against the RDNA2 inputs of those 17 shaders, so the tests exist whether or not the implementation lands. Would that be useful, @⁠maren-halv, or would you rather carry the tests alongside the implementation? And a question for @⁠JayFoxRox: is the intended upstream this repo or Marvisak/VIctory, given VIctory-DXR describes itself as a fork of the latter?
Author
Owner

@⁠JayFoxRox on GitHub · 2026-11-26 19:43 UTC · original · edited 2026-11-26 22:39 UTC

If #1310 lands (which it probably should, depending on correctness?), then it's irrelevant how many of the 17 programs generate the ray query. Obviously it would be an optimization goal to improve the rayquery lift to detect 100% of all cases, but even if it doesn't it would be beneficial for performance.

The RDNA2 BVH fallback should probably remain in case the lift fails, even if the lift coverage was 100%, on the current corpus, simply because game updates might come with new shaders which fail the lift in the future.
(Edit: Also for systems without DXR 1.1)

is the intended upstream this repo or Marvisak/VIctory

This fork is the most advanced / open-source'ish fork of for all victory variants I believe (?), so I'd consider this to be the upstream.
Work should happen here.

Ideally there'd be a community maintained version of VIctory which actively plan work and merge PRs / bring forks back under its wing, but it's probably a pipedream right now. This fork auto-merges PRs (claude checks on cronjob wether new PRs pop up / are useful). Unfortunately most people just fork instead of sending PRs to gain clout (and a ton of low quality PRs exist, with too little AI/manpower to review). Too much workforce and too little coordination.

**@⁠JayFoxRox** on GitHub · 2026-11-26 19:43 UTC · [original](https://github.com/fxceless/victory-fork/issues/1310#issuecomment-7201895048) · edited 2026-11-26 22:39 UTC If #1310 lands (which it probably should, depending on correctness?), then it's irrelevant how many of the 17 programs generate the ray query. Obviously it would be an optimization goal to improve the rayquery lift to detect 100% of all cases, but even if it doesn't it would be beneficial for performance. The RDNA2 BVH fallback should probably remain in case the lift fails, even if the lift coverage was 100%, on the current corpus, simply because game updates might come with new shaders which fail the lift in the future. *(Edit: Also for systems without DXR 1.1)* >is the intended upstream this repo or Marvisak/VIctory This fork is the most advanced / open-source'ish fork of for all victory variants I believe (?), so I'd consider this to be the upstream. Work should happen here. Ideally there'd be a community maintained version of VIctory which actively plan work and merge PRs / bring forks back under its wing, but it's probably a pipedream right now. This fork auto-merges PRs (claude checks on cronjob wether new PRs pop up / are useful). Unfortunately most people just fork instead of sending PRs to gain clout (and a ton of low quality PRs exist, with too little AI/manpower to review). Too much workforce and too little coordination.
This discussion has been locked. Commenting is limited to contributors.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/fxceless--victory-fork#1310
No description provided.