startup: translate shader requests during a -Render run (cold-cache black frames) #2112

Merged
SimSalabimse merged 2 commits from upstream-pr/2120 into main 2026-11-25 01:07:12 +00:00
SimSalabimse commented 2026-11-25 00:51:51 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by SimSalabimse on 2026-11-25T00:51:51Z.


Cold -Render runs stay black when pipelines write req_* requests but never get manifests (pipelines translated 0 / missing N). Add gfx2hlsl.py --watch and run.ps1 -Translate so translations publish while the title runs; keep #2008 bytecode resume and -TraceCalls.

Rebases reviewed #1749 onto current main. Refs #870.

Change

Cold -Render at 06cdc47d presented mean level 0.00/255 with pipelines translated 0 / missing 6 and translated draws 0 (not drawn 54879). The six pipelines wrote req_* requests but never loaded a <key>.txt manifest. Heap-indexed root deferral (#1732) had refuse counts 0 and does not block the translated path.

This PR rebases reviewed #1749 onto current main:

  • tools/startup/gfx2hlsl.py --watch repeats the pending scan (parallel via X2W_TRANSLATE_JOBS)
  • run.ps1 -Translate (with -Render) starts the watcher beside the debugger and tears it down with taskkill /T
  • Keeps #2008 manifest/bytecode resume and -TraceCalls

Originally authored by @NiiRoZz in #1749. Prefer superseding #1749 after merge.

Verification

Linux pure-Python (this agent), no Windows GPU:

python3 -B tests/startup_gfx2hlsl_watch_check.py   # passed
python3 -B tests/startup_translator_check.py       # 0 failed
python3 -B tests/startup_run_ps1_check.py --text-only  # 0 failed
python3 -B tests/startup_gfx2hlsl_capture_check.py # passed
python3 -B tests/startup_image_sample_l_check.py   # passed
python3 -B tests/startup_image_3d_check.py         # passed
python3 -B tests/startup_image_load_mip_check.py   # passed
python3 -B tests/startup_image_2d_array_check.py   # passed
python3 -B tests/startup_flat_param_check.py       # passed
python3 -B tests/startup_inline_sampler_check.py   # passed
python3 -B tests/docs_links_check.py               # passed
python3 -B tests/bidi_controls_check.py            # passed

Not run: Windows PowerShell startup_run_ps1, WARP/hardware GPU fixtures, live title with -Translate (no game files on this agent).

Evidence and follow-up

Synthetic request files only; no game data. After merge, cold runs should use -Render -Translate (docs updated). A warm cache still works without -Translate. Live title mean-level recovery and per-pipeline .fail census remain for a Windows retest on #870.

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.
  • I updated README/docs when a capability or build requirement changed.
  • I did not include game files, dumps, distribution links or secrets.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6594576068 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2120). Originally posted by [SimSalabimse](https://github.com/SimSalabimse) on 2026-11-25T00:51:51Z. --- Cold -Render runs stay black when pipelines write req_* requests but never get manifests (pipelines translated 0 / missing N). Add gfx2hlsl.py --watch and run.ps1 -Translate so translations publish while the title runs; keep #2008 bytecode resume and -TraceCalls. Rebases reviewed #1749 onto current main. Refs #870. ## Change Cold `-Render` at `06cdc47d` presented mean level 0.00/255 with `pipelines translated 0 / missing 6` and `translated draws 0 (not drawn 54879)`. The six pipelines wrote `req_*` requests but never loaded a `<key>.txt` manifest. Heap-indexed root deferral (#1732) had refuse counts 0 and does not block the translated path. This PR rebases reviewed #1749 onto current `main`: - `tools/startup/gfx2hlsl.py --watch` repeats the pending scan (parallel via `X2W_TRANSLATE_JOBS`) - `run.ps1 -Translate` (with `-Render`) starts the watcher beside the debugger and tears it down with `taskkill /T` - Keeps `#2008` manifest/bytecode resume and `-TraceCalls` Originally authored by @NiiRoZz in #1749. Prefer superseding #1749 after merge. ## Verification Linux pure-Python (this agent), no Windows GPU: python3 -B tests/startup_gfx2hlsl_watch_check.py # passed python3 -B tests/startup_translator_check.py # 0 failed python3 -B tests/startup_run_ps1_check.py --text-only # 0 failed python3 -B tests/startup_gfx2hlsl_capture_check.py # passed python3 -B tests/startup_image_sample_l_check.py # passed python3 -B tests/startup_image_3d_check.py # passed python3 -B tests/startup_image_load_mip_check.py # passed python3 -B tests/startup_image_2d_array_check.py # passed python3 -B tests/startup_flat_param_check.py # passed python3 -B tests/startup_inline_sampler_check.py # passed python3 -B tests/docs_links_check.py # passed python3 -B tests/bidi_controls_check.py # passed Not run: Windows PowerShell `startup_run_ps1`, WARP/hardware GPU fixtures, live title with `-Translate` (no game files on this agent). ## Evidence and follow-up Synthetic request files only; no game data. After merge, cold runs should use `-Render -Translate` (docs updated). A warm cache still works without `-Translate`. Live title mean-level recovery and per-pipeline `.fail` census remain for a Windows retest on #870. ## 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. - [x] I updated README/docs when a capability or build requirement changed. - [x] I did not include game files, dumps, distribution links or secrets. AI-assisted.
upstream-sync closed this pull request 2026-11-25 02:01:48 +00:00
R0Y00 commented 2026-11-25 02:02:04 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-25T01:04:23Z.


I merged current main into the reviewed branch and retained both CTest registrations. On Windows the PowerShell 5.1 and 7 launcher tests passed, including watcher cleanup and the surviving-child mutations. The ready-marker watcher, worker-pool retry, translator and scalar arity checks also passed. These are source-built checks; cold title rendering still needs an independent run.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7149177174 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2120#issuecomment-7149177174). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-25T01:04:23Z. --- I merged current main into the reviewed branch and retained both CTest registrations. On Windows the PowerShell 5.1 and 7 launcher tests passed, including watcher cleanup and the surviving-child mutations. The ready-marker watcher, worker-pool retry, translator and scalar arity checks also passed. These are source-built checks; cold title rendering still needs an independent run.
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!2112
No description provided.