Check live page-table allocations on capped view heaps #2244
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!2244
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/2244/head"
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?
@gmankab on GitHub · 2026-11-25 08:38 UTC · original
gmankab:contrib/check-live-page-pairs→main· +12 −3 · 1 files · 1 commits · closed without mergingThe 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
@MamaLeVrai on GitHub · 2026-11-25 09:13 UTC · original
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.
@kotekompotek on GitHub · 2026-11-25 09:21 UTC · original
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.@Mericas77 on GitHub · 2026-11-25 10:12 UTC · original
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.
@Marvisak on GitHub · 2026-11-25 13:30 UTC · original
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
@Marvisak on GitHub · 2026-11-25 22:07 UTC · original
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