GPU test: the pair region is not where a capped heap puts it #3284
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3286"
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 Marvisak/VIctory. Originally posted by zzm1234560621-prog on 2026-11-26T15:59:02Z.
What
memory::tests::lists_share_a_table_and_copies_keep_their_viewsasserted that the two copies' view slots lie at>= 1 << 18, i.e. past a dynamic region ofDYNAMIC. On a host that caps shader-visible heaps at 1,000,000 the heap takesMIN_DYNAMIC(1 << 16) — and its pair region ends below where it starts, soHostHeap::pairnever uses it and hands out dynamic slots instead:The test then failed on an index assertion while the reads above it — the point of the test, one table shared and each list's own views kept — were all correct.
The layout the test described is not one a capped heap is required to have, so it now asserts what the design does guarantee:
a pair per copy);#[cfg(test)]has_pair_region()next tofirst_pair_slot(), both of which name the boundary instead of spelling1 << 18out.The read assertions are untouched.
Measured
Intel Arc (Xe-LPG, driver 32.0.101.6127), 1M cap,
main63bcca4:lists_share_a_table_and_copies_keep_their_viewspast the dynamic slots)cargo test -p victory-gpu --libThe one remaining failure is
descriptor::host::tests::dynamic_slots_are_held_until_released, which #3191 fixes — the two together make the suite green on a capped host.cargo clippy -p victory-gpu --all-targets --locked -- -D warnings: clean.cargo xtask policy: 191 files ok.Not in this PR
HEAP_VIEWSitself and whether a capped host should offer the larger dynamic range: that is #3178, and it is a design question, not a test one. This PR only stops a test from encoding one particular answer to it.No game files. AI-assisted (Claude).
Imported from Marvisak/VIctory. Originally posted by Dukestar69 on 2026-11-26T16:10:15Z.
Review: APPROVED
Reviewed the diff and verified locally on Windows 11 x64 (RTX 5090 + WARP):
views.has_pair_region()and asserting>= views.first_pair_slot()when present (instead of hardcoding1 << 18) cleanly fixeslists_share_a_table_and_copies_keep_their_viewson 1M-capped NVIDIA heaps while keeping the pair-region assertion intact on uncapped heaps.cargo test -p victory-gpu --lib memory::tests::lists_share_a_table_and_copies_keep_their_views -- --test-threads=1(RTX 5090): 1 passed, 0 failed.VICTORY_FORCE_WARP=1 cargo test -p victory-gpu --lib memory::tests::lists_share_a_table_and_copies_keep_their_views -- --test-threads=1(WARP): 1 passed, 0 failed.cargo clippy -p victory-gpu --all-targets -- -D warnings: clean.cargo xtask policy: 191 files ok.Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
Imported from Marvisak/VIctory. Originally posted by oni-swr on 2026-11-26T16:42:42Z.
WARP verification report (test report only, no code changes)
b83c07d563bcca43(control); WARP software adapter forced withVICTORY_WARP=1 VICTORY_D3D12_WARP=1,--features diagnostics, d3d10warp.dll 10.0.26100.9818; dxil.dll 1.8.2502.11 (Windows Kit 10.0.26100.0, viaVICTORY_DXIL). No physical GPU. Synthetic tests only, no game data.cargo test -p victory-gpu --lib --features diagnostics --no-run -j 4, then the test binary with--exact memory::tests::lists_share_a_table_and_copies_keep_their_views --test-threads 1, then the whole lib suite (7 runs per side).memory::tests::lists_share_a_table_and_copies_keep_their_views: passes on the PR (1 passed, 0.36 s).>= 1 << 18assertion holds. This PR's capped-heap failure (Intel Arc, 1M cap) is therefore not reproducible here; WARP only shows that the changed test still passes when the pair region exists.victory-gpulib suite, 7 runs on each side: both haveframe::tests::waits_end_on_ticks_and_count_framesfailing every run (also alone, on the PR and on main; unrelated).descriptor::host::tests::views_bound_while_another_slot_gets_its_texture_do_not_wait,pipeline::placed_uav_tests::placed_uav_dispatch_writes_its_texture), PR run 3 had 1 (views_bound_...); main run 7 had 1 (shadow::tests::partial_refresh_under_marked_range_updates_saved_bytes). Each passes alone on both sides, so these are parallel-run flakes unrelated to the PR.AI use: Claude Code (Claude Sonnet 5.5)
Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-26T23:48:31Z.
I tested the two assertion changes together in
67577b5, using exact #319178524a7and #3286b83c07d. Both Windows WARP runs per configuration used the same synthetic data. In the forced-cap fixture I rejected descriptor allocation requests above 1,000,000 and let D3D12 create the smaller heap through the existing fallback.mainOn capped
main, the first memory readback succeeded before the old pair-index assertion fired. The combined tests also completed the second submission and retained its readback and view checks. The fork commit contains just the two PRs' test changes. Strict GPU Clippy in both configurations and the asset policy passed.@zzm1234560621-prog, both exact heads are compatible as proposed. The combined branch is available if the maintainers prefer to take the two test fixes together.
Imported from Marvisak/VIctory. Originally posted by zzm1234560621-prog on 2026-11-27T00:01:21Z.
Cross-checked with #3191 on one branch (
preview/heap-caps), on the capped host:cargo test -p victory-gpu --libis 231 passed, 0 failed, 1 ignored, clippy clean. Each PR fixes its own test independently; together they leave the crate green here. If a single patch is preferred, that branch is the diff and I will fold these two into one.AI-assisted (Claude).
Imported from Marvisak/VIctory. Originally posted by kalberts0089-hash on 2026-11-27T08:15:00Z.
NVIDIA test report: RTX 4070 Ti (desktop, driver 621.01), Windows 11 Pro, rustc 1.98.1. Head
b83c07d(base main63bcca4).cargo test -p victory-gpu --lib -- --test-threads=1: 230 passed, 1 failed, 1 ignored (main: 229 / 2 / 1).lists_share_a_table_and_copies_keep_their_viewsfails on main here ("past the dynamic slots", capped 1M heap) and passes with this PR. The remaining failure is the other known capped-heap one,dynamic_slots_are_held_until_released(>= HEAP_VIEWS), which #3191 fixes.cargo test -p victory-shader --lib --no-fail-fast, skippingheap_direct_texture_reads_mark_their_heap_index(#2571): 298 passed, 3 failed, 3 ignored, same as main. The 3 are the known NVIDIA failures (a_heap_buffer_read_by_element_takes_the_views_stride,a_heap_buffer_read_where_no_buffer_view_is_reads_zeros,gathers_at_a_level_match_the_hardware), unrelated to this PR.Synthetic tests only, no game files. AI-assisted (Claude Code).
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.