cpu: give every archive texture runner the same app-local WARP #1302

Merged
archielcqp-a11y merged 1 commit from upstream-pr/1309 into main 2026-11-24 07:46:19 +00:00
archielcqp-a11y commented 2026-11-24 07:29:10 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by archielcqp-a11y on 2026-11-24T07:29:10Z.


Change

cpu_archive_texture_gpu_* compares the three runners' traces, and each trace includes the WARP driver line. With an app-local WARP (OFFSCREEN_WARP_DIR), the native reader runs from archive_gpu/, which had no d3d10warp.dll, and the pe_map run is hosted by python.exe, so both loaded the in-box WARP (10.0.19041). The AOT EXE sits beside the build's copy and loaded WARP 1.0.22, so its trace differed only in the driver line.

The build now places the app-local copy in archive_gpu/ through the existing offscreen_app_local_warp helper, which also removes it when the option is cleared. tests/cpu/archive_check.py --mapped loads the copy beside the native EXE before mapping. Builds without an app-local WARP are unchanged. Same approach as #1108 for the shim tests. Independent problem; no issue.

Verification

Commit 1c8ad41 on upstream dc73c29, Windows 10 build 19045, Agility SDK 1.620.2 + WARP 1.0.22 build, debug layer enabled.

  • On f05369e, system CFG off: ctest --no-tests=error -R '^cpu_(native_archive|archive)' → 5/5 passed; native, pe_map and AOT all report driver 1.0.22.0. Before: AOT both trace and status mismatch (10.0.19041.5794 expected, 1.0.22.0 got).
  • On dc73c29, system CFG on (Windows default): native and AOT device lines are both gpu device Microsoft Basic Render Driver, driver 1.0.22.0, and the pe_map "both" case matches. The pe_map "truncated" case then fails fast with FAST_FAIL_INVALID_LONGJUMP_TARGET, as reported in #1293; it fails the same way without this change, and also in cpu_native_archive_blast and cpu_archive_texture_publication, which this change does not affect.
  • app_local_warp_toggle and docs_links pass.

Not run: a build without OFFSCREEN_WARP_DIR on this base; there the helper only removes a stale copy and the mapped host finds no d3d10warp.dll to load.

Evidence and follow-up

No new fixture. docs/experiments.md gains a paragraph in the archive texture GPU section. Refs #1293 for the remaining pe_map truncated failure under CFG.

Checklist

  • This pull request covers one reviewable behavior.
  • I included the exact command and result for every check I ran.
  • I considered a negative control or failure case for a new fixture. (No new fixture; the pre-change driver mismatch is the failure case.)
  • I updated README/docs when a capability or build requirement changed.
  • I did not include game files, dumps, distribution links or secrets.

This change was AI-assisted.

🤖 Generated with Claude Code

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6576862578 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1309). Originally posted by [archielcqp-a11y](https://github.com/archielcqp-a11y) on 2026-11-24T07:29:10Z. --- ## Change `cpu_archive_texture_gpu_*` compares the three runners' traces, and each trace includes the WARP driver line. With an app-local WARP (`OFFSCREEN_WARP_DIR`), the native reader runs from `archive_gpu/`, which had no `d3d10warp.dll`, and the `pe_map` run is hosted by `python.exe`, so both loaded the in-box WARP (10.0.19041). The AOT EXE sits beside the build's copy and loaded WARP 1.0.22, so its trace differed only in the driver line. The build now places the app-local copy in `archive_gpu/` through the existing `offscreen_app_local_warp` helper, which also removes it when the option is cleared. `tests/cpu/archive_check.py --mapped` loads the copy beside the native EXE before mapping. Builds without an app-local WARP are unchanged. Same approach as #1108 for the shim tests. Independent problem; no issue. ## Verification Commit `1c8ad41` on upstream `dc73c29`, Windows 10 build 19045, Agility SDK 1.620.2 + WARP 1.0.22 build, debug layer enabled. - On `f05369e`, system CFG off: `ctest --no-tests=error -R '^cpu_(native_archive|archive)'` → 5/5 passed; native, `pe_map` and AOT all report `driver 1.0.22.0`. Before: `AOT both trace and status` mismatch (`10.0.19041.5794` expected, `1.0.22.0` got). - On `dc73c29`, system CFG on (Windows default): native and AOT device lines are both `gpu device Microsoft Basic Render Driver, driver 1.0.22.0`, and the `pe_map` "both" case matches. The `pe_map` "truncated" case then fails fast with `FAST_FAIL_INVALID_LONGJUMP_TARGET`, as reported in #1293; it fails the same way without this change, and also in `cpu_native_archive_blast` and `cpu_archive_texture_publication`, which this change does not affect. - `app_local_warp_toggle` and `docs_links` pass. Not run: a build without `OFFSCREEN_WARP_DIR` on this base; there the helper only removes a stale copy and the mapped host finds no `d3d10warp.dll` to load. ## Evidence and follow-up No new fixture. `docs/experiments.md` gains a paragraph in the archive texture GPU section. Refs #1293 for the remaining `pe_map` truncated failure under CFG. ## Checklist - [x] This pull request covers one reviewable behavior. - [x] I included the exact command and result for every check I ran. - [x] I considered a negative control or failure case for a new fixture. (No new fixture; the pre-change driver mismatch is the failure case.) - [x] I updated README/docs when a capability or build requirement changed. - [x] I did not include game files, dumps, distribution links or secrets. This change was AI-assisted. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
upstream-sync closed this pull request 2026-11-24 08:01:33 +00:00
tedin7 commented 2026-11-24 08:01:33 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T07:42:07Z.

Review: COMMENTED


Reviewed at commit 1c8ad4135465fff84740c09da865aac234419168.

Code Review

  • CMakeLists.txt: offscreen_app_local_warp("${OFFSCREEN_WARP_DIR}" "${archive_gpu_dir}") ensures the native archive_gpu/archive_texture_reader.exe resolves the same app-local d3d10warp.dll as the lifted AOT executable.
  • tests/cpu/archive_check.py: preloading native.with_name("d3d10warp.dll") via ctypes.WinDLL when present ensures the pe_map host (python.exe) also binds the same app-local WARP DLL before DXGI initialization, keeping driver-version traces consistent across all three runners.
  • docs/experiments.md: documents the app-local WARP behavior clearly.

Verification

  • Linux (1c8ad413):
    • git diff --check origin/main...HEAD: pass
    • /root/.local/share/x2w-rev-venv/bin/python -B tests/docs_links_check.py: pass (16 Markdown files, 289 links)
    • /root/.local/share/x2w-rev-venv/bin/python -B tests/bidi_controls_check.py: pass (1091 files)
  • Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP, --target archive_texture_gpu_lifted archive_gpu_reader pe_map):
    • Debug (--preset dev): ctest --preset dev -R '^cpu_archive_texture_.*_warp$' --parallel 4 --no-tests=error --output-on-failure — 1/1 passed (cpu_archive_texture_gpu_warp)
    • Release /O2 (--preset release): ctest --preset release -R '^cpu_archive_texture_.*_warp$' --parallel 4 --no-tests=error --output-on-failure — 1/1 passed (cpu_archive_texture_gpu_warp)
<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6035400504 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1309#pullrequestreview-6035400504). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-24T07:42:07Z. **Review:** COMMENTED --- Reviewed at commit `1c8ad4135465fff84740c09da865aac234419168`. ### Code Review - `CMakeLists.txt`: `offscreen_app_local_warp("${OFFSCREEN_WARP_DIR}" "${archive_gpu_dir}")` ensures the native `archive_gpu/archive_texture_reader.exe` resolves the same app-local `d3d10warp.dll` as the lifted AOT executable. - `tests/cpu/archive_check.py`: preloading `native.with_name("d3d10warp.dll")` via `ctypes.WinDLL` when present ensures the `pe_map` host (`python.exe`) also binds the same app-local WARP DLL before DXGI initialization, keeping driver-version traces consistent across all three runners. - `docs/experiments.md`: documents the app-local WARP behavior clearly. ### Verification - **Linux** (`1c8ad413`): - `git diff --check origin/main...HEAD`: pass - `/root/.local/share/x2w-rev-venv/bin/python -B tests/docs_links_check.py`: pass (16 Markdown files, 289 links) - `/root/.local/share/x2w-rev-venv/bin/python -B tests/bidi_controls_check.py`: pass (1091 files) - **Windows Server 2025** (Build 26100, MSVC 14.44.35207 + D3D12 WARP, `--target archive_texture_gpu_lifted archive_gpu_reader pe_map`): - **Debug (`--preset dev`)**: `ctest --preset dev -R '^cpu_archive_texture_.*_warp$' --parallel 4 --no-tests=error --output-on-failure` — **1/1 passed** (`cpu_archive_texture_gpu_warp`) - **Release `/O2` (`--preset release`)**: `ctest --preset release -R '^cpu_archive_texture_.*_warp$' --parallel 4 --no-tests=error --output-on-failure` — **1/1 passed** (`cpu_archive_texture_gpu_warp`)
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!1302
No description provided.