GPU: publish written depth planes before later draws in the same list #1018
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!1018
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1018"
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?
@invismann on GitHub · 2026-11-28 11:14 UTC · original
invismann:fix/same-list-depth-plane-sync→main· +80 −92 · 3 files · 1 commits · closed without mergingA shader can write a depth-plane twin and a later lighting draw can depth-test against the corresponding plane within the same command list. Waiting until the list closes leaves the earlier depth values visible to that draw.
Publish a written depth-plane twin after the writer is recorded. Restore the title's render-target bindings and invalidate the cached pipeline and root bindings after the copy pass. Closing the list still handles the remaining dirty twins.
Validation
@cxy0072019-sketch on GitHub · 2026-11-28 11:38 UTC · original
Confirmed the same-list depth fix on an RTX 5070 Ti (621.24), Windows 11 build 28000, Series S profile, and 1920×1080 output. Both Gambit Bay runs used one
c100068diagnostics build, the same warmed emulator cache seed and save, and the same input sequence. A local switch selected early publication or publication at list close.resource::tests::a_depth_planes_twin_is_drawn_into_the_planepassed with the early publication path. The control failed the expected lighting/readback assertion.Both runs still had dark regions around the underwater waterline. The camera trajectories differed, so the gameplay check is limited to the depth counter and the targeted rendering test.
@Dukestar69 on GitHub · 2026-11-28 11:44 UTC · original · approved these changes
Tested locally merged onto
main(63b902f).draw.rs,host.rs, andresource.rs;cargo xtask policypassed (294 files ok).cargo test -p victory-gpu --lib resource::passed (20 passed; 0 failed, includinga_depth_texture_and_its_twin_copy_into_each_other,a_depth_planes_twin_is_drawn_into_the_plane, anda_stencil_planes_twin_reaches_the_plane).cargo test -p victory-gpu --lib draw::passed (8 passed; 0 failed; 1 ignored).Clean intra-list depth-plane publication fix. LGTM.
Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
@Yoshi-233 on GitHub · 2026-11-28 12:11 UTC · original
I tested
c100068fon an RTX 4070 Ti SUPER (16 GB, driver 617.42) on Windows. Both runs started from copies of the same save and used Series X, DLSS Quality M at 2560×1440 → 3840×2160, 2× frame generation, and the BVH builder disabled. The candidate adds this PR to the local baseline.In the safehouse living room, the cumulative
times used before the passcounter rose from 5,965 to 6,269 over 20.8 seconds on the baseline. On the candidate it stayed at zero over 20.5 seconds in the same room. The separatetimes not given back to a twincounter still increased in both runs. The three Windows depth/stencil twin tests also passed.Bright white streaks on the wooden floor remain visible in the game's own backbuffer captures with either build. I would count this as a confirmed same-list ordering improvement on Ada and keep the remaining floor artifact open. The camera positions differ slightly, so I am not drawing an FPS or pixel-level quality conclusion from these runs.
@trustno1-coder on GitHub · 2026-11-28 19:23 UTC · original
Thanks for this. I'm closing it without merging because it conflicts with the current main in several places (main has moved a lot since it was opened, with about 100 pull requests merged today), and I can't resolve that safely on your behalf. If you'd still like it in, please rebase it on the current main and open a new pull request.
Pull request closed