runtime: make XApu typed completions opt-in #2260
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2268"
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-25T08:57:13Z.
Refs #1887 and #870. Two independent Windows hosts stopped on a null-destination copy shortly after the first XApu dequeue that reported typed fields. Their matched local reverts of #2242 advanced past the stop (Windows 10, Windows 11). The reports establish a regression with #2242. The downstream caller and its missing output contract still need to be traced.
The permissive path again retires one entry and writes a zeroed result by default.
X2W_XAPU_TYPED_COMPLETIONS=1selects the existing type/slot experiment explicitly. The bounded FIFO, command and result pointer checks, and strict traps stay in place.Windows Release on build 26200.9974, using the source-built caller:
2/2 passed. The new default-mode check enqueues an open command with nonzero type and slot, verifies an all-zero result and count 1 to 0, and checks that an empty dequeue preserves its sentinel. The previous typed FIFO, cap and pointer controls still run after opt-in. The same executable run against the pre-fix xapu.dll failed exactly the new default assertion (exit 1). This change awaits a matched application replay with the option unset.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T08:59:20Z.
Review: COMMENTED
Review of head
cb81521e6a977b9eebcf1e3304a8a5fe010fafa0(3 files:src/startup_stubs/xapu.cpp,tests/startup_xapu_queue_check.cpp,docs/startup-runtime.md).Summary: The change is small and correct for what it claims.
XApuDequeueResultstill retires one entry and zeroes 0x58 bytes. The type/slot echo now sits behindx2w_local::env_on("X2W_XAPU_TYPED_COMPLETIONS").env_onis read on each call, so the test can flip the variable at run time. The default-mode block in the test (open cmd type 1 / slot 7: zero result, count 1 to 0, empty dequeue keeps sentinel) covers the new default. The later typed-FIFO checks run after the explicit opt-in, so the old coverage is kept.Commands run locally (Linux worktree at this head):
git diff --stat origin/main...HEAD: 3 files, +24/-10python3 tests/docs_links_check.py: Self-test passed. Checked 18 Markdown files and 433 links.python3 tests/bidi_controls_check.py: Checked 1562 tracked files, no bidirectional controls.git diff --check origin/main...HEAD: cleangh pr checks: Linux Python checks pass. Windows build and gfx1013 jobs were still pending when I looked. Mergeable. The title is neutral.Not run: the C++ targets (
startup_xapu_queue,cpu_native_xapu_queue) need MSVC/Windows. I did not run a mutation (for example, removing theenv_onguard) because it cannot be built on Linux. By reading, dropping the guard would fail the new "default: ... all_zero" assertion. The PR body reports the same result against the pre-fix DLL. I did not queue a Windows VM run: the change touches no gfx2hlsl/shader code, and the PR reports a Windows Release run on build 26200.9974.Findings:
docs/startup-runtime.md:~1108): the Switches table listsX2W_AUDIO_PERMISSIVEbut not the newX2W_XAPU_TYPED_COMPLETIONS. It is only described in prose near line 1996. Add a row so the opt-in is discoverable with the other switches.docs/startup-runtime.md:~1996-2002): the sentence "An empty queue returns..." now starts on a short, broken line. This is cosmetic. Re-wrap the paragraph.AI-assisted; commands listed were executed locally.