startup: exercise upload arena allocation contract #1767
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1774"
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 R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-24T18:22:43Z.
Refs #1352.
Extract the mapped D3D12 upload arena into an independently exercised helper. The source-built fixture allocates 640 writable bytes with 16-byte alignment on both CPU and GPU, checks allocation offsets and address translation, fills a later page, and verifies that the first allocation still holds its data. Controls reject zero size or alignment, non-power-of-two alignment, overflow, and translations that cross an allocation boundary. Idle reset retires all prior ranges.
The fixture issues no GPU submission. Guest slot binding, rejection after list Close, and GPU use of an upload payload across a pending fence remain outside this measurement. The separate command-list resubmit tests exercise allocator reuse and the lost-fence control with render-target clears.
Verification
Commit
4c4ea4aa, Windows 11 25H2 build 26200.9974, MSVC 19.51.36244.0. D3D12 debug layer enabled on WARP 10.0.26100.9818 and RTX 4060 Laptop GPU 32.0.16.1656.All six CTests passed with zero skips. Link, bidi, and whitespace checks passed.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T18:49:40Z.
Review: COMMENTED
Reviewed at
4c4ea4aaef1b56d7808db73db882667bbf8129e3.No P1/P2 defects found in local verification.
x2w_upload::Arenainsrc/startup_stubs/list_upload_pages.henforces 16-byte minimum power-of-two alignment, checks CPU/GPU alignment parity, prevents integer overflow in allocation andtranslate()range bounds checks, rolls over to new 64 KiB+ upload pages without invalidating earlier allocations, and clears pages/allocations onreset().Local Verification
python3 /root/.local/state/xbox2windows/pipeline/x2w_pipe.py prep-verify 1774 --dir /tmp/rev-sm2-rexb/1774 --json(git_diff_check,docs_links_check,bidi_controls_check: all ok)--preset dev) & Release/O2(--preset release):python3 /root/.local/state/xbox2windows/pipeline/x2w_pipe.py win2025 1774 --targets startup_upload_arena --regex '^startup_upload_arena_warp$'--preset dev): 1/1 passed (startup_upload_arena_warp0.12s)/O2(--preset release): 1/1 passed (startup_upload_arena_warp0.11s)bytes <= it->bytes - offset) inArena::translate()insrc/startup_stubs/list_upload_pages.hand ranpython3 /root/.local/state/xbox2windows/pipeline/x2w_pipe.py win2025 1774 --wt /tmp/rev-sm2-rexb/1774 --targets startup_upload_arena --regex '^startup_upload_arena_warp$' --wait 600: FAIL (startup_upload_arena_warpexited withUpload arena contract failed: invalid allocation or range accepted), then restored withgit checkout -- ..AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-24T18:58:54Z.
Merged the current main into this PR branch and retained the list and RTV registrations and documentation. Windows Release passed 8/8 across the arena, resubmission (including untracked fence) and RTV tests on WARP and RTX 4060 Laptop. Production slot wiring and the separate in-flight upload test remain tracked in #1758/#874.