ProjectScarlett start menu: compute roots, faster compiles, watchdog pause #216

Merged
bbijsterbosch merged 12 commits from upstream-pr/216 into main 2026-11-26 11:19:35 +00:00
bbijsterbosch commented 2026-11-26 08:50:50 +00:00 (Migrated from github.com)

Imported from brcly/TuxBox. Originally posted by bbijsterbosch on 2026-11-26T08:50:50Z.


Summary

With this branch, ProjectScarlett 1.0.2.1 boots to its start menu on an NVIDIA laptop GPU under GE-Proton11-14. When the menu was up, no stand-in pipeline was bound (null usage … compute=0 raster=0).

Stand-ins remain during boot. 288 distinct stages had no translation (207 compute, 45 pixel, 32 mesh, 4 vertex). With the default 20 s deadline, many large compute pipelines also returned a stand-in while their driver compile went on.

The run used these twelve commits on ac4f099. They are now rebased onto main (773278a) without conflicts. Each commit builds on its own and passes the translator tests. The only addition to the build that ran is a one-line test fix (a missing strides field in an inline-arena test initializer).

Translator (xshader)

Commit Change
lower long jumps and waterfall lane reads A s_getpc/s_add_u32/s_addc_u32/s_setpc long jump with a provable target becomes a branch. A waterfall loop that gives each lane the value of the lane it names becomes a single group gather through the compute swizzle exchange.
lower DPP16 row-shift prefix sums The wave32 compaction scan (four row_shr adds, v_permlanex16, upper-row add) becomes WavePrefixSum. A select-then-copy into the accumulator is first merged into one select.
follow SCC through packed-root pointer masks SCC provenance is a 107th state word: s_cselect/s_addc/s_subb are accepted when SCC came from plain data.
take root table SGPRs from FSSM user-data records A user-data record that names a table pointer's SGPR overrides the per-stage default.
keep unproved uniform loops in the full-mask mode Structured loops with wave-uniform scalars translate and keep the emitter's watchdog. VCC is accepted as an SMEM offset.
or jump flags together in compute programs Compute guards use | and j = j | (c). The resolve kernels' unoptimised DXIL has a third fewer blocks, and DXC optimises them in 45 s instead of 83–110 s.
refuse translations beyond DXC's memory budget HLSL above 8 MiB is refused. Two 10 MB programs had taken 11 GB of DXC memory each.
read heap buffer strides from the runtime's table With root SRV t1, space32766 in the root, heap-loaded buffer descriptors get word 1 (the stride) from the runtime, so heap-indexed IDXEN accesses translate.

Runtime (d3d12, dxbc)

  • Compute programs bound to the root the title pairs them with:
    • Roots with more than two tables, or with root descriptors and constants after the tables, are accepted when the user data confirms every binding.
    • A pipeline root replaces an embedded RTS0.
    • Literal samplers that a root without flag 0x800 lacks become private statics. A root that reflection cannot describe gets a samplers-only extension, bound around each dispatch.
    • Paged heaps keep a per-slot buffer stride table, from view creation and descriptor copies. A program refused only for want of strides is retried with that table appended as a root SRV, and each dispatch binds it.
    • A rejected raster stream records its guest root and stages under the existing capture variables.
  • clzero: ProjectScarlett's hot clearing routine (RVA 0x4E8AA10) gets AVX stores in place of five clzero loops. On hosts without CLZERO, every call used to trap five times, about four million exceptions in half an hour.
  • Hang watchdog: ProjectScarlett's watchdog is paused while a title thread waits on a translation or a driver compile. It used to crash the title after long waits.

Both title patches write nothing unless the code matches 1.0.2.1 byte for byte. TUXBOX_KEEP_TITLE_WATCHDOG=1 keeps the watchdog.

Launcher

  • The -O0 compile cap scales with the HLSL size: 90 s per MB, between 90 and 600 s. The 2.5 MB resolve kernels used to time out on every boot.
  • Game runs set VKD3D_SHADER_DEBUG=err, so DXIL conversion failures name the construct the shader compiler rejected.

Host-profile record

host_profiles.txt changes for the saveexec and empty programs on every profile. Their jump-flag guards are now joined with | (commit "or jump flags together in compute programs"). Nothing else in the record changes.

Verified on Lanes

A pull request is not merged until Lanes passes on a GPU. Run:

python tuxbox.py check
  • python tuxbox.py check passed on this branch: every stage that ran passed, including Lanes and the fixtures on the GPU. The D3D12 regression controls and the translator GPU checks did not run, because they need --proton, --prefix and --windows-dxc.
  • Changed or new behaviour is covered by a Lanes scenario, or the reason it cannot be is stated below.
    • The clzero and watchdog patches match ProjectScarlett 1.0.2.1 code bytes and change nothing elsewhere, so Lanes cannot exercise them. Their unit tests check the byte matching.
    • The translator lowerings have unit tests built from the ProjectScarlett instruction sequences. They are not yet in check_translator_gpu.py.
    • The runtime root and stride binding could be covered by a Lanes scenario, but none has been added yet.

GPU, driver and backend: NVIDIA RTX 3000 Ada Generation Laptop GPU (10de:2838, host profile wave 32-32), driver 620.73.04, Proton backend with GE-Proton11-14 (vkd3d-proton v3.1-83-gcae8353ed), Linux 7.3.5.

  • This changes code both vendors run, and the check passed on an AMD and an NVIDIA card (why). Otherwise, say which vendor still needs to run it: AMD still needs to run it. NVIDIA passed the check above and ran ProjectScarlett with this build.

Paste the summary printed at the end:

Summary
  passed   Build the shader compiler (0s)
  passed   Python tests (3s)
  passed   Shader compiler tests (0s)
  passed   DXBC tests (0s)
  passed   XG layout tests (1s)
  passed   D3D12 Windows typecheck (0s)
  passed   Build (23s)
  passed   Lanes and fixtures on the GPU (201s)
  not run: pass --proton, --prefix and --windows-dxc D3D12 regression controls (0s)
  not run: pass --proton, --prefix and --windows-dxc Shader translator on the GPU (0s)

All checks that ran passed.

ProjectScarlett 1.0.2.1 with this build at its start menu, from the game log:

TuxBox d3d12_xs: host profile: adapter=10de:2838 wave=32-32 section-import=aliased descriptor-bytes=32/32
TuxBox d3d12_xs: replaced clzero loops at RVA 0x4e8aa10 with AVX stores (host lacks CLZERO)
TuxBox d3d12_xs: pausing the title's hang watchdog (RVA 0x71b6330) while shaders compile
TuxBox d3d12_xs: translated a compute shader with the heap stride table
TuxBox d3d12_xs: null usage interval recorded=0 display_bound=0 tracked=0 overflow=0 overflow_display_bound=0 compute=0 raster=0 interval=279 trigger=present_sample
TuxBox d3d12_xs: presented 124 frames in 10s, 142055 in total

Checks

CI runs the Python unit tests, the shader compiler, DXBC, and XG layout tests, and a Windows typecheck of tuxbox-d3d12.

These ran locally on the rebased tip, as in CI:

Check Result
python -m unittest discover -s tests -q 371 tests, OK (18 skipped)
cargo test … tools/shader-compiler 334 passed; before the rebase, it also passed at every translator commit
cargo test -p tuxbox-dxbc --features native-bindings 66 passed
cargo test -p tuxbox-xg-layout 14 passed
cargo check --target x86_64-pc-windows-msvc -p tuxbox-d3d12 clean, also with --tests, here and at every runtime commit before the rebase

No evidence JSON changes.

🤖 Generated with Claude Code

<!-- greyfinch-sync:brcly/TuxBox:issue:6622958674 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/pull/216). Originally posted by [bbijsterbosch](https://github.com/bbijsterbosch) on 2026-11-26T08:50:50Z. --- ## Summary With this branch, ProjectScarlett 1.0.2.1 boots to its start menu on an NVIDIA laptop GPU under GE-Proton11-14. When the menu was up, no stand-in pipeline was bound (`null usage … compute=0 raster=0`). Stand-ins remain during boot. 288 distinct stages had no translation (207 compute, 45 pixel, 32 mesh, 4 vertex). With the default 20 s deadline, many large compute pipelines also returned a stand-in while their driver compile went on. The run used these twelve commits on `ac4f099`. They are now rebased onto `main` (`773278a`) without conflicts. Each commit builds on its own and passes the translator tests. The only addition to the build that ran is a one-line test fix (a missing `strides` field in an inline-arena test initializer). ### Translator (`xshader`) | Commit | Change | | --- | --- | | lower long jumps and waterfall lane reads | A `s_getpc`/`s_add_u32`/`s_addc_u32`/`s_setpc` long jump with a provable target becomes a branch. A waterfall loop that gives each lane the value of the lane it names becomes a single group gather through the compute swizzle exchange. | | lower DPP16 row-shift prefix sums | The wave32 compaction scan (four `row_shr` adds, `v_permlanex16`, upper-row add) becomes `WavePrefixSum`. A select-then-copy into the accumulator is first merged into one select. | | follow SCC through packed-root pointer masks | SCC provenance is a 107th state word: `s_cselect`/`s_addc`/`s_subb` are accepted when SCC came from plain data. | | take root table SGPRs from FSSM user-data records | A user-data record that names a table pointer's SGPR overrides the per-stage default. | | keep unproved uniform loops in the full-mask mode | Structured loops with wave-uniform scalars translate and keep the emitter's watchdog. VCC is accepted as an SMEM offset. | | or jump flags together in compute programs | Compute guards use `\|` and `j = j \| (c)`. The resolve kernels' unoptimised DXIL has a third fewer blocks, and DXC optimises them in 45 s instead of 83–110 s. | | refuse translations beyond DXC's memory budget | HLSL above 8 MiB is refused. Two 10 MB programs had taken 11 GB of DXC memory each. | | read heap buffer strides from the runtime's table | With root SRV `t1, space32766` in the root, heap-loaded buffer descriptors get word 1 (the stride) from the runtime, so heap-indexed IDXEN accesses translate. | ### Runtime (`d3d12`, `dxbc`) - **Compute programs bound to the root the title pairs them with:** - Roots with more than two tables, or with root descriptors and constants after the tables, are accepted when the user data confirms every binding. - A pipeline root replaces an embedded RTS0. - Literal samplers that a root without flag 0x800 lacks become private statics. A root that reflection cannot describe gets a samplers-only extension, bound around each dispatch. - Paged heaps keep a per-slot buffer stride table, from view creation and descriptor copies. A program refused only for want of strides is retried with that table appended as a root SRV, and each dispatch binds it. - A rejected raster stream records its guest root and stages under the existing capture variables. - **clzero:** ProjectScarlett's hot clearing routine (RVA 0x4E8AA10) gets AVX stores in place of five `clzero` loops. On hosts without CLZERO, every call used to trap five times, about four million exceptions in half an hour. - **Hang watchdog:** ProjectScarlett's watchdog is paused while a title thread waits on a translation or a driver compile. It used to crash the title after long waits. Both title patches write nothing unless the code matches 1.0.2.1 byte for byte. `TUXBOX_KEEP_TITLE_WATCHDOG=1` keeps the watchdog. ### Launcher - The -O0 compile cap scales with the HLSL size: 90 s per MB, between 90 and 600 s. The 2.5 MB resolve kernels used to time out on every boot. - Game runs set `VKD3D_SHADER_DEBUG=err`, so DXIL conversion failures name the construct the shader compiler rejected. ### Host-profile record `host_profiles.txt` changes for the `saveexec` and `empty` programs on every profile. Their jump-flag guards are now joined with `|` (commit "or jump flags together in compute programs"). Nothing else in the record changes. ## Verified on Lanes A pull request is not merged until Lanes passes on a GPU. Run: ```sh python tuxbox.py check ``` - [x] `python tuxbox.py check` passed on this branch: every stage that ran passed, including Lanes and the fixtures on the GPU. The D3D12 regression controls and the translator GPU checks did not run, because they need `--proton`, `--prefix` and `--windows-dxc`. - [ ] Changed or new behaviour is covered by a Lanes scenario, or the reason it cannot be is stated below. - The clzero and watchdog patches match ProjectScarlett 1.0.2.1 code bytes and change nothing elsewhere, so Lanes cannot exercise them. Their unit tests check the byte matching. - The translator lowerings have unit tests built from the ProjectScarlett instruction sequences. They are not yet in `check_translator_gpu.py`. - The runtime root and stride binding could be covered by a Lanes scenario, but none has been added yet. GPU, driver and backend: NVIDIA RTX 3000 Ada Generation Laptop GPU (10de:2838, host profile wave 32-32), driver 620.73.04, Proton backend with GE-Proton11-14 (vkd3d-proton v3.1-83-gcae8353ed), Linux 7.3.5. - [ ] This changes code both vendors run, and the check passed on an AMD and an NVIDIA card ([why](../CONTRIBUTING.md#amd-and-nvidia)). Otherwise, say which vendor still needs to run it: **AMD still needs to run it.** NVIDIA passed the check above and ran ProjectScarlett with this build. Paste the summary printed at the end: ```text Summary passed Build the shader compiler (0s) passed Python tests (3s) passed Shader compiler tests (0s) passed DXBC tests (0s) passed XG layout tests (1s) passed D3D12 Windows typecheck (0s) passed Build (23s) passed Lanes and fixtures on the GPU (201s) not run: pass --proton, --prefix and --windows-dxc D3D12 regression controls (0s) not run: pass --proton, --prefix and --windows-dxc Shader translator on the GPU (0s) All checks that ran passed. ``` ProjectScarlett 1.0.2.1 with this build at its start menu, from the game log: ```text TuxBox d3d12_xs: host profile: adapter=10de:2838 wave=32-32 section-import=aliased descriptor-bytes=32/32 TuxBox d3d12_xs: replaced clzero loops at RVA 0x4e8aa10 with AVX stores (host lacks CLZERO) TuxBox d3d12_xs: pausing the title's hang watchdog (RVA 0x71b6330) while shaders compile TuxBox d3d12_xs: translated a compute shader with the heap stride table TuxBox d3d12_xs: null usage interval recorded=0 display_bound=0 tracked=0 overflow=0 overflow_display_bound=0 compute=0 raster=0 interval=279 trigger=present_sample TuxBox d3d12_xs: presented 124 frames in 10s, 142055 in total ``` ## Checks CI runs the Python unit tests, the shader compiler, DXBC, and XG layout tests, and a Windows typecheck of `tuxbox-d3d12`. These ran locally on the rebased tip, as in CI: | Check | Result | | --- | --- | | `python -m unittest discover -s tests -q` | 371 tests, OK (18 skipped) | | `cargo test … tools/shader-compiler` | 334 passed; before the rebase, it also passed at every translator commit | | `cargo test -p tuxbox-dxbc --features native-bindings` | 66 passed | | `cargo test -p tuxbox-xg-layout` | 14 passed | | `cargo check --target x86_64-pc-windows-msvc -p tuxbox-d3d12` | clean, also with `--tests`, here and at every runtime commit before the rebase | No evidence JSON changes. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
bbijsterbosch commented 2026-11-26 09:06:06 +00:00 (Migrated from github.com)

Imported from brcly/TuxBox. Originally posted by bbijsterbosch on 2026-11-26T09:06:06Z.


Please note performance of shader compilation is very poor. will optimize after ive resolved more unsupported shaders.

<!-- greyfinch-sync:brcly/TuxBox:comment:7187422249 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/pull/216#issuecomment-7187422249). Originally posted by [bbijsterbosch](https://github.com/bbijsterbosch) on 2026-11-26T09:06:06Z. --- Please note performance of shader compilation is very poor. will optimize after ive resolved more unsupported shaders.
NickStallman commented 2026-11-26 09:26:13 +00:00 (Migrated from github.com)

Imported from brcly/TuxBox. Originally posted by NickStallman on 2026-11-26T09:26:13Z.


AMD run of python tuxbox.py check on this PR's head (7e0ad65):

  • GPU: AMD Raphael iGPU of a Ryzen 9 9950X (1002:13c0, RADV RAPHAEL_MENDOCINO), Mesa 26.0.8, GE-Proton11-14, Linux 7.0.0.
  • Every group passed except "Lanes and fixtures on the GPU": 95 gates passed and 5 failed. The 5 are guest-present, guest-present-rgb10, guest-present-4k-owned, guest-present-4k-oversized and guest-present-4k-fit.
  • Those 5 fail the same way on main and on every other branch I've run on this machine. They come from how this host samples the screen, so they aren't caused by this change.
  • D3D12 regression controls and the shader translator on the GPU both passed.
  passed   Build the shader compiler
  passed   Python tests
  passed   Shader compiler tests
  passed   DXBC tests
  passed   XG layout tests
  passed   D3D12 Windows typecheck
  passed   Build
  FAILED   Lanes and fixtures on the GPU   (only the 5 guest-present gates above)
  passed   D3D12 regression controls
  passed   Shader translator on the GPU
<!-- greyfinch-sync:brcly/TuxBox:comment:7187986453 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/pull/216#issuecomment-7187986453). Originally posted by [NickStallman](https://github.com/NickStallman) on 2026-11-26T09:26:13Z. --- AMD run of `python tuxbox.py check` on this PR's head (`7e0ad65`): - GPU: AMD Raphael iGPU of a Ryzen 9 9950X (1002:13c0, RADV RAPHAEL_MENDOCINO), Mesa 26.0.8, GE-Proton11-14, Linux 7.0.0. - Every group passed except "Lanes and fixtures on the GPU": 95 gates passed and 5 failed. The 5 are `guest-present`, `guest-present-rgb10`, `guest-present-4k-owned`, `guest-present-4k-oversized` and `guest-present-4k-fit`. - Those 5 fail the same way on `main` and on every other branch I've run on this machine. They come from how this host samples the screen, so they aren't caused by this change. - D3D12 regression controls and the shader translator on the GPU both passed. ``` passed Build the shader compiler passed Python tests passed Shader compiler tests passed DXBC tests passed XG layout tests passed D3D12 Windows typecheck passed Build FAILED Lanes and fixtures on the GPU (only the 5 guest-present gates above) passed D3D12 regression controls passed Shader translator on the GPU ```
bbijsterbosch commented 2026-11-26 09:55:49 +00:00 (Migrated from github.com)

Imported from brcly/TuxBox. Originally posted by bbijsterbosch on 2026-11-26T09:55:49Z.


@NickStallman you manage to get past the loading screen?
edit: read your pr nice work!

<!-- greyfinch-sync:brcly/TuxBox:comment:7188667195 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/pull/216#issuecomment-7188667195). Originally posted by [bbijsterbosch](https://github.com/bbijsterbosch) on 2026-11-26T09:55:49Z. --- @NickStallman you manage to get past the loading screen? edit: read your pr nice work!
NickStallman commented 2026-11-26 10:24:29 +00:00 (Migrated from github.com)

Imported from brcly/TuxBox. Originally posted by NickStallman on 2026-11-26T10:24:29Z.


@bbijsterbosch Thanks! Partly. I ran this PR plus #217 on main 773278a, on an RTX 5090 (595.99.02, GE-Proton11-14). ProjectScarlett gets through the front end and the story loading screens and reaches Game Running (mission 0x98c85f2a, SRL fbk_stry000_FBK_STRY000_INTRO). Then, in both runs, the GPU was lost at Prestream Metadata, before the intro starts:

  • Run 1: kernel NVRM: Xid 13 … SKEDCHECK36_DEPENDENCE_COUNTER_UNDERFLOW, then vkd3d-proton VK_ERROR_DEVICE_LOST, about 22 min in.
  • Run 2: NVRM: Xid 109 … CTX SWITCH TIMEOUT, then VK_ERROR_DEVICE_LOST, about 19 min in. VKD3D_CONFIG=breadcrumbs was set but printed no dump.
  • After the loss: the title's 30 s heartbeat watchdog fires at +0x23CF683 (#215), because the render thread spins on a label the lost device never writes.
  • Not this PR's doing: your watchdog pause and the compile paths. No title thread was in a TuxBox compile at the time.
  • On main without this PR: four runs on the same machine never lost the device. They reached the same point and died of label-wait stalls instead (#215).
  • Not proven: I haven't established that this PR causes the loss.
  • What ran just before it: the null-usage ranks show compute stand-ins being dispatched (CS=b51813bc…, 5aafeb77…), and the second loss is a hang. So the new loop and long-jump lowerings might be worth checking for a loop that never exits on the GPU.

I can rerun with any diagnostics you'd like.

<!-- greyfinch-sync:brcly/TuxBox:comment:7189325033 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/pull/216#issuecomment-7189325033). Originally posted by [NickStallman](https://github.com/NickStallman) on 2026-11-26T10:24:29Z. --- @bbijsterbosch Thanks! Partly. I ran this PR plus #217 on `main` 773278a, on an RTX 5090 (595.99.02, GE-Proton11-14). ProjectScarlett gets through the front end and the story loading screens and reaches `Game Running` (mission 0x98c85f2a, SRL `fbk_stry000_FBK_STRY000_INTRO`). Then, in both runs, the GPU was lost at `Prestream Metadata`, before the intro starts: - **Run 1:** kernel `NVRM: Xid 13 … SKEDCHECK36_DEPENDENCE_COUNTER_UNDERFLOW`, then vkd3d-proton `VK_ERROR_DEVICE_LOST`, about 22 min in. - **Run 2:** `NVRM: Xid 109 … CTX SWITCH TIMEOUT`, then `VK_ERROR_DEVICE_LOST`, about 19 min in. `VKD3D_CONFIG=breadcrumbs` was set but printed no dump. - **After the loss:** the title's 30 s heartbeat watchdog fires at `+0x23CF683` (#215), because the render thread spins on a label the lost device never writes. - **Not this PR's doing:** your watchdog pause and the compile paths. No title thread was in a TuxBox compile at the time. - **On `main` without this PR:** four runs on the same machine never lost the device. They reached the same point and died of label-wait stalls instead (#215). - **Not proven:** I haven't established that this PR causes the loss. - **What ran just before it:** the null-usage ranks show compute stand-ins being dispatched (`CS=b51813bc…`, `5aafeb77…`), and the second loss is a hang. So the new loop and long-jump lowerings might be worth checking for a loop that never exits on the GPU. I can rerun with any diagnostics you'd like.
JeffreyBytes commented 2026-11-26 11:10:01 +00:00 (Migrated from github.com)

Imported from brcly/TuxBox. Originally posted by JeffreyBytes on 2026-11-26T11:10:01Z.


AMD run of ProjectScarlett 1.0.2.1 on this PR's head (7e0ad65), compared with main (773278a).

RX 6700 XT (1002:73df), Mesa RADV 26.3.1, Linux 7.3.6, GE-Proton11-14, i5-12600K. Both sides ran with the ANONONLY preload from #191 (host profile section-import=aliased), because without it this card only gets the 1 fps copy path.

Shader preparation

main this PR
checked 30,941 31,383
compiled 28,792 29,303
unsupported 2,149 2,080
time, 8 jobs 143 s (all DXIL reused) 1,560 s (27,515 reused)

Three launches in a row on this PR, from the Account Picker to the story loading screen:

main (warm) launch 1 launch 2 launch 3
time to the Account Picker under 1 min about 15 min 88 s 49 s
shaders compiled live 0 391 0 0
loading screen 12 to 19 fps 44 falling to 15 fps about 20 fps about 27 fps
compute stand-ins, distinct 605 324 666 263
… not translated 293 145 136 136
… driver compile failed 312 129 82 127
… driver compile deadline 0 50 448 0
vertex + pixel stand-ins 189 179 179 179
mesh + pixel rejected (0x80070057, 0x80004001, 0x80004005) 417 / 184 / 29 same same same

So on this card the PR halves the compute shaders that have no translation (293 to 136) and more than halves the driver compile failures. The deadline stand-ins are a one-launch effect: on launch 2, the first with nothing left to translate, 448 compute pipelines missed the driver compile deadline; on launch 3 the driver cache had them and none did.

The log has replaced clzero loops at RVA 0x4e8aa10 with AVX stores (host lacks CLZERO), pausing the title's hang watchdog (RVA 0x71b6330) while shaders compile and translated a compute shader with the heap stride table. No stand-in was bound at the picker (null usage … compute=0 raster=0), same as the NVIDIA result.

How each launch ended. Two to three minutes after leaving the picker the device was lost and the title exited with code 5. This is the page-remap device loss from #191 (radv/amdgpu: The CS has been rejected (-14) after one CopyPageMappingsBatchX batch). It happens at the same point on main, so it is not caused by this PR, but it means I can't see past the story loading screen on AMD yet.

Not run: python tuxbox.py check. On this machine its translator stage currently fails on main for an unrelated reason (#219).

<!-- greyfinch-sync:brcly/TuxBox:comment:7190361944 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/pull/216#issuecomment-7190361944). Originally posted by [JeffreyBytes](https://github.com/JeffreyBytes) on 2026-11-26T11:10:01Z. --- AMD run of ProjectScarlett 1.0.2.1 on this PR's head (`7e0ad65`), compared with `main` (`773278a`). RX 6700 XT (`1002:73df`), Mesa RADV 26.3.1, Linux 7.3.6, GE-Proton11-14, i5-12600K. Both sides ran with the `ANONONLY` preload from #191 (host profile `section-import=aliased`), because without it this card only gets the 1 fps copy path. **Shader preparation** | | `main` | this PR | | --- | --- | --- | | checked | 30,941 | 31,383 | | compiled | 28,792 | 29,303 | | unsupported | 2,149 | 2,080 | | time, 8 jobs | 143 s (all DXIL reused) | 1,560 s (27,515 reused) | **Three launches in a row on this PR**, from the Account Picker to the story loading screen: | | `main` (warm) | launch 1 | launch 2 | launch 3 | | --- | --- | --- | --- | --- | | time to the Account Picker | under 1 min | about 15 min | 88 s | 49 s | | shaders compiled live | 0 | 391 | 0 | 0 | | loading screen | 12 to 19 fps | 44 falling to 15 fps | about 20 fps | about 27 fps | | compute stand-ins, distinct | 605 | 324 | 666 | 263 | | … not translated | 293 | 145 | 136 | 136 | | … driver compile failed | 312 | 129 | 82 | 127 | | … driver compile deadline | 0 | 50 | 448 | 0 | | vertex + pixel stand-ins | 189 | 179 | 179 | 179 | | mesh + pixel rejected (`0x80070057`, `0x80004001`, `0x80004005`) | 417 / 184 / 29 | same | same | same | So on this card the PR halves the compute shaders that have no translation (293 to 136) and more than halves the driver compile failures. The deadline stand-ins are a one-launch effect: on launch 2, the first with nothing left to translate, 448 compute pipelines missed the driver compile deadline; on launch 3 the driver cache had them and none did. The log has `replaced clzero loops at RVA 0x4e8aa10 with AVX stores (host lacks CLZERO)`, `pausing the title's hang watchdog (RVA 0x71b6330) while shaders compile` and `translated a compute shader with the heap stride table`. No stand-in was bound at the picker (`null usage … compute=0 raster=0`), same as the NVIDIA result. **How each launch ended.** Two to three minutes after leaving the picker the device was lost and the title exited with code 5. This is the page-remap device loss from #191 (`radv/amdgpu: The CS has been rejected (-14)` after one `CopyPageMappingsBatchX` batch). It happens at the same point on `main`, so it is not caused by this PR, but it means I can't see past the story loading screen on AMD yet. **Not run:** `python tuxbox.py check`. On this machine its translator stage currently fails on `main` for an unrelated reason (#219).
gtb-sbe commented 2026-11-26 13:25:22 +00:00 (Migrated from github.com)

Imported from brcly/TuxBox. Originally posted by gtb-sbe on 2026-11-26T13:25:22Z.


One more AMD data point, this time RDNA4 and after the merge, without the preload.

Host: RX 9060 XT (1002:7590), Mesa 26.2.6 RADV, Linux 6.18, GE-Proton11-14, main at 9b31fd8. Host profile wave=32-64 section-import=substituted descriptor-bytes=32/16, so the #200 copy path.

tuxbox.py check with --backend proton --proton ... --windows-dxc ...: everything passes, including the five guest-present* gates, all 19 regression controls (buffer-remap and the new buffer-unmap-* too) and the translator checks.

ProjectScarlett 1.0.2.1, offline, cold translation cache, the same machine before and after this PR:

main cb8c38b main 9b31fd8
Pipelines not delivered (rank_pipeline_failures.py) 651 312
vkd3d result -3, all after dxil-spirv: Failed to remap ... 276 108
… sampler 32765:0 44 27
Present samples at 22 draws per frame all black lit=0.998

The sampler remaps are what #227 covers; I can run those branches here once they're up. The rest of the 108 are SRV and CBV remaps (SRV 0:126 17, 1:63 9, 0:7 8, 1:239 6, CBV 1:0 4, ...), about 56 on compute and 52 on raster.

On the compute side, every remaining rejection used the plain translation of the program (CS.used equals the source digest in the failure record). In 24 of them the root-keyed lookup is recorded as missing first, so the provider fell back to the root-less translation (.or_else(|| prepared(bytes)) in the reflected arm, prepared(bytes).or_else(...) in the last arm). Does missing there mean the translator refused the program for this root, or that its translation wasn't ready yet? If it was a refusal, recording that reason instead of trying the root-less variant would end in the same stand-in but name the real cause. I have the captured roots for these and can look into it if that's useful.

<!-- greyfinch-sync:brcly/TuxBox:comment:7193329790 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/pull/216#issuecomment-7193329790). Originally posted by [gtb-sbe](https://github.com/gtb-sbe) on 2026-11-26T13:25:22Z. --- One more AMD data point, this time RDNA4 and after the merge, without the preload. **Host:** RX 9060 XT (`1002:7590`), Mesa 26.2.6 RADV, Linux 6.18, GE-Proton11-14, `main` at `9b31fd8`. Host profile `wave=32-64 section-import=substituted descriptor-bytes=32/16`, so the #200 copy path. **`tuxbox.py check`** with `--backend proton --proton ... --windows-dxc ...`: everything passes, including the five `guest-present*` gates, all 19 regression controls (`buffer-remap` and the new `buffer-unmap-*` too) and the translator checks. **ProjectScarlett 1.0.2.1**, offline, cold translation cache, the same machine before and after this PR: | | `main` `cb8c38b` | `main` `9b31fd8` | | --- | --- | --- | | Pipelines not delivered (`rank_pipeline_failures.py`) | 651 | 312 | | `vkd3d result -3`, all after `dxil-spirv: Failed to remap ...` | 276 | 108 | | … sampler `32765:0` | 44 | 27 | | Present samples at 22 draws per frame | all black | `lit=0.998` | The sampler remaps are what #227 covers; I can run those branches here once they're up. The rest of the 108 are SRV and CBV remaps (SRV `0:126` 17, `1:63` 9, `0:7` 8, `1:239` 6, CBV `1:0` 4, ...), about 56 on compute and 52 on raster. On the compute side, every remaining rejection used the plain translation of the program (`CS.used` equals the source digest in the failure record). In 24 of them the root-keyed lookup is recorded as `missing` first, so the provider fell back to the root-less translation (`.or_else(|| prepared(bytes))` in the reflected arm, `prepared(bytes).or_else(...)` in the last arm). Does `missing` there mean the translator refused the program for this root, or that its translation wasn't ready yet? If it was a refusal, recording that reason instead of trying the root-less variant would end in the same stand-in but name the real cause. I have the captured roots for these and can look into it if that's useful.
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
brcly/TuxBox!216
No description provided.