startup: exercise upload arena allocation contract #1774
No reviewers
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows!1774
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1774/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?
@R0Y00 on GitHub · 2026-11-24 18:22 UTC · original
R0Y00:codex/command-list-upload-arena→main· +192 −0 · 4 files · 2 commits · merged 2026-11-24 19:08 UTCRefs #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.
@R0Y00 on GitHub · 2026-11-24 18:58 UTC · original
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.
github-bot referenced this pull request2026-11-27 16:59:50 +00:00
@tedin7 on GitHub · 2026-11-24 18:49 UTC · original · reviewed
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.