d3d12: publish only the textures a heap write bitmap names #462

Merged
brcly merged 5 commits from upstream-pr/462 into main 2026-11-29 11:52:34 +00:00
brcly commented 2026-11-29 10:19:31 +00:00 (Migrated from github.com)

Imported from brcly/TuxBox. Originally posted by brcly on 2026-11-29T10:19:31Z.


Summary

Builds on #439 and #460, both now on main.

A program that picks its image store's view from the resource heap at run time can write any texture with a view there. #460 traces most compute programs; what it cannot trace (all 120 pixel programs of this kind in ProjectScarlett, which store through a heap slot read from a constant buffer, and a few compute ones) still makes every writable texture in the heap count as written. In the world load that is 504 textures, 939 MiB, read back per batch.

This has the translation record the slots instead:

  • dxbc: heap_writes fixes a bitmap layout: a root UAV at u0, space32766, bit 0 for a store whose slot is unknown, bit n + 1 for guest slot n, 2^20 bits. heap_writes_variant appends it to an embedded root.
  • xshader: with that UAV in the root, each heap descriptor load keeps its guest slot (before the index map), and each heap image store sets its bit. Without it the output is unchanged.
  • d3d12: a program with untraced image stores is translated against its reflected root with the UAV appended, where the root has room (compute and vertex/pixel roots, and the pixel stage of mesh pipelines, whose pixel root carries it too). Each command list owns a bitmap, cleared where a draw first binds it; those draws count the heap as read. After the batch the bitmaps are copied back; the publication worker maps each slot through the arena's resident slots, copies the named textures on a copy queue of its own and publishes them before the batch's single signal of its publication fence. Candidates wait and are recorded as writes are, and the narrowed-write check of #460 leaves them out.
  • lanes: bindless-heap-slot, below.

Measured

ProjectScarlett, RTX 4070 Ti SUPER, warm caches, main at 75453953 with #439 and an earlier form of #460's tracing, one run, world load:

before with #439 with #439 and this
Batches counting a whole heap as written every load batch every load batch none
Largest readback in a batch 939 MiB / 504 textures 939 MiB / 504 270–302 MiB / 77–79
Copied back per 5 s 3–9 GiB 1–11 GiB 0.1–2.2 GiB
Pinned readback buffers 2.5–4.4 GiB 0.3–1.4 GiB 0.29 GiB

What remains are textures the GPU did write; not reading those back at all is #413's ground.

Tested

Run the checks relevant to this change.

  • The checks relevant to this change passed
  • Changed or new behaviour is covered by a Lanes scenario, or the reason it cannot be is stated below
  • Where the table calls for AMD and NVIDIA, they passed on both. Otherwise, say which vendor still needs to run them: both. DrArroway ran the five suites below on an RX 6900 XT and a Radeon 610M (59/59 each) in the comments.

bindless-heap-slot fails on main ("the provider wrote back the texture at another heap slot: 4096 of 65536 title words replaced") and passes with this, in both the wide and the constrained (paged) trial, on both cards. The mesh-pipeline path has no Lanes scenario of its own; it was exercised in ProjectScarlett, and the existing mesh and raster scenarios pass.

GPU, driver and backend:

  • NVIDIA GeForce RTX 4070 Ti SUPER (10de:2705), 620.73.04, GE-Proton11-14
  • AMD Radeon 610M (1002:13c0), Mesa RADV 26.3.1, GE-Proton11-14

Commands run and their results:

tuxbox.py verify --only lanes-bindless-compute    NVIDIA 22/22, AMD 22/22
tuxbox.py verify --only lanes-raster-tables       NVIDIA 8/8
tuxbox.py verify --only d3d12-placement           NVIDIA 1/1
tuxbox.py verify --only lanes-selftest            NVIDIA 27/27
cargo test -p tuxbox-dxbc --features native-bindings   96 passed
cargo test (tools/shader-compiler) --lib               588 passed
tuxbox-d3d12 --lib under GE-Proton11-14 Wine           376 passed, 8 ignored
python -m unittest discover -s tests                   635, OK (22 skipped)

🤖 Generated with Claude Code

<!-- greyfinch-sync:brcly/TuxBox:issue:5549769674 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/pull/462). Originally posted by [brcly](https://github.com/brcly) on 2026-11-29T10:19:31Z. --- ## Summary Builds on #439 and #460, both now on `main`. A program that picks its image store's view from the resource heap at run time can write any texture with a view there. #460 traces most compute programs; what it cannot trace (all 120 pixel programs of this kind in ProjectScarlett, which store through a heap slot read from a constant buffer, and a few compute ones) still makes every writable texture in the heap count as written. In the world load that is 504 textures, 939 MiB, read back per batch. This has the translation record the slots instead: - **dxbc**: `heap_writes` fixes a bitmap layout: a root UAV at `u0, space32766`, bit 0 for a store whose slot is unknown, bit `n + 1` for guest slot `n`, 2^20 bits. `heap_writes_variant` appends it to an embedded root. - **xshader**: with that UAV in the root, each heap descriptor load keeps its guest slot (before the index map), and each heap image store sets its bit. Without it the output is unchanged. - **d3d12**: a program with untraced image stores is translated against its reflected root with the UAV appended, where the root has room (compute and vertex/pixel roots, and the pixel stage of mesh pipelines, whose pixel root carries it too). Each command list owns a bitmap, cleared where a draw first binds it; those draws count the heap as read. After the batch the bitmaps are copied back; the publication worker maps each slot through the arena's resident slots, copies the named textures on a copy queue of its own and publishes them before the batch's single signal of its publication fence. Candidates wait and are recorded as writes are, and the narrowed-write check of #460 leaves them out. - **lanes**: `bindless-heap-slot`, below. ## Measured ProjectScarlett, RTX 4070 Ti SUPER, warm caches, `main` at 75453953 with #439 and an earlier form of #460's tracing, one run, world load: | | before | with #439 | with #439 and this | |---|---|---|---| | Batches counting a whole heap as written | every load batch | every load batch | none | | Largest readback in a batch | 939 MiB / 504 textures | 939 MiB / 504 | 270–302 MiB / 77–79 | | Copied back per 5 s | 3–9 GiB | 1–11 GiB | 0.1–2.2 GiB | | Pinned readback buffers | 2.5–4.4 GiB | 0.3–1.4 GiB | 0.29 GiB | What remains are textures the GPU did write; not reading those back at all is #413's ground. ## Tested Run the [checks relevant to this change](../CONTRIBUTING.md#test-what-your-change-touches). - [x] The checks relevant to this change passed - [x] Changed or new behaviour is covered by a Lanes scenario, or the reason it cannot be is stated below - [x] Where the table calls for AMD and NVIDIA, they passed on both. Otherwise, say which vendor still needs to run them: both. DrArroway ran the five suites below on an RX 6900 XT and a Radeon 610M (59/59 each) in the comments. `bindless-heap-slot` fails on `main` ("the provider wrote back the texture at another heap slot: 4096 of 65536 title words replaced") and passes with this, in both the wide and the constrained (paged) trial, on both cards. The mesh-pipeline path has no Lanes scenario of its own; it was exercised in ProjectScarlett, and the existing mesh and raster scenarios pass. GPU, driver and backend: - NVIDIA GeForce RTX 4070 Ti SUPER (`10de:2705`), 620.73.04, GE-Proton11-14 - AMD Radeon 610M (`1002:13c0`), Mesa RADV 26.3.1, GE-Proton11-14 Commands run and their results: ```text tuxbox.py verify --only lanes-bindless-compute NVIDIA 22/22, AMD 22/22 tuxbox.py verify --only lanes-raster-tables NVIDIA 8/8 tuxbox.py verify --only d3d12-placement NVIDIA 1/1 tuxbox.py verify --only lanes-selftest NVIDIA 27/27 cargo test -p tuxbox-dxbc --features native-bindings 96 passed cargo test (tools/shader-compiler) --lib 588 passed tuxbox-d3d12 --lib under GE-Proton11-14 Wine 376 passed, 8 ignored python -m unittest discover -s tests 635, OK (22 skipped) ``` 🤖 Generated with [Claude Code](https://claude.com/claude-code)
DrArroway commented 2026-11-29 10:45:04 +00:00 (Migrated from github.com)

Imported from brcly/TuxBox. Originally posted by DrArroway on 2026-11-29T10:45:04Z.


Tested #462 (002ef885) on AMD (GE-Proton11-14, Mesa RADV 26.3.1, Linux 7.3.6).

1. Missing AMD verify Suites on Pure 002ef885

Ran on both AMD RX 6900 XT (1002:73bf) and AMD Raphael Radeon 610M (1002:164e): 59/59 PASS on both cards

tuxbox.py verify --only lanes-bindless-compute    1002:73bf 22/22, 1002:164e 22/22
tuxbox.py verify --only lanes-raster-tables       1002:73bf  8/8,  1002:164e  8/8
tuxbox.py verify --only d3d12-placement           1002:73bf  1/1,  1002:164e  1/1
tuxbox.py verify --only lanes-selftest            1002:73bf 27/27, 1002:164e 27/27
tuxbox.py verify --only d3d12-mesh                1002:73bf  1/1,  1002:164e  1/1

2. ProjectScarlett 1.0.2.1 (3840×2160, offline, RX 6900 XT 1002:73bf, TUXBOX_SUBMIT_PROFILE=1)

Built from main (75453953) + #455 (361df2d4) + #441 (f244a687) + #462 (002ef885, clean merge): 606.3s total, 0 GPU faults / 0 VK_ERROR_DEVICE_LOST.

Metric (3D world, RX 6900 XT) Baseline (no #439/#460/#462) #439 alone (962a1cee) #462 (002ef885)
3D frame cadence 8.29 s/f (0.121 FPS) 3.96 s/f (0.252 FPS) 3.84 s/f (25 frames / 96s; steady 22 / 83s = 3.77 s/f, 0.265 FPS)
≥500-tex (939 MiB) windows 24/38 every window 0/18 (eliminated completely)
Max single batch readback 939.3 MiB / 504 tex 939.3 MiB / 504 tex 270.1 MiB / 79 tex
Avg readback MiB / batch 342.0 MiB 346.8 MiB 51.9 MiB (264 batches, 13,706.0 MiB, 145.5 MiB/s)
Changed vs unchanged mips 9.5% changed 9.0% changed 69.1% changed (9,156.0 MiB changed vs 4,095.0 MiB unchanged)
placement publication wall % 83.2% (avg 685.9 ms) 42.0% (avg 165.0 ms) 22.6% (21.67s / 95.9s, avg 85.6 ms, max 480.5 ms)
Pinned texture readback buffers 3,247 MiB — 216–712 MiB (56 created / 5,591.7 MiB, 208 reused = 78.8%)

What Remains on RADV

With placement publication down to 22.6% of wall time, the dominant cost per frame on RADV shifted to CPU placement submit prep on the compute (1.34–2.58 s / 5s, max 447 ms) and direct (0.67–1.16 s / 5s, max 236 ms) queues — driven by placement scan (11.5% wall, 11.04s / 95.9s) and placement digest (7.8% wall, 7.48s / 95.9s, hashing 118,074.9 MiB across 95.9s because host imports disturb the write watch on game memory on RADV).

<!-- greyfinch-sync:brcly/TuxBox:comment:7254643802 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/pull/462#issuecomment-7254643802). Originally posted by [DrArroway](https://github.com/DrArroway) on 2026-11-29T10:45:04Z. --- Tested `#462` (`002ef885`) on AMD (`GE-Proton11-14`, Mesa RADV 26.3.1, Linux 7.3.6). ### 1. Missing AMD `verify` Suites on Pure `002ef885` Ran on both **AMD RX 6900 XT (`1002:73bf`)** and **AMD Raphael Radeon 610M (`1002:164e`)**: **59/59 PASS on both cards** ```text tuxbox.py verify --only lanes-bindless-compute 1002:73bf 22/22, 1002:164e 22/22 tuxbox.py verify --only lanes-raster-tables 1002:73bf 8/8, 1002:164e 8/8 tuxbox.py verify --only d3d12-placement 1002:73bf 1/1, 1002:164e 1/1 tuxbox.py verify --only lanes-selftest 1002:73bf 27/27, 1002:164e 27/27 tuxbox.py verify --only d3d12-mesh 1002:73bf 1/1, 1002:164e 1/1 ``` --- ### 2. ProjectScarlett 1.0.2.1 (3840×2160, offline, RX 6900 XT `1002:73bf`, `TUXBOX_SUBMIT_PROFILE=1`) Built from `main` (`75453953`) + `#455` (`361df2d4`) + `#441` (`f244a687`) + `#462` (`002ef885`, clean merge): `606.3s` total, `0` GPU faults / `0` `VK_ERROR_DEVICE_LOST`. | Metric (3D world, RX 6900 XT) | Baseline (no `#439`/`#460`/`#462`) | `#439` alone (`962a1cee`) | `#462` (`002ef885`) | |---|---:|---:|---:| | **3D frame cadence** | `8.29 s/f` (`0.121 FPS`) | `3.96 s/f` (`0.252 FPS`) | **`3.84 s/f`** (`25` frames / `96s`; steady `22` / `83s` = **`3.77 s/f`**, `0.265 FPS`) | | **≥500-tex (`939 MiB`) windows** | `24/38` | every window | **`0/18` (eliminated completely)** | | **Max single batch readback** | `939.3 MiB / 504 tex` | `939.3 MiB / 504 tex` | **`270.1 MiB / 79 tex`** | | **Avg readback MiB / batch** | `342.0 MiB` | `346.8 MiB` | **`51.9 MiB`** (`264` batches, `13,706.0 MiB`, **`145.5 MiB/s`**) | | **Changed vs unchanged mips** | `9.5%` changed | `9.0%` changed | **`69.1%` changed** (`9,156.0 MiB` changed vs `4,095.0 MiB` unchanged) | | **`placement publication` wall %** | `83.2%` (`avg 685.9 ms`) | `42.0%` (`avg 165.0 ms`) | **`22.6%`** (`21.67s / 95.9s`, avg `85.6 ms`, max `480.5 ms`) | | **Pinned `texture readback` buffers** | `3,247 MiB` | — | **`216–712 MiB`** (`56` created / `5,591.7 MiB`, `208` reused = `78.8%`) | ### What Remains on RADV With `placement publication` down to `22.6%` of wall time, the dominant cost per frame on RADV shifted to CPU `placement` submit prep on the `compute` (`1.34–2.58 s / 5s`, max `447 ms`) and `direct` (`0.67–1.16 s / 5s`, max `236 ms`) queues — driven by `placement scan` (`11.5%` wall, `11.04s / 95.9s`) and `placement digest` (`7.8%` wall, `7.48s / 95.9s`, hashing `118,074.9 MiB` across `95.9s` because `host imports disturb the write watch on game memory` on RADV).
NickStallman commented 2026-11-29 11:00:46 +00:00 (Migrated from github.com)

Imported from brcly/TuxBox. Originally posted by NickStallman on 2026-11-29T11:00:46Z.


Two things from reading this while building it together with #390, #441, #455 and #459 for a 5090 run (not run yet, and I have no test for either):

  1. A mesh pipeline whose pixel stage keeps its root-less translation. mesh_table::reflected sets heap_writes from the program's untraced stores. In stream::create, if neither attempt gives a variant on table.pixel_root that is prepared, rooted[1] stays None and the stage runs root-less, so it can't write the bitmap, but the table still has heap_writes. The draw would then be taken to record its stores in a bitmap that stays empty, and nothing would be copied back for it. Clearing heap_writes there falls back to counting the whole heap, as without the PR. I did that in my build, after the second attempt:

    if original[0].is_none() && rooted[1].is_none()
        && let Some(table) = pipeline.raster_table.as_mut().and_then(Arc::get_mut)
    {
        table.heap_writes = None;
    }
    

    Whether a title program hits it I don't know: 167 of the 174 recorded programs I could form a bitmap variant of do translate (the 7 others are refused).

  2. #460's check mode with #439's shared readback. The check records its copy into the queue's shared buffer, but nothing makes the next readback wait for the check, so it can overwrite what the check compares. Only with TUXBOX_CHECK_NARROWED set. Its own buffer fixes it; I'll send that for whichever of the two lands second.

#460 is out of draft now: full checks passed on an RTX 5090 (185) and an AMD iGPU (184).

<!-- greyfinch-sync:brcly/TuxBox:comment:7254818698 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/pull/462#issuecomment-7254818698). Originally posted by [NickStallman](https://github.com/NickStallman) on 2026-11-29T11:00:46Z. --- Two things from reading this while building it together with #390, #441, #455 and #459 for a 5090 run (not run yet, and I have no test for either): 1. **A mesh pipeline whose pixel stage keeps its root-less translation.** `mesh_table::reflected` sets `heap_writes` from the program's untraced stores. In `stream::create`, if neither attempt gives a variant on `table.pixel_root` that is `prepared`, `rooted[1]` stays `None` and the stage runs root-less, so it can't write the bitmap, but the table still has `heap_writes`. The draw would then be taken to record its stores in a bitmap that stays empty, and nothing would be copied back for it. Clearing `heap_writes` there falls back to counting the whole heap, as without the PR. I did that in my build, after the second attempt: ```rust if original[0].is_none() && rooted[1].is_none() && let Some(table) = pipeline.raster_table.as_mut().and_then(Arc::get_mut) { table.heap_writes = None; } ``` Whether a title program hits it I don't know: 167 of the 174 recorded programs I could form a bitmap variant of do translate (the 7 others are refused). 2. **#460's check mode with #439's shared readback.** The check records its copy into the queue's shared buffer, but nothing makes the next readback wait for the check, so it can overwrite what the check compares. Only with `TUXBOX_CHECK_NARROWED` set. Its own buffer fixes it; I'll send that for whichever of the two lands second. #460 is out of draft now: full checks passed on an RTX 5090 (185) and an AMD iGPU (184).
NickStallman commented 2026-11-29 11:31:06 +00:00 (Migrated from github.com)

Imported from brcly/TuxBox. Originally posted by NickStallman on 2026-11-29T11:31:06Z.


First run on an RTX 5090 (620.70.10, GE-Proton11-14): your branch with #455, #441, #440, #390, #459 and a few diagnostics, on main 75453953. One run.

  • Largest batch in the world load: 302.8 MiB / 81 textures (you saw 270–302 MiB / 77–79 on a 4070 Ti SUPER). No window reached the 504-texture set. The run without any of this on the same card (main at 28717263) had it in 7 of the 11 windows of its world.
  • It ended 65 s after the story load with a GPU MMU fault (Xid 13, SM warp exception, no fault address logged). My earlier builds have also ended in GPU faults or timeouts about 30 to 70 s into the world, so I don't read it as yours, but this run had no breadcrumbs and I can't say which draw it was. A traced run is next.
  • So it covered the story load and only a little of the world: 1 window of 2.7 GB copied, 1.6 GB of new buffers, right before the fault.
  • The fix I mentioned for a mesh pipeline without a bitmap was in this build; I haven't seen the case arise or not arise.
<!-- greyfinch-sync:brcly/TuxBox:comment:7255165395 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/pull/462#issuecomment-7255165395). Originally posted by [NickStallman](https://github.com/NickStallman) on 2026-11-29T11:31:06Z. --- First run on an RTX 5090 (620.70.10, GE-Proton11-14): your branch with #455, #441, #440, #390, #459 and a few diagnostics, on `main` 75453953. One run. - **Largest batch in the world load: 302.8 MiB / 81 textures** (you saw 270–302 MiB / 77–79 on a 4070 Ti SUPER). No window reached the 504-texture set. The run without any of this on the same card (`main` at 28717263) had it in 7 of the 11 windows of its world. - **It ended 65 s after the story load with a GPU MMU fault** (Xid 13, SM warp exception, no fault address logged). My earlier builds have also ended in GPU faults or timeouts about 30 to 70 s into the world, so I don't read it as yours, but this run had no breadcrumbs and I can't say which draw it was. A traced run is next. - So it covered the story load and only a little of the world: 1 window of 2.7 GB copied, 1.6 GB of new buffers, right before the fault. - The fix I mentioned for a mesh pipeline without a bitmap was in this build; I haven't seen the case arise or not arise.
brcly commented 2026-11-29 11:36:31 +00:00 (Migrated from github.com)

Imported from brcly/TuxBox. Originally posted by brcly on 2026-11-29T11:36:31Z.


Thanks both.

@NickStallman, the mesh case is fixed in cb11fafb as you suggested: after both pixel-root attempts, a mesh pipeline whose pixel stage kept its root-less translation drops heap_writes, so its draws count the whole heap as before. Only mesh pipelines can reach it: on the vertex/pixel path a missing translation for the reflected root already keeps the guest root or refuses the stream, and compute fails without one. I have no test that forms that case either; lanes-raster-tables 8/8, d3d12-mesh, lanes-bindless-compute 22/22 and the d3d12 --lib tests (376) still pass on the 4070 Ti SUPER. The check-mode buffer is yours, agreed.

@DrArroway, thank you for the AMD suites, which fill what the description said was missing, and for the RX 6900 XT table. The scan and digest cost you found is where I'll look next for frame time.

<!-- greyfinch-sync:brcly/TuxBox:comment:7255227533 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/pull/462#issuecomment-7255227533). Originally posted by [brcly](https://github.com/brcly) on 2026-11-29T11:36:31Z. --- Thanks both. @NickStallman, the mesh case is fixed in `cb11fafb` as you suggested: after both pixel-root attempts, a mesh pipeline whose pixel stage kept its root-less translation drops `heap_writes`, so its draws count the whole heap as before. Only mesh pipelines can reach it: on the vertex/pixel path a missing translation for the reflected root already keeps the guest root or refuses the stream, and compute fails without one. I have no test that forms that case either; `lanes-raster-tables` 8/8, `d3d12-mesh`, `lanes-bindless-compute` 22/22 and the d3d12 `--lib` tests (376) still pass on the 4070 Ti SUPER. The check-mode buffer is yours, agreed. @DrArroway, thank you for the AMD suites, which fill what the description said was missing, and for the RX 6900 XT table. The scan and digest cost you found is where I'll look next for frame time.
1093i3511 commented 2026-11-29 11:42:34 +00:00 (Migrated from github.com)

Imported from brcly/TuxBox. Originally posted by 1093i3511 on 2026-11-29T11:42:34Z.


#462 on 8 GB, as @NickStallman asked on #413. RX 6600 (1002:73ff, 8 GB, RADV, Mesa 26.3.1, Linux 7.3.6, GE-Proton11-14). The build is #462 at 002ef885, so before cb11fafb, on main 75453953, without #455 or #441. Default settings, so the write watch is on. Offline, 3840x2160. I did two runs: the first one cold for the new bitmap variants, the second one warm.

On this card, #462 removes what ended our runs. All numbers are for the 5 s windows after world entry:

main 2871726 / 75453953 (8 runs today) #462 run 1 (cold) #462 run 2 (warm)
Largest readback in a window 939.3 MiB / 504 textures, every window 269.6–302.8 MiB / 75–81 269.6–270.1 MiB / 77–79
Copied back per window 1.0–4.8 GiB 0.5–1.1 GiB 0.49 GiB on average (33 windows)
Readback buffers created 1–5 GiB per window, hardly reused mostly under 0.5 GiB, reused=6–13 5.7 GiB for all 33 windows
Peak card GTT (of 16 GB) 12.7–16.0 GB 11.8 GB 11.3 GB
Not enough memory for command submission! in 4 of 8 runs, compositor lost twice none none
GPU faults in the game 2 of 8 runs none none

On main, GTT reached the full 16 GB within 15–40 s of world entry. Twice, the kernel then refused the compositor's command submissions and the desktop went down. With #462, GTT stays flat at 10.6–11.3 GB in the world.

Both runs still ended on the title's watchdog, 33–35 frames into the world:

  • Run 1: 699 s, mission at F:1238, crash at F:1271.
  • Run 2: 856 s, mission at F:8508, crash at F:8543. The F numbers are higher because the account picker waited for a while.
  • For the first time on this card, the world rendered visible frames with the intro audio.

The world frames come every 10–19 s. That's no faster than main with TUXBOX_PLACEMENT_WATCH=0, and 3–5× slower than @DrArroway's 3.8 s per frame on the 6900 XT. So the run now stays in the world for 160–170 s instead of 10–40 s, but it doesn't get past the watchdog.

Two observations for the frame-time work:

  1. VRAM is full in the world. The card holds 8.2 of 8.6 GB, and the game asks for 7.6–7.9 GB with 7.25 GB of that resident. RAM grows to 28.2 of 32 GB and swap to 13.5 GB, and the audio drops out as they grow. So part of our slower frame pace is probably memory pressure that a 16 GB card doesn't have.

  2. The write watch slows the start, with #462 too. Presents per 10 s from startup:

    • #462: 725, 691, 938, 774, 501 (run 1) and 784, 431, 675, 702, 846 (run 2).
    • main with TUXBOX_PLACEMENT_WATCH=0: 911–994 and 882–938 in the first two windows.

    The Rockstar logo plays slower, with audio dropouts. This may be the same placement scan / placement digest cost that @DrArroway found on RADV (host imports disturb the write watch on game memory), showing up before the world already on a smaller CPU budget. That's a guess; I haven't profiled it yet.

Next on this card: a TUXBOX_SUBMIT_PROFILE=1 run of #462, in the first minutes and in the world, with the watch on and off, to put numbers on point 2. After that, #455 on top of #462. With #462 the runs now stay in the world long enough to show whether the occasional host-page fault from main is still there.

<!-- greyfinch-sync:brcly/TuxBox:comment:7255296030 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/pull/462#issuecomment-7255296030). Originally posted by [1093i3511](https://github.com/1093i3511) on 2026-11-29T11:42:34Z. --- #462 on 8 GB, as @NickStallman asked on #413. RX 6600 (`1002:73ff`, 8 GB, RADV, Mesa 26.3.1, Linux 7.3.6, GE-Proton11-14). The build is #462 at `002ef885`, so before `cb11fafb`, on `main` `75453953`, without #455 or #441. Default settings, so the write watch is on. Offline, 3840x2160. I did two runs: the first one cold for the new bitmap variants, the second one warm. **On this card, #462 removes what ended our runs.** All numbers are for the 5 s windows after world entry: | | `main` 2871726 / 75453953 (8 runs today) | #462 run 1 (cold) | #462 run 2 (warm) | | --- | --- | --- | --- | | Largest readback in a window | 939.3 MiB / 504 textures, every window | 269.6–302.8 MiB / 75–81 | 269.6–270.1 MiB / 77–79 | | Copied back per window | 1.0–4.8 GiB | 0.5–1.1 GiB | 0.49 GiB on average (33 windows) | | Readback buffers created | 1–5 GiB per window, hardly reused | mostly under 0.5 GiB, `reused=6–13` | 5.7 GiB for all 33 windows | | Peak card GTT (of 16 GB) | 12.7–16.0 GB | 11.8 GB | 11.3 GB | | `Not enough memory for command submission!` | in 4 of 8 runs, compositor lost twice | none | none | | GPU faults in the game | 2 of 8 runs | none | none | On `main`, GTT reached the full 16 GB within 15–40 s of world entry. Twice, the kernel then refused the compositor's command submissions and the desktop went down. With #462, GTT stays flat at 10.6–11.3 GB in the world. **Both runs still ended on the title's watchdog**, 33–35 frames into the world: - Run 1: 699 s, mission at F:1238, crash at F:1271. - Run 2: 856 s, mission at F:8508, crash at F:8543. The F numbers are higher because the account picker waited for a while. - For the first time on this card, the world rendered visible frames with the intro audio. The world frames come every 10–19 s. That's no faster than `main` with `TUXBOX_PLACEMENT_WATCH=0`, and 3–5× slower than @DrArroway's 3.8 s per frame on the 6900 XT. So the run now stays in the world for 160–170 s instead of 10–40 s, but it doesn't get past the watchdog. **Two observations for the frame-time work:** 1. **VRAM is full in the world.** The card holds 8.2 of 8.6 GB, and the game asks for 7.6–7.9 GB with 7.25 GB of that resident. RAM grows to 28.2 of 32 GB and swap to 13.5 GB, and the audio drops out as they grow. So part of our slower frame pace is probably memory pressure that a 16 GB card doesn't have. 2. **The write watch slows the start, with #462 too.** Presents per 10 s from startup: - #462: 725, 691, 938, 774, 501 (run 1) and 784, 431, 675, 702, 846 (run 2). - `main` with `TUXBOX_PLACEMENT_WATCH=0`: 911–994 and 882–938 in the first two windows. The Rockstar logo plays slower, with audio dropouts. This may be the same `placement scan` / `placement digest` cost that @DrArroway found on RADV (`host imports disturb the write watch on game memory`), showing up before the world already on a smaller CPU budget. That's a guess; I haven't profiled it yet. Next on this card: a `TUXBOX_SUBMIT_PROFILE=1` run of #462, in the first minutes and in the world, with the watch on and off, to put numbers on point 2. After that, #455 on top of #462. With #462 the runs now stay in the world long enough to show whether the occasional host-page fault from `main` is still there.
NickStallman commented 2026-11-29 13:17:12 +00:00 (Migrated from github.com)

Imported from brcly/TuxBox. Originally posted by NickStallman on 2026-11-29T13:17:12Z.


A caveat on the RTX 5090 game runs I reported here and on #460, #464 and #457: those builds also contained my #459, which turns out to compute wrong values in some mesh programs on NVIDIA. The readback sizes and counts don't depend on it, but how far each run got, and what ended it, aren't evidence about main. I'll rerun without it.

<!-- greyfinch-sync:brcly/TuxBox:comment:7256425208 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/pull/462#issuecomment-7256425208). Originally posted by [NickStallman](https://github.com/NickStallman) on 2026-11-29T13:17:12Z. --- A caveat on the RTX 5090 game runs I reported here and on #460, #464 and #457: those builds also contained my #459, which turns out to compute wrong values in some mesh programs on NVIDIA. The readback sizes and counts don't depend on it, but how far each run got, and what ended it, aren't evidence about `main`. I'll rerun without it.
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!462
No description provided.