Indirect dispatches: NVIDIA cards run the title's wide tile lists too #1273
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1273"
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 trustno1-coder/VIctory-NVIDIA. Originally posted by Anorak-314 on 2026-11-28T16:48:58Z.
What was wrong
indirect::widestlets an indirect dispatch run more than 65,535 groups in x on AMD cards only. On every other card the title's two tile-list programs (2dc364df5d3278b8and940c2635dc1312f4, one group per 8x4 tile) are cut to 65,535 groups each:widest). On an RTX card this shows as blocky patches on arms and hands low in the frame.34fb51b8a0312e82) reads. On screen: bright horizontal streaks and blocky patches across faces and hands while anything moves, and stale light after a camera cut.How it was found
Dumps of every render target of the same cutscene moment at Quality and at DLAA, compared pass by pass. The G-buffer is clean in both. The first lit target already has the streaks at DLAA. The resolve's history input, which those two programs write, is clean but for a few blocks at Quality and full of stale blocks from earlier camera views at DLAA.
Ruled out on the way, each with a run of screenshots: the title's motion blur, the motion vector scale given to DLSS (x1.5 and x0.667), DLSS preset K against M, a scene at 0.99 of the output, the temporal scene scale left at 2/3, leaving out the depth reprojection (
11bbed94ee7a3243), and #932. The frame's and the resolve's constant buffers scale exactly between the two modes.The change
widestruns wide on NVIDIA cards (vendor0x10de) as it does on AMD's.VICTORY_INDIRECT_WIDE=0still turns it off.VICTORY_INDIRECT_WIDE=forceruns wide on any card, for trying it elsewhere.card_runs_wide_indirect_dispatchesnow runs on NVIDIA cards too.65,535 is the most D3D12 names for a dispatch, so this stays outside what the API promises, as it already does on AMD.
Testing
One PC: RTX 5090 (32 GB, driver 621.24), Ryzen 9 9950X3D, Windows 11, Series X profile, 3840x2160 output.
card_runs_wide_indirect_dispatchespasses on the RTX 5090 (checked that the test ran on vendor0x10dewithWIDEST2^20, not on the PC's integrated Radeon): every group of 67,440, 115,200 and 2^20 runs once under its own number, one by one and in a batch; 2^20 + 1 runs 65,535.VICTORY_CAPTURE_WORLD): withVICTORY_INDIRECT_WIDE=0, streaks or blocks in 10 of 12, and a face broken up into noise in two of them; with the default, none in 12.mainwith other open pull requests merged, 12 screenshots 2 s apart: withVICTORY_INDIRECT_WIDE=0, blocky patches low in the frame in 3 of 12; with the dispatches wide, none in 12.cargo test --workspace --lockedpasses (1,126 tests), and so doesrepository_passes_policy.cargo clippy --workspace --all-targets --locked -- -D warningsstops here onmainitself (manual_is_multiple_ofinshadow.rsanddescriptor.rs,let_and_returninvictory-shader); it reports nothing inindirect.rs.Only this one NVIDIA card was tried. If you would rather keep NVIDIA opt-in until more cards are checked, say so and I will flip the default;
forceis there either way.🤖 Generated with Claude Code
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Anorak-314 on 2026-11-29T05:28:12Z.
Update after more runs on the same card (RTX 5090, driver 621.24, Series X profile).
A caveat I found. With the opt-in structure builder (
VICTORY_BVH_BUILDER=1) and the wide bound together, the device stopped answering within a minute of the opening cutscenes in 3 runs of 4 (0x887A0006, after frames of more than a second). With the bound at 65,535 it held 10 to 13 fps at DLSS Quality in 2 runs of 2, and a later 5-minute run had no device loss. Those runs were on a build with #718, #403, #401 and #1161 on top. I have not found which dispatch does it; my guess is one of the builder's that asks for more than 65,535 groups and then runs whole.What I pushed.
b6f3d13: an NVIDIA card keeps the 65,535 bound whileVICTORY_BVH_BUILDER=1.VICTORY_INDIRECT_WIDE=forcestill sets the wide one. Without the builder nothing changes from the first commit, so the native-4K streak fix stands.c9f0c2d: merges8f03fa2to resolve the conflict with main (the clamp compiles throughcrate::hlslnow).cargo test -p victory-gpu indirect: 29 passed.Not done here. Widening only the two tile-list programs, so that native 4K stays clean with the builder on. That means the picture at native 4K with the builder on has the streaks again on NVIDIA until then.
🤖 Generated with Claude Code
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Yoshi-233 on 2026-11-29T07:09:26Z.
The indirect-dispatch counter test also runs on an RTX 4070 Ti SUPER (16 GB, driver 617.42) with the structure builder off. I used the NVIDIA change plus the
b6f3d13builder guard on our local build. The test fixture asserted the physical adapter vendor was 0x10de and printed the UAV counter after queue completion so the hardware test could not silently skip.The upstream per-group exactly-once checks and max-group checks passed in all eight cases. This covers card execution at the wider limit. A separate same-scene comparison is needed to attribute lighting changes to it.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by trustno1-coder on 2026-11-29T08:28:12Z.
Thank you! An earlier version of this pull request was merged into main with its original commits and is part of v2026.11.29.01, where you are credited. GitHub does not show it as merged because new commits were pushed here after that merge. It stays open so those newer commits can be looked at next.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Anorak-314 on 2026-11-30T04:58:02Z.
Merged with main at
41adb551, and one correction of mine.I have taken back the builder guard (
b6f3d131). It kept an NVIDIA card at 65,535 groups whileVICTORY_BVH_BUILDER=1, after the device was lost in three runs of four with the builder and the wide bound together. Two things since then:41adb551the builder and the wide bound ran together in two runs of two with no device loss (RTX 5090, driver 621.40, DLSS Quality, a loaded save in gameplay, five minutes each, 13 to 20 fps). The losses I reported were on a build of 2026-11-28 with #718, #403, #401 and #1161 on top, in the opening cutscenes, and I never found the dispatch that did it. My guess of a builder dispatch asking for more than 65,535 groups was not confirmed.Not covered: the opening cutscenes themselves on this build, and other NVIDIA cards with the builder on. If anyone sees a device loss with ray tracing on and the wide bound,
VICTORY_INDIRECT_WIDE=0is the cap again; please say so here.With that the branch is the same as main (no files changed): the original change is in since v2026.11.29.01. Closing. Thanks to @Yoshi-233 for the 4070 Ti SUPER counter test.
Pull request closed