Tests: retry the decommit in the WARP placed-buffer test while the adapter lets go of the pages #80
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/80"
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 DexNom/VIctory. Originally posted by harrisotiropoulos-jpg on 2026-11-26T16:24:48Z.
What
inplace::tests::warp_a_title_buffer_in_place_shows_its_bytes_at_its_offsetfails now and then when the whole suite runs. The test drops the placed heap and immediately decommits half of its pages. The software adapter (WARP) releases the opened pages a few milliseconds after the heap's last reference goes away. So under load,VirtualFree(MEM_DECOMMIT)can still find the pages held and fail withERROR_INVALID_PARAMETER(87), which trips theassert_ne!(..., 0).The fix retries the decommit every 5 ms, for 2 s at most, before failing with the error code. The assertion that matters, that memory not committed whole is turned down without asking the host, is unchanged.
Evidence
cargo test --workspace --lockedfailed only on this test: 682 passed, 1 failed, 12 ignored.victory-gpulib tests, 6 processes at a time, 30 runs in all:Test machine (NVIDIA, since the README asks)
On this machine, at
64bd58f:cargo build --locked --release -p victory --features diagnostics --binsbuilds with no warnings.No gameplay results yet.
Other things seen under the same 6× parallel stress (not changed here)
frame::tests::waits_end_on_ticks_and_count_framesfailed in 9–10 of 30 runs, with flip ticks skipped (e.g.[3, 4, 5, 7]). It's a wall-clock test, and the CPU was oversubscribed, so this is probably just the load. It never failed in normalcargo testruns.texture::ahead::tests::first_upload_waits_for_its_copy_fence_and_preserves_texture_bytesfailed once in 30 runs, atahead.rs:682:retire(©)returnedSome(..)instead ofNoneafter the source byte changed. This one may be a real race between the ready upload and retire. I didn't dig into it.🤖 Generated with Claude Code
Imported from DexNom/VIctory. Originally posted by harrisotiropoulos-jpg on 2026-11-26T16:48:33Z.
Card measurements on an RTX 4080 (no game files needed)
I ran the
--ignoredmeasurement tests on NVIDIA hardware:cargo test --release --locked -p <crate> --lib <name> -- --ignored --exact --nocapture, at commit64bd58f. All five pass.indirect::bare_cost::bare_command_cost10,000 one-triangle draws into 2560×1440, three batches each. The numbers are µs per draw on the card.
The compute pass before a draw, (h) and (i), costs about 3.7 µs per draw on NVIDIA. That's about 300× an unchanged draw, so it's where per-draw overhead goes on this card.
host::tiled_write_probe::reserved_gpu_buffer_write_masks_match_snapshot_comparehost::batch::texture_checks_per_submissionwatch::tests::measures_mapped_guard_scansThese are medians.
bcpack::tests::bcpack_throughput(CPU)Imported from DexNom/VIctory. Originally posted by andrewDoing on 2026-11-27T00:07:37Z.
I reproduced one way the unrelated
ahead.rs:682failure mentioned in the PR can occur at7a2e7f6, using the original test's real copy queue/fence/readback on native Windows and no production-logic changes. A second thread heldwatch::MAPPINGonly during the test's 100while_readychecks. Each returned false before validating the changed fingerprint becausewatch.rs:903usestry_lock; no stale descriptor was published. After releasing the lock,retirereturnedSome(3930892424531486835), matching the unexpected result. The same binary passed without the held lock.Repeated false results therefore do not necessarily mean stale-state cleanup occurred. A bounded wait for transition out of READY, or synchronization on a successful pin, plus an assertion that publish never ran may stabilize the fixture. This demonstrates a test assumption under contention; it does not by itself show wrong texture bytes or a regression introduced by this PR.
Verification was AI-assisted with GPT-6.2 Astra.
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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.