gpu: refresh shared upload buffers after draining in-flight work #273
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Belobug--VIctory-Belobug-AMD!273
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-273"
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?
@battledogegames-design on GitHub · 2026-11-26 17:54 UTC · original
battledogegames-design:gpu/drain-before-shadow-refresh→main· +8 −31 · 1 files · 1 commits · openAn asynchronous submission can still be reading a Shadow upload buffer when the next submission calls
Host::prewarm. A direct refresh can overwrite those bytes. Batching two disjoint requests can also overwrite bytes between them.Remove the early refresh call, its private helper and its write-only timing counter. Normal deferred preparation refreshes the upload after the existing drain. CPU command-list recording can still overlap GPU execution. Both gated regression tests are in PR #203.
Windows validation
On PR #203 at
d2adbc2, each unchanged regression reproduced its assertion failure once. With the equivalent correction applied to that branch, each passed in 20 fresh WARP processes using its original fence checkpoint. Each pair gives the earlier and later GPU reads.OLD was
0x11223344and NEW was0xAABBCCDD. On clean main at4f62c2aand on that revision plus this patch,cargo test --locked -p victory-gpureported 113 passed, 0 failed and 4 ignored on each. Targeted Clippy completed with matching warnings. The corrected production crate built successfully.Scope and performance
Removing early refresh gives up overlap between those CPU copies and the preceding GPU submission. In-game frame time, physical-GPU rendering and lighting were unmeasured. The correctness evidence covers the two synthetic WARP paths. This submission is for correctness review. Merge readiness requires maintainer evaluation of the unmeasured in-game tradeoff.
This touches the path in #232, which retains early refresh for a busy predecessor, and the helper extended by #215. Combining these changes would need separate validation.
Thanks to Zetsukae for identifying the overlap in #139 and recommending standalone regression coverage. Nyx identified the coalesced-range case and prepared the production correction.
AI-assisted with Astra 6.2.
@battledogegames-design on GitHub · 2026-11-27 00:43 UTC · original
Physical AMD hardware validation of production fix
7ae9c1d5is complete on a Radeon RX 6800 XT (RDNA 2), using native Windows and AMD driver32.0.21045.29003.Both regressions from #203 were executed in 20 fresh processes per implementation:
[NEW, NEW][OLD, NEW][NEW, OLD][OLD, OLD]OLD = 0x11223344,NEW = 0xAABBCCDD.All 80 hardware runs produced their expected outcomes. No skips, timeouts, or device initialization failures occurred.
Every D3D12 test device matched the selected physical DXGI adapter's LUID, PCI ID
1002:73bf, and software flag0. The harness modification was limited to explicit adapter selection and the two test device-construction calls. The original synchronization gates, fence checkpoints and readback assertions remained unchanged.Tested revisions:
4f62c2a5e27e7beebf3e8d68f77898e43dc7b77cd2adbc2dc5be507200bf7aaa387f972e0a48be5a7ae9c1d5ff94871c319a8f89ea7a070bd39365c1These results extend the independent RX 7900 XT reproduction reported in #203 by validating the exact production correction and the coalesced-refresh case on RDNA 2 hardware.
The evidence supports correctness on the tested
mainimplementation. The separatea-publierhost implementation, submission overhead and in-game performance remain unmeasured.Raw logs, adapter checks, harness changes and reproduction commands have been preserved and are available upon request.
AI-assisted development: Nyx (Claude, Anthropic). Native Windows and physical AMD GPU validation: Astra 6.2 (OpenAI).
@hajduzsolt on GitHub · 2026-11-27 09:32 UTC · original · reviewed
crates/victory-gpu/src/host.rs:1264now drains prior work before preparing the next submission. I checked the red CI run while reviewing that ordering. CI stops in Clippy on existing shader diagnostics, including the hex literal atcrates/victory-shader/src/native.rs:389and the return binding incrates/victory-shader/src/emit/mod.rs:350. Both reproduce on cleanmainat4f62c2a, and #3 already covers the shader lint cleanup.The locked Windows workspace tests on
7ae9c1dand4f62c2areported the same set of baseline failures. This check leaves the WARP regressions in #203 and the performance tradeoff for separate validation.AI assistance: ChatGPT 6.2 Sol Extra High.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.