feat(vk): add adaptive per-area simulated-turf controls #2093

Merged
HumanBean merged 13 commits from erlo68/Longshot:experiment/grass-adaptive into main 2026-11-21 22:52:49 +00:00
Contributor

Summary

This is a dependent proposal, not a competing replacement for the existing vegetation and turf work:

  • #1382, now merged on main, controls how far short decorative blades used for details such as Kokiri tufts and moss remain visible.
  • #1877 supplies the renderer-owned record-buffer foundation for the large-scale simulated turf so high demand does not flicker, lose patches, or overflow the game's fixed record storage.
  • #1621 documents the same dense simulated-turf flicker/disappearance failure on an AMD RX 7900 XT.

This proposal keeps #1877's original commit and author, then adds adaptive sizing and player-facing controls on top. It does not replace or duplicate #1382's Grass distance setting.

The renderer measures the two simulated-turf blade lists and four pool lists independently, keeps 25% aligned headroom, grows immediately, and shrinks from a 600-present quiet-window high-water mark. Capacity can fall below the game's stock counts and reaches zero when simulated turf is disabled. RX_VK_SIM_TURF_ADAPTIVE=0 restores fixed private sizing for A/B testing; RX_VK_SIM_TURF_POOLS=0 disables the private-buffer path.

The Graphics menu adds a six-row Simulated turf page: Use global multipliers, Fade start, Turf density, Minimum blades, Far power, and Reset current area. Its explanatory text identifies simulated turf as the broad field grass animated by the game's fluid simulation and points players to the separate Grass distance row for short decorative blades. Area edits persist in sim_turf_settings.ini; global multipliers preserve each area's installed profile; Fade start 0 plus Minimum blades 0 provides a supported no-simulated-turf mode for lower-end systems. Changes apply live and Reset removes the current area's saved override.

The review fixes carried into the current head df6880b5 make the private path compatible with independently patched programs. Each bound private producer mirrors a bounded stock-compatible record window back into the game's original storage after dispatch, with reverse lists end-aligned. An unpatched consumer therefore still sees the producer's records. The copy uses the exact private buffer bound for that dispatch, and retired buffers remain timeline-safe. If demand readback cannot be created, the recording fails closed to the game's buffers, logs the failure, and retries later instead of allowing an unmonitored private buffer to shrink.

Review the capacity policy in gpu/vk/sim_turf_capacity.h, buffer lifecycle and compatibility copy in gpu/vk/vk_draw.cpp, shader demand instrumentation in gpu/vk/eden/shader_recompiler/ir_opt/sim_turf_pool_pass.h, and settings/UI in gpu/vk/menu/sim_turf_settings.h and gpu/vk/menu/sim_turf.cpp.

Testing

Tested: Current head df6880b5, rebased onto current main 1101b612, on Windows 11 with an AMD Radeon RX 7900 XT and driver 26.11.2. The focused checks and 268-file Vulkan renderer build pass on that final code. git range-diff reports all 13 proposal commits patch-identical to the prior tested head. The exact-base full package, live stress cases, and main-versus-PR performance measurement below were made at 8aa74983 / 9a6eb383; they are kept under their exact hashes rather than relabelled. Since that measurement, main added DualSense speaker/headphone audio, per-control reset/confirm UI, BC3-kept ASTC upload batching, and expanded randomized tests. None changes the simulated-turf shader instrumentation, buffer lifecycle, demand policy, or compatibility copies; the affected shared menu/settings fixtures pass on the combined code. The historical A/B remains evidence for the proposal's measured overhead at its exact base, not a claim about current-main absolute performance.

The reviewer findings are addressed as follows:

  • L1: producer dispatches mirror a bounded compatible record window into the original game buffer, so patched and unpatched producers/consumers do not become disconnected. Forward pools copy from the start; reverse blade/pool lists align the newest records at the end. Unit coverage includes private capacity above, below, equal to, and zero relative to stock.
  • L2: tests/sim_turf_settings_test.cpp now uses VirtualAlloc on Windows and mmap/mprotect on POSIX. The same guard-page behavior remains in both paths. A real Linux compile/run is still listed below rather than claimed.
  • L3: the UTF-8 options path is converted through std::u8string/char8_t before constructing std::filesystem::path; the fixture persists through a Unicode sim-turf-測試 directory.
  • L4: missing host-visible readback disables private adaptive binding for that recording, keeps the game's buffers in use, emits a rate-limited log, and retries allocation on later recordings.
  • L5: the capacity-policy Python check declares RUN_ALL_ARGS = ["--cxx", "{cxx}"].
  • L6: the complete default path is measured against exact main below, including frame times and renderer-owned capacity.
  • L7: the branch is rebased onto current main 1101b612; the full package and performance measurement retain their exact tested pair, base 8aa74983 and proposal 9a6eb383.

Focused checks passed on the final head:

  • simulated-turf settings, persistence, reset, zero-turf inheritance, and Unicode options paths;
  • adaptive capacity growth, shrink, zero, allocation-failure policy, and stock/private mirror spans;
  • simulated-turf pool IR and runtime wiring;
  • menu model, rows, sections, shortcuts, per-control reset/confirm navigation, settings table, vibration fixture, INI keys, and the merged Controller speaker/recordings/simulated-turf page layout;
  • Vulkan brace/source checks.

On final head df6880b5, scripts/dev.py vk compiled 268 renderer files with zero failures, linked longshot_vk.dll, and passed symbol checks. The earlier exact-base scripts/dev.py pack built and linked both longshot.exe and longshot_vk.dll against main 8aa74983 with zero compile failures. The official A/B harness then made clean base/PR runtimes from those artifacts.

tests/test_menu_modules.py currently fails two ReShade preset-name assertions on this branch and on untouched exact base 8aa74983; the generated Graphics layout otherwise includes the Simulated turf page in the intended position. This base-reproduced mismatch is not counted as a proposal regression.

Live Windows AMD coverage from the earlier stress pass remains applicable to the unchanged turf implementation:

  • Fade start 0 plus Minimum blades 0 settled both blade lists and all four pools to zero demand/capacity while flowers, shrubs, and #1382's decorative blades remained.
  • A same-frame zero-to-high change to 25.2 / 200 / 23 / 1.00 grew all six buffers to demand without flicker, oscillating partial coverage, allocation failure, stale mappings, device loss, or hang.
  • Restoring the installed Hyrule values shrank below stock after the quiet window.
  • Normal Hyrule Field-to-Market traversal used the expected black fade; the first playable Market state was complete and its turf buffers subsequently settled to zero.

Still to test:

  • Linux: compile and run the focused settings/capacity fixtures, expecting the POSIX guard-page and UTF-8 persistence cases to pass (by hand; a minimal WSL2 VM is planned but not yet installed).
  • Windows NVIDIA: repeat no-turf, direct zero-to-high, fallback shrink, and normal transition tests, expecting complete coverage and no allocation/device errors (@Beanstalk Windows NVIDIA simulated-turf compatibility test).
  • Steam Deck: test no turf, the installed profile, and a high profile while moving through a dense area, expecting stable coverage and bounded capacity (@Beanstalk Steam Deck simulated-turf presets test).
  • Supported build environment: run mise run lint and mise run test, expecting the complete suite to pass (by hand).
  • Screenshots: add the final Simulated turf menu and a matched main/PR same-position pair after author review, expecting the affected turf and UI distinction to be visible (by hand).

Measurements

Complete default path against exact main

Verdict: faster: +1.0% FPS (median 113.9 against 112.8), with every PR run above every main run. The effect is small; the practical conclusion is that the complete default adaptive path and compatibility copies show no gameplay-performance regression.

Setup: Windows 11, RX 7900 XT driver 26.11.2, saved Hyrule Field child view from slot_02, window 2150x900, 67% of 3440x1440 (2294x960), Custom quality, VSync and frame generation off, HOS_FPS_MAX=1000. dev.py ab ran two interleaved 60-second pairs (A1 B1 A2 B2), each after at least 10 seconds and until no frame had waited for a shader or pipeline. Renderer, window, and menu settings matched; only the per-run HOS_CONTROL socket identifier was allowed to differ.

Before: main @ 8aa74983 After: this PR @ 9a6eb383
FPS (each run) 112.3 / 113.4 (median 112.8) 113.9 / 113.9 (median 113.9, +1.0%)
Median frame time 8.79 ms 8.73 ms (-0.07 ms)
p99 frame time 10.70 ms 10.75 ms (+0.05 ms)
1% low 93.5 FPS 93.2 FPS (-0.4%)
Frames at least 50 ms (median) 1.5 0 (-1.5)

The measurement's installed Hyrule profile settled the PR to two 47,616-record blade lists, two 35,136-record main pools, and two 9,632-record secondary pools: 4.83 MiB of renderer-owned record capacity in total. main has no renderer-owned simulated-turf buffers; both sides retain the game's original storage. During the PR runs telemetry reported zero retaken, absent, or lost mappings. Overall driver VRAM moves with streamed textures and is not presented as a stable feature delta; the direct record-capacity count is the isolated incremental memory cost.

Continuous-monitor isolation

The earlier rollback-switch A/B isolates the continuous demand monitor from the private-buffer foundation. In the same saved Hyrule Field view, three interleaved 60-second runs per side measured 141.6 FPS / 7.03 ms median with RX_VK_SIM_TURF_ADAPTIVE=0 and 141.4 FPS / 7.04 ms with the adaptive default. The 0.2 FPS / 0.01 ms difference was below run-to-run variation. This secondary result supports keeping monitoring continuous; the exact-main comparison above covers the complete shipped path.

Capacity stress results (renderer-owned record capacity, excluding allocation alignment):

Scene/settings Fixed private foundation Adaptive proposal
Earlier settled installed Hyrule Field far view 80.0 MiB 8.61 MiB (-89.2%)
Simulated turf disabled 80.0 MiB 0 MiB
Direct zero-to-high 25.2 / 200 / 23 / 1.00 80.0 MiB 42.4 MiB

Risks

The simulated-turf programs are identified by version-specific signatures and guest buffer addresses. Unexpected programs are not patched. The compatibility mirror preserves original-buffer records for independently unpatched consumers; if the monitor or private allocation is unavailable, the current recording uses the game's buffers and retries later. RX_VK_SIM_TURF_POOLS=0 disables all private simulated-turf buffers, and RX_VK_SIM_TURF_ADAPTIVE=0 keeps private buffers at fixed sizing.

The compatibility mirror adds bounded GPU buffer copies after producer dispatches. The exact-main A/B above exercises that default path and shows no measurable regression on the tested RX 7900 XT. Other GPU/driver combinations remain in Still to test.

Abrupt debug teleports or instant large setting changes can show one turf pop-in while a zero/small buffer grows. The zero-to-high stress test showed no flicker or oscillating partial state, and normal scene transitions are hidden by the game's black fade. The 25% headroom and 600-present high-water quiet window avoid resize churn during ordinary movement.

Changing simulated-turf settings creates sim_turf_settings.ini. It stores renderer settings only and does not modify game saves. Reset current area removes that area's override.

Checklist

Ready for review

  • One topic, on current main; the title is a Conventional Commit.
  • Tested on my own PC, in the game for a change the game runs, as Testing says.
  • mise run test passes (any failure that also fails on main is named).
  • Measured against main, or Measurements says why there is nothing to measure.
  • No game files, build output or hand-edited generated files; third_party/ untouched; nothing GPL-incompatible.

When it applies

  • A fix: a game-free test that fails on main and passes here.
  • A switch added or changed: it ships at the default the measurements chose, with its row in gpu/vk/switches.def.
  • A check under tests/ that reads changed source is updated, not weakened.
  • Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths.
  • Screenshots of the same spot on main and here, for a change that shows on screen.
  • Docs updated.
  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.

Ready to merge

  • Everything in Still to test has run, its results in Tested.
  • Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers").
  • Approved in review and every comment answered.
  • CI passes on the head; on current main, measured again or a comment says why the numbers still hold.
## Summary This is a dependent proposal, not a competing replacement for the existing vegetation and turf work: - #1382, now merged on `main`, controls how far short decorative blades used for details such as Kokiri tufts and moss remain visible. - #1877 supplies the renderer-owned record-buffer foundation for the large-scale simulated turf so high demand does not flicker, lose patches, or overflow the game's fixed record storage. - #1621 documents the same dense simulated-turf flicker/disappearance failure on an AMD RX 7900 XT. This proposal keeps #1877's original commit and author, then adds adaptive sizing and player-facing controls on top. It does not replace or duplicate #1382's **Grass distance** setting. The renderer measures the two simulated-turf blade lists and four pool lists independently, keeps 25% aligned headroom, grows immediately, and shrinks from a 600-present quiet-window high-water mark. Capacity can fall below the game's stock counts and reaches zero when simulated turf is disabled. `RX_VK_SIM_TURF_ADAPTIVE=0` restores fixed private sizing for A/B testing; `RX_VK_SIM_TURF_POOLS=0` disables the private-buffer path. The Graphics menu adds a six-row **Simulated turf** page: Use global multipliers, Fade start, Turf density, Minimum blades, Far power, and Reset current area. Its explanatory text identifies simulated turf as the broad field grass animated by the game's fluid simulation and points players to the separate Grass distance row for short decorative blades. Area edits persist in `sim_turf_settings.ini`; global multipliers preserve each area's installed profile; Fade start 0 plus Minimum blades 0 provides a supported no-simulated-turf mode for lower-end systems. Changes apply live and Reset removes the current area's saved override. The review fixes carried into the current head `df6880b5` make the private path compatible with independently patched programs. Each bound private producer mirrors a bounded stock-compatible record window back into the game's original storage after dispatch, with reverse lists end-aligned. An unpatched consumer therefore still sees the producer's records. The copy uses the exact private buffer bound for that dispatch, and retired buffers remain timeline-safe. If demand readback cannot be created, the recording fails closed to the game's buffers, logs the failure, and retries later instead of allowing an unmonitored private buffer to shrink. Review the capacity policy in `gpu/vk/sim_turf_capacity.h`, buffer lifecycle and compatibility copy in `gpu/vk/vk_draw.cpp`, shader demand instrumentation in `gpu/vk/eden/shader_recompiler/ir_opt/sim_turf_pool_pass.h`, and settings/UI in `gpu/vk/menu/sim_turf_settings.h` and `gpu/vk/menu/sim_turf.cpp`. ## Testing **Tested:** Current head `df6880b5`, rebased onto current `main` `1101b612`, on Windows 11 with an AMD Radeon RX 7900 XT and driver 26.11.2. The focused checks and 268-file Vulkan renderer build pass on that final code. `git range-diff` reports all 13 proposal commits patch-identical to the prior tested head. The exact-base full package, live stress cases, and main-versus-PR performance measurement below were made at `8aa74983` / `9a6eb383`; they are kept under their exact hashes rather than relabelled. Since that measurement, main added DualSense speaker/headphone audio, per-control reset/confirm UI, BC3-kept ASTC upload batching, and expanded randomized tests. None changes the simulated-turf shader instrumentation, buffer lifecycle, demand policy, or compatibility copies; the affected shared menu/settings fixtures pass on the combined code. The historical A/B remains evidence for the proposal's measured overhead at its exact base, not a claim about current-main absolute performance. The reviewer findings are addressed as follows: - L1: producer dispatches mirror a bounded compatible record window into the original game buffer, so patched and unpatched producers/consumers do not become disconnected. Forward pools copy from the start; reverse blade/pool lists align the newest records at the end. Unit coverage includes private capacity above, below, equal to, and zero relative to stock. - L2: `tests/sim_turf_settings_test.cpp` now uses `VirtualAlloc` on Windows and `mmap`/`mprotect` on POSIX. The same guard-page behavior remains in both paths. A real Linux compile/run is still listed below rather than claimed. - L3: the UTF-8 options path is converted through `std::u8string`/`char8_t` before constructing `std::filesystem::path`; the fixture persists through a Unicode `sim-turf-測試` directory. - L4: missing host-visible readback disables private adaptive binding for that recording, keeps the game's buffers in use, emits a rate-limited log, and retries allocation on later recordings. - L5: the capacity-policy Python check declares `RUN_ALL_ARGS = ["--cxx", "{cxx}"]`. - L6: the complete default path is measured against exact `main` below, including frame times and renderer-owned capacity. - L7: the branch is rebased onto current `main` `1101b612`; the full package and performance measurement retain their exact tested pair, base `8aa74983` and proposal `9a6eb383`. Focused checks passed on the final head: - simulated-turf settings, persistence, reset, zero-turf inheritance, and Unicode options paths; - adaptive capacity growth, shrink, zero, allocation-failure policy, and stock/private mirror spans; - simulated-turf pool IR and runtime wiring; - menu model, rows, sections, shortcuts, per-control reset/confirm navigation, settings table, vibration fixture, INI keys, and the merged Controller speaker/recordings/simulated-turf page layout; - Vulkan brace/source checks. On final head `df6880b5`, `scripts/dev.py vk` compiled 268 renderer files with zero failures, linked `longshot_vk.dll`, and passed symbol checks. The earlier exact-base `scripts/dev.py pack` built and linked both `longshot.exe` and `longshot_vk.dll` against `main` `8aa74983` with zero compile failures. The official A/B harness then made clean base/PR runtimes from those artifacts. `tests/test_menu_modules.py` currently fails two ReShade preset-name assertions on this branch and on untouched exact base `8aa74983`; the generated Graphics layout otherwise includes the Simulated turf page in the intended position. This base-reproduced mismatch is not counted as a proposal regression. Live Windows AMD coverage from the earlier stress pass remains applicable to the unchanged turf implementation: - Fade start 0 plus Minimum blades 0 settled both blade lists and all four pools to zero demand/capacity while flowers, shrubs, and #1382's decorative blades remained. - A same-frame zero-to-high change to 25.2 / 200 / 23 / 1.00 grew all six buffers to demand without flicker, oscillating partial coverage, allocation failure, stale mappings, device loss, or hang. - Restoring the installed Hyrule values shrank below stock after the quiet window. - Normal Hyrule Field-to-Market traversal used the expected black fade; the first playable Market state was complete and its turf buffers subsequently settled to zero. **Still to test:** - Linux: compile and run the focused settings/capacity fixtures, expecting the POSIX guard-page and UTF-8 persistence cases to pass (by hand; a minimal WSL2 VM is planned but not yet installed). - Windows NVIDIA: repeat no-turf, direct zero-to-high, fallback shrink, and normal transition tests, expecting complete coverage and no allocation/device errors (@Beanstalk Windows NVIDIA simulated-turf compatibility test). - Steam Deck: test no turf, the installed profile, and a high profile while moving through a dense area, expecting stable coverage and bounded capacity (@Beanstalk Steam Deck simulated-turf presets test). - Supported build environment: run `mise run lint` and `mise run test`, expecting the complete suite to pass (by hand). - Screenshots: add the final Simulated turf menu and a matched main/PR same-position pair after author review, expecting the affected turf and UI distinction to be visible (by hand). ## Measurements **Complete default path against exact main** **Verdict:** faster: +1.0% FPS (median 113.9 against 112.8), with every PR run above every `main` run. The effect is small; the practical conclusion is that the complete default adaptive path and compatibility copies show no gameplay-performance regression. Setup: Windows 11, RX 7900 XT driver 26.11.2, saved Hyrule Field child view from `slot_02`, window 2150x900, 67% of 3440x1440 (2294x960), Custom quality, VSync and frame generation off, `HOS_FPS_MAX=1000`. `dev.py ab` ran two interleaved 60-second pairs (`A1 B1 A2 B2`), each after at least 10 seconds and until no frame had waited for a shader or pipeline. Renderer, window, and menu settings matched; only the per-run `HOS_CONTROL` socket identifier was allowed to differ. | | Before: main @ 8aa74983 | After: this PR @ 9a6eb383 | |---|---:|---:| | FPS (each run) | 112.3 / 113.4 (median 112.8) | 113.9 / 113.9 (median 113.9, +1.0%) | | Median frame time | 8.79 ms | 8.73 ms (-0.07 ms) | | p99 frame time | 10.70 ms | 10.75 ms (+0.05 ms) | | 1% low | 93.5 FPS | 93.2 FPS (-0.4%) | | Frames at least 50 ms (median) | 1.5 | 0 (-1.5) | The measurement's installed Hyrule profile settled the PR to two 47,616-record blade lists, two 35,136-record main pools, and two 9,632-record secondary pools: **4.83 MiB** of renderer-owned record capacity in total. `main` has no renderer-owned simulated-turf buffers; both sides retain the game's original storage. During the PR runs telemetry reported zero retaken, absent, or lost mappings. Overall driver VRAM moves with streamed textures and is not presented as a stable feature delta; the direct record-capacity count is the isolated incremental memory cost. ### Continuous-monitor isolation The earlier rollback-switch A/B isolates the continuous demand monitor from the private-buffer foundation. In the same saved Hyrule Field view, three interleaved 60-second runs per side measured 141.6 FPS / 7.03 ms median with `RX_VK_SIM_TURF_ADAPTIVE=0` and 141.4 FPS / 7.04 ms with the adaptive default. The 0.2 FPS / 0.01 ms difference was below run-to-run variation. This secondary result supports keeping monitoring continuous; the exact-main comparison above covers the complete shipped path. Capacity stress results (renderer-owned record capacity, excluding allocation alignment): | Scene/settings | Fixed private foundation | Adaptive proposal | |---|---:|---:| | Earlier settled installed Hyrule Field far view | 80.0 MiB | 8.61 MiB (-89.2%) | | Simulated turf disabled | 80.0 MiB | 0 MiB | | Direct zero-to-high 25.2 / 200 / 23 / 1.00 | 80.0 MiB | 42.4 MiB | ## Risks The simulated-turf programs are identified by version-specific signatures and guest buffer addresses. Unexpected programs are not patched. The compatibility mirror preserves original-buffer records for independently unpatched consumers; if the monitor or private allocation is unavailable, the current recording uses the game's buffers and retries later. `RX_VK_SIM_TURF_POOLS=0` disables all private simulated-turf buffers, and `RX_VK_SIM_TURF_ADAPTIVE=0` keeps private buffers at fixed sizing. The compatibility mirror adds bounded GPU buffer copies after producer dispatches. The exact-main A/B above exercises that default path and shows no measurable regression on the tested RX 7900 XT. Other GPU/driver combinations remain in Still to test. Abrupt debug teleports or instant large setting changes can show one turf pop-in while a zero/small buffer grows. The zero-to-high stress test showed no flicker or oscillating partial state, and normal scene transitions are hidden by the game's black fade. The 25% headroom and 600-present high-water quiet window avoid resize churn during ordinary movement. Changing simulated-turf settings creates `sim_turf_settings.ini`. It stores renderer settings only and does not modify game saves. Reset current area removes that area's override. ## Checklist ### Ready for review - [x] One topic, on current `main`; the title is a Conventional Commit. - [x] Tested on my own PC, in the game for a change the game runs, as Testing says. - [ ] `mise run test` passes (any failure that also fails on `main` is named). - [x] Measured against `main`, or Measurements says why there is nothing to measure. - [x] No game files, build output or hand-edited generated files; `third_party/` untouched; nothing GPL-incompatible. ### When it applies - [x] A fix: a game-free test that fails on `main` and passes here. - [x] A switch added or changed: it ships at the default the measurements chose, with its row in `gpu/vk/switches.def`. - [x] A check under `tests/` that reads changed source is updated, not weakened. - [ ] Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths. - [ ] Screenshots of the same spot on `main` and here, for a change that shows on screen. - [x] Docs updated. - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. ### Ready to merge - [ ] Everything in Still to test has run, its results in Tested. - [ ] Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers"). - [ ] Approved in review and every comment answered. - [ ] CI passes on the head; on current `main`, measured again or a comment says why the numbers still hold.
Above 2x the short grass asks for more blades than the game's lists hold (143360 blades in d5a9475f2790532e, 138240
48-byte records in each of 3de6d86ec7e6720e's two pools): which patches get in changes from frame to frame, and whole
patches of grass come and go in Hyrule Field, even standing still. An IR pass (ir_opt/grass_pool_pass.h) moves the
records to storage buffers of the renderer's own (524288 blades, 393216 records in pool 2) and raises the caps in the
producers and the mesh readers; the 64-byte headers stay in the game's buffers. 3de6's pool-2 writes are taken in both
forms the program has (the record's address, and that address + 8). Every edit is checked first; a program that does
not look as expected is left as it is and logged ("vk: grass: program ...: ... left as it is: <why>").
RX_VK_GRASS_POOLS=0 leaves the programs as they were.

The renderer's buffers are found by the guest address the game's descriptor names (vk_draw.cpp grass_private_binding).
A line every 600 frames, when it changed, counts the lookups over the run ("vk: grass: frame N: ..."), and the binding
log stops at 64 lines.

tests/test_grass_pools.py runs the pass on synthetic programs shaped as the game's (tests/grass_pools_ir.cpp): the three
made larger, pool 2's records at the same place in the new buffer, eleven that differ a little left as they are, and
vk_shader.cpp's grass_pools both ways (unset, and RX_VK_GRASS_POOLS=0).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Builds on MagicBeanDev/Longshot#1382 and #1877. Derive shader caps from runtime descriptor ranges, sample unclipped list demand asynchronously, and resize each grass list independently with bounded headroom.
Include the highest raw reservation count and its installed capacity in the existing 600-frame grass tally so area-specific sizing can be verified without per-frame logging.
Keep the stock capacities as the safe initial allocation, but let an opt-in RX_VK_GRASS_SUBSTOCK run shrink to measured demand plus headroom, including zero demand. Reset the quiet timer after each installed resize so consecutive reductions each require a stable window.
feat(vk): add per-area grass controls
All checks were successful
Website / Website on Cloudflare (pull_request_target) Has been skipped
PR description / Description follows the template (pull_request_target) Successful in 10s
12272fd89d
Assisted-by: OpenAI Codex
Member

Possibly related, for context:

  • issue #950 Idea: More graphics performance and quality-of-life options — Open request for adjustable grass distance and graphics options; the proposed settings partially address it.
Possibly related, for context: - issue #950 Idea: More graphics performance and quality-of-life options — Open request for adjustable grass distance and graphics options; the proposed settings partially address it.
Author
Contributor

Player-facing grass controls

The final proposal preserves the basic mod's six-row layout. The page switches between per-area values and global multipliers without adding a preset row. Fade start 0 plus Minimum blades 0 is the supported no-grass configuration.

Grass settings six-row menu
Grass settings six-row menu

### Player-facing grass controls The final proposal preserves the basic mod's six-row layout. The page switches between per-area values and global multipliers without adding a preset row. Fade start 0 plus Minimum blades 0 is the supported no-grass configuration. ![Grass settings six-row menu](https://git.magicbean.dev/attachments/30bafe66-3b60-4843-8df5-a7c341e6ff95) ![Grass settings six-row menu](https://git.magicbean.dev/attachments/5d9fd122-da47-4f4a-b876-ca8b6850688a)
Owner

Please include screenshot of the settigns!

Please include screenshot of the settigns!
Author
Contributor

Fixed screenshots

Fixed screenshots
erlo68 force-pushed experiment/grass-adaptive from 12272fd89d
All checks were successful
Website / Website on Cloudflare (pull_request_target) Has been skipped
PR description / Description follows the template (pull_request_target) Successful in 10s
to f5dca2cb98
Some checks failed
PR description / Description follows the template (pull_request_target) Successful in 25s
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Workflow lint (actionlint) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
Guide screenshots / Guide images and local UI source review (pull_request) Has been cancelled
Third-party parts / As their notes say (pull_request) Has been cancelled
Third-party parts / The same as upstream (pull_request) Has been cancelled
Website / Website on Cloudflare (pull_request) Has been cancelled
2026-11-21 18:53:56 +00:00
Compare
Author
Contributor

Rebased the proposal onto main d2f0e8dc (#1382) and force-updated the branch with lease to f5dca2cb. The release renderer/pack/runtime build passes on Windows AMD. The current-main live regression passed: zero simulated turf settled all six lists to zero; a same-frame jump to simulated-turf values 25.2/200/23/1.00 grew safely to measured demand with zero retaken, absent or lost mappings; restoring 8.0/200/12/1.00 shrank below stock after the quiet window; and a normal Hyrule Field-to-Market gate transition used the expected black fade, arrived complete and settled Market to zero capacity. The description now distinguishes these fluid/simulated-turf controls from #1382's separate short decorative-blade Grass distance row. Focused grass, menu-model, settings-table, handle-table and capacity checks pass. No screenshot comments were changed.

Rebased the proposal onto main d2f0e8dc (#1382) and force-updated the branch with lease to f5dca2cb. The release renderer/pack/runtime build passes on Windows AMD. The current-main live regression passed: zero simulated turf settled all six lists to zero; a same-frame jump to simulated-turf values 25.2/200/23/1.00 grew safely to measured demand with zero retaken, absent or lost mappings; restoring 8.0/200/12/1.00 shrank below stock after the quiet window; and a normal Hyrule Field-to-Market gate transition used the expected black fade, arrived complete and settled Market to zero capacity. The description now distinguishes these fluid/simulated-turf controls from #1382's separate short decorative-blade Grass distance row. Focused grass, menu-model, settings-table, handle-table and capacity checks pass. No screenshot comments were changed.
erlo68 force-pushed experiment/grass-adaptive from f5dca2cb98
Some checks failed
PR description / Description follows the template (pull_request_target) Successful in 25s
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Workflow lint (actionlint) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
Guide screenshots / Guide images and local UI source review (pull_request) Has been cancelled
Third-party parts / As their notes say (pull_request) Has been cancelled
Third-party parts / The same as upstream (pull_request) Has been cancelled
Website / Website on Cloudflare (pull_request) Has been cancelled
to 2f05b3b637
Some checks failed
PR description / Description follows the template (pull_request_target) Successful in 4s
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Workflow lint (actionlint) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
Guide screenshots / Guide images and local UI source review (pull_request) Has been cancelled
Third-party parts / As their notes say (pull_request) Has been cancelled
Third-party parts / The same as upstream (pull_request) Has been cancelled
Website / Website on Cloudflare (pull_request) Has been cancelled
2026-11-21 18:58:14 +00:00
Compare
Author
Contributor

Main advanced again after the live run, so the branch is now rebased onto d76d202f at 2f05b3b6. The rebase dropped our c52adf31 allocator-call fix because #2098 merged the identical fix upstream; range-diff shows every grass commit otherwise unchanged. On the final head, all focused grass/menu/settings-table/handle-table checks pass (126 saved keys, 149 module rows/headings), git diff --check passes, and the queued release renderer build compiled 266 files with zero failures and linked with symbols checked. The live Windows AMD results remain applicable to the unchanged grass patches. No screenshot comments were changed.

Main advanced again after the live run, so the branch is now rebased onto d76d202f at 2f05b3b6. The rebase dropped our c52adf31 allocator-call fix because #2098 merged the identical fix upstream; range-diff shows every grass commit otherwise unchanged. On the final head, all focused grass/menu/settings-table/handle-table checks pass (126 saved keys, 149 module rows/headings), git diff --check passes, and the queued release renderer build compiled 266 files with zero failures and linked with symbols checked. The live Windows AMD results remain applicable to the unchanged grass patches. No screenshot comments were changed.
erlo68 force-pushed experiment/grass-adaptive from 2f05b3b637
Some checks failed
PR description / Description follows the template (pull_request_target) Successful in 4s
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Workflow lint (actionlint) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
Guide screenshots / Guide images and local UI source review (pull_request) Has been cancelled
Third-party parts / As their notes say (pull_request) Has been cancelled
Third-party parts / The same as upstream (pull_request) Has been cancelled
Website / Website on Cloudflare (pull_request) Has been cancelled
to 951b62d042
Some checks failed
PR description / Description follows the template (pull_request_target) Successful in 26s
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Workflow lint (actionlint) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
Guide screenshots / Guide images and local UI source review (pull_request) Has been cancelled
Third-party parts / As their notes say (pull_request) Has been cancelled
Third-party parts / The same as upstream (pull_request) Has been cancelled
Website / Website on Cloudflare (pull_request) Has been cancelled
2026-11-21 19:18:01 +00:00
Compare
Owner

This looks great!

@review

This looks great! @review
erlo68 changed title from WIP: feat(vk): add adaptive per-area grass controls to WIP: feat(vk): add adaptive per-area simulated-turf controls 2026-11-21 19:20:19 +00:00
Author
Contributor

Renamed this proposal from generic grass terminology to simulated turf throughout the player-facing page and its implementation. The page/header is now Simulated turf; internal files, namespaces, descriptors, renderer state, tests and rollback switches use sim_turf, while Grass distance remains the distinct #1382 short-decorative-blade path. Rebased onto current main 1bd93a48 at 951b62d0; range-diff reports all 11 proposal commits unchanged, the focused suite passes, and the queued release renderer build compiled 266 files with zero failures and linked successfully. The earlier screenshot comment now documents the superseded header; replacement menu screenshots are pending.

Renamed this proposal from generic grass terminology to simulated turf throughout the player-facing page and its implementation. The page/header is now Simulated turf; internal files, namespaces, descriptors, renderer state, tests and rollback switches use sim_turf, while Grass distance remains the distinct #1382 short-decorative-blade path. Rebased onto current main 1bd93a48 at 951b62d0; range-diff reports all 11 proposal commits unchanged, the focused suite passes, and the queued release renderer build compiled 266 files with zero failures and linked successfully. The earlier screenshot comment now documents the superseded header; replacement menu screenshots are pending.
Owner
@review
BeanBot left a comment

Recommendation: Request changes. The private-buffer path can leave producers and consumers using different buffers when one shader cannot be patched, and the settings test cannot build on Linux. Persistence also fails for some Windows user paths.

This adds per-area simulated-turf controls and adaptive renderer-owned buffers. The reported Windows AMD run shows live settings and substantial private-buffer savings, at the cost of new shader, buffer-lifetime and guest-memory complexity.

@fix will do (5)

  1. L1 gpu/vk/eden/shader_recompiler/ir_opt/sim_turf_pool_pass.h:476: Patching each program independently does not fail closed as a pipeline. (more on the line)
  2. L2 tests/sim_turf_settings_test.cpp:4: This fixture unconditionally includes windows.h and uses VirtualAlloc, so the new settings check cannot compile on Linux. (more on the line)
  3. L3 gpu/vk/menu/sim_turf_settings.h:175: Constructing a Windows filesystem path from the narrow UTF-8 options path uses the native narrow encoding. (more on the line)
  4. L4 gpu/vk/vk_draw.cpp:6360: If the host-visible readback allocation fails, sampling silently stops for that recording and adaptive buffers can shrink or remain too small without ever growing to demand. (more on the line)
  5. L5 (minor) tests/test_sim_turf_capacity_policy.py:18: This check lacks the runner's RUN_ALL_ARGS declaration, so the suite does not pass its selected CXX and the check defaults to clang++ even on a machine configured with another compiler. (more on the line)

Before merging, for the author (2) (a run, a measurement or a decision; it doesn't hold the recommendation)

  • L6 (minor): Measure the complete default path against main in the same representative scene and settings, including frame times and memory. The switch comparison isolates monitoring but omits the cost of the private-buffer foundation and UI integration.
  • L7: It conflicts with its base branch: bring it up to date (@​fix or @​rebase try first).

Checks: Still running: CI / Conventional Commit title (pull_request), CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request), CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request), CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request), CI / Workflow lint (actionlint) (pull_request), CI / Website build and checks (pull_request), Guide screenshots / Guide images and local UI source review (pull_request), Third-party parts / As their notes say (pull_request), Third-party parts / The same as upstream (pull_request), Website / Website on Cloudflare (pull_request).

More: does it help, other systems, switches, what was read

Does it help: Unproven against main. The reported fixed-private versus adaptive comparison reduced settled private capacity from 80.0 MiB to 8.61 MiB, with median FPS 141.6 versus 141.4 across three interleaved runs per side. It does not measure the complete change against main.

Other systems: The live run covers Windows on an RX 7900 XT; NVIDIA, Linux AMD and Intel, and Steam Deck runs are outstanding. Shader patching and buffer ownership affect compute and mesh stages across vendors. The settings path reads and writes guest resources and persists a separate file.

Switches: RX_VK_SIM_TURF_POOLS defaults on and disables the private path when set to 0. RX_VK_SIM_TURF_ADAPTIVE defaults on and retains stock private sizing when set to 0. Their defaults need the outstanding platform and against-main validation.

Reviewed: 951b62d042 against 1bd93a4890: Read the repository instructions, contributing guide, PR template, commit log, changed settings, capacity policy, test fixtures and renderer diff. Inspected shader pass and related call sites. The requested review checklist and sibling Tooling instructions were absent. Other changed code, generated documentation and the full surrounding renderer were not read in full; this limits the completeness of this review.; nothing run (a code review).

Checked and fine:

  • The reported Windows AMD run covers a zero-to-high demand transition and a normal area transition.
  • The synthetic capacity policy checks include growth, shrink, zero capacity and allocation failure.
  • The new switches have entries in switches.def.

Testing: Read-only review; no builds, scripts or tests were run. The supplied CI checks are still running.

Overlaps and merge order: #1877 supplies the private-buffer foundation included here; the description identifies it as dependent work. #1382 is already merged and controls separate decorative blades.


Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.

**Recommendation: Request changes.** The private-buffer path can leave producers and consumers using different buffers when one shader cannot be patched, and the settings test cannot build on Linux. Persistence also fails for some Windows user paths. This adds per-area simulated-turf controls and adaptive renderer-owned buffers. The reported Windows AMD run shows live settings and substantial private-buffer savings, at the cost of new shader, buffer-lifetime and guest-memory complexity. **`@fix` will do (5)** 1. **L1** `gpu/vk/eden/shader_recompiler/ir_opt/sim_turf_pool_pass.h:476`: Patching each program independently does not fail closed as a pipeline. (more on the line) 2. **L2** `tests/sim_turf_settings_test.cpp:4`: This fixture unconditionally includes windows.h and uses VirtualAlloc, so the new settings check cannot compile on Linux. (more on the line) 3. **L3** `gpu/vk/menu/sim_turf_settings.h:175`: Constructing a Windows filesystem path from the narrow UTF-8 options path uses the native narrow encoding. (more on the line) 4. **L4** `gpu/vk/vk_draw.cpp:6360`: If the host-visible readback allocation fails, sampling silently stops for that recording and adaptive buffers can shrink or remain too small without ever growing to demand. (more on the line) 5. **L5** (minor) `tests/test_sim_turf_capacity_policy.py:18`: This check lacks the runner's RUN_ALL_ARGS declaration, so the suite does not pass its selected CXX and the check defaults to clang++ even on a machine configured with another compiler. (more on the line) **Before merging, for the author (2)** (a run, a measurement or a decision; it doesn't hold the recommendation) - **L6** (minor): Measure the complete default path against main in the same representative scene and settings, including frame times and memory. The switch comparison isolates monitoring but omits the cost of the private-buffer foundation and UI integration. - **L7**: It conflicts with its base branch: bring it up to date (`@​fix` or `@​rebase` try first). **Checks:** Still running: `CI / Conventional Commit title (pull_request)`, `CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request)`, `CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request)`, `CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request)`, `CI / Workflow lint (actionlint) (pull_request)`, `CI / Website build and checks (pull_request)`, `Guide screenshots / Guide images and local UI source review (pull_request)`, `Third-party parts / As their notes say (pull_request)`, `Third-party parts / The same as upstream (pull_request)`, `Website / Website on Cloudflare (pull_request)`. <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Unproven against main. The reported fixed-private versus adaptive comparison reduced settled private capacity from 80.0 MiB to 8.61 MiB, with median FPS 141.6 versus 141.4 across three interleaved runs per side. It does not measure the complete change against main. **Other systems:** The live run covers Windows on an RX 7900 XT; NVIDIA, Linux AMD and Intel, and Steam Deck runs are outstanding. Shader patching and buffer ownership affect compute and mesh stages across vendors. The settings path reads and writes guest resources and persists a separate file. **Switches:** RX_VK_SIM_TURF_POOLS defaults on and disables the private path when set to 0. RX_VK_SIM_TURF_ADAPTIVE defaults on and retains stock private sizing when set to 0. Their defaults need the outstanding platform and against-main validation. **Reviewed:** 951b62d04231 against 1bd93a48903a: Read the repository instructions, contributing guide, PR template, commit log, changed settings, capacity policy, test fixtures and renderer diff. Inspected shader pass and related call sites. The requested review checklist and sibling Tooling instructions were absent. Other changed code, generated documentation and the full surrounding renderer were not read in full; this limits the completeness of this review.; nothing run (a code review). **Checked and fine:** - The reported Windows AMD run covers a zero-to-high demand transition and a normal area transition. - The synthetic capacity policy checks include growth, shrink, zero capacity and allocation failure. - The new switches have entries in switches.def. **Testing:** Read-only review; no builds, scripts or tests were run. The supplied CI checks are still running. **Overlaps and merge order:** #1877 supplies the private-buffer foundation included here; the description identifies it as dependent work. #1382 is already merged and controls separate decorative blades. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.</sub>
@ -0,0 +473,4 @@
/// else a line for the log: "made larger" or why it was left as it is
inline std::string SimTurfPools(IR::Program& program, u64 key) {
if (program.stage == Stage::Compute) {
if (std::find(std::begin(kSimTurfBladeKeys), std::end(kSimTurfBladeKeys), key) != std::end(kSimTurfBladeKeys)) {
Member

L1: Patching each program independently does not fail closed as a pipeline. For example, if a pool producer does not match and stays on the game's buffers but its blade producer was patched, it reads the game's blade records while the producer writes the private list; similarly an unpatched mesh reader cannot see a patched pool producer's records. Coordinate enablement across producers and consumers, or retain compatible writes until all participating programs are known to be supported.

**L1**: Patching each program independently does not fail closed as a pipeline. For example, if a pool producer does not match and stays on the game's buffers but its blade producer was patched, it reads the game's blade records while the producer writes the private list; similarly an unpatched mesh reader cannot see a patched pool producer's records. Coordinate enablement across producers and consumers, or retain compatible writes until all participating programs are known to be supported.
@ -0,0 +172,4 @@
std::filesystem::path config_path() {
const std::string options = options_path();
return options.empty() ? std::filesystem::path{} : std::filesystem::path(options).parent_path() / "sim_turf_settings.ini";
Member

L3: Constructing a Windows filesystem path from the narrow UTF-8 options path uses the native narrow encoding. A user directory containing characters outside that encoding can produce the wrong path or throw, preventing settings from loading or saving. Convert the UTF-8 path to a native wide path using the project's path helpers.

**L3**: Constructing a Windows filesystem path from the narrow UTF-8 options path uses the native narrow encoding. A user directory containing characters outside that encoding can produce the wrong path or throw, preventing settings from loading or saving. Convert the UTF-8 path to a native wide path using the project's path helpers.
@ -6162,0 +6357,4 @@
}
r.sim_turf_samples.clear();
}
if (!r.sim_turf_readback) {
Member

L4: If the host-visible readback allocation fails, sampling silently stops for that recording and adaptive buffers can shrink or remain too small without ever growing to demand. Log and disable adaptive shrinking, or otherwise retain a safe capacity and retry until monitoring is available.

**L4**: If the host-visible readback allocation fails, sampling silently stops for that recording and adaptive buffers can shrink or remain too small without ever growing to demand. Log and disable adaptive shrinking, or otherwise retain a safe capacity and retry until monitoring is available.
@ -0,0 +1,159 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// The per-area simulated-turf settings over a sparse stand-in for the guest window, without Vulkan or the game.
#define NOMINMAX
#include <windows.h>
Member

L2: This fixture unconditionally includes windows.h and uses VirtualAlloc, so the new settings check cannot compile on Linux. Provide a Linux allocation implementation and run the same behavior checks on both supported platforms.

**L2**: This fixture unconditionally includes windows.h and uses VirtualAlloc, so the new settings check cannot compile on Linux. Provide a Linux allocation implementation and run the same behavior checks on both supported platforms.
@ -0,0 +15,4 @@
def main() -> None:
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument("--cxx", default="clang++")
Member

L5 (minor): This check lacks the runner's RUN_ALL_ARGS declaration, so the suite does not pass its selected CXX and the check defaults to clang++ even on a machine configured with another compiler. Declare RUN_ALL_ARGS as the other new C++ checks do.

**L5** (minor): This check lacks the runner's RUN_ALL_ARGS declaration, so the suite does not pass its selected CXX and the check defaults to clang++ even on a machine configured with another compiler. Declare RUN_ALL_ARGS as the other new C++ checks do.
Owner
@fix
Member

I didn't fix this pull request: it doesn't allow edits from maintainers (the author can turn on Allow edits from maintainers).


Automated fix by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.

I didn't fix this pull request: it doesn't allow edits from maintainers (the author can turn on *Allow edits from maintainers*). --- <sub>Automated fix by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.</sub>
erlo68 force-pushed experiment/grass-adaptive from 951b62d042
Some checks failed
PR description / Description follows the template (pull_request_target) Successful in 26s
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Workflow lint (actionlint) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
Guide screenshots / Guide images and local UI source review (pull_request) Has been cancelled
Third-party parts / As their notes say (pull_request) Has been cancelled
Third-party parts / The same as upstream (pull_request) Has been cancelled
Website / Website on Cloudflare (pull_request) Has been cancelled
to 1f30fb71df
Some checks failed
PR description / Description follows the template (pull_request_target) Successful in 19s
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Workflow lint (actionlint) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
Guide screenshots / Guide images and local UI source review (pull_request) Has been cancelled
Third-party parts / As their notes say (pull_request) Has been cancelled
Third-party parts / The same as upstream (pull_request) Has been cancelled
Website / Website on Cloudflare (pull_request) Has been cancelled
2026-11-21 21:26:24 +00:00
Compare
Author
Contributor

Rebased onto current main c7bd8f80 and force-updated the PR to 1f30fb71 with the requested fixes:

  • L1: private producers now mirror a bounded stock-compatible record window into the original game buffer after dispatch, including end alignment for reverse lists, so independently unpatched consumers remain compatible. The copy source is the exact private buffer bound for that dispatch.
  • L2: the settings fixture uses VirtualAlloc on Windows and mmap/mprotect on POSIX.
  • L3: the options path is constructed from UTF-8 through char8_t; persistence is exercised in a Unicode directory.
  • L4: a missing demand-readback allocation fails closed to the game's buffers for that recording, logs, and retries later.
  • L5: the capacity check now receives the suite-selected C++ compiler.
  • L7: the branch is rebased and both binaries build against the exact current-main base.

L6 now has a complete main versus PR measurement from the newest saved Hyrule Field position (slot_02), using the official dev.py ab harness: two interleaved 60-second pairs at fixed 67% render resolution, with matching renderer/window/menu settings. The accepted verdict is no difference shown: 105.3 versus 107.3 median FPS (+1.8%, within spread), 9.37 versus 9.28 ms median frame time, and 12.36 versus 10.59 ms p99. The PR settled to 4.80 MiB of renderer-owned turf records in that view and reported zero retaken, absent, or lost mappings.

The Graphics page also now explains that Simulated turf is the broad field grass animated by the fluid simulation and distinguishes it from the separate short-blade Grass distance row.

Focused settings/capacity/pool/menu/Vulkan checks, scripts/dev.py vk, and an exact-base full scripts/dev.py pack pass with zero compile failures. Actual Linux execution, NVIDIA/Steam Deck coverage, the complete mise suite, and replacement screenshots remain explicit WIP items.

@review

Rebased onto current `main` `c7bd8f80` and force-updated the PR to `1f30fb71` with the requested fixes: - L1: private producers now mirror a bounded stock-compatible record window into the original game buffer after dispatch, including end alignment for reverse lists, so independently unpatched consumers remain compatible. The copy source is the exact private buffer bound for that dispatch. - L2: the settings fixture uses `VirtualAlloc` on Windows and `mmap`/`mprotect` on POSIX. - L3: the options path is constructed from UTF-8 through `char8_t`; persistence is exercised in a Unicode directory. - L4: a missing demand-readback allocation fails closed to the game's buffers for that recording, logs, and retries later. - L5: the capacity check now receives the suite-selected C++ compiler. - L7: the branch is rebased and both binaries build against the exact current-main base. L6 now has a complete `main` versus PR measurement from the newest saved Hyrule Field position (`slot_02`), using the official `dev.py ab` harness: two interleaved 60-second pairs at fixed 67% render resolution, with matching renderer/window/menu settings. The accepted verdict is **no difference shown**: 105.3 versus 107.3 median FPS (+1.8%, within spread), 9.37 versus 9.28 ms median frame time, and 12.36 versus 10.59 ms p99. The PR settled to 4.80 MiB of renderer-owned turf records in that view and reported zero retaken, absent, or lost mappings. The Graphics page also now explains that Simulated turf is the broad field grass animated by the fluid simulation and distinguishes it from the separate short-blade Grass distance row. Focused settings/capacity/pool/menu/Vulkan checks, `scripts/dev.py vk`, and an exact-base full `scripts/dev.py pack` pass with zero compile failures. Actual Linux execution, NVIDIA/Steam Deck coverage, the complete `mise` suite, and replacement screenshots remain explicit WIP items. @review
erlo68 force-pushed experiment/grass-adaptive from 1f30fb71df
Some checks failed
PR description / Description follows the template (pull_request_target) Successful in 19s
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Workflow lint (actionlint) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
Guide screenshots / Guide images and local UI source review (pull_request) Has been cancelled
Third-party parts / As their notes say (pull_request) Has been cancelled
Third-party parts / The same as upstream (pull_request) Has been cancelled
Website / Website on Cloudflare (pull_request) Has been cancelled
to 9a6eb38305
Some checks failed
PR description / Description follows the template (pull_request_target) Successful in 12s
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Workflow lint (actionlint) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
Guide screenshots / Guide images and local UI source review (pull_request) Has been cancelled
Third-party parts / As their notes say (pull_request) Has been cancelled
Third-party parts / The same as upstream (pull_request) Has been cancelled
Website / Website on Cloudflare (pull_request) Has been cancelled
2026-11-21 22:20:16 +00:00
Compare
Author
Contributor

Rebased onto current main 8aa74983 and force-updated the PR to 9a6eb383, preserving both upstream's new guest-page-table/input-recording work and this proposal's simulated-turf paths.

Post-rebase verification:

  • Focused simulated-turf capacity, shader-pool, settings/UTF-8, menu-model, rows, sections, and INI checks pass.
  • scripts/dev.py vk: 267 renderer files, zero failures, linked DLL, symbols checked.
  • Exact-base full packages for main and the PR: both binaries compile and link with zero failures.
  • tests/test_menu_modules.py has two ReShade preset-name assertions that fail identically on untouched main 8aa74983; the generated Graphics layout includes the Simulated turf page correctly.

I repeated the official complete-path A/B from the newest saved Hyrule Field slot_02, with two interleaved 60-second pairs, fixed 67% render resolution, VSync/frame generation off, and matching settings. The harness verdict is faster: +1.0% FPS, with every PR run above every main run:

main 8aa74983 PR 9a6eb383
FPS runs (median) 112.3 / 113.4 (112.8) 113.9 / 113.9 (113.9)
Median frame time 8.79 ms 8.73 ms
p99 frame time 10.70 ms 10.75 ms
1% low 93.5 FPS 93.2 FPS
≥50 ms frames (median) 1.5 0

The practical conclusion is no performance regression from continuous adaptive monitoring plus compatibility copies. The installed Hyrule profile settled to two 47,616-record blade lists, two 35,136-record main pools, and two 9,632-record secondary pools (4.83 MiB total renderer-owned record capacity), with zero retaken, absent, or lost mappings.

The description now carries the current hashes, exact-main measurements, build results, and the current-main-only ReShade test mismatch. Linux execution, NVIDIA/Steam Deck coverage, the full mise suite, and author-approved replacement screenshots remain explicit WIP items.

@review

Rebased onto current `main` `8aa74983` and force-updated the PR to `9a6eb383`, preserving both upstream's new guest-page-table/input-recording work and this proposal's simulated-turf paths. Post-rebase verification: - Focused simulated-turf capacity, shader-pool, settings/UTF-8, menu-model, rows, sections, and INI checks pass. - `scripts/dev.py vk`: 267 renderer files, zero failures, linked DLL, symbols checked. - Exact-base full packages for `main` and the PR: both binaries compile and link with zero failures. - `tests/test_menu_modules.py` has two ReShade preset-name assertions that fail identically on untouched `main` `8aa74983`; the generated Graphics layout includes the Simulated turf page correctly. I repeated the official complete-path A/B from the newest saved Hyrule Field `slot_02`, with two interleaved 60-second pairs, fixed 67% render resolution, VSync/frame generation off, and matching settings. The harness verdict is **faster: +1.0% FPS**, with every PR run above every main run: | | main `8aa74983` | PR `9a6eb383` | |---|---:|---:| | FPS runs (median) | 112.3 / 113.4 (112.8) | 113.9 / 113.9 (113.9) | | Median frame time | 8.79 ms | 8.73 ms | | p99 frame time | 10.70 ms | 10.75 ms | | 1% low | 93.5 FPS | 93.2 FPS | | ≥50 ms frames (median) | 1.5 | 0 | The practical conclusion is no performance regression from continuous adaptive monitoring plus compatibility copies. The installed Hyrule profile settled to two 47,616-record blade lists, two 35,136-record main pools, and two 9,632-record secondary pools (4.83 MiB total renderer-owned record capacity), with zero retaken, absent, or lost mappings. The description now carries the current hashes, exact-main measurements, build results, and the current-main-only ReShade test mismatch. Linux execution, NVIDIA/Steam Deck coverage, the full `mise` suite, and author-approved replacement screenshots remain explicit WIP items. @review
erlo68 force-pushed experiment/grass-adaptive from 9a6eb38305
Some checks failed
PR description / Description follows the template (pull_request_target) Successful in 12s
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Workflow lint (actionlint) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
Guide screenshots / Guide images and local UI source review (pull_request) Has been cancelled
Third-party parts / As their notes say (pull_request) Has been cancelled
Third-party parts / The same as upstream (pull_request) Has been cancelled
Website / Website on Cloudflare (pull_request) Has been cancelled
to 183b96b562
Some checks failed
PR description / Description follows the template (pull_request_target) Successful in 5s
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Workflow lint (actionlint) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
Guide screenshots / Guide images and local UI source review (pull_request) Has been cancelled
Third-party parts / As their notes say (pull_request) Has been cancelled
Third-party parts / The same as upstream (pull_request) Has been cancelled
Website / Website on Cloudflare (pull_request) Has been cancelled
2026-11-21 22:30:14 +00:00
Compare
erlo68 force-pushed experiment/grass-adaptive from 183b96b562
Some checks failed
PR description / Description follows the template (pull_request_target) Successful in 5s
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Workflow lint (actionlint) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
Guide screenshots / Guide images and local UI source review (pull_request) Has been cancelled
Third-party parts / As their notes say (pull_request) Has been cancelled
Third-party parts / The same as upstream (pull_request) Has been cancelled
Website / Website on Cloudflare (pull_request) Has been cancelled
to df6880b55a
Some checks failed
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Blocked by required conditions
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Blocked by required conditions
CI / Conventional Commit title (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Blocked by required conditions
CI / Workflow lint (actionlint) (pull_request) Blocked by required conditions
CI / Website build and checks (pull_request) Blocked by required conditions
Guide screenshots / Guide images and local UI source review (pull_request) Blocked by required conditions
Third-party parts / As their notes say (pull_request) Blocked by required conditions
Third-party parts / The same as upstream (pull_request) Blocked by required conditions
Website / Website on Cloudflare (pull_request) Blocked by required conditions
PR description / Description follows the template (pull_request_target) Failing after 12s
2026-11-21 22:33:00 +00:00
Compare
Author
Contributor

Rebased onto current main 1101b612 and force-updated the PR to df6880b5. git range-diff reports all 13 proposal commits patch-identical to the prior head.

Current main now includes DualSense controller-speaker/headphone audio, per-control reset/confirm UI, BC3-kept ASTC upload batching, and expanded randomized tests. The shared menu changes combine cleanly: Controller speaker remains under Audio and Simulated turf under Graphics, with the correct page labels, navigation, independent scroll state, and test-fixture coverage.

Post-rebase verification:

  • Focused simulated-turf capacity, shader-pool, settings/UTF-8, menu-model, rows, sections, shortcuts, per-control reset/confirm navigation, settings-table, vibration, and INI checks pass.
  • scripts/dev.py vk: 268 renderer files, zero failures, linked DLL, symbols checked.
  • The earlier exact-base full packages for 8aa74983 / 9a6eb383: both binaries compile and link with zero failures.
  • tests/test_menu_modules.py has two ReShade preset-name assertions that fail identically on untouched main 8aa74983; the generated Graphics layout includes the Simulated turf page correctly.

The official complete-path A/B used the newest saved Hyrule Field slot_02, with two interleaved 60-second pairs, fixed 67% render resolution, VSync/frame generation off, and matching settings. It remains labelled with the exact tested pair 8aa74983 / 9a6eb383. The intervening changes do not alter the simulated-turf shader instrumentation, buffer lifecycle, demand policy, or compatibility copies, so the result remains exact-base evidence of the proposal's overhead; it is not relabelled as current-main absolute performance. The harness verdict was faster: +1.0% FPS, with every PR run above every main run:

main 8aa74983 PR 9a6eb383
FPS runs (median) 112.3 / 113.4 (112.8) 113.9 / 113.9 (113.9)
Median frame time 8.79 ms 8.73 ms
p99 frame time 10.70 ms 10.75 ms
1% low 93.5 FPS 93.2 FPS
≥50 ms frames (median) 1.5 0

The practical conclusion is no performance regression from continuous adaptive monitoring plus compatibility copies. The installed Hyrule profile settled to two 47,616-record blade lists, two 35,136-record main pools, and two 9,632-record secondary pools (4.83 MiB total renderer-owned record capacity), with zero retaken, absent, or lost mappings.

The description now separates final-head verification from the exact-hash performance evidence. Linux execution, NVIDIA/Steam Deck coverage, the full mise suite, and author-approved replacement screenshots remain explicit WIP items.

@review

Rebased onto current `main` `1101b612` and force-updated the PR to `df6880b5`. `git range-diff` reports all 13 proposal commits patch-identical to the prior head. Current main now includes DualSense controller-speaker/headphone audio, per-control reset/confirm UI, BC3-kept ASTC upload batching, and expanded randomized tests. The shared menu changes combine cleanly: **Controller speaker** remains under Audio and **Simulated turf** under Graphics, with the correct page labels, navigation, independent scroll state, and test-fixture coverage. Post-rebase verification: - Focused simulated-turf capacity, shader-pool, settings/UTF-8, menu-model, rows, sections, shortcuts, per-control reset/confirm navigation, settings-table, vibration, and INI checks pass. - `scripts/dev.py vk`: 268 renderer files, zero failures, linked DLL, symbols checked. - The earlier exact-base full packages for `8aa74983` / `9a6eb383`: both binaries compile and link with zero failures. - `tests/test_menu_modules.py` has two ReShade preset-name assertions that fail identically on untouched `main` `8aa74983`; the generated Graphics layout includes the Simulated turf page correctly. The official complete-path A/B used the newest saved Hyrule Field `slot_02`, with two interleaved 60-second pairs, fixed 67% render resolution, VSync/frame generation off, and matching settings. It remains labelled with the exact tested pair `8aa74983` / `9a6eb383`. The intervening changes do not alter the simulated-turf shader instrumentation, buffer lifecycle, demand policy, or compatibility copies, so the result remains exact-base evidence of the proposal's overhead; it is not relabelled as current-main absolute performance. The harness verdict was **faster: +1.0% FPS**, with every PR run above every main run: | | main `8aa74983` | PR `9a6eb383` | |---|---:|---:| | FPS runs (median) | 112.3 / 113.4 (112.8) | 113.9 / 113.9 (113.9) | | Median frame time | 8.79 ms | 8.73 ms | | p99 frame time | 10.70 ms | 10.75 ms | | 1% low | 93.5 FPS | 93.2 FPS | | ≥50 ms frames (median) | 1.5 | 0 | The practical conclusion is no performance regression from continuous adaptive monitoring plus compatibility copies. The installed Hyrule profile settled to two 47,616-record blade lists, two 35,136-record main pools, and two 9,632-record secondary pools (4.83 MiB total renderer-owned record capacity), with zero retaken, absent, or lost mappings. The description now separates final-head verification from the exact-hash performance evidence. Linux execution, NVIDIA/Steam Deck coverage, the full `mise` suite, and author-approved replacement screenshots remain explicit WIP items. @review
HumanBean changed title from WIP: feat(vk): add adaptive per-area simulated-turf controls to feat(vk): add adaptive per-area simulated-turf controls 2026-11-21 22:52:34 +00:00
HumanBean deleted branch experiment/grass-adaptive 2026-11-21 22:52:50 +00:00
Some checks failed
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Blocked by required conditions
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Blocked by required conditions
CI / Conventional Commit title (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Blocked by required conditions
CI / Workflow lint (actionlint) (pull_request) Blocked by required conditions
CI / Website build and checks (pull_request) Blocked by required conditions
Guide screenshots / Guide images and local UI source review (pull_request) Blocked by required conditions
Third-party parts / As their notes say (pull_request) Blocked by required conditions
Third-party parts / The same as upstream (pull_request) Blocked by required conditions
Website / Website on Cloudflare (pull_request) Blocked by required conditions
PR description / Description follows the template (pull_request_target) Failing after 12s
Some workflows are waiting to be reviewed.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 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!2093
No description provided.