perf(host): a character's shadow map reserves stepped storage, so the frame's other render targets keep their addresses (HOS_SHADOW_BUCKET) #1256

Merged
HumanBean merged 2 commits from GummiNaomi/Longshot:perf/shadow-map-slots into main 2026-11-16 23:03:45 +00:00
Member

Type: perf · Risk: low · Tested on: Windows 11, RTX 4070 SUPER (NVIDIA 617.42), 2560x1440 and 3840x2160 · Needs: Linux; a Steam Deck; a long play at 3840x2160; other titles

Why

In Castle Town's market, with the camera turning, the game makes 15-16 new textures every frame and lets as many go: every render target of the frame, at a new address. The renderer tells textures apart by address, so each is a new texture object and often a new image, and the dead ones hold video memory until they are found.

The cause is in how the game sizes one kind of target. Each shadow-casting character near the camera gets its own square depth map (NVN format 0x34), and the game computes its side anew every frame from the camera's distance: 384 from far, more from near (up to 1277 seen here), a few pixels different each frame. In the market that gave sides such as 397, 439, 479, 517 ... and 1156, 1191, 1210 ... from one frame to the next. The game makes a frame's render targets one after another in a first-fit heap, asking the host for the storage size and alignment of each, so a shadow map a few pixels larger pushes every target made after it to a new address. With the camera still, the same sizes come in the same order and nothing moves (0.3-0.4 textures made a frame).

Related: #994 and the dead targets' sweep (how the renderer copes with the targets once they have moved; this PR stops most of them moving).

What changed

A character's shadow map reserves the storage of the next step of sides up, so the render targets made after it keep their addresses while its side changes.

  • host: nvnTextureBuilderGetStorageSize and nvnTextureBuilderGetStorageAlignment answer a square, two-dimensional, one-level NVN 0x34 texture of side 385 to 1920 with the size and alignment of the next multiple of 384 up (768, 1152, 1536, 1920), where those are larger than its own (host/nvn_native.c, host/shadow_slot.h). Only the bytes the game sets aside change, by less than one step's worth for each such map: the texture keeps its own description, size and layout, nvnTextureGetStorageSize of a made texture is unchanged, and nothing is drawn or sampled differently. The 384 x 384 maps, the frame's own targets, the static shadow maps (2400, 4096, 12288) and every other format keep their own storage.
  • host: HOS_SHADOW_BUCKET=<step> sets the step (384); 0 turns it off.
  • tests: tests/test_shadow_slot.py (which textures get a slot and which side, compiled from the header; that both answers use the slot's layout and the texture's own description is not changed).
  • docs: HOS_SHADOW_BUCKET in docs/development.md; docs/tested/2026-11-16-shadow-map-slots-gumminaomi-off.md and -on.md.

Why this is safe to answer: the game uses these two numbers only to place the texture in its heap (the bytes it reserves are the size plus the alignment). No game code is in this change, and the rule goes only by a texture's shape and format as the host is asked for them. How the game sizes these maps and places its targets I read from the game statically, to understand the addresses in the log; it is described here in my own words.

Measurements

Verdict: 6.0-6.7 textures made a frame in the market with the camera turning, against 15.2-16.2 (9.0 in one run), and a third fewer new images; the frame rate is the same within the runs' spread at 2560x1440 (61.1 against 61.4 fps over five runs a side), and at 3840x2160 one run a side went from 45.7 to 50.8 fps with 150 frames over 25 ms against 335.

Hardware: Windows 11 Pro 26200, RTX 4070 SUPER 12 GB (NVIDIA 617.42), Ryzen 9 9950X3D (16 cores, SMT off), 32 GB
Scene: save set "First Step into Hyrule Town", the walk into Castle Town's market and the camera turning (town-market.txt, wall clock, 100 s), DLAA, uncapped
Method: headless runs, the two sides in turn, five rounds at 2560x1440 and one at 3840x2160; the frame trace from 48 s on (the camera turn) and the log's status lines
Baseline: main's behaviour is this PR with HOS_SHADOW_BUCKET=0; both sides are one build, main ac778751 with this change. The branch has since been merged with main a413bf1c (no conflict) and built and run once there: 5.8 textures made a frame, no error
How to reproduce: HOS_SHADOW_BUCKET=0 against no switch, on the route above

2560x1440, five runs a side Before, HOS_SHADOW_BUCKET=0: this PR @ 4ad1d600 After: this PR @ 4ad1d600
Textures made a frame 15.2, 9.0, 16.2, 15.8, 15.6 6.3, 6.7, 6.3, 6.4, 6.0
Render target images made new 9,054, 6,054, 7,792, 8,845, 7,292 6,004, 5,235, 5,116, 6,061, 5,247
reused from the pool 38,035, 25,700, 32,047, 35,754, 31,266 12,561, 10,905, 10,375, 12,937, 11,140
VRAM used (the last three status lines) 7,166-8,014 MB 6,918-7,462 MB
Market fps 63.1, 66.5, 59.8, 59.0, 58.4 63.7, 57.2, 61.7, 61.1, 61.7
Median frame 15.1, 14.4, 16.1, 16.2, 16.4 ms 15.0, 15.9, 15.6, 15.6, 15.5 ms
99th percentile frame 24.9, 23.7, 25.8, 26.2, 26.7 ms 23.8, 33.1, 25.0, 26.3, 25.1 ms
Frames over 25 ms 27, 13, 39, 49, 70 21, 87, 26, 51, 30
Frames over 100 ms 0, 0, 0, 0, 0 0, 9, 0, 0, 0
Texture lookups, a frame 0.79, 0.58, 0.85, 0.83, 0.84 ms 0.63, 0.72, 0.65, 0.63, 0.63 ms
texture_frame, a frame 0.59, 0.42, 0.61, 0.60, 0.60 ms 0.46, 0.49, 0.45, 0.45, 0.43 ms

The second run with the slots had nine frames over 100 ms (101 to 412 ms), all between 65 and 69 s, with the render thread's phases small in them. No other run of either side had one, and I did not find the cause: the game has such stalls of its own in play without this change (a 745 ms one in a played session on main), but I cannot show this one was that.

3840x2160, one run a side Before, HOS_SHADOW_BUCKET=0: this PR @ 4ad1d600 After: this PR @ 4ad1d600
Textures made a frame 16.2 4.4
Render target images made new 13,217 3,892
Market fps 45.7 50.8
Median / 99th percentile frame 21.1 / 31.8 ms 18.8 / 30.5 ms
Frames over 25 ms 335 150
Errors in the log none none

What is left at 6 a frame: the changing maps themselves (a new description each frame), the frames in which a map crosses a step, and characters gaining or losing their shadow, which moves what the game makes after them.

One round of the gate's flicker test (a 320x180 shot every present, ~13,000 frames): 54 frames with 1 % or more of the picture flipping for one frame without the slots, 38 with. Two played sessions in the market, a shop and back with this change (and the dead targets' sweep): no flicker seen, and the texture budget was not cut once.

Flags and settings

One new switch, on by default.

Flag What it is Before this PR After this PR Effect Helps / doesn't help / untested Recommendation
HOS_SHADOW_BUCKET the step of sides a character's shadow map reserves storage by (none: its own size) 384 6 textures made a frame in the market, not 15-16 helps on the RTX 4070 SUPER at 2560x1440 and 3840x2160; untested on AMD, Intel, Linux, the Deck 384

Testing

Tested: Windows 11, RTX 4070 SUPER, NVIDIA 617.42: the runs above; two played sessions; tests/test_shadow_slot.py, tests/test_nvn_tex_builder_guard.py and tests/test_nvn_host_tables.py pass; python -I -B tests/run_all.py: 391 passed, 90 failed, 213 skipped, the same 90 failing as on main ac778751 on this PC (390 passed there; its toolchain: no gcc, Windows line endings, fixtures needing tools not installed).

Not tested: Linux, the Steam Deck, AMD, Intel; a long session at 3840x2160 (the game's heap for these targets is 512 MB at 2560x1440 and 686 MB at 3840x2160, hos_rt_pool_size; each such map reserves at most 1.8 MB more at the first step and under 4 MB at the last); handheld mode; other titles (the rule is by shape and format: another game's square one-level 0x34 textures of 385 to 1920 would reserve a little more too).

Must be tested:

  • Linux, any GPU: Castle Town's market with the camera turning, expecting no crash and the same picture (Test Farm: @Beanstalk linux)
  • 3840x2160, half an hour of play through the market and Hyrule Field: expecting no crash and no missing shadows (by hand)
  • A Steam Deck: the market, expecting the same picture and the same or a better frame rate (by hand)

Risks

What could break: the game's heap for a frame's targets has a fixed size (512 MB at 2560x1440, hos_rt_pool_size), and a slot reserves more of it than the map needs; if it ran out, the game's allocation would fail (a missing shadow or a crash). It held at 3840x2160 for 100 s here; a long session there is not tested. Another title's textures of the same shape would reserve slightly more memory.

Turning it off: HOS_SHADOW_BUCKET=0.

Compatibility: Nothing changes.

Issues

None found for this exactly.

Checklist

Everyone

  • One topic.
  • The title is a Conventional Commit (type(scope): description) of the status line's type.
  • Why gives the reason plainly and links the issues that fit (the tracker searched).
  • Measurements has a verdict, or one line saying why there is nothing to measure.
  • Testing names what was tested, what wasn't, and what must still be tested, where and how.
  • Rebased on current main.
  • python -I -B tests/run_all.py passes (any failure that also fails on main is named).
  • No game files, dumps, build output or generated files.
  • third_party/ untouched (a new folder with a PROVENANCE.md instead).
  • The license is OK: GPL-3.0-or-later, nothing incompatible and nothing decompiled.

When it applies

  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.
  • Switches documented (docs/development.md; the README for a menu row) and shipped at their recommended value.
  • A file in docs/tested/ for each new measured run (format in docs/tested-configurations.md).
  • A check under tests/ that reads changed source updated in this PR, not weakened.
  • Docs updated.
  • Host code builds on both Windows (llvm-mingw) and Linux, with UTF-8 paths. (Built on Windows only.)

🤖 Generated with Claude Code

**Type:** perf · **Risk:** low · **Tested on:** Windows 11, RTX 4070 SUPER (NVIDIA 617.42), 2560x1440 and 3840x2160 · **Needs:** Linux; a Steam Deck; a long play at 3840x2160; other titles ## Why In Castle Town's market, with the camera turning, the game makes 15-16 new textures every frame and lets as many go: every render target of the frame, at a new address. The renderer tells textures apart by address, so each is a new texture object and often a new image, and the dead ones hold video memory until they are found. The cause is in how the game sizes one kind of target. Each shadow-casting character near the camera gets its own square depth map (NVN format 0x34), and the game computes its side anew every frame from the camera's distance: 384 from far, more from near (up to 1277 seen here), a few pixels different each frame. In the market that gave sides such as 397, 439, 479, 517 ... and 1156, 1191, 1210 ... from one frame to the next. The game makes a frame's render targets one after another in a first-fit heap, asking the host for the storage size and alignment of each, so a shadow map a few pixels larger pushes every target made after it to a new address. With the camera still, the same sizes come in the same order and nothing moves (0.3-0.4 textures made a frame). Related: #994 and the dead targets' sweep (how the renderer copes with the targets once they have moved; this PR stops most of them moving). ## What changed A character's shadow map reserves the storage of the next step of sides up, so the render targets made after it keep their addresses while its side changes. - host: `nvnTextureBuilderGetStorageSize` and `nvnTextureBuilderGetStorageAlignment` answer a square, two-dimensional, one-level NVN 0x34 texture of side 385 to 1920 with the size and alignment of the next multiple of 384 up (768, 1152, 1536, 1920), where those are larger than its own (`host/nvn_native.c`, `host/shadow_slot.h`). Only the bytes the game sets aside change, by less than one step's worth for each such map: the texture keeps its own description, size and layout, `nvnTextureGetStorageSize` of a made texture is unchanged, and nothing is drawn or sampled differently. The 384 x 384 maps, the frame's own targets, the static shadow maps (2400, 4096, 12288) and every other format keep their own storage. - host: `HOS_SHADOW_BUCKET=<step>` sets the step (384); `0` turns it off. - tests: `tests/test_shadow_slot.py` (which textures get a slot and which side, compiled from the header; that both answers use the slot's layout and the texture's own description is not changed). - docs: `HOS_SHADOW_BUCKET` in `docs/development.md`; `docs/tested/2026-11-16-shadow-map-slots-gumminaomi-off.md` and `-on.md`. Why this is safe to answer: the game uses these two numbers only to place the texture in its heap (the bytes it reserves are the size plus the alignment). No game code is in this change, and the rule goes only by a texture's shape and format as the host is asked for them. How the game sizes these maps and places its targets I read from the game statically, to understand the addresses in the log; it is described here in my own words. ## Measurements **Verdict:** 6.0-6.7 textures made a frame in the market with the camera turning, against 15.2-16.2 (9.0 in one run), and a third fewer new images; the frame rate is the same within the runs' spread at 2560x1440 (61.1 against 61.4 fps over five runs a side), and at 3840x2160 one run a side went from 45.7 to 50.8 fps with 150 frames over 25 ms against 335. Hardware: Windows 11 Pro 26200, RTX 4070 SUPER 12 GB (NVIDIA 617.42), Ryzen 9 9950X3D (16 cores, SMT off), 32 GB Scene: save set "First Step into Hyrule Town", the walk into Castle Town's market and the camera turning (town-market.txt, wall clock, 100 s), DLAA, uncapped Method: headless runs, the two sides in turn, five rounds at 2560x1440 and one at 3840x2160; the frame trace from 48 s on (the camera turn) and the log's status lines Baseline: main's behaviour is this PR with `HOS_SHADOW_BUCKET=0`; both sides are one build, main ac778751 with this change. The branch has since been merged with main a413bf1c (no conflict) and built and run once there: 5.8 textures made a frame, no error How to reproduce: `HOS_SHADOW_BUCKET=0` against no switch, on the route above | 2560x1440, five runs a side | Before, `HOS_SHADOW_BUCKET=0`: this PR @ 4ad1d600 | After: this PR @ 4ad1d600 | |---|---|---| | Textures made a frame | 15.2, 9.0, 16.2, 15.8, 15.6 | 6.3, 6.7, 6.3, 6.4, 6.0 | | Render target images made new | 9,054, 6,054, 7,792, 8,845, 7,292 | 6,004, 5,235, 5,116, 6,061, 5,247 | | reused from the pool | 38,035, 25,700, 32,047, 35,754, 31,266 | 12,561, 10,905, 10,375, 12,937, 11,140 | | VRAM used (the last three status lines) | 7,166-8,014 MB | 6,918-7,462 MB | | Market fps | 63.1, 66.5, 59.8, 59.0, 58.4 | 63.7, 57.2, 61.7, 61.1, 61.7 | | Median frame | 15.1, 14.4, 16.1, 16.2, 16.4 ms | 15.0, 15.9, 15.6, 15.6, 15.5 ms | | 99th percentile frame | 24.9, 23.7, 25.8, 26.2, 26.7 ms | 23.8, 33.1, 25.0, 26.3, 25.1 ms | | Frames over 25 ms | 27, 13, 39, 49, 70 | 21, 87, 26, 51, 30 | | Frames over 100 ms | 0, 0, 0, 0, 0 | 0, 9, 0, 0, 0 | | Texture lookups, a frame | 0.79, 0.58, 0.85, 0.83, 0.84 ms | 0.63, 0.72, 0.65, 0.63, 0.63 ms | | `texture_frame`, a frame | 0.59, 0.42, 0.61, 0.60, 0.60 ms | 0.46, 0.49, 0.45, 0.45, 0.43 ms | The second run with the slots had nine frames over 100 ms (101 to 412 ms), all between 65 and 69 s, with the render thread's phases small in them. No other run of either side had one, and I did not find the cause: the game has such stalls of its own in play without this change (a 745 ms one in a played session on main), but I cannot show this one was that. | 3840x2160, one run a side | Before, `HOS_SHADOW_BUCKET=0`: this PR @ 4ad1d600 | After: this PR @ 4ad1d600 | |---|---|---| | Textures made a frame | 16.2 | 4.4 | | Render target images made new | 13,217 | 3,892 | | Market fps | 45.7 | 50.8 | | Median / 99th percentile frame | 21.1 / 31.8 ms | 18.8 / 30.5 ms | | Frames over 25 ms | 335 | 150 | | Errors in the log | none | none | What is left at 6 a frame: the changing maps themselves (a new description each frame), the frames in which a map crosses a step, and characters gaining or losing their shadow, which moves what the game makes after them. One round of the gate's flicker test (a 320x180 shot every present, ~13,000 frames): 54 frames with 1 % or more of the picture flipping for one frame without the slots, 38 with. Two played sessions in the market, a shop and back with this change (and the dead targets' sweep): no flicker seen, and the texture budget was not cut once. ### Flags and settings One new switch, on by default. | Flag | What it is | Before this PR | After this PR | Effect | Helps / doesn't help / untested | Recommendation | |---|---|---|---|---|---|---| | `HOS_SHADOW_BUCKET` | the step of sides a character's shadow map reserves storage by | (none: its own size) | 384 | 6 textures made a frame in the market, not 15-16 | helps on the RTX 4070 SUPER at 2560x1440 and 3840x2160; untested on AMD, Intel, Linux, the Deck | 384 | ## Testing **Tested:** Windows 11, RTX 4070 SUPER, NVIDIA 617.42: the runs above; two played sessions; `tests/test_shadow_slot.py`, `tests/test_nvn_tex_builder_guard.py` and `tests/test_nvn_host_tables.py` pass; `python -I -B tests/run_all.py`: 391 passed, 90 failed, 213 skipped, the same 90 failing as on main ac778751 on this PC (390 passed there; its toolchain: no gcc, Windows line endings, fixtures needing tools not installed). **Not tested:** Linux, the Steam Deck, AMD, Intel; a long session at 3840x2160 (the game's heap for these targets is 512 MB at 2560x1440 and 686 MB at 3840x2160, `hos_rt_pool_size`; each such map reserves at most 1.8 MB more at the first step and under 4 MB at the last); handheld mode; other titles (the rule is by shape and format: another game's square one-level 0x34 textures of 385 to 1920 would reserve a little more too). **Must be tested:** - Linux, any GPU: Castle Town's market with the camera turning, expecting no crash and the same picture (Test Farm: @Beanstalk linux) - 3840x2160, half an hour of play through the market and Hyrule Field: expecting no crash and no missing shadows (by hand) - A Steam Deck: the market, expecting the same picture and the same or a better frame rate (by hand) ## Risks **What could break:** the game's heap for a frame's targets has a fixed size (512 MB at 2560x1440, `hos_rt_pool_size`), and a slot reserves more of it than the map needs; if it ran out, the game's allocation would fail (a missing shadow or a crash). It held at 3840x2160 for 100 s here; a long session there is not tested. Another title's textures of the same shape would reserve slightly more memory. **Turning it off:** `HOS_SHADOW_BUCKET=0`. **Compatibility:** Nothing changes. ## Issues None found for this exactly. ## Checklist ### Everyone - [x] One topic. - [x] The title is a Conventional Commit (`type(scope): description`) of the status line's type. - [x] Why gives the reason plainly and links the issues that fit (the tracker searched). - [x] Measurements has a verdict, or one line saying why there is nothing to measure. - [x] Testing names what was tested, what wasn't, and what must still be tested, where and how. - [x] Rebased on current `main`. - [x] `python -I -B tests/run_all.py` passes (any failure that also fails on `main` is named). - [x] No game files, dumps, build output or generated files. - [x] `third_party/` untouched (a new folder with a `PROVENANCE.md` instead). - [x] The license is OK: GPL-3.0-or-later, nothing incompatible and nothing decompiled. ### When it applies - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. - [x] Switches documented (docs/development.md; the README for a menu row) and shipped at their recommended value. - [x] A file in `docs/tested/` for each new measured run (format in `docs/tested-configurations.md`). - [x] A check under `tests/` that reads changed source updated in this PR, not weakened. - [x] Docs updated. - [ ] Host code builds on both Windows (llvm-mingw) and Linux, with UTF-8 paths. (Built on Windows only.) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
OoT gives each shadow-casting character near the camera a square depth map
(NVN 0x34) whose side it computes anew every frame from the camera's
distance (397, 439, 479 ...), and makes a frame's render targets one after
another in one heap, asking the host the storage size and alignment of each.
A map a few pixels larger moved every target made after it to a new address:
15-16 textures made a frame in Castle Town's market with the camera turning,
each a new texture for the game and a new image for the renderer.

nvnTextureBuilderGetStorageSize and ...Alignment now answer such a map (square,
2D, one level, side 385 to 1920) with the storage of the next multiple of 384
up, so the targets after it stay where they are until it crosses a step
(host/shadow_slot.h). Only the bytes the game sets aside change; the texture
keeps its own size and layout. HOS_SHADOW_BUCKET=<step>, 0: off.

Market, camera turning, five runs a side at 2560x1440: 6.0-6.7 textures made
a frame against 15.2-16.2 (9.0 once), images made new 5,116-6,061 against
6,054-9,054, 61.1 against 61.4 fps. At 3840x2160, one run a side: 4.4
against 16.2 a frame, 50.8 against 45.7 fps, no error.

Assisted-by: Claude Mythos 5.2
Co-Authored-By: Claude Mythos 5.2 <[email protected]>
Merge main into perf/shadow-map-slots
Some checks failed
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
Website / Website on Cloudflare (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 11s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 13s
Third-party parts / As their notes say (pull_request) Successful in 17s
CI / Workflow lint (actionlint) (pull_request) Successful in 22s
Website / Website on Cloudflare (pull_request_target) Has been skipped
PR description / Description follows the template (pull_request_target) Failing after 4s
beanstalk/approval approved by GummiNaomi (reviewed)
beanstalk/linux 1/1 fail
2297e55462
Assisted-by: Claude Mythos 5.2
Co-Authored-By: Claude Mythos 5.2 <[email protected]>
Author
Member

@Beanstalk linux: Castle Town's market with the camera turning (save set "First Step into Hyrule Town", the walk north into the market, then the camera turned for a minute), once with this PR's default and once with HOS_SHADOW_BUCKET=0 (the behaviour before it). Expecting: no crash; the same picture on both, shadows included; with the default fewer textures made a frame (the log's N textures made a frame lines: about 6 against about 15 here), and a frame rate no worse.

🤖 Generated with Claude Code

@Beanstalk linux: Castle Town's market with the camera turning (save set "First Step into Hyrule Town", the walk north into the market, then the camera turned for a minute), once with this PR's default and once with `HOS_SHADOW_BUCKET=0` (the behaviour before it). Expecting: no crash; the same picture on both, shadows included; with the default fewer textures made a frame (the log's `N textures made a frame` lines: about 6 against about 15 here), and a frame rate no worse. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Member

Beanstalk test farm

Commit 2297e55 · tier reviewed · approved by GummiNaomi · dashboard

What will be tested · AI plan (gpt-6.1-terra)

On Linux, the plan teleports a new child save to Castle Town Market and applies camera-turn input for 3,600 frames with shadow bucketing enabled and disabled. It compares pictures against main and measures frame rate, frame times and VRAM after the turn; crashes, material visual differences or a frame-rate drop over 10% fail. The requested town-entry save is unavailable, and the farm cannot measure texture creations per frame or collect performance metrics during the turn, so those expectations are not directly tested. The two configurations take roughly 28 minutes per tester.

  • Where: linux (1 report).
  • market-default: from a new save (settings frame_rate_cap=6), then teleport to Market, take the picture market-before to compare with main, 6 times: move the stick, take the picture market-after to compare with main, measure market-rest for 10 s (after 5 s warm-up); 1 run on each side.
  • market-bucketing-off: from a new save (settings frame_rate_cap=6; switches HOS_SHADOW_BUCKET=0), then teleport to Market, take the picture market-before to compare with main, 6 times: move the stick, take the picture market-after to compare with main, measure market-rest for 10 s (after 5 s warm-up); 1 run on each side.
  • Measured: crashes, draws and frame rate, frame times, stutters and hitches, VRAM use.
  • The PR fails if: it crashes; or frame rate is more than 10% below main; or a picture differs from main by more than 5%.
  • Time: about 25 min of game runs per tester (4 game starts), plus the two builds.

Done. Comment @Beanstalk to run it again.

Target Reports Crash Frame p99 (ms) vs main VRAM peak (MB) vs main Result
linux · 1: linux+amd+radv+dgpu AMD Radeon RX 7900 XTX (RADV NAVI31), 26.2.7 1/1 1 none 1008.6 vs 20.9 (+4728%) 11,608 vs 11,731 (−1%) fail

Measurements · linux

Verdict: fail on linux (1/1 report): market-default market-rest.fps_mean.min_delta_pct (-78.5%); market-default screenshot.max_diff; market-bucketing-off screenshot.max_diff failed.

Hardware: 1: linux+amd+radv+dgpu AMD Radeon RX 7900 XTX (RADV NAVI31), 26.2.7 AMD Ryzen 7 5800X3D 8-Core Processor, 64 GB RAM
Scene: market-default, from a new save (frame_rate_cap=6); market-bucketing-off, from a new save (frame_rate_cap=6, HOS_SHADOW_BUCKET=0); each cell's settings and switches as the table names them
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); market-default: 1 game start a side, market-rest 10 s after 5 s warm-up; market-bucketing-off: 1 game start a side, market-rest 10 s after 5 s warm-up; each number the median of the runs, then of 1 report
How to reproduce: the farm's plan above (@Beanstalk on this PR runs it again)

Before: main @ a413bf1 After: this PR @ 2297e55
market-default · market-rest · frame rate 66.8 14.4 (−78%)
market-default · market-rest · frame time (p99) (ms) 20.9 1,009 (+4728%)
market-default · market-rest · peak VRAM (MB) 11,731 11,608 (−1%)
market-bucketing-off · market-rest · frame rate 70.1 76.4 (+9%)
market-bucketing-off · market-rest · frame time (p99) (ms) 19.5 17.5 (−10%)
market-bucketing-off · market-rest · peak VRAM (MB) 11,882 11,530 (−3%)

Flags and settings

None: the plan varied no setting, switch or build option.

Markdown for the PR description
## Measurements

**Verdict:** fail on linux (1/1 report): `market-default market-rest.fps_mean.min_delta_pct (-78.5%)`; `market-default screenshot.max_diff`; `market-bucketing-off screenshot.max_diff` failed.

Hardware: 1: linux+amd+radv+dgpu `AMD Radeon RX 7900 XTX (RADV NAVI31), 26.2.7` `AMD Ryzen 7 5800X3D 8-Core Processor, 64 GB RAM`  
Scene: market-default, from a new save (frame_rate_cap=6); market-bucketing-off, from a new save (frame_rate_cap=6, HOS_SHADOW_BUCKET=0); each cell's settings and switches as the table names them  
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); market-default: 1 game start a side, market-rest 10 s after 5 s warm-up; market-bucketing-off: 1 game start a side, market-rest 10 s after 5 s warm-up; each number the median of the runs, then of 1 report  
How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again)

| | Before: main @ a413bf1 | After: this PR @ 2297e55 |
|---|---|---|
| market-default · market-rest · frame rate | 66.8 | 14.4 (−78%) |
| market-default · market-rest · frame time (p99) (ms) | 20.9 | 1,009 (+4728%) |
| market-default · market-rest · peak VRAM (MB) | 11,731 | 11,608 (−1%) |
| market-bucketing-off · market-rest · frame rate | 70.1 | 76.4 (+9%) |
| market-bucketing-off · market-rest · frame time (p99) (ms) | 19.5 | 17.5 (−10%) |
| market-bucketing-off · market-rest · peak VRAM (MB) | 11,882 | 11,530 (−3%) |

### Flags and settings

None: the plan varied no setting, switch or build option.
<!-- beanstalk:sticky --> ### Beanstalk test farm Commit `2297e55` · tier **reviewed** · approved by GummiNaomi · [dashboard](https://beanstalk.magicbean.dev/prs/1256) **What will be tested** · AI plan (`gpt-6.1-terra`) On Linux, the plan teleports a new child save to Castle Town Market and applies camera-turn input for 3,600 frames with shadow bucketing enabled and disabled. It compares pictures against main and measures frame rate, frame times and VRAM after the turn; crashes, material visual differences or a frame-rate drop over 10% fail. The requested town-entry save is unavailable, and the farm cannot measure texture creations per frame or collect performance metrics during the turn, so those expectations are not directly tested. The two configurations take roughly 28 minutes per tester. - **Where:** linux (1 report). - **market-default:** from a new save (settings frame_rate_cap=6), then teleport to Market, take the picture market-before to compare with main, 6 times: move the stick, take the picture market-after to compare with main, measure market-rest for 10 s (after 5 s warm-up); 1 run on each side. - **market-bucketing-off:** from a new save (settings frame_rate_cap=6; switches `HOS_SHADOW_BUCKET=0`), then teleport to Market, take the picture market-before to compare with main, 6 times: move the stick, take the picture market-after to compare with main, measure market-rest for 10 s (after 5 s warm-up); 1 run on each side. - **Measured:** crashes, draws and frame rate, frame times, stutters and hitches, VRAM use. - **The PR fails if:** it crashes; or frame rate is more than 10% below main; or a picture differs from main by more than 5%. - **Time:** about 25 min of game runs per tester (4 game starts), plus the two builds. Done. Comment `@Beanstalk` to run it again. | Target | Reports | Crash | Frame p99 (ms) vs main | VRAM peak (MB) vs main | Result | | --- | --- | --- | --- | --- | --- | | linux · 1: linux+amd+radv+dgpu `AMD Radeon RX 7900 XTX (RADV NAVI31), 26.2.7` | 1/1 [1](https://beanstalk.magicbean.dev/reports/rp_27657396b1fa127e) | none | 1008.6 vs 20.9 (+4728%) | 11,608 vs 11,731 (−1%) | fail | #### Measurements · linux **Verdict:** fail on linux (1/1 report): `market-default market-rest.fps_mean.min_delta_pct (-78.5%)`; `market-default screenshot.max_diff`; `market-bucketing-off screenshot.max_diff` failed. Hardware: 1: linux+amd+radv+dgpu `AMD Radeon RX 7900 XTX (RADV NAVI31), 26.2.7` `AMD Ryzen 7 5800X3D 8-Core Processor, 64 GB RAM` Scene: market-default, from a new save (frame_rate_cap=6); market-bucketing-off, from a new save (frame_rate_cap=6, HOS_SHADOW_BUCKET=0); each cell's settings and switches as the table names them Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); market-default: 1 game start a side, market-rest 10 s after 5 s warm-up; market-bucketing-off: 1 game start a side, market-rest 10 s after 5 s warm-up; each number the median of the runs, then of 1 report How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again) | | Before: main @ a413bf1 | After: this PR @ 2297e55 | |---|---|---| | market-default · market-rest · frame rate | 66.8 | 14.4 (−78%) | | market-default · market-rest · frame time (p99) (ms) | 20.9 | 1,009 (+4728%) | | market-default · market-rest · peak VRAM (MB) | 11,731 | 11,608 (−1%) | | market-bucketing-off · market-rest · frame rate | 70.1 | 76.4 (+9%) | | market-bucketing-off · market-rest · frame time (p99) (ms) | 19.5 | 17.5 (−10%) | | market-bucketing-off · market-rest · peak VRAM (MB) | 11,882 | 11,530 (−3%) | ### Flags and settings None: the plan varied no setting, switch or build option. <details><summary>Markdown for the PR description</summary> ```markdown ## Measurements **Verdict:** fail on linux (1/1 report): `market-default market-rest.fps_mean.min_delta_pct (-78.5%)`; `market-default screenshot.max_diff`; `market-bucketing-off screenshot.max_diff` failed. Hardware: 1: linux+amd+radv+dgpu `AMD Radeon RX 7900 XTX (RADV NAVI31), 26.2.7` `AMD Ryzen 7 5800X3D 8-Core Processor, 64 GB RAM` Scene: market-default, from a new save (frame_rate_cap=6); market-bucketing-off, from a new save (frame_rate_cap=6, HOS_SHADOW_BUCKET=0); each cell's settings and switches as the table names them Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); market-default: 1 game start a side, market-rest 10 s after 5 s warm-up; market-bucketing-off: 1 game start a side, market-rest 10 s after 5 s warm-up; each number the median of the runs, then of 1 report How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again) | | Before: main @ a413bf1 | After: this PR @ 2297e55 | |---|---|---| | market-default · market-rest · frame rate | 66.8 | 14.4 (−78%) | | market-default · market-rest · frame time (p99) (ms) | 20.9 | 1,009 (+4728%) | | market-default · market-rest · peak VRAM (MB) | 11,731 | 11,608 (−1%) | | market-bucketing-off · market-rest · frame rate | 70.1 | 76.4 (+9%) | | market-bucketing-off · market-rest · frame time (p99) (ms) | 19.5 | 17.5 (−10%) | | market-bucketing-off · market-rest · peak VRAM (MB) | 11,882 | 11,530 (−3%) | ### Flags and settings None: the plan varied no setting, switch or build option. ``` </details>
GummiNaomi changed title from WIP: perf(host): a character's shadow map reserves stepped storage, so the frame's other render targets keep their addresses (HOS_SHADOW_BUCKET) to perf(host): a character's shadow map reserves stepped storage, so the frame's other render targets keep their addresses (HOS_SHADOW_BUCKET) 2026-11-16 22:34:42 +00:00
HumanBean deleted branch perf/shadow-map-slots 2026-11-16 23:03:46 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/Longshot!1256
No description provided.