startup: add slot 148 acceptance client #2202
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2210"
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 MasterDomino on 2026-11-25T05:17:17Z.
Refs #1758
What
startup_slot148_acceptancetests command-list slot 148, the upload allocation that the title's acceleration-structure builder requests. It is the acceptance R0Y00 defined on #1758, now required against the production slot that landed in #2216.The client drives the actual d3d12_xs list and queue. It calls whichever slot 148 the build installs, supplies no allocator, and keeps no upload page of its own. The branch is rebased on
mainata78de99a, which includes #2216 (940cd178). This PR changes nothing insrc/.There are two commits:
de20801a: the first client, rebased from342554da.feb40ff2: the review changes, listed below.Review changes (second commit)
x2w_d3d12_upload_gpu_address(list, cpu, bytes)is a fixture-only adapter to the production address resolver, outside the guest ABI. It holds no page reference for the client.slot 148 not implemented (missing slot), exit 10.SKIP_REGULAR_EXPRESSIONis removed, so only a missing physical adapter skips (77). There is no skip left to drop in a follow-up.startup_indirect_dispatchreaches it.(i * 29 + 0x5b) ^ s. A and B use the #2068 values 0xA1 and 0xB2 as seeds; the stale fill uses 0x5C and the sentinel 0xE7.foreign).Contract and its sources
rdx = 0x280andr8 = 0x10, and returns a pointer inrax; null is a refusalFailed to allocate upload bufferSteps
Each step uses new lists on the real console device and queue:
traced: a writable CPU range, a 16-byte-aligned GPU address, and the last byte atgpu + 0x27f.fresh:b. A must no longer resolve.allocator: asfresh, but allocatorais Reset and the list is Reset onawhile A is held. B must not overlap A, and A must still read A.overwrite: the #2068 control. B is also written into A's live range before the gate opens, so both reads of A must show B.reuse: forced early reuse. A list is Closed without being submitted, then Reset on the same idle allocator. If B overlaps A's GPU range, A's read must show B. #2216 does not reuse that range, so this step reportsnot exercised.foreign: the wrong-list and stale-generation controls above.arguments: zero size, zero alignment, alignment 24 and an overflowing size are refused.(64, 256)gives a CPU pointer and GPU address that are both 256-byte aligned.Exit codes:
Registration: four tests,
startup_slot148_acceptance_{warp,hardware}andstartup_slot148_acceptance_nodebug_{warp,hardware}. The environment isX2W_D3D12_PERMISSIVE=1;X2W_D3D12_LIST_NOOP=1;X2W_D3D12_RENDER=1withX2W_D3D12_DEBUG=1or0, and the only skip property isSKIP_RETURN_CODE 77.Results
Commit
feb40ff2onmainata78de99a, Release and Dev presets.startup_slot148_acceptance_*: 4 of 4 pass on WARP and the RX 9070 XT, with the debug layer on and off. In every run the device is not removed, there are 0 debug-layer errors, andreuse: not exercised.Related tests:
ctest --preset release --no-tests=error -R '^startup_(slot148_acceptance|upload_arena|upload_lifetime|list_resubmit)' -Vgives 16 of 16 passed, 0 skipped:startup_slot148_acceptance_*(4),startup_list_resubmit_*(8),startup_upload_arena_*(2),startup_upload_lifetime_*(2).The Dev preset gives the same 4 of 4 for the new tests.
Mutants of the real #2216 slots (local harness, not in this PR). The harness builds the client source unchanged. It wraps the real slot 148, slot 43, Reset and resolver of the
mainbuild, applying one mutation at a time. Every row gave the same exit on WARP and the RX 9070 XT, with the debug layer on and off (36 runs):main)slot 148 acceptance passedslot 148 not implemented (missing slot)the advertised slot 148 refused the valid request (0x280, 0x10), first callgpu % 16 = 4observer B: byte 0 is 0x99 (expected 0xe9)in-list B: byte 0 is 0xbc (expected 0xe9); #2216 refuses the misaligned binding, so the read shows the sentinelin-list B: byte 0 is 0x99 (expected 0xe9)foreign: list 2 reading list 1's A: byte 0 is 0xfa (expected 0xbc)Under the earlier uniform payload, a +16 GPU address was caught only through a neighbouring allocation. Now it fails at byte 0.
Commands
The link, bidi and whitespace checks passed.
Environment
1002:7550), driver 32.0.31044.16.X2W_D3D12_DEBUG=1(the stand-in logsdebug layer: 0x00000000 enabled), and off withX2W_D3D12_DEBUG=0.Skips
None. Exit 77 is reserved for a missing physical adapter.
Not covered
🤖 Generated with Claude Code
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T06:01:09Z.
Review: COMMENTED
Review of head
a1c3c173a33f57ca4959e99613b622546575ad59.Scope: CMakeLists.txt (new
startup_slot148_acceptancetarget, 4 CTest entries: warp/hardware x debug on/off), docs/startup-runtime.md, tests/startup_slot148_acceptance.cpp. Nothing insrc/.Findings: 0 P1, 0 P2.
startup_upload_lifetimeentry; CMake block mirrors it (same TIMEOUT/SKIP_RETURN_CODE/ENVIRONMENT style). No other open PR covers slot 148 acceptance.Commands executed locally:
python3 tests/docs_links_check.py: pass (18 files, 409 links)python3 tests/bidi_controls_check.py: passgit diff --check origin/main...HEAD: cleanx2w_pipe.py win2025 2210 --scope direct --targets startup_slot148_acceptance --regex '^startup_slot148_acceptance_'; the default scope exceeded the 8191-char command limit): Debug 4/4 passed, Release /O2 4/4 passed (warp, hardware, nodebug variants)--patch, Debug): the overwrite control no longer writes B into A's live range (kPayloadB->kPayloadAat line 538). Result: 0/4 passed, all four tests failed. Reverted.Build and test on WindowsSUCCESS.AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-25T05:31:49Z.
The range query is fine as a fixture-only adapter to the production address resolver. Reuse the production range and generation checks. It should return the GPU address only for a valid live range, hold no page reference for the client, and stay outside the guest ABI. Keep zero alignment refused in this profile, as in #1774.
Please separate a missing slot from a valid 640-byte allocation returning null. Once production advertises the slot, the latter must fail, including on the first call. The production PR should make the acceptance required and remove the broad skip-by-message for that configuration.
The separate observer queue is a good lifetime and mapping probe. It does not yet check a GPU read recorded on the submitted list. For production acceptance, add a source-built copy or store that consumes A and B from the corresponding submissions, then fence and compare them. A fixture-only adapter can record that read if there is no suitable guest consumer yet. Keep the current observer as a separate check and use nonuniform payloads to catch partial-offset errors.
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-25T05:35:57Z.
Thanks for writing the independent client. I built
342554daunchanged and ran it against production candidate #2216, commit1239c983. WARP and RTX 4060 Laptop both passed with the D3D12 debug layer on and off (4/4, no skips). Both A and B survived the gated submission and reset. There were zero reported debug-layer errors and no device removal. The existing arena, lifetime and list-resubmission group passed 12/12.For the three open questions: the range-checked GPU-address export is accepted for fixtures. It resolves only a complete nonempty range within an allocation of the supplied list's open recording. Zero alignment is refused. Once #2216 is in the base branch, a missing implementation on a supported backend should fail this test; please drop the not-implemented skip then. A missing physical adapter can still report a capability skip.
Imported from R0Y00/Xbox2Windows. Originally posted by MasterDomino on 2026-11-25T05:48:06Z.
Updated for your review and now on top of #2216 (
feb40ff2ona78de99a). The acceptance is required:SKIP_REGULAR_EXPRESSIONis removed, so only a missing physical adapter skips (77).x2w_d3d12_upload_gpu_addressexport marks the slot as advertised.slot 148 not implemented (missing slot), exit 10.(i*29 + 0x5b) ^ seed, seeded with #2068's 0xA1/0xB2. The client checks at startup that a shift by 4 or 16 bytes changes every byte. The overwrite control is kept.foreignstep: slot 43 with another list's range, and with a pre-Reset range on the same list, must read the sentinel.Real
main, Windows 11 build 26300, WARP and RX 9070 XT, debug layer on and off:That gave 16/16, 0 skipped, no device removal and 0 debug-layer errors.
I also wrapped the real slot with one mutation at a time. That harness is local and not committed. Each mutant failed with its own exit code on both adapters: missing slot, null from the valid request, no refusal after Close, resolver address +4 or +16, slot 43 address +4 or +16, and resolving another list's range.
Two things for you to decide:
startup_indirect_dispatchdoes. Only the upload binding goes through guest slots 25, 33 and 43. Would you rather the Dispatch go through ExecuteIndirect (slot 61) as well?The startup rerun on the same input is going now; I'll report it on #1758.
AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by MasterDomino on 2026-11-25T05:49:03Z.
Note: you had pushed
6aa7fe7bto this branch while I was reworking it, so I didn't force-push over it. The branch head is nowa1c3c173, a merge that keeps6aa7fe7bin the history. Its tree is exactly the reworkedfeb40ff2described above, which supersedes6aa7fe7b's test, CMake and docs edits while keeping its requirement: no skip on a supported adapter, and a null from the valid request fails. The only difference is that a missing slot is reported separately, as exit 10.AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-25T06:00:57Z.
Verified
a1c3c173independently, 4/4 on WARP and RTX 4060 Laptop with the debug layer enabled and disabled. Using the desktop list for Dispatch is fine here because slot 43 binds the allocation and the same submitted list consumes it. Slot 61 can stay separate. Keep the early-reuse observation informational and keep the required fenced A/B, wrong-list and stale-generation checks.Imported from R0Y00/Xbox2Windows. Originally posted by legacy-code-archaeologist on 2026-11-25T06:02:40Z.
Ran head
a1c3c173(build targetstartup_slot148_acceptance). All six runs pass. Windows 11 build 26100.XBOX2WINDOWS_ADAPTER=QuadroXBOX2WINDOWS_ADAPTER=Intelstartup_slot148_acceptance_{warp,hardware}(debug layer requested)startup_slot148_acceptance_nodebug_{warp,hardware}(debug layer off)The executable does not print the adapter name, so I can't confirm from the log that the two hardware runs used different GPUs. A related startup test (
startup_indirect_draw_indexed) ignoresXBOX2WINDOWS_ADAPTERon this machine, so treat the two hardware columns as at least one hardware adapter, not necessarily two.AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by Jess-Doit on 2026-11-25T07:01:15Z.
Windows 10 result for this fixture, as requested on #870.
mainatb7707495, which includes this PR. Release, MSVC x64, clean worktree.startup_slot148_acceptance_warp(debug layer requested)startup_slot148_acceptance_nodebug_warp(debug layer off)slot 148 acceptance failed: exit 18after about 10.2 sstartup_slot148_acceptance_hardware(GTX 1060, debug layer requested)startup_slot148_acceptance_nodebug_hardware(GTX 1060, debug layer off)In the failing runs:
Microsoft Basic Render Driverwithdebug_layer=off.kWaitMsdeadline expires. Exit 18 is the ordering or timeout code.SEGFAULTinstead ofFailed, so the process also faults on the way out after the timeout.I have not narrowed it further. The same WARP passes with the debug layer requested, and both hardware variants pass.
Imported from R0Y00/Xbox2Windows. Originally posted by MasterDomino on 2026-11-25T07:01:24Z.
Seen Jess-Doit's result on #870:
startup_slot148_acceptance_nodebug_warpfails 4 of 4 runs on Windows 10's in-box WARP (10.0.19041), timing out with exit 18. The debug-requested WARP variant and both GTX 1060 variants pass. I'll take the follow-up, since this is our client.My working hypothesis, which I can't reproduce here (WARP 10.0.26100 passes): that WARP executes queues on a single ordered path. The client's held-phase reads run on a second queue while the first waits on the unsignalled CPU gate, so they can't complete before the gate opens, and the client times out. The segfault on exit in 2 of the 4 runs fits the client giving up with the gate still closed and work pending.
Planned fix, in a separate PR:
queues serializedand skips only the held-phase checks. Everything else still runs and is required: the traced shape, refusal after Close, A/B after the gate opens, and the foreign and stale reads.@Jess-Doit, once it's up, a rerun of
ctest --preset release --no-tests=error -R "^startup_slot148_acceptance(_nodebug)?_warp$" -Von that host would confirm the hypothesis. The expected output isqueues serializedwith the remaining checks passing.AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by MasterDomino on 2026-11-25T14:29:50Z.
The Windows 10 WARP follow-up is up as #2381. It adds a preflight for queues that don't progress while another waits on an unsignalled fence, skips only the held-phase observer reads there (and says so), and adds bounded cleanup on every exit path, plus a forced-serialized variant. The rerun request for that host is in the PR.
AI-assisted.