GPU: track D3D12 shadow-buffer states (#1670) #1691
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!1691
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1691"
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?
@Elensito on GitHub · 2026-11-24 20:47 UTC · original
Elensito:fix/shadow-buffer-state-1670→main· +164 −27 · 4 files · 1 commits · openWhat changed
Fixes #1670
Validation
cargo test -p victory-gpucargo xtask policyVICTORY_D3D12_DEBUG=1 cargo test -p victory-gpu --features diagnostics shadow::tests::buffer_states_follow_submission_order_and_combine_reads -- --nocaptureThe reported RTX 5080 case could not be reproduced on that hardware locally.
@Headache3318 on GitHub · 2026-11-25 01:09 UTC · original
Independent second-read at head
667e7dc9a4.This is a massive architectural simplification despite the modest title: 132 files changed, +2,270 / -37,366 lines. Several internal crates and features are removed (memory.rs page-table approach, bindless.rs, pipelines.rs, shaderpack.rs, publish.rs, many diagnostic features, HostList::id breadcrumb matching, range.rs).
What the PR adds: buffer state tracking on shadow buffers via
HostList::buffer_state()andShadow::state(AtomicU32), combining consecutive read states (VERTEX | SRV) and resetting on writes (UAV), mirroring the existing texture state model. New test validates the tracking.Correctness concerns: three
shadow.gpu_writes(list, address, len)calls are removed, so root UAV write-backs are no longer copied back to title memory — shader writes through root UAVs will be lost. Theupdate_busypath that copied title writes under GPU write ranges is gone, which could cause stale constants to reach the GPU. Off-element buffer views (for_view) andkeep_writesare removed.Recommendation: The new buffer state tracking itself is clean and well-tested, consistent with the existing texture state model. But the scope is dramatically larger than the title suggests, and several correctness paths are gone. These removals should be documented as intentional simplifications with a note on what breaks. The removed test coverage should be restored or replaced. A commit message explaining why these features are being removed would help reviewers understand the rationale.
Arch Linux, kernel 7.3.5-arch1-1, zero-CPU read, AI-assisted.
@Marvisak on GitHub · 2026-11-25 01:34 UTC · original
Automated triage for the maintainers.
Needs rebase. This pull request conflicts with
main(conflicting:crates/victory-gpu/src/draw.rs,crates/victory-gpu/src/host.rs,crates/victory-gpu/src/indirect.rs,crates/victory-gpu/src/shadow.rs). It will be reviewed once it is rebased onto the currentmain.Generated by Claude Code
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.