tooling: retry incomplete slot 57 shader bytecode #2521

Manually merged
github merged 1 commit from gh-pr/2521/head into gh-pr/2521/base 2026-11-27 00:59:03 +00:00
Owner

@⁠RonLogic on GitHub · 2026-11-25 19:40 UTC · original
RonLogic:tooling/repair-incomplete-slot57-cache → main · +59 −3 · 3 files · 1 commits · merged 2026-11-25 19:52 UTC

Change

Refs #2413 and #1759. The fixed slot-57 pending scan used a nonempty-file check, so a truncated shader was treated as ready when its manifest and the other stage were present. Check the DXContainer header and declared file length for both stages during compile publication and pending scans. Manifest-only mode still accepts a manifest without bytecode.

Verification

Windows x64 Release at 6d1b89ac, on 47490bd6. Five CTests passed without skips, including the WARP and RTX 4070 source-built render checks. The four new assertions for truncated or malformed nonempty artifacts fail with the old scanner. In a separate DXC run, I truncated each real stage in turn and verified that --pending recompiled it and marked the pair done.

cmake --build --preset release --target offscreen_check --parallel 4
ctest --preset release --no-tests=error -j 1 -R '^(startup_gfx2hlsl_watch|startup_mesh57_skeleton.*|startup_compute_request_offline)$' --output-on-failure
python -B tests/docs_links_check.py
git diff --check origin/main...HEAD

Windows 11 26300.10075, WARP 10.0.26100.10068, RTX 4070 driver 32.0.16.2124, and SDK 10.0.26100 DXC. I used Codex to implement the change and ran the checks on my Windows workstation.

**@⁠RonLogic** on GitHub · 2026-11-25 19:40 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2521) `RonLogic:tooling/repair-incomplete-slot57-cache` → `main` · +59 −3 · 3 files · 1 commits · merged 2026-11-25 19:52 UTC ## Change Refs #2413 and #1759. The fixed slot-57 pending scan used a nonempty-file check, so a truncated shader was treated as ready when its manifest and the other stage were present. Check the DXContainer header and declared file length for both stages during compile publication and pending scans. Manifest-only mode still accepts a manifest without bytecode. ## Verification Windows x64 Release at `6d1b89ac`, on `47490bd6`. Five CTests passed without skips, including the WARP and RTX 4070 source-built render checks. The four new assertions for truncated or malformed nonempty artifacts fail with the old scanner. In a separate DXC run, I truncated each real stage in turn and verified that `--pending` recompiled it and marked the pair done. ```powershell cmake --build --preset release --target offscreen_check --parallel 4 ctest --preset release --no-tests=error -j 1 -R '^(startup_gfx2hlsl_watch|startup_mesh57_skeleton.*|startup_compute_request_offline)$' --output-on-failure python -B tests/docs_links_check.py git diff --check origin/main...HEAD ``` Windows 11 26300.10075, WARP 10.0.26100.10068, RTX 4070 driver 32.0.16.2124, and SDK 10.0.26100 DXC. I used Codex to implement the change and ran the checks on my Windows workstation.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 00:59:01 +00:00
github manually merged commit 6d1b89acde into gh-pr/2521/base 2026-11-27 00:59:03 +00:00
Author
Owner

@⁠tedin7 on GitHub · 2026-11-25 19:49 UTC · original · reviewed

Review of head 6d1b89ac (comment only).

Scope: tooling only (tools/startup/gfx2hlsl.py, its watch test, docs note). No claim to advance game startup; nothing here needs game verification.

What I checked:

  • has_complete_mesh57_bytecode checks the DXBC magic, declared size == file size, and a sane part count. It is used both after the DXC compile (publication) and in pending_keys, so a truncated stage is recompiled instead of treated as done. Non-mesh keys still use has_bytecode. Manifest-only mode still accepts a manifest without bytecode.
  • The new test mesh57_resume_controls covers: manifest only, one stage only, both complete, each stage truncated, each stage with a bad header, and manifest-only mode.
  • Mutations (each reverted): dropping the size comparison makes the two truncated-bytecode checks fail; dropping the magic check makes the two bad-header checks fail.
  • Sibling callsites: the vs/ps and cs paths keep has_bytecode; no other mesh57 .cso readers found that need the new check.

Commands run locally:

  • python3 -B tests/startup_gfx2hlsl_watch_check.py passed
  • python3 tests/docs_links_check.py passed
  • python3 tests/bidi_controls_check.py passed
  • git diff --check origin/main...HEAD clean

No blocking findings. Win2025 receipt to follow separately.

AI-assisted; commands listed were executed locally.

**@⁠tedin7** on GitHub · 2026-11-25 19:49 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2521#pullrequestreview-6063982829) · **reviewed** Review of head 6d1b89ac (comment only). Scope: tooling only (`tools/startup/gfx2hlsl.py`, its watch test, docs note). No claim to advance game startup; nothing here needs game verification. What I checked: - `has_complete_mesh57_bytecode` checks the DXBC magic, declared size == file size, and a sane part count. It is used both after the DXC compile (publication) and in `pending_keys`, so a truncated stage is recompiled instead of treated as done. Non-mesh keys still use `has_bytecode`. Manifest-only mode still accepts a manifest without bytecode. - The new test `mesh57_resume_controls` covers: manifest only, one stage only, both complete, each stage truncated, each stage with a bad header, and manifest-only mode. - Mutations (each reverted): dropping the size comparison makes the two truncated-bytecode checks fail; dropping the magic check makes the two bad-header checks fail. - Sibling callsites: the vs/ps and cs paths keep `has_bytecode`; no other mesh57 `.cso` readers found that need the new check. Commands run locally: - `python3 -B tests/startup_gfx2hlsl_watch_check.py` passed - `python3 tests/docs_links_check.py` passed - `python3 tests/bidi_controls_check.py` passed - `git diff --check origin/main...HEAD` clean No blocking findings. Win2025 receipt to follow separately. AI-assisted; commands listed were executed locally.
Author
Owner

@⁠tedin7 on GitHub · 2026-11-25 19:53 UTC · original

Win2025 WARP receipt for head 6d1b89ac (up to date with main, no update needed).

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

  • Debug (--preset dev): ctest --preset dev -R 'startup_gfx2hlsl_watch|startup_mesh57' --parallel 2 --no-tests=error --output-on-failure: 4/4 passed (startup_mesh57_skeleton, startup_mesh57_skeleton_draw_hardware, startup_mesh57_skeleton_draw_warp, startup_gfx2hlsl_watch)
  • Release /O2 (--preset release): same ctest command: 4/4 passed (same four tests)
  • Windows Python checks: the startup Python check set ran ok on Windows (full list in the local pipeline log).

AI-assisted; commands listed were executed locally.

**@⁠tedin7** on GitHub · 2026-11-25 19:53 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2521#issuecomment-7172905227) Win2025 WARP receipt for head 6d1b89ac (up to date with main, no update needed). Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit `6d1b89acde4d92a54dd1a32f712a400d650c41bb`: - **Debug (`--preset dev`)**: `ctest --preset dev -R 'startup_gfx2hlsl_watch|startup_mesh57' --parallel 2 --no-tests=error --output-on-failure`: **4/4 passed** (`startup_mesh57_skeleton`, `startup_mesh57_skeleton_draw_hardware`, `startup_mesh57_skeleton_draw_warp`, `startup_gfx2hlsl_watch`) - **Release `/O2` (`--preset release`)**: same ctest command: **4/4 passed** (same four tests) - **Windows Python checks**: the startup Python check set ran ok on Windows (full list in the local pipeline log). AI-assisted; commands listed were executed locally.
This discussion has been locked. Commenting is limited to contributors.
No description provided.