Check live page-table allocations on capped view heaps #2242
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2244"
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 gmankab on 2026-11-25T08:38:45Z.
The page-table readback test assumes persistent view pairs start at or above slot 2^18. On a capped heap, the allocator can put those pairs in the smaller dynamic pool.
Keep the readback and pair-stability checks. While both pairs are live, reserve a draw-table allocation and assert that their two-slot ranges neither overlap each other nor the draw-table allocation. Also check that both pairs are outside the title slots.
The readback test passed on the default heap and with a locally forced 2^16-slot heap. FXC rejected the shader flags on this Wine setup, so I compiled the same HLSL with DXC for these runs. The DXC workaround and forced heap are local test changes.
Based-on:
github.com/Marvisak/VIctory@6d021fe3dfTested-on: AMD Radeon RX 6800, Fedora Linux 45 (Wine/vkd3d-proton, DXC test build)
Assisted-by: gpt-6.2 sol xhigh
Imported from Marvisak/VIctory. Originally posted by DenRakEiw on 2026-11-25T08:42:27Z.
Review: APPROVED
Verified locally merged onto
origin/main(940d32f, Windows 11 x64, NVIDIA GeForce RTX 5090, Rust 1.98.1 MSVC):cargo test -p victory-gpu --lib memory::tests::— 3 passed, 0 failed on NVIDIA RTX 5090! Directly fixeslists_share_a_table_and_copies_keep_their_viewson capped NVIDIA view heaps!cargo clippy -p victory-gpu --all-targets— 0 warningscargo xtask policy— ok (183 files ok)Clean check for live page-table allocations on capped view heaps. Looks great.
AI-assisted (Gemini 4 Neon).
Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-25T08:48:38Z.
Review: COMMENTED
Test-only: strengthen lists_share_a_table_and_copies_keep_their_views to verify disjoint live allocations on capped heaps (dynamic-slot assumption removed). Static review only: victory-gpu/victory-hle are Windows-only (D3D12/windows-sys); not compiled or tested on this macOS arm64 host. rustc 1.98.1.
Imported from Marvisak/VIctory. Originally posted by MamaLeVrai on 2026-11-25T09:13:28Z.
Test report on real hardware: AMD RX 6950 XT (RDNA2), Windows 11, Rust 1.98.1, with a GPU present, so the hardware-only shader checks run. I merged this PR's head
646363e2intomain940d32fin a throwaway tree (no conflict).cargo clippy --workspace --all-targets --locked -- -D warnings: clean; the same with--all-features: clean.cargo test --workspace --locked: 701 passed, 0 failed, 10 ignored, two runs (mainalone on the same machine: 701 passed, 0 failed, 10 ignored). The title was not run, so this says nothing about in-game effect. No game data.AI-assisted (Claude Code); no game data.
Imported from Marvisak/VIctory. Originally posted by kotekompotek on 2026-11-25T09:21:19Z.
Heads-up: #2251 touches the same assertion in this test (
pairs >= 1 << 18on a capped heap), so these two will conflict at that hunk. Your version is the better fix for this test — it keeps real invariants (pairs disjoint from each other and from the draw-table allocation, outside title slots) in both layouts, where mine just skips the check when the heap has no persistent range. If this lands first I'll rebase #2251 to drop its hunk here and keep only thedraw.rs/descriptor::hostchanges.Imported from Marvisak/VIctory. Originally posted by Mericas77 on 2026-11-25T10:12:53Z.
NVIDIA test report: RTX 4070, driver 621.01, Windows 11, Rust 1.98.1 MSVC. This host has a real capped view heap (NVIDIA's 1,000,000-descriptor limit), not a forced one. I ran head
646363eagainstmain940d32f; the head branches from940d32fand only changesmemory.rs.memory::tests::lists_share_a_table_and_copies_keep_their_viewsmain: fails:past the dynamic slots(memory.rs:673)cargo test -p victory-gpu --lib --lockedmain: 141 passed, 2 faileddescriptor::host::tests::dynamic_slots_are_held_until_released(heap.heap.GetDesc().NumDescriptors >= victory_shader::emit::HEAP_VIEWS, host.rs:1486), fails the same way onmain. It's the same heap-cap issue, and this PR doesn't touch it (#2251 / #2185 / #2177 cover that area).VICTORY_D3D12_DEBUG=1and--features diagnosticsand got the same result: it fails onmainand passes here.So the relaxed check holds on a real capped heap as well as the Wine run with a forced 2^16 heap. No game data; the title was not run.
AI-assisted.
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T13:30:57Z.
Automated triage for the maintainers.
This is a test-only fix in
memory::tests::lists_share_a_table_and_copies_keep_their_views(crates/victory-gpu/src/memory.rs). The hard-coded>= 1 << 18is replaced with checks that hold on any heap layout: pairs are disjoint from each other and from a live draw-table allocation, and lie outside the title slots. The reasoning matches main:HostHeap::pairfalls back todynamic(2)when the pair range is empty, which happens on capped heaps. CI passes, and a tester reports that the test now passes on an NVIDIA card with a real 1,000,000-descriptor cap, where it fails on main. #2251 touches the same assertion, and its author says this version should land first.Generated by Claude Code
upstream-sync referenced this pull request2026-11-25 14:07:24 +00:00
upstream-sync referenced this pull request2026-11-25 21:03:12 +00:00
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T22:07:25Z.
Automated triage for the maintainers, second look (a review against current
main, with builds and tests where they could change the verdict).Closing in favour of #2251, which changes the same assertion to
>= views.pair_start()where the heap has a pair range and skips it only on capped heaps, so the check keeps holding on uncapped hosts. With this version, a pair taken from the per-draw dynamic range would pass on an uncapped heap, and that is the mistake the test exists to catch.If this is mistaken, reply here with what was missed and it will be looked at again. Thank you for the contribution.
Pull request closed