DXR 1.1 for the image_bvh_* node tests #1307

Open
opened 2026-11-26 13:35:00 +00:00 by liuycsbxbxn · 3 comments
liuycsbxbxn commented 2026-11-26 13:35:00 +00:00 (Migrated from github.com)
Contributor

Imported from fxceless/victory-fork. Originally posted by liuycsbxbxn on 2026-11-26T13:35:00Z.


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.

<!-- greyfinch-sync:fxceless/victory-fork:issue:6627806690 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/issues/1310). Originally posted by [liuycsbxbxn](https://github.com/liuycsbxbxn) on 2026-11-26T13:35:00Z. --- 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. ---
JayFoxRox commented 2026-11-26 18:48:57 +00:00 (Migrated from github.com)
Author
Contributor

Imported from fxceless/victory-fork. Originally posted by JayFoxRox on 2026-11-26T18:48:57Z.


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

<!-- greyfinch-sync:fxceless/victory-fork:comment:7200883008 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/issues/1310#issuecomment-7200883008). Originally posted by [JayFoxRox](https://github.com/JayFoxRox) on 2026-11-26T18:48:57Z. --- There's a victory fork with this: https://github.com/maren-halv/VIctory-DXR Do you plan to upstream this @maren-halv ?
liuycsbxbxn commented 2026-11-26 19:04:35 +00:00 (Migrated from github.com)
Author
Contributor

Imported from fxceless/victory-fork. Originally posted by liuycsbxbxn on 2026-11-26T19:04:35Z.


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?

<!-- greyfinch-sync:fxceless/victory-fork:comment:7201168853 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/issues/1310#issuecomment-7201168853). Originally posted by [liuycsbxbxn](https://github.com/liuycsbxbxn) on 2026-11-26T19:04:35Z. --- 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?
JayFoxRox commented 2026-11-26 19:43:30 +00:00 (Migrated from github.com)
Author
Contributor

Imported from fxceless/victory-fork. Originally posted by JayFoxRox on 2026-11-26T19:43:30Z.


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.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7201895048 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/issues/1310#issuecomment-7201895048). Originally posted by [JayFoxRox](https://github.com/JayFoxRox) on 2026-11-26T19:43:30Z. --- 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.
Sign in to join this conversation.
No labels
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.

Reference
fxceless/victory-fork#1307
No description provided.