tooling: retry incomplete slot 57 shader bytecode #2513

Merged
RonLogic merged 1 commit from upstream-pr/2521 into main 2026-11-25 19:52:14 +00:00
RonLogic commented 2026-11-25 19:40:58 +00:00 (Migrated from github.com)

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


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.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6612291716 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2521). Originally posted by [RonLogic](https://github.com/RonLogic) on 2026-11-25T19:40:58Z. --- ## 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.
upstream-sync closed this pull request 2026-11-25 20:04:37 +00:00
tedin7 commented 2026-11-25 20:04:38 +00:00 (Migrated from github.com)

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

Review: COMMENTED


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.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6063982829 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2521#pullrequestreview-6063982829). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-25T19:49:00Z. **Review:** COMMENTED --- 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 commented 2026-11-25 20:04:47 +00:00 (Migrated from github.com)

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


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.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7172905227 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2521#issuecomment-7172905227). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-25T19:53:30Z. --- 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.
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!2513
No description provided.