test: add WARP regression for async prewarm upload-buffer overwrite #203
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!203
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-203"
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-25 21:51 UTC · original
battledogegames-design:test/async-prewarm-warp-regression→main· +256 −3 · 3 files · 2 commits · openAdds an opt-in Windows D3D12 WARP regression for the upload-buffer overlap Zetsukae identified in #139. With async submission enabled, the early prewarm refresh can overwrite shared upload bytes while an earlier GPU submission still needs them. Thanks to Zetsukae for identifying the overlap and recommending a standalone test against main. Original evidence · Zetsukae’s reply
The test uses synthetic words, a queue gate to force the overlap, and a completion fence before readback. It checks synchronous overlap and asynchronous disjoint ranges before asserting that an asynchronous overlapping refresh preserves the first read. The upload-shadow constructor and synchronization checkpoint are test-only. Production keeps its existing async selection and prewarm/drain order.
4f62c2aa208d61Fresh validation on main at
4f62c2a. The explicit test reached the overlap assertion. The GPU read[0xAABBCCDD, 0xAABBCCDD]; expected[0x11223344, 0xAABBCCDD]. The default invocation reported one ignored test. Five existing indirect tests passed. Targeted Clippy (lib and tests) and the non-test library build check completed with warnings.The regression stays ignored while the overwrite is present. A production fix should make the explicit run pass. The drain checkpoint may need revisiting if a fix moves the blocking wait. This evidence covers software WARP. Physical GPU behavior, game lighting, and performance remain unverified.
Coalesced disjoint refreshes
Nyx identified a second way to trigger the same early-prewarm overwrite. Neither four-byte refresh at offsets 0 and 131072 touches the pending GPU read at 66048. Batching both refreshes on the same non-sparse Shadow expands the actual copy to
[0, 131076), which includes that read. Checking each requested range separately would miss the overlap.Windows D3D12 WARP results on
70697c1with the added test. Each prewarm setting ran in 20 fresh processes. Each process exercised both cases on separate WARP hosts. Both reads should return OLD (0x11223344). NEW is0xAABBCCDD.[OLD, OLD][NEW, OLD][OLD, OLD][OLD, OLD]Both tests remain ignored by default. On the final test-only commit, each explicit WARP run reproduced its expected readback failure. The locked non-test library check passed with warnings.
AI-assisted with Astra 6.2.
@adrianmjim on GitHub · 2026-11-26 19:48 UTC · original
Tested at
70697c1; the later commit (d2adbc2) doesn't touch the overlapping-refresh test. It only adds the coalesced-refresh test, which I did not run.Tested on Windows 11 with an RX 7900 XT (driver 32.0.32029.2010), Rust 1.98.1, debug build. PR head
70697c1, base4f62c2a. Each run used a fresh process and the command from the PR body.WARP:
Hardware GPU: I changed
Host::new_warp()locally so it creates the device onfastest_adapter()(the RX 7900 XT) instead of WARP. Nothing else in the test changed.With the early
self.prewarm(runs)call skipped locally:Full
victory-gpulib tests, 7 runs of base and 7 runs of the PR, interleaved:frame::tests::waits_end_on_ticks_and_count_framesandwatch::tests::a_write_through_another_view_is_reported_at_the_guarded_onefailed in some runs on both base and PR.pipeline::library::tests::concurrent_atomic_writes_publish_one_complete_filefailed once in the PR runs with os error 5 (access denied). The PR does not touch that file, and it did not fail again in 30 runs on its own and 8 more full-suite runs.Not tested: a production fix (there is none yet), the performance cost of skipping the early prewarm, release builds, and the game itself.
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.