tests: cover paired XMem refusals and lease retirement #2375

Manually merged
github merged 3 commits from gh-pr/2375/head into gh-pr/2375/base 2026-11-27 00:46:17 +00:00
Owner

@⁠sydney-0o on GitHub · 2026-11-25 14:15 UTC · original
sydney-0o:codex/mesh86-dual-xmem → main · +95 −23 · 3 files · 3 commits · merged 2026-11-25 18:37 UTC

Refs #870, #1759, and #1914. Follow-up to the paired slot-86 mesh path merged in #2377, as requested in the maintainer's review.

The ordered cached-mesh fixture now checks three additional cases.

  • Submit the SRV writer while its gate is closed and keep the recorded argument writer unsubmitted. The DIRECT consumer completes with a clear target while the SRV writer remains gated.
  • Remap the root SRV page after recording and before submission while preserving the argument mapping. The target stays clear. Restoring the original mapping restores all eight red pixels.
  • Hold a submitted DIRECT consumer behind a gate and unmap both guest pages. Neither physical page is reusable while the consumer is pending. The consumer still paints all eight red pixels. Both original pages become reusable after its fence.

The ordered WARP fixture is selected by the Windows PR smoke preset.

Validation on current main

Local Release commit cd9041f7, based on 7092683a, has the same tree as this PR head. Windows 10 build 19045.6456, app-local WARP 1.0.22.0 and Agility SDK 1.620.2 with the D3D12 debug layer enabled. The GTX 1080 Ti (32.0.15.8278) reported capability skips for mesh tests.

$warp and $agility point to the x64 runtime directories. $python and $dxc point to the test interpreter and the Windows SDK 10.0.26100.0 DXC.

.\tools\dev.ps1
cmake --preset release -B out/build/mesh-agility "-DOFFSCREEN_WARP_DIR=$warp" "-DOFFSCREEN_AGILITY_620_DIR=$agility" "-DINTAKE_PYTHON=$python" "-DDXC_EXECUTABLE=$dxc"
cmake --build out/build/mesh-agility --target startup_indirect_draw_indexed xmem_shim --parallel 4
ctest --test-dir out/build/mesh-agility --no-tests=error -j1 -R '^(startup_mesh86_srv_proof|startup_indirect_(mesh_(xmem_arguments.*|lease_.*)|translated_refusal_census_.*))$' --output-on-failure
ctest --test-dir out/build/mesh-agility --no-tests=error -j1 -R '^startup_indirect_mesh_lease_warp_dual$' --repeat until-fail:5 -V

12 passed, 0 failed, 8 capability skips. The updated WARP test passed five consecutive runs with zero D3D12 debug warnings or errors. The Python mesh86 proof, docs link check, bidi check, and git diff --check passed.

Original validation

The original head ddac900 remains in the branch history. Its Windows CI run passed. The maintainer independently ran all six paired cases on WARP and RTX 4060 Laptop, confirming both remap refusals and the retirement of both pages after the DIRECT fence.

**@⁠sydney-0o** on GitHub · 2026-11-25 14:15 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2375) `sydney-0o:codex/mesh86-dual-xmem` → `main` · +95 −23 · 3 files · 3 commits · merged 2026-11-25 18:37 UTC Refs #870, #1759, and #1914. Follow-up to the paired slot-86 mesh path merged in #2377, as requested in [the maintainer's review](https://git.gtahub.st/github/R0Y00--Xbox2Windows/pulls/2375). The ordered cached-mesh fixture now checks three additional cases. - Submit the SRV writer while its gate is closed and keep the recorded argument writer unsubmitted. The DIRECT consumer completes with a clear target while the SRV writer remains gated. - Remap the root SRV page after recording and before submission while preserving the argument mapping. The target stays clear. Restoring the original mapping restores all eight red pixels. - Hold a submitted DIRECT consumer behind a gate and unmap both guest pages. Neither physical page is reusable while the consumer is pending. The consumer still paints all eight red pixels. Both original pages become reusable after its fence. The ordered WARP fixture is selected by the Windows PR smoke preset. ### Validation on current main Local Release commit `cd9041f7`, based on `7092683a`, has the same tree as this PR head. Windows 10 build 19045.6456, app-local WARP 1.0.22.0 and Agility SDK 1.620.2 with the D3D12 debug layer enabled. The GTX 1080 Ti (32.0.15.8278) reported capability skips for mesh tests. `$warp` and `$agility` point to the x64 runtime directories. `$python` and `$dxc` point to the test interpreter and the Windows SDK 10.0.26100.0 DXC. ```powershell .\tools\dev.ps1 cmake --preset release -B out/build/mesh-agility "-DOFFSCREEN_WARP_DIR=$warp" "-DOFFSCREEN_AGILITY_620_DIR=$agility" "-DINTAKE_PYTHON=$python" "-DDXC_EXECUTABLE=$dxc" cmake --build out/build/mesh-agility --target startup_indirect_draw_indexed xmem_shim --parallel 4 ctest --test-dir out/build/mesh-agility --no-tests=error -j1 -R '^(startup_mesh86_srv_proof|startup_indirect_(mesh_(xmem_arguments.*|lease_.*)|translated_refusal_census_.*))$' --output-on-failure ctest --test-dir out/build/mesh-agility --no-tests=error -j1 -R '^startup_indirect_mesh_lease_warp_dual$' --repeat until-fail:5 -V ``` 12 passed, 0 failed, 8 capability skips. The updated WARP test passed five consecutive runs with zero D3D12 debug warnings or errors. The Python mesh86 proof, docs link check, bidi check, and `git diff --check` passed. ### Original validation The original head `ddac900` remains in the branch history. Its [Windows CI run](https://github.com/R0Y00/Xbox2Windows/actions/runs/45632057359) passed. The maintainer independently ran all six paired cases on WARP and RTX 4060 Laptop, confirming both remap refusals and the retirement of both pages after the DIRECT fence.
Compose the independently published ranges from R0Y00/Xbox2Windows#2303 and R0Y00/Xbox2Windows#2332.
Integrate upstream main and keep the three source-built controls requested in R0Y00/Xbox2Windows#2375. Retain the original review revision as the first parent.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 00:46:15 +00:00
github manually merged commit 52de62b966 into gh-pr/2375/base 2026-11-27 00:46:17 +00:00
Author
Owner

@⁠R0Y00 on GitHub · 2026-11-25 14:48 UTC · original

I independently ran the six paired mesh cases on WARP and RTX 4060 Laptop. Both backends saw the separate root and argument remap refusals and both pages became reusable after the DIRECT fence. The overlapping production path landed in #2377 (afd02a24), including the initializer-only GPU argument control. Please keep your root-page remap, unsubmitted argument writer and post-submit unmap of both ranges as a focused fixture follow-up to that baseline. Keeping them on your branch preserves authorship and the original Windows evidence.

**@⁠R0Y00** on GitHub · 2026-11-25 14:48 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2375#issuecomment-7165848297) I independently ran the six paired mesh cases on WARP and RTX 4060 Laptop. Both backends saw the separate root and argument remap refusals and both pages became reusable after the DIRECT fence. The overlapping production path landed in #2377 (`afd02a24`), including the initializer-only GPU argument control. Please keep your root-page remap, unsubmitted argument writer and post-submit unmap of both ranges as a focused fixture follow-up to that baseline. Keeping them on your branch preserves authorship and the original Windows evidence.
Author
Owner

@⁠tedin7 on GitHub · 2026-11-25 16:20 UTC · original · reviewed

Review of head 8d9df11b (tests: tests/startup_indirect_mesh_lease.inl, CMakePresets.json, docs/experiments.md).

What I checked:

  • This is the focused fixture follow-up the maintainer asked for after #2377. It extends the existing dual mode of check_mesh_dual_xmem and does not touch production code.
  • New cases are real D3D12 WARP readbacks: (1) the recorded but unsubmitted argument writer is refused while the SRV writer's gate stays closed (fence value still 0); (2) remapping the root SRV page and the argument page, one at a time, leaves the target clear, and restoring the mapping gives all red again; (3) with a gated DIRECT consumer, unmapping both guest pages leaves neither physical page reusable until the fence, and both become reusable after it.
  • The control modes (dual-skip-srv, dual-skip-argument, dual-init-only) keep their previous path because the new code only runs for ordered_case.
  • The CMakePresets.json change only adds startup_indirect_mesh_lease_warp_dual to the PR smoke filter. That name matches the test registered in CMakeLists.txt (startup_indirect_mesh_lease_${backend}_${mode}).
  • No open or merged PR duplicates this slice (searched XMem refusal and lease; #2280, #2332 and #2322 are the production and SRV-count work it builds on).

No blocking findings. Next: update with main, CI, Win2025 WARP dev+release.

AI-assisted; commands listed were executed locally.

**@⁠tedin7** on GitHub · 2026-11-25 16:20 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2375#pullrequestreview-6061043656) · **reviewed** Review of head 8d9df11b (tests: `tests/startup_indirect_mesh_lease.inl`, `CMakePresets.json`, `docs/experiments.md`). What I checked: - This is the focused fixture follow-up the maintainer asked for after #2377. It extends the existing `dual` mode of `check_mesh_dual_xmem` and does not touch production code. - New cases are real D3D12 WARP readbacks: (1) the recorded but unsubmitted argument writer is refused while the SRV writer's gate stays closed (fence value still 0); (2) remapping the root SRV page and the argument page, one at a time, leaves the target clear, and restoring the mapping gives all red again; (3) with a gated DIRECT consumer, unmapping both guest pages leaves neither physical page reusable until the fence, and both become reusable after it. - The control modes (`dual-skip-srv`, `dual-skip-argument`, `dual-init-only`) keep their previous path because the new code only runs for `ordered_case`. - The `CMakePresets.json` change only adds `startup_indirect_mesh_lease_warp_dual` to the PR smoke filter. That name matches the test registered in `CMakeLists.txt` (`startup_indirect_mesh_lease_${backend}_${mode}`). - No open or merged PR duplicates this slice (searched XMem refusal and lease; #2280, #2332 and #2322 are the production and SRV-count work it builds on). No blocking findings. Next: update with main, CI, Win2025 WARP dev+release. AI-assisted; commands listed were executed locally.
Author
Owner

@⁠tedin7 on GitHub · 2026-11-25 16:21 UTC · original

Win2025 WARP receipt for head 8d9df11b after updating with main.

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

  • Debug (--preset dev):
    • Build (cmake --build --preset dev --target startup_indirect_draw_indexed -- -j 2): 5.80s (configure 2.63s)
    • Test (ctest --preset dev -R 'startup_indirect_mesh_lease_warp' --parallel 4 --no-tests=error --output-on-failure): 6/6 passed (1.81s: startup_indirect_mesh_lease_warp_ordered_control 1.01s, startup_indirect_mesh_lease_warp_dual-skip-srv 1.03s, startup_indirect_mesh_lease_warp_dual-init-only 1.13s, startup_indirect_mesh_lease_warp_dual 1.21s, startup_indirect_mesh_lease_warp_skip-wait 0.56s, startup_indirect_mesh_lease_warp_dual-skip-argument 0.61s)
  • Release /O2 (--preset release):
    • Build (cmake --build --preset release --target startup_indirect_draw_indexed -- -j 2): 8.79s (configure 2.04s)
    • Test (ctest --preset release -R 'startup_indirect_mesh_lease_warp' --parallel 4 --no-tests=error --output-on-failure): 6/6 passed (1.40s: startup_indirect_mesh_lease_warp_ordered_control 0.71s, startup_indirect_mesh_lease_warp_dual-skip-argument 0.72s, startup_indirect_mesh_lease_warp_dual-init-only 0.79s, startup_indirect_mesh_lease_warp_dual 0.87s, startup_indirect_mesh_lease_warp_skip-wait 0.51s, startup_indirect_mesh_lease_warp_dual-skip-srv 0.56s)
  • sccache: 0/11 hits; wall 31.3s

AI-assisted; commands listed were executed locally.

**@⁠tedin7** on GitHub · 2026-11-25 16:21 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2375#issuecomment-7167831788) Win2025 WARP receipt for head 8d9df11b after updating with main. Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit `8d9df11bb570bc0d26aca7a86393e71b77229de4`: - **Debug (`--preset dev`)**: - Build (`cmake --build --preset dev --target startup_indirect_draw_indexed -- -j 2`): `5.80s` (configure `2.63s`) - Test (`ctest --preset dev -R 'startup_indirect_mesh_lease_warp' --parallel 4 --no-tests=error --output-on-failure`): **6/6 passed** (`1.81s`: `startup_indirect_mesh_lease_warp_ordered_control` `1.01s`, `startup_indirect_mesh_lease_warp_dual-skip-srv` `1.03s`, `startup_indirect_mesh_lease_warp_dual-init-only` `1.13s`, `startup_indirect_mesh_lease_warp_dual` `1.21s`, `startup_indirect_mesh_lease_warp_skip-wait` `0.56s`, `startup_indirect_mesh_lease_warp_dual-skip-argument` `0.61s`) - **Release `/O2` (`--preset release`)**: - Build (`cmake --build --preset release --target startup_indirect_draw_indexed -- -j 2`): `8.79s` (configure `2.04s`) - Test (`ctest --preset release -R 'startup_indirect_mesh_lease_warp' --parallel 4 --no-tests=error --output-on-failure`): **6/6 passed** (`1.40s`: `startup_indirect_mesh_lease_warp_ordered_control` `0.71s`, `startup_indirect_mesh_lease_warp_dual-skip-argument` `0.72s`, `startup_indirect_mesh_lease_warp_dual-init-only` `0.79s`, `startup_indirect_mesh_lease_warp_dual` `0.87s`, `startup_indirect_mesh_lease_warp_skip-wait` `0.51s`, `startup_indirect_mesh_lease_warp_dual-skip-srv` `0.56s`) - `sccache`: 0/11 hits; wall `31.3s` AI-assisted; commands listed were executed locally.
This discussion has been locked. Commenting is limited to contributors.
No description provided.