runtime: trace paired slot 86 input writers and fences #2496

Merged
sydney-0o merged 2 commits from upstream-pr/2504 into main 2026-11-25 19:12:16 +00:00
sydney-0o commented 2026-11-25 18:42:09 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by sydney-0o on 2026-11-25T18:42:09Z.


Refs #870. Follows #2377 and #2375.

Set X2W_MESH86_WRITER_TRACE=<n> to observe one DispatchMesh attempt using a slot 86 cache key. The trace reports both inputs before an early refusal, the most recent overlapping copy in the observed submission history, and the writer and fence submission IDs for each validated lease. A root binding without a proved extent is reported as an anchor. Submission reports forwarding or its first refusal.

The new source-built check observes the root publication while the argument writer is still unsubmitted, matches both independent writer submissions to the DIRECT waits, and requires separate submit-time refusals after remapping either physical page.

Validation at 2b87fcfc

Windows 10 host build 19045.6456, Windows Sandbox with vGPU disabled, Release x64, Microsoft Basic Render Driver app-local WARP 1.0.22.0, Agility SDK 1.620.2. The D3D12 debug layer was unavailable in the guest. Ran the commands registered by this CTest selection serially in the guest: 13 zero-exit passes and both refusal-census controls with their expected diagnostics. No software capability skips.

cmake --build --preset release --target startup_indirect_draw_indexed xmem_shim
ctest --preset release --no-tests=error -j 1 -R '^(startup_mesh86_srv_proof|startup_indirect_(mesh_(cache_warp|xmem_arguments.*warp|lease_warp_.*)|(translated|other)_refusal_census_.*warp))$' -V

For app-local WARP setup, see the wrapped XMem lease fixture in docs/experiments.md. The real writer and fence chain in #870 still needs a matched replay that reaches slot 86.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6611279594 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2504). Originally posted by [sydney-0o](https://github.com/sydney-0o) on 2026-11-25T18:42:09Z. --- Refs #870. Follows #2377 and #2375. Set `X2W_MESH86_WRITER_TRACE=<n>` to observe one DispatchMesh attempt using a slot 86 cache key. The trace reports both inputs before an early refusal, the most recent overlapping copy in the observed submission history, and the writer and fence submission IDs for each validated lease. A root binding without a proved extent is reported as an anchor. Submission reports forwarding or its first refusal. The new source-built check observes the root publication while the argument writer is still unsubmitted, matches both independent writer submissions to the DIRECT waits, and requires separate submit-time refusals after remapping either physical page. **Validation at `2b87fcfc`** Windows 10 host build 19045.6456, Windows Sandbox with vGPU disabled, Release x64, Microsoft Basic Render Driver app-local WARP 1.0.22.0, Agility SDK 1.620.2. The D3D12 debug layer was unavailable in the guest. Ran the commands registered by this CTest selection serially in the guest: 13 zero-exit passes and both refusal-census controls with their expected diagnostics. No software capability skips. ```powershell cmake --build --preset release --target startup_indirect_draw_indexed xmem_shim ctest --preset release --no-tests=error -j 1 -R '^(startup_mesh86_srv_proof|startup_indirect_(mesh_(cache_warp|xmem_arguments.*warp|lease_warp_.*)|(translated|other)_refusal_census_.*warp))$' -V ``` For app-local WARP setup, see the wrapped XMem lease fixture in `docs/experiments.md`. The real writer and fence chain in #870 still needs a matched replay that reaches slot 86.
tedin7 commented 2026-11-25 19:04:08 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T18:57:22Z.

Review: COMMENTED


Review of head 2b87fcfc (code and fixture; Win2025 receipt follows separately).

What I checked:

  • The trace is opt-in. X2W_MESH86_WRITER_TRACE must be a decimal ordinal (invalid or empty gives 0, off), one call per process, so logs stay bounded. With it off, trace_call stays 0 and the new branches in list_execute_indirect do nothing.
  • The submission trace takes mesh_xmem_mutex only when the split path does not already hold it (locked), so no double lock. The copy history is a fixed 1024-entry ring, read newest first.
  • note_mesh_xmem_write gains slot and source_kind. Both callers in list_copy.inl are updated, with labels that match the source (upload, default-uav, uav-capable-buffer, buffer).
  • The new CTest startup_indirect_mesh_lease_warp_dual-trace runs the fixture at ordinals 2, 3, 4 and 6. It asserts the missing-writer refusal, two distinct writer submits matched to the DIRECT waits, and a separate refusal for each remap (root-srv-identity-changed, arguments-identity-changed). It guards the new log contract, and the refusal rows give it negative controls.
  • Sibling check: no other open or merged PR uses X2W_MESH86_WRITER_TRACE. It follows #2377 and #2375, as the body says.

Not blocking: the trace rows are plain log text, so a later wording change needs a matching test change. That is expected for this kind of fixture.

Commands run locally (Linux): git diff --check origin/main...HEAD (clean), python3 tests/docs_links_check.py (pass), python3 tests/bidi_controls_check.py (pass). The check script is Windows/D3D12 only, so no mutation was run on Linux.

The PR itself says the real writer and fence chain in #870 still needs a matched replay. I make no claim about game startup.

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6063281521 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2504#pullrequestreview-6063281521). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-25T18:57:22Z. **Review:** COMMENTED --- Review of head 2b87fcfc (code and fixture; Win2025 receipt follows separately). What I checked: - The trace is opt-in. `X2W_MESH86_WRITER_TRACE` must be a decimal ordinal (invalid or empty gives 0, off), one call per process, so logs stay bounded. With it off, `trace_call` stays 0 and the new branches in `list_execute_indirect` do nothing. - The submission trace takes `mesh_xmem_mutex` only when the split path does not already hold it (`locked`), so no double lock. The copy history is a fixed 1024-entry ring, read newest first. - `note_mesh_xmem_write` gains `slot` and `source_kind`. Both callers in `list_copy.inl` are updated, with labels that match the source (upload, default-uav, uav-capable-buffer, buffer). - The new CTest `startup_indirect_mesh_lease_warp_dual-trace` runs the fixture at ordinals 2, 3, 4 and 6. It asserts the missing-writer refusal, two distinct writer submits matched to the DIRECT waits, and a separate refusal for each remap (`root-srv-identity-changed`, `arguments-identity-changed`). It guards the new log contract, and the refusal rows give it negative controls. - Sibling check: no other open or merged PR uses `X2W_MESH86_WRITER_TRACE`. It follows #2377 and #2375, as the body says. Not blocking: the trace rows are plain log text, so a later wording change needs a matching test change. That is expected for this kind of fixture. Commands run locally (Linux): `git diff --check origin/main...HEAD` (clean), `python3 tests/docs_links_check.py` (pass), `python3 tests/bidi_controls_check.py` (pass). The check script is Windows/D3D12 only, so no mutation was run on Linux. The PR itself says the real writer and fence chain in #870 still needs a matched replay. I make no claim about game startup. AI-assisted; commands listed were executed locally.
upstream-sync closed this pull request 2026-11-25 20:04:29 +00:00
RonLogic commented 2026-11-25 20:04:40 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by RonLogic on 2026-11-25T19:09:10Z.


Independent Release verification of 44087b3c4d300a07b31e4c6b37240b02819047df.

Windows 11 x64 build 26300.10075, MSVC 19.52.37029, RTX 4070 driver 621.24,
and in-box WARP 10.0.26100.10068. The fixture reported the D3D12 debug layer
enabled on both backends.

cmake --build --preset release --target startup_indirect_draw_indexed xmem_shim --parallel 4
ctest --preset release --no-tests=error -j 1 -R '^(startup_mesh86_srv_proof|startup_indirect_(mesh_(cache_(warp|hardware)|xmem_arguments.*(warp|hardware)|lease_(warp|hardware)_.*)|(translated|other)_refusal_census_.*(warp|hardware)))$' --output-on-failure

26/26 passed, including the CTest WARP trace and both expected refusal-census
controls. No skips. I also ran the same trace assertions on RTX 4070 by invoking
the fixture directly from the Release build directory:

$env:XBOX2WINDOWS_ADAPTER = 'RTX 4070'
$dxc = ((Select-String -LiteralPath CMakeCache.txt -Pattern '^DXC_EXECUTABLE:FILEPATH=').Line -split '=', 2)[1]
python -B ../../../tests/startup_indirect_mesh_cache_check.py $dxc ./startup_indirect_draw_indexed.exe hardware ./xmem.dll dual-trace
Selected call Trace and pixel readback on RTX 4070
2 Root SRV publication matched. The unsubmitted argument writer was absent and recording was refused. 0/8 pixels changed.
3 COPY submit 2 published the four-byte root SRV and COMPUTE submit 4 published the 12-byte arguments. DIRECT submit 5 waited on both corresponding fences and forwarded the command. 8/8 pixels were red.
4 The root-page remap produced root-srv-identity-changed at submission. 0/8 pixels changed.
6 The argument-page remap produced arguments-identity-changed at submission. 0/8 pixels changed.

Three additional runs in dual mode left the selector unset or set to 3x
and 4294967296. Each emitted zero trace rows and still rendered 8/8 red
pixels in the ordered case.

This covers the public fixture on the RTX 4070 as well as WARP. The
saved-profile writer/fence trace in #870 remains a separate retest.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7171889027 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2504#issuecomment-7171889027). Originally posted by [RonLogic](https://github.com/RonLogic) on 2026-11-25T19:09:10Z. --- Independent Release verification of `44087b3c4d300a07b31e4c6b37240b02819047df`. Windows 11 x64 build 26300.10075, MSVC 19.52.37029, RTX 4070 driver 621.24, and in-box WARP 10.0.26100.10068. The fixture reported the D3D12 debug layer enabled on both backends. ```powershell cmake --build --preset release --target startup_indirect_draw_indexed xmem_shim --parallel 4 ctest --preset release --no-tests=error -j 1 -R '^(startup_mesh86_srv_proof|startup_indirect_(mesh_(cache_(warp|hardware)|xmem_arguments.*(warp|hardware)|lease_(warp|hardware)_.*)|(translated|other)_refusal_census_.*(warp|hardware)))$' --output-on-failure ``` 26/26 passed, including the CTest WARP trace and both expected refusal-census controls. No skips. I also ran the same trace assertions on RTX 4070 by invoking the fixture directly from the Release build directory: ```powershell $env:XBOX2WINDOWS_ADAPTER = 'RTX 4070' $dxc = ((Select-String -LiteralPath CMakeCache.txt -Pattern '^DXC_EXECUTABLE:FILEPATH=').Line -split '=', 2)[1] python -B ../../../tests/startup_indirect_mesh_cache_check.py $dxc ./startup_indirect_draw_indexed.exe hardware ./xmem.dll dual-trace ``` | Selected call | Trace and pixel readback on RTX 4070 | | --- | --- | | 2 | Root SRV publication matched. The unsubmitted argument writer was absent and recording was refused. 0/8 pixels changed. | | 3 | COPY submit 2 published the four-byte root SRV and COMPUTE submit 4 published the 12-byte arguments. DIRECT submit 5 waited on both corresponding fences and forwarded the command. 8/8 pixels were red. | | 4 | The root-page remap produced `root-srv-identity-changed` at submission. 0/8 pixels changed. | | 6 | The argument-page remap produced `arguments-identity-changed` at submission. 0/8 pixels changed. | Three additional runs in `dual` mode left the selector unset or set to `3x` and `4294967296`. Each emitted zero trace rows and still rendered 8/8 red pixels in the ordered case. This covers the public fixture on the RTX 4070 as well as WARP. The saved-profile writer/fence trace in #870 remains a separate retest.
tedin7 commented 2026-11-25 20:04:40 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T19:10:58Z.


Win2025 WARP receipt for head 44087b3c after updating with main. Targeted run on the tests this PR adds or changes; hardware variants skip on the WARP-only VM.

Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit 44087b3c4d300a07b31e4c6b37240b02819047df:

  • Debug (--preset dev):
    • Build (cmake --build --preset dev --target startup_indirect_draw_indexed xmem_shim d3d12_xs_shim -- -j 2): 56.75s (configure 4.05s)
    • Test (ctest --preset dev -R '^(startup_mesh86_srv_proof|startup_indirect_mesh_.*(warp|dual).*)$' --parallel 2 --no-tests=error --output-on-failure): 16/20 passed (29.10s: startup_indirect_mesh_warp 1.86s, startup_indirect_mesh_amplified_warp 1.42s, startup_indirect_mesh_console_warp 4.02s, startup_indirect_mesh_xmem_arguments_warp 1.93s, startup_indirect_mesh_xmem_arguments_skip_wait_warp 1.35s, startup_indirect_mesh_create_result_warp 0.22s, startup_indirect_mesh_request_warp 1.92s, startup_mesh86_srv_proof 2.75s, startup_indirect_mesh_lease_warp_dual-trace 9.01s, startup_indirect_mesh_lease_warp_ordered_control 3.68s, startup_indirect_mesh_cache_warp 11.41s, startup_indirect_mesh_lease_warp_skip-wait 2.68s, startup_indirect_mesh_lease_warp_dual 4.15s, startup_indirect_mesh_lease_warp_dual-skip-srv 3.18s, startup_indirect_mesh_lease_warp_dual-skip-argument 2.80s, startup_indirect_mesh_lease_hardware_dual 0.64s, startup_indirect_mesh_lease_hardware_dual-skip-srv 0.34s, startup_indirect_mesh_lease_hardware_dual-skip-argument 0.32s, startup_indirect_mesh_lease_warp_dual-init-only 2.76s, startup_indirect_mesh_lease_hardware_dual-init-only 0.37s); skipped (capability, not a pass): startup_indirect_mesh_lease_hardware_dual, startup_indirect_mesh_lease_hardware_dual-skip-srv, startup_indirect_mesh_lease_hardware_dual-skip-argument, startup_indirect_mesh_lease_hardware_dual-init-only
  • Release /O2 (--preset release):
    • Build (cmake --build --preset release --target startup_indirect_draw_indexed xmem_shim d3d12_xs_shim -- -j 2): 80.01s (configure 6.18s)
    • Test (ctest --preset release -R '^(startup_mesh86_srv_proof|startup_indirect_mesh_.*(warp|dual).*)$' --parallel 2 --no-tests=error --output-on-failure): 16/20 passed (5.24s: startup_indirect_mesh_warp 0.25s, startup_indirect_mesh_console_warp 0.22s, startup_indirect_mesh_amplified_warp 0.10s, startup_indirect_mesh_xmem_arguments_skip_wait_warp 0.13s, startup_indirect_mesh_xmem_arguments_warp 0.23s, startup_indirect_mesh_create_result_warp 0.06s, startup_indirect_mesh_request_warp 0.07s, startup_mesh86_srv_proof 0.68s, startup_indirect_mesh_lease_warp_dual-trace 1.74s, startup_indirect_mesh_cache_warp 1.55s, startup_indirect_mesh_lease_warp_ordered_control 0.69s, startup_indirect_mesh_lease_warp_skip-wait 0.60s, startup_indirect_mesh_lease_warp_dual 0.82s, startup_indirect_mesh_lease_warp_dual-skip-srv 0.65s, startup_indirect_mesh_lease_warp_dual-skip-argument 0.67s, startup_indirect_mesh_lease_hardware_dual 0.20s, startup_indirect_mesh_lease_warp_dual-init-only 0.71s, startup_indirect_mesh_lease_hardware_dual-skip-srv 0.19s, startup_indirect_mesh_lease_hardware_dual-skip-argument 0.18s, startup_indirect_mesh_lease_hardware_dual-init-only 0.18s); skipped (capability, not a pass): startup_indirect_mesh_lease_hardware_dual, startup_indirect_mesh_lease_hardware_dual-skip-srv, startup_indirect_mesh_lease_hardware_dual-skip-argument, startup_indirect_mesh_lease_hardware_dual-init-only
  • sccache: 12/173 hits; wall 168.6s

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7171930578 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2504#issuecomment-7171930578). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-25T19:10:58Z. --- Win2025 WARP receipt for head 44087b3c after updating with main. Targeted run on the tests this PR adds or changes; hardware variants skip on the WARP-only VM. Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit `44087b3c4d300a07b31e4c6b37240b02819047df`: - **Debug (`--preset dev`)**: - Build (`cmake --build --preset dev --target startup_indirect_draw_indexed xmem_shim d3d12_xs_shim -- -j 2`): `56.75s` (configure `4.05s`) - Test (`ctest --preset dev -R '^(startup_mesh86_srv_proof|startup_indirect_mesh_.*(warp|dual).*)$' --parallel 2 --no-tests=error --output-on-failure`): **16/20 passed** (`29.10s`: `startup_indirect_mesh_warp` `1.86s`, `startup_indirect_mesh_amplified_warp` `1.42s`, `startup_indirect_mesh_console_warp` `4.02s`, `startup_indirect_mesh_xmem_arguments_warp` `1.93s`, `startup_indirect_mesh_xmem_arguments_skip_wait_warp` `1.35s`, `startup_indirect_mesh_create_result_warp` `0.22s`, `startup_indirect_mesh_request_warp` `1.92s`, `startup_mesh86_srv_proof` `2.75s`, `startup_indirect_mesh_lease_warp_dual-trace` `9.01s`, `startup_indirect_mesh_lease_warp_ordered_control` `3.68s`, `startup_indirect_mesh_cache_warp` `11.41s`, `startup_indirect_mesh_lease_warp_skip-wait` `2.68s`, `startup_indirect_mesh_lease_warp_dual` `4.15s`, `startup_indirect_mesh_lease_warp_dual-skip-srv` `3.18s`, `startup_indirect_mesh_lease_warp_dual-skip-argument` `2.80s`, `startup_indirect_mesh_lease_hardware_dual` `0.64s`, `startup_indirect_mesh_lease_hardware_dual-skip-srv` `0.34s`, `startup_indirect_mesh_lease_hardware_dual-skip-argument` `0.32s`, `startup_indirect_mesh_lease_warp_dual-init-only` `2.76s`, `startup_indirect_mesh_lease_hardware_dual-init-only` `0.37s`); skipped (capability, not a pass): `startup_indirect_mesh_lease_hardware_dual`, `startup_indirect_mesh_lease_hardware_dual-skip-srv`, `startup_indirect_mesh_lease_hardware_dual-skip-argument`, `startup_indirect_mesh_lease_hardware_dual-init-only` - **Release `/O2` (`--preset release`)**: - Build (`cmake --build --preset release --target startup_indirect_draw_indexed xmem_shim d3d12_xs_shim -- -j 2`): `80.01s` (configure `6.18s`) - Test (`ctest --preset release -R '^(startup_mesh86_srv_proof|startup_indirect_mesh_.*(warp|dual).*)$' --parallel 2 --no-tests=error --output-on-failure`): **16/20 passed** (`5.24s`: `startup_indirect_mesh_warp` `0.25s`, `startup_indirect_mesh_console_warp` `0.22s`, `startup_indirect_mesh_amplified_warp` `0.10s`, `startup_indirect_mesh_xmem_arguments_skip_wait_warp` `0.13s`, `startup_indirect_mesh_xmem_arguments_warp` `0.23s`, `startup_indirect_mesh_create_result_warp` `0.06s`, `startup_indirect_mesh_request_warp` `0.07s`, `startup_mesh86_srv_proof` `0.68s`, `startup_indirect_mesh_lease_warp_dual-trace` `1.74s`, `startup_indirect_mesh_cache_warp` `1.55s`, `startup_indirect_mesh_lease_warp_ordered_control` `0.69s`, `startup_indirect_mesh_lease_warp_skip-wait` `0.60s`, `startup_indirect_mesh_lease_warp_dual` `0.82s`, `startup_indirect_mesh_lease_warp_dual-skip-srv` `0.65s`, `startup_indirect_mesh_lease_warp_dual-skip-argument` `0.67s`, `startup_indirect_mesh_lease_hardware_dual` `0.20s`, `startup_indirect_mesh_lease_warp_dual-init-only` `0.71s`, `startup_indirect_mesh_lease_hardware_dual-skip-srv` `0.19s`, `startup_indirect_mesh_lease_hardware_dual-skip-argument` `0.18s`, `startup_indirect_mesh_lease_hardware_dual-init-only` `0.18s`); skipped (capability, not a pass): `startup_indirect_mesh_lease_hardware_dual`, `startup_indirect_mesh_lease_hardware_dual-skip-srv`, `startup_indirect_mesh_lease_hardware_dual-skip-argument`, `startup_indirect_mesh_lease_hardware_dual-init-only` - `sccache`: 12/173 hits; wall `168.6s` AI-assisted; commands listed were executed locally.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
R0Y00/Xbox2Windows!2496
No description provided.