feat(vk): populate simulated turf around Link #2772

Merged
HumanBean merged 17 commits from erlo68/Longshot:feat/actor-centered-turf into main 2026-11-29 18:47:04 +00:00
Contributor

Summary

Graphics → Simulated turf → Turf renderer now switches live between Game's and Longshot. Game's is the default for a fresh profile and uses the original shaders and buffers. Choosing Longshot reveals the preset, Density, Reach, and Fade start controls. Switching back keeps those values for later.

Supersedes #2241.

How turf population changes

Previous algorithm. The game's camera-dependent blade producer fills a shared list. On main, Longshot grows the record buffers as demand rises. GPU workers reserve list slots as they run, so reservation order determines which patches keep their blades if the list fills. #2241 kept that producer and added controls for its per-area settings.

Longshot renderer. The Vulkan population pass counts patches in one-patch-wide rings around Link and reserves space from the nearest ring outward. Workers fill each ring in parallel. Blade placement spreads the first samples across each patch and fills the gaps as density increases. Counts scale with patch footprint. The camera frustum culls patches outside the view, and distance to Link drives the taper. Fade start sets where thinning begins as a percentage of Reach, and density falls to zero at Reach.

Each turf update uses one producer. Longshot skips the stock blade pass, and mesh draws use the shader and buffers for the pool that was actually written. The existing Vulkan stages still split the blades into two mesh pools and draw them. When a pool's demand exceeds the GPU's workgroup limit, Longshot steepens the fade automatically. The menu shows a warning triangle, the workgroup usage at activation, and the live adjusted usage.

Longshot preset Density Reach Fade start
Off 0 Keeps current Keeps current
Low 30 20 0%
Default 55 41 0%
High 150 50 20%
Max 150 100 43%

Players can lower Density, shorten Reach, or start the fade earlier to reduce the turf workload. Off disables simulated turf within the Longshot renderer. The separate Grass distance setting controls short decorative grass.

For the population pass, start with gpu/vk/host_shaders/turf_population.comp. For the live selector, dispatch, shader variants, and pool limits, see gpu/vk/menu/sim_turf.cpp, gpu/vk/vk_draw.cpp, gpu/vk/vk_shader.cpp, and gpu/vk/sim_turf_population.h.

Testing

Tested: The rebased head 88ba875d built on Windows and ran in Hyrule Field on Windows 11 with a Radeon RX 7900 XT and Adrenalin 26.11.2. Each fresh PR profile started with Game's. The runs switched live to Longshot Default, verified its preset values, and recorded live blade and workgroup counts. The pre-rebase smoke build 2d9a3a3d switched Game's → Longshot → Game's repeatedly in one process and retained its Longshot preset.

We tested the Auto GPU ceiling under simulated lower-end GPU constraints by reducing the turf mesh workgroup limit to 1% of the hardware limit in the earlier playable build based on 04ff0706. The Linux renderer compiled and linked at c01242b5. Gameplay and timing runs were on Windows.

The full game-free mise run test suite ran on the final rebased PR and pinned main with the same Windows toolchain.

Revision Passed Failed Skipped
Main b6d274d7 628 227 47
PR 88ba875d 629 226 47

All 226 PR failures reproduced on pinned main. They include missing tools under the strict Windows runner and the missing LONGSHOT_LAUNCHER_STARTUP switch-table row. Main's extra control-bridge lifecycle failure passed on a targeted rerun. The updated draw, live shader, and host-interface checks pass on the rebased head.

Shared Windows suite failures (226)
tests/test_alt_enter.py
tests/test_aspect_default.py
tests/test_astc_bc_policy.py
tests/test_astc_reuse.py
tests/test_audio_aux.py
tests/test_audio_biquad.py
tests/test_audio_deadline.py
tests/test_audio_in.py
tests/test_audio_mono.py
tests/test_audio_output_errors.py
tests/test_audio_output_menu.py
tests/test_audio_output_preferences.py
tests/test_audio_output_recovery.py
tests/test_audio_voice_biquad.py
tests/test_audio_volume.py
tests/test_audio_wave_buffer_release.py
tests/test_auto_handheld.py
tests/test_auto_settings.py
tests/test_bc_levels.py
tests/test_bind_memo.py
tests/test_bug_report.py
tests/test_builder_channel.py
tests/test_capture_copy_helpers.py
tests/test_cbuf_table_extent.py
tests/test_cheat_vm.py
tests/test_close_waits_for_save.py
tests/test_collect_wide.py
tests/test_control.py
tests/test_control_picture.py
tests/test_coverage_run.py
tests/test_crash_dump_policy.py
tests/test_crash_record.py
tests/test_crt_options.py
tests/test_cursor_hidden_in_play.py
tests/test_cv_handoff_threads.py
tests/test_cv_signal_early.py
tests/test_cv_signal_race.py
tests/test_desc_counts.py
tests/test_dev_ab.py
tests/test_dev_build.py
tests/test_dev_migrate.py
tests/test_dev_packs.py
tests/test_dev_update.py
tests/test_discord_activity.py
tests/test_dlss_actor.py
tests/test_dlss_checks.py
tests/test_dlss_math.py
tests/test_draw_binds.py
tests/test_drawn_writeback.py
tests/test_driver_faults.py
tests/test_dump_ssbo_read.py
tests/test_env_file.py
tests/test_evict_reason.py
tests/test_fallback_lanes.py
tests/test_fallback_size_policy.py
tests/test_fg_scale_sharpen.py
tests/test_fps_overlay_order.py
tests/test_fps_rate.py
tests/test_fps_stats.py
tests/test_frame_carry_cap60.py
tests/test_framegen_auto.py
tests/test_framegen_gate.py
tests/test_framegen_hdr.py
tests/test_framegen_resources.py
tests/test_fs_path_utf8.py
tests/test_fsr3_math.py
tests/test_fsr4_tune.py
tests/test_game_call.py
tests/test_game_flags.py
tests/test_game_font.py
tests/test_game_layout.py
tests/test_game_menu_mouse_buttons.py
tests/test_game_phases.py
tests/test_gpu_choice.py
tests/test_gpu_clock.py
tests/test_gyro_rearm.py
tests/test_heart_containers.py
tests/test_hle_guest_ranges.py
tests/test_hold_toggle.py
tests/test_host_alloc_wait.py
tests/test_host_free_marks.py
tests/test_hud_layout_row.py
tests/test_import_span.py
tests/test_import_windows.py
tests/test_input_background.py
tests/test_input_movie.py
tests/test_invalidate_vcore.py
tests/test_job_queue.py
tests/test_jobs_wait_runs_queued.py
tests/test_keep_rendered.py
tests/test_keyboard_menu_option.py
tests/test_keyboard_option.py
tests/test_libc_hooks.py
tests/test_lifter.py
tests/test_linux_pressure.py
tests/test_loaded_modules_drop.py
tests/test_log_batch.py
tests/test_log_levels.py
tests/test_longshot_exit.py
tests/test_lower_atomg_cas.py
tests/test_lower_end_at_closing_branch.py
tests/test_lower_immediate_not_register.py
tests/test_lower_imnmx_wide_immediate.py
tests/test_lower_isberd_output.py
tests/test_lower_ldg_uniform_order.py
tests/test_lower_lea_hi_constant.py
tests/test_lower_r2ur_one_register.py
tests/test_lower_suld_1d.py
tests/test_lower_tld_ms.py
tests/test_mask_history_retire.py
tests/test_menu_env_on.py
tests/test_menu_hit.py
tests/test_menu_keys.py
tests/test_menu_model.py
tests/test_menu_module_slots.py
tests/test_menu_modules.py
tests/test_menu_mouse_scroll.py
tests/test_menu_restart.py
tests/test_menu_rows_model.py
tests/test_menu_sections.py
tests/test_mesh_dynamic_state.py
tests/test_mirror_budget.py
tests/test_mirror_inherit.py
tests/test_mirror_trim.py
tests/test_mise_build.py
tests/test_mods_list.py
tests/test_mods_size_table.py
tests/test_motion.py
tests/test_motion_background.py
tests/test_mouse_stick.py
tests/test_movie_upscale_policy.py
tests/test_nvn_buffer_map.py
tests/test_nvn_device_modes.py
tests/test_nvn_host_tables.py
tests/test_oot_menu_mouse.py
tests/test_oot_state_tap.py
tests/test_option_ids.py
tests/test_options_path.py
tests/test_os_lifted_siblings.py
tests/test_pads_after_menu.py
tests/test_parity_gates.py
tests/test_pass_hazard.py
tests/test_pcache_stamp.py
tests/test_perf_send.py
tests/test_pool_span.py
tests/test_prepare_seed_stamp.py
tests/test_prepare_workers.py
tests/test_present_ahead.py
tests/test_present_source_crop.py
tests/test_prof_clock.py
tests/test_program_cache_cleanup.py
tests/test_program_cache_one_variant.py
tests/test_program_record_head.py
tests/test_prompt_auto_face.py
tests/test_prompt_font_bind.py
tests/test_prompts_live.py
tests/test_push_state.py
tests/test_query_memory_free.py
tests/test_quick_pipelines.py
tests/test_realtime_rate.py
tests/test_recording_log_handoff.py
tests/test_renderer_load_error.py
tests/test_report_privacy.py
tests/test_report_run.py
tests/test_report_words.py
tests/test_reserved_core.py
tests/test_run_all_mingw.py
tests/test_same_bind.py
tests/test_same_draw.py
tests/test_same_dyn.py
tests/test_sampler_admission.py
tests/test_screensaver.py
tests/test_sdl_desktop_size.py
tests/test_sdl_pad_diagnostics.py
tests/test_seed_cs_pointers.py
tests/test_seed_kept_loaded.py
tests/test_seed_reader.py
tests/test_settings_atomic.py
tests/test_settings_table.py
tests/test_short_sleep_timer.py
tests/test_skip_code.py
tests/test_skip_title.py
tests/test_sparse_bc_usage.py
tests/test_spin_by_role.py
tests/test_startup_progress.py
tests/test_status_line.py
tests/test_steam_pads.py
tests/test_stick_dead_zone.py
tests/test_stick_inversion_rest.py
tests/test_stick_range.py
tests/test_stick_rest.py
tests/test_submitted_page.py
tests/test_switch_table.py
tests/test_taau_env_lookup.py
tests/test_table_track.py
tests/test_target_overlap.py
tests/test_target_retention.py
tests/test_temporal_present_bandwidth.py
tests/test_tex_spans_once_a_present.py
tests/test_text_keyboard_policy.py
tests/test_text_size.py
tests/test_texture_budget.py
tests/test_texture_layout_sizes.py
tests/test_thread_arg_self.py
tests/test_timeline_modes.py
tests/test_ub_gap.py
tests/test_upscale_fallback.py
tests/test_upscale_independent.py
tests/test_upscale_label.py
tests/test_upscaler_round_trip.py
tests/test_vcore_video_acquire.py
tests/test_vertex_bind.py
tests/test_video_catchup.py
tests/test_video_hold_early.py
tests/test_video_input_limit.py
tests/test_vram_compact.py
tests/test_vram_pressure.py
tests/test_wb_diff_split.py
tests/test_wb_diff_stale_shadow.py
tests/test_wb_learn.py
tests/test_wb_pages.py
tests/test_widescreen_shapes.py
tests/test_windows_display_startup.py
tests/test_windows_on_linux.py
tests/test_windows_stop.py
tests/test_xinput_thread.py

Still to test:

  • Windows AMD, by hand. Check renderer and slider persistence across a restart and the live ceiling warning in a scene that exceeds the limit on the rebased head.
  • Windows NVIDIA, by hand. Check live renderer switching and workgroup adjustment on the NVIDIA Vulkan driver.
  • Linux, by hand. Build the host and renderer on the rebased head and check UTF-8 paths.
  • Windows, by hand. Capture current main and PR screenshots from the same view.

Measurements

Verdict: Both PR modes fell within main's observed FPS spread. Game's measured 131.56 FPS (+0.26%) and Longshot Default measured 131.01 FPS (−0.15%) against 131.21 FPS on main.

Setup: Windows 11, Radeon RX 7900 XT, Adrenalin 26.11.2, Vulkan. The same saved Hyrule Field position and camera view in a 2150×900 window at 100% field of view, with uncapped FPS and frame generation off. Two 15-second samples per mode after pipeline warm-up. Each pair ran main, then the fresh PR profile in Game's, then Longshot Default after a live switch in that profile. Every sample had zero cold frames. The opt-in HOS_CONTROL bridge was enabled in every run for the replay and settings checks. It stays off by default.

Before: main @ b6d274d7 After: this PR @ 88ba875d After, Longshot Default: this PR @ 88ba875d
Renderer Game producer with adaptive buffers Game's Longshot Default (55 / 41 / 0%)
FPS per run 131.64 / 130.78 130.95 / 132.16 131.19 / 130.83
Median FPS across runs 131.21 131.56 131.01
1% low FPS (1000 / p99) 119.29 120.85 119.44
Median frame time 7.62 ms 7.61 ms 7.62 ms
p99 frame time 8.38 ms 8.28 ms 8.37 ms
Blade-list entries 73,559 — 171,584
Blade compute workgroups 1,150 — 2,681
Busiest mesh pool workgroups 1,748–1,758 — 1,691–1,695

Main's stationary buffer peak logs supply its blade counts and derived workgroup counts. Longshot reports live counters at the end of each sample. The Game's column comes from the frame trace.

A1 Main: 131.64 FPS, p99 8.46 ms, 0 cold frames
B1 PR Game's: 130.95 FPS, p99 8.26 ms, 0 cold frames
C1 PR Longshot Default: 131.19 FPS, p99 8.36 ms, 0 cold frames
A2 Main: 130.78 FPS, p99 8.30 ms, 0 cold frames
B2 PR Game's: 132.16 FPS, p99 8.29 ms, 0 cold frames
C2 PR Longshot Default: 130.83 FPS, p99 8.39 ms, 0 cold frames

Simulated turf UI

The new captures show Game's and the Longshot controls. Game's and Longshot settings

The earlier captures show the range of preset visuals. Preset comparison GIF

Risks

The first live switch may pause briefly while the alternate turf shaders compile. Game's is the out-of-box renderer and can be reselected in play. Profiles without a saved renderer start on Game's and retain any saved Longshot slider values. The earlier sim_turf_settings.ini stays available to older builds.

RX_VK_SIM_TURF_POOLS=0 forces the original shaders and buffers for the run. The same path applies when the required push descriptors are unavailable. With the override unset, the menu selection controls the renderer.

Checklist

Ready for review

  • One topic, on current main. The title is a Conventional Commit. Rebased onto b6d274d7.
  • 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.

When it applies

  • A switch added or changed. RX_VK_SIM_TURF_POOLS is documented in gpu/vk/switches.def. Fresh profiles use Game's, which measured within main's spread.
  • A check under tests/ that reads changed source is updated, not weakened.
  • MKWVK_API_VERSION bumped to 56. The existing keyboard callback keeps its slot.
  • The SPIR-V headers were regenerated.
  • Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths. Windows build passed at the current head. The rebased Linux host and UTF-8 path check are pending.
  • Screenshots of the same spot on main and here, for a change that shows on screen.
  • Docs updated.
  • AI assistance recorded with Assisted-by: in the commits.

Ready to merge

  • Everything in Still to test has run, its results in Tested.
  • Tier 1 hardware it can affect is tested.
  • Approved in review, every comment answered.
  • CI passes on the head. Against current main, measured again or a comment says why the numbers still hold.
## Summary **Graphics → Simulated turf → Turf renderer** now switches live between **Game's** and **Longshot**. Game's is the default for a fresh profile and uses the original shaders and buffers. Choosing Longshot reveals the preset, Density, Reach, and Fade start controls. Switching back keeps those values for later. Supersedes [#2241](https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/2241). ### How turf population changes **Previous algorithm.** The game's camera-dependent blade producer fills a shared list. On main, Longshot grows the record buffers as demand rises. GPU workers reserve list slots as they run, so reservation order determines which patches keep their blades if the list fills. #2241 kept that producer and added controls for its per-area settings. **Longshot renderer.** The Vulkan population pass counts patches in one-patch-wide rings around Link and reserves space from the nearest ring outward. Workers fill each ring in parallel. Blade placement spreads the first samples across each patch and fills the gaps as density increases. Counts scale with patch footprint. The camera frustum culls patches outside the view, and distance to Link drives the taper. Fade start sets where thinning begins as a percentage of Reach, and density falls to zero at Reach. Each turf update uses one producer. Longshot skips the stock blade pass, and mesh draws use the shader and buffers for the pool that was actually written. The existing Vulkan stages still split the blades into two mesh pools and draw them. When a pool's demand exceeds the GPU's workgroup limit, Longshot steepens the fade automatically. The menu shows a warning triangle, the workgroup usage at activation, and the live adjusted usage. | Longshot preset | Density | Reach | Fade start | |---|---:|---:|---:| | Off | 0 | Keeps current | Keeps current | | Low | 30 | 20 | 0% | | Default | 55 | 41 | 0% | | High | 150 | 50 | 20% | | Max | 150 | 100 | 43% | Players can lower Density, shorten Reach, or start the fade earlier to reduce the turf workload. Off disables simulated turf within the Longshot renderer. The separate Grass distance setting controls short decorative grass. For the population pass, start with `gpu/vk/host_shaders/turf_population.comp`. For the live selector, dispatch, shader variants, and pool limits, see `gpu/vk/menu/sim_turf.cpp`, `gpu/vk/vk_draw.cpp`, `gpu/vk/vk_shader.cpp`, and `gpu/vk/sim_turf_population.h`. ## Testing **Tested:** The rebased head `88ba875d` built on Windows and ran in Hyrule Field on Windows 11 with a Radeon RX 7900 XT and Adrenalin 26.11.2. Each fresh PR profile started with Game's. The runs switched live to Longshot Default, verified its preset values, and recorded live blade and workgroup counts. The pre-rebase smoke build `2d9a3a3d` switched Game's → Longshot → Game's repeatedly in one process and retained its Longshot preset. We tested the Auto GPU ceiling under simulated lower-end GPU constraints by reducing the turf mesh workgroup limit to 1% of the hardware limit in the earlier playable build based on `04ff0706`. The Linux renderer compiled and linked at `c01242b5`. Gameplay and timing runs were on Windows. The full game-free `mise run test` suite ran on the final rebased PR and pinned main with the same Windows toolchain. | Revision | Passed | Failed | Skipped | |---|---:|---:|---:| | Main `b6d274d7` | 628 | 227 | 47 | | PR `88ba875d` | 629 | 226 | 47 | All 226 PR failures reproduced on pinned main. They include missing tools under the strict Windows runner and the missing `LONGSHOT_LAUNCHER_STARTUP` switch-table row. Main's extra control-bridge lifecycle failure passed on a targeted rerun. The updated draw, live shader, and host-interface checks pass on the rebased head. <details> <summary>Shared Windows suite failures (226)</summary> ```text tests/test_alt_enter.py tests/test_aspect_default.py tests/test_astc_bc_policy.py tests/test_astc_reuse.py tests/test_audio_aux.py tests/test_audio_biquad.py tests/test_audio_deadline.py tests/test_audio_in.py tests/test_audio_mono.py tests/test_audio_output_errors.py tests/test_audio_output_menu.py tests/test_audio_output_preferences.py tests/test_audio_output_recovery.py tests/test_audio_voice_biquad.py tests/test_audio_volume.py tests/test_audio_wave_buffer_release.py tests/test_auto_handheld.py tests/test_auto_settings.py tests/test_bc_levels.py tests/test_bind_memo.py tests/test_bug_report.py tests/test_builder_channel.py tests/test_capture_copy_helpers.py tests/test_cbuf_table_extent.py tests/test_cheat_vm.py tests/test_close_waits_for_save.py tests/test_collect_wide.py tests/test_control.py tests/test_control_picture.py tests/test_coverage_run.py tests/test_crash_dump_policy.py tests/test_crash_record.py tests/test_crt_options.py tests/test_cursor_hidden_in_play.py tests/test_cv_handoff_threads.py tests/test_cv_signal_early.py tests/test_cv_signal_race.py tests/test_desc_counts.py tests/test_dev_ab.py tests/test_dev_build.py tests/test_dev_migrate.py tests/test_dev_packs.py tests/test_dev_update.py tests/test_discord_activity.py tests/test_dlss_actor.py tests/test_dlss_checks.py tests/test_dlss_math.py tests/test_draw_binds.py tests/test_drawn_writeback.py tests/test_driver_faults.py tests/test_dump_ssbo_read.py tests/test_env_file.py tests/test_evict_reason.py tests/test_fallback_lanes.py tests/test_fallback_size_policy.py tests/test_fg_scale_sharpen.py tests/test_fps_overlay_order.py tests/test_fps_rate.py tests/test_fps_stats.py tests/test_frame_carry_cap60.py tests/test_framegen_auto.py tests/test_framegen_gate.py tests/test_framegen_hdr.py tests/test_framegen_resources.py tests/test_fs_path_utf8.py tests/test_fsr3_math.py tests/test_fsr4_tune.py tests/test_game_call.py tests/test_game_flags.py tests/test_game_font.py tests/test_game_layout.py tests/test_game_menu_mouse_buttons.py tests/test_game_phases.py tests/test_gpu_choice.py tests/test_gpu_clock.py tests/test_gyro_rearm.py tests/test_heart_containers.py tests/test_hle_guest_ranges.py tests/test_hold_toggle.py tests/test_host_alloc_wait.py tests/test_host_free_marks.py tests/test_hud_layout_row.py tests/test_import_span.py tests/test_import_windows.py tests/test_input_background.py tests/test_input_movie.py tests/test_invalidate_vcore.py tests/test_job_queue.py tests/test_jobs_wait_runs_queued.py tests/test_keep_rendered.py tests/test_keyboard_menu_option.py tests/test_keyboard_option.py tests/test_libc_hooks.py tests/test_lifter.py tests/test_linux_pressure.py tests/test_loaded_modules_drop.py tests/test_log_batch.py tests/test_log_levels.py tests/test_longshot_exit.py tests/test_lower_atomg_cas.py tests/test_lower_end_at_closing_branch.py tests/test_lower_immediate_not_register.py tests/test_lower_imnmx_wide_immediate.py tests/test_lower_isberd_output.py tests/test_lower_ldg_uniform_order.py tests/test_lower_lea_hi_constant.py tests/test_lower_r2ur_one_register.py tests/test_lower_suld_1d.py tests/test_lower_tld_ms.py tests/test_mask_history_retire.py tests/test_menu_env_on.py tests/test_menu_hit.py tests/test_menu_keys.py tests/test_menu_model.py tests/test_menu_module_slots.py tests/test_menu_modules.py tests/test_menu_mouse_scroll.py tests/test_menu_restart.py tests/test_menu_rows_model.py tests/test_menu_sections.py tests/test_mesh_dynamic_state.py tests/test_mirror_budget.py tests/test_mirror_inherit.py tests/test_mirror_trim.py tests/test_mise_build.py tests/test_mods_list.py tests/test_mods_size_table.py tests/test_motion.py tests/test_motion_background.py tests/test_mouse_stick.py tests/test_movie_upscale_policy.py tests/test_nvn_buffer_map.py tests/test_nvn_device_modes.py tests/test_nvn_host_tables.py tests/test_oot_menu_mouse.py tests/test_oot_state_tap.py tests/test_option_ids.py tests/test_options_path.py tests/test_os_lifted_siblings.py tests/test_pads_after_menu.py tests/test_parity_gates.py tests/test_pass_hazard.py tests/test_pcache_stamp.py tests/test_perf_send.py tests/test_pool_span.py tests/test_prepare_seed_stamp.py tests/test_prepare_workers.py tests/test_present_ahead.py tests/test_present_source_crop.py tests/test_prof_clock.py tests/test_program_cache_cleanup.py tests/test_program_cache_one_variant.py tests/test_program_record_head.py tests/test_prompt_auto_face.py tests/test_prompt_font_bind.py tests/test_prompts_live.py tests/test_push_state.py tests/test_query_memory_free.py tests/test_quick_pipelines.py tests/test_realtime_rate.py tests/test_recording_log_handoff.py tests/test_renderer_load_error.py tests/test_report_privacy.py tests/test_report_run.py tests/test_report_words.py tests/test_reserved_core.py tests/test_run_all_mingw.py tests/test_same_bind.py tests/test_same_draw.py tests/test_same_dyn.py tests/test_sampler_admission.py tests/test_screensaver.py tests/test_sdl_desktop_size.py tests/test_sdl_pad_diagnostics.py tests/test_seed_cs_pointers.py tests/test_seed_kept_loaded.py tests/test_seed_reader.py tests/test_settings_atomic.py tests/test_settings_table.py tests/test_short_sleep_timer.py tests/test_skip_code.py tests/test_skip_title.py tests/test_sparse_bc_usage.py tests/test_spin_by_role.py tests/test_startup_progress.py tests/test_status_line.py tests/test_steam_pads.py tests/test_stick_dead_zone.py tests/test_stick_inversion_rest.py tests/test_stick_range.py tests/test_stick_rest.py tests/test_submitted_page.py tests/test_switch_table.py tests/test_taau_env_lookup.py tests/test_table_track.py tests/test_target_overlap.py tests/test_target_retention.py tests/test_temporal_present_bandwidth.py tests/test_tex_spans_once_a_present.py tests/test_text_keyboard_policy.py tests/test_text_size.py tests/test_texture_budget.py tests/test_texture_layout_sizes.py tests/test_thread_arg_self.py tests/test_timeline_modes.py tests/test_ub_gap.py tests/test_upscale_fallback.py tests/test_upscale_independent.py tests/test_upscale_label.py tests/test_upscaler_round_trip.py tests/test_vcore_video_acquire.py tests/test_vertex_bind.py tests/test_video_catchup.py tests/test_video_hold_early.py tests/test_video_input_limit.py tests/test_vram_compact.py tests/test_vram_pressure.py tests/test_wb_diff_split.py tests/test_wb_diff_stale_shadow.py tests/test_wb_learn.py tests/test_wb_pages.py tests/test_widescreen_shapes.py tests/test_windows_display_startup.py tests/test_windows_on_linux.py tests/test_windows_stop.py tests/test_xinput_thread.py ``` </details> **Still to test:** - Windows AMD, by hand. Check renderer and slider persistence across a restart and the live ceiling warning in a scene that exceeds the limit on the rebased head. - Windows NVIDIA, by hand. Check live renderer switching and workgroup adjustment on the NVIDIA Vulkan driver. - Linux, by hand. Build the host and renderer on the rebased head and check UTF-8 paths. - Windows, by hand. Capture current main and PR screenshots from the same view. ## Measurements **Verdict:** Both PR modes fell within main's observed FPS spread. Game's measured 131.56 FPS (+0.26%) and Longshot Default measured 131.01 FPS (−0.15%) against 131.21 FPS on main. **Setup:** Windows 11, Radeon RX 7900 XT, Adrenalin 26.11.2, Vulkan. The same saved Hyrule Field position and camera view in a 2150×900 window at 100% field of view, with uncapped FPS and frame generation off. Two 15-second samples per mode after pipeline warm-up. Each pair ran main, then the fresh PR profile in Game's, then Longshot Default after a live switch in that profile. Every sample had zero cold frames. The opt-in `HOS_CONTROL` bridge was enabled in every run for the replay and settings checks. It stays off by default. | | Before: main @ b6d274d7 | After: this PR @ 88ba875d | After, Longshot Default: this PR @ 88ba875d | |---|---:|---:|---:| | Renderer | Game producer with adaptive buffers | Game's | Longshot Default (55 / 41 / 0%) | | FPS per run | 131.64 / 130.78 | 130.95 / 132.16 | 131.19 / 130.83 | | Median FPS across runs | 131.21 | 131.56 | 131.01 | | 1% low FPS (1000 / p99) | 119.29 | 120.85 | 119.44 | | Median frame time | 7.62 ms | 7.61 ms | 7.62 ms | | p99 frame time | 8.38 ms | 8.28 ms | 8.37 ms | | Blade-list entries | 73,559 | — | 171,584 | | Blade compute workgroups | 1,150 | — | 2,681 | | Busiest mesh pool workgroups | 1,748–1,758 | — | 1,691–1,695 | Main's stationary buffer peak logs supply its blade counts and derived workgroup counts. Longshot reports live counters at the end of each sample. The Game's column comes from the frame trace. ```text A1 Main: 131.64 FPS, p99 8.46 ms, 0 cold frames B1 PR Game's: 130.95 FPS, p99 8.26 ms, 0 cold frames C1 PR Longshot Default: 131.19 FPS, p99 8.36 ms, 0 cold frames A2 Main: 130.78 FPS, p99 8.30 ms, 0 cold frames B2 PR Game's: 132.16 FPS, p99 8.29 ms, 0 cold frames C2 PR Longshot Default: 130.83 FPS, p99 8.39 ms, 0 cold frames ``` ### Simulated turf UI The new captures show Game's and the Longshot controls. [Game's and Longshot settings](https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/2772#issuecomment-90941) The earlier captures show the range of preset visuals. [Preset comparison GIF](https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/2772#issuecomment-88916) ## Risks The first live switch may pause briefly while the alternate turf shaders compile. Game's is the out-of-box renderer and can be reselected in play. Profiles without a saved renderer start on Game's and retain any saved Longshot slider values. The earlier `sim_turf_settings.ini` stays available to older builds. `RX_VK_SIM_TURF_POOLS=0` forces the original shaders and buffers for the run. The same path applies when the required push descriptors are unavailable. With the override unset, the menu selection controls the renderer. ## Checklist ### Ready for review - [x] One topic, on current `main`. The title is a Conventional Commit. Rebased onto `b6d274d7`. - [x] Tested on my own PC, in the game for a change the game runs, as Testing says. - [x] `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. ### When it applies - [x] A switch added or changed. `RX_VK_SIM_TURF_POOLS` is documented in `gpu/vk/switches.def`. Fresh profiles use Game's, which measured within main's spread. - [x] A check under `tests/` that reads changed source is updated, not weakened. - [x] `MKWVK_API_VERSION` bumped to 56. The existing keyboard callback keeps its slot. - [x] The SPIR-V headers were regenerated. - [ ] Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths. Windows build passed at the current head. The rebased Linux host and UTF-8 path check are pending. - [ ] 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:` in the commits. ### Ready to merge - [ ] Everything in Still to test has run, its results in Tested. - [ ] Tier 1 hardware it can affect is tested. - [ ] Approved in review, every comment answered. - [ ] CI passes on the head. Against current `main`, measured again or a comment says why the numbers still hold.
feat(vk): populate simulated turf around Link
Some checks failed
PR description / Title and description (pull_request_target) Successful in 6s
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Has been cancelled
CI / Third-party parts and guide screenshots (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
f15f0d8571
Assisted-by: OpenAI Codex
Author
Contributor

Tested in game: Windows, Radeon RX 7900 XT, Adrenalin 26.11.2. In the playable build based on 04ff0706, checked all five presets from the same position and camera and verified the Max workgroup warning. We tested Auto GPU ceiling under simulated lower-end GPU constraints by reducing the turf mesh workgroup limit to 1% of the hardware limit. The rebased PR head passed Windows packaging and focused checks. Its in-game check is pending.

Tested in game: Windows, Radeon RX 7900 XT, Adrenalin 26.11.2. In the playable build based on 04ff0706, checked all five presets from the same position and camera and verified the Max workgroup warning. We tested Auto GPU ceiling under simulated lower-end GPU constraints by reducing the turf mesh workgroup limit to 1% of the hardware limit. The rebased PR head passed Windows packaging and focused checks. Its in-game check is pending.
Member

Possibly related, for context:

  • PR #2443 fix(ab): read options after warm-up and ignore unready area rows (#2349) — Open tooling PR touches retired per-area turf option keys.
  • issue #2634 Game: Simulated turf grass blades flicker with camera distance on Intel Arc A770 — Open simulated-turf rendering flicker report; test new population path against it.
  • PR #2093 feat(vk): add adaptive per-area simulated-turf controls — Merged predecessor supplies per-area settings and private-buffer infrastructure that this replaces.
  • PR #2288 fix(vk): simulated-turf lists stay within the device's workgroups for one draw or dispatch — Merged workgroup-limit fix in the same turf list pipeline.
Possibly related, for context: - PR #2443 fix(ab): read options after warm-up and ignore unready area rows (#2349) — Open tooling PR touches retired per-area turf option keys. - issue #2634 Game: Simulated turf grass blades flicker with camera distance on Intel Arc A770 — Open simulated-turf rendering flicker report; test new population path against it. - PR #2093 feat(vk): add adaptive per-area simulated-turf controls — Merged predecessor supplies per-area settings and private-buffer infrastructure that this replaces. - PR #2288 fix(vk): simulated-turf lists stay within the device's workgroups for one draw or dispatch — Merged workgroup-limit fix in the same turf list pipeline.
Author
Contributor

Five turf presets from the same position and camera in the earlier playable build. The GIF cycles through Off, Low, Default, High and Max.

Five simulated turf presets

Five turf presets from the same position and camera in the earlier playable build. The GIF cycles through Off, Low, Default, High and Max. ![Five simulated turf presets](https://git.magicbean.dev/attachments/c02ef341-322e-42a7-b0be-eac8bc7b254b)
Member
@review
BeanBot left a comment

Recommendation: Request changes. The population pass reads Link’s live position during replay, so it can use a position from a different frame, and several failure and recovery paths can leave turf missing or permanently reduced. The reviewed head also needs in-game and performance validation.

The change replaces camera-centered turf population with Link-centered, prioritized rings and adds density and reach presets. It offers more predictable placement, at the cost of new GPU passes, buffer growth, readback and automatic density adjustment.

Blocking (1): must change before merging.

  1. L1 gpu/vk/sim_turf_dispatch.h:160: The replay reads Link’s current live position instead of the position associated with the submitted work. (more on the line) Do: Capture the actor position with the submission and use that snapshot during replay.

Should fix (3): not blocking, but worth doing before merging.

  • L2 gpu/vk/vk_draw.cpp:12878: A population setup failure skips the pool producer instead of falling back to usable stock turf. (more on the line) Do: Choose the stock shader and buffer path when population setup cannot be used, including pipeline and allocation failures.
  • L3 gpu/vk/vk_draw.cpp:550: A failed buffer growth is never retried for the same demand. (more on the line) Do: Clear or roll back actor_growth_target on allocation failure, and retry growth with suitable throttling.
  • L4 gpu/vk/sim_turf_population.h:90: Automatic fade only increases until the player changes settings. (more on the line) Do: Reduce the fade gradually after sustained headroom, with hysteresis to avoid oscillation.

Testing before merging (2) (runs on the systems it can change; it doesn't hold the recommendation)

  • L5: The reviewed head has not been checked in game across the rendering paths it changes. When: The only reported preset and ceiling run used an earlier build; the head’s actor-centered population and stock fallback have no reported game run. Do: Run the head against the base in the same scene on Windows AMD, Linux NVIDIA and Steam Deck, including presets, movement, restart persistence, ceiling adjustment and the stock fallback.
  • L6: The cost of the new default population path is not measured. When: The new compute passes, barriers, buffer copies and larger allocations run during play, but the PR provides no comparable frame-time, 1% low or memory figures. Do: Measure interleaved runs of the base and head in the same representative field scenes and settings, reporting frame times, 1% lows and RAM/VRAM on the affected hardware.

@fix can do L1, L2, L3 and L4.

Checks: Still running: 10 checks.

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

Does it help: Unproven. The preset demonstration used an earlier playable build, not head f15f0d8571, and no same-scene frame-time or 1% low comparisons against base 694ae582 are provided.

Other systems: The new path affects Vulkan compute, mesh and compute-fallback rendering, GPU memory, replay timing and menu persistence. Windows AMD was exercised on an earlier build; the reviewed head, Linux, NVIDIA, Steam Deck and the stock-shader fallback still need runs.

Switches: RX_VK_SIM_TURF_POOLS remains on by default when push descriptors are available, but now selects actor-centered population; its default has not been measured. RX_VK_SIM_TURF_ADAPTIVE is removed and recorded as GONE; RX_VK_SIM_TURF_ACTOR is also recorded as GONE.

Reviewed: f15f0d8571 against 694ae5820a: Read the repository rules, standards, PR template, commit and core population shader, dispatch, capacity, settings, menu and replay changes. Skimmed the generated SPIR-V header, documentation, scripts and test changes; the full change and every changed code file were not read in full.; nothing run (a code review).

Checked and fine:

  • The commit records AI assistance.
  • The renderer API version is bumped.
  • The removed adaptive switch has a GONE row.

Testing: No code, tests or project scripts were run, as requested. CI is still running and the reported head in-game check is pending.

Overlaps and merge order: The PR says it supersedes Longshot#2241; no merge order is established here.


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

**Recommendation: Request changes.** The population pass reads Link’s live position during replay, so it can use a position from a different frame, and several failure and recovery paths can leave turf missing or permanently reduced. The reviewed head also needs in-game and performance validation. The change replaces camera-centered turf population with Link-centered, prioritized rings and adds density and reach presets. It offers more predictable placement, at the cost of new GPU passes, buffer growth, readback and automatic density adjustment. **Blocking (1)**: must change before merging. 1. **L1** `gpu/vk/sim_turf_dispatch.h:160`: The replay reads Link’s current live position instead of the position associated with the submitted work. (more on the line) **Do:** Capture the actor position with the submission and use that snapshot during replay. **Should fix (3)**: not blocking, but worth doing before merging. - **L2** `gpu/vk/vk_draw.cpp:12878`: A population setup failure skips the pool producer instead of falling back to usable stock turf. (more on the line) **Do:** Choose the stock shader and buffer path when population setup cannot be used, including pipeline and allocation failures. - **L3** `gpu/vk/vk_draw.cpp:550`: A failed buffer growth is never retried for the same demand. (more on the line) **Do:** Clear or roll back actor_growth_target on allocation failure, and retry growth with suitable throttling. - **L4** `gpu/vk/sim_turf_population.h:90`: Automatic fade only increases until the player changes settings. (more on the line) **Do:** Reduce the fade gradually after sustained headroom, with hysteresis to avoid oscillation. **Testing before merging (2)** (runs on the systems it can change; it doesn't hold the recommendation) - **L5**: The reviewed head has not been checked in game across the rendering paths it changes. *When:* The only reported preset and ceiling run used an earlier build; the head’s actor-centered population and stock fallback have no reported game run. **Do:** Run the head against the base in the same scene on Windows AMD, Linux NVIDIA and Steam Deck, including presets, movement, restart persistence, ceiling adjustment and the stock fallback. - **L6**: The cost of the new default population path is not measured. *When:* The new compute passes, barriers, buffer copies and larger allocations run during play, but the PR provides no comparable frame-time, 1% low or memory figures. **Do:** Measure interleaved runs of the base and head in the same representative field scenes and settings, reporting frame times, 1% lows and RAM/VRAM on the affected hardware. `@fix` can do L1, L2, L3 and L4. **Checks:** Still running: 10 checks. <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Unproven. The preset demonstration used an earlier playable build, not head f15f0d857145, and no same-scene frame-time or 1% low comparisons against base 694ae582 are provided. **Other systems:** The new path affects Vulkan compute, mesh and compute-fallback rendering, GPU memory, replay timing and menu persistence. Windows AMD was exercised on an earlier build; the reviewed head, Linux, NVIDIA, Steam Deck and the stock-shader fallback still need runs. **Switches:** RX_VK_SIM_TURF_POOLS remains on by default when push descriptors are available, but now selects actor-centered population; its default has not been measured. RX_VK_SIM_TURF_ADAPTIVE is removed and recorded as GONE; RX_VK_SIM_TURF_ACTOR is also recorded as GONE. **Reviewed:** f15f0d857145 against 694ae5820a37: Read the repository rules, standards, PR template, commit and core population shader, dispatch, capacity, settings, menu and replay changes. Skimmed the generated SPIR-V header, documentation, scripts and test changes; the full change and every changed code file were not read in full.; nothing run (a code review). **Checked and fine:** - The commit records AI assistance. - The renderer API version is bumped. - The removed adaptive switch has a GONE row. **Testing:** No code, tests or project scripts were run, as requested. CI is still running and the reported head in-game check is pending. **Overlaps and merge order:** The PR says it supersedes Longshot#2241; no merge order is established here. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.</sub>
@ -0,0 +157,4 @@
const BufferRef header = gpu_buffer_bind(indirect - prefix, prefix + Shader::Optimization::kSimTurfListHeader, true);
if (!header || header.offset % dev.props.limits.minStorageBufferOffsetAlignment) return false;
float actor[3]{};
const bool actor_valid = host->turf_actor_position && host->turf_actor_position(actor);
Member

L1 (blocking): The replay reads Link’s current live position instead of the position associated with the submitted work.

When: If the game advances or changes maps before a queued dispatch is replayed, the terrain and uniforms come from the earlier submission while this callback supplies the later actor position. Turf is populated around the wrong position or disappears when the live position is invalid.

Do: Capture the actor position with the submission and use that snapshot during replay.

**L1** (blocking): The replay reads Link’s current live position instead of the position associated with the submitted work. *When:* If the game advances or changes maps before a queued dispatch is replayed, the terrain and uniforms come from the earlier submission while this callback supplies the later actor position. Turf is populated around the wrong position or disappears when the live position is invalid. **Do:** Capture the actor position with the submission and use that snapshot during replay.
@ -0,0 +87,4 @@
void observe(uint32_t controls, uint32_t applied, uint64_t frame, uint32_t groups, uint32_t limit) {
if (!controls || controls != key || applied != power || frame < changed_frame) return;
if (groups > limit && power < 64) {
Member

L4 (should fix): Automatic fade only increases until the player changes settings.

When: After a dense location exceeds the workgroup limit, moving to a sparse location leaves the increased fade power in force even when usage is well below the limit. Turf remains thinner for the rest of the session despite available capacity.

Do: Reduce the fade gradually after sustained headroom, with hysteresis to avoid oscillation.

**L4** (should fix): Automatic fade only increases until the player changes settings. *When:* After a dense location exceeds the workgroup limit, moving to a sparse location leaves the increased fade power in force even when usage is well below the limit. Turf remains thinner for the rest of the session despite available capacity. **Do:** Reduce the fade gradually after sustained headroom, with hysteresis to avoid oscillation.
@ -562,0 +547,4 @@
for (size_t i = 0; i < 3; ++i) {
for (auto& list : sim_turf_private[samples[i].pool]) {
if (list.addr != samples[i].addr || demand <= list.policy.target() || target <= list.actor_growth_target) continue;
list.actor_growth_target = target;
Member

L3 (should fix): A failed buffer growth is never retried for the same demand.

When: The target is recorded in actor_growth_target before allocation. If sim_turf_resize fails, install_failed resets the policy target, but later samples at the same demand are rejected by the actor_growth_target check, leaving the list at its old capacity even after memory becomes available.

Do: Clear or roll back actor_growth_target on allocation failure, and retry growth with suitable throttling.

**L3** (should fix): A failed buffer growth is never retried for the same demand. *When:* The target is recorded in actor_growth_target before allocation. If sim_turf_resize fails, install_failed resets the policy target, but later samples at the same demand are rejected by the actor_growth_target check, leaving the list at its old capacity even after memory becomes available. **Do:** Clear or roll back actor_growth_target on allocation failure, and retry growth with suitable throttling.
@ -12855,0 +12875,4 @@
if (sim_turf_pools_on() && !p.stages.empty()) {
const Stage& stage = p.stages[0];
if (std::find(std::begin(kSimTurfPoolKeys), std::end(kSimTurfPoolKeys), p.key) != std::end(kSimTurfPoolKeys) &&
(!indirect || !turf_populate(cmd, s, stage, indirect, actor_budget, population))) {
Member

L2 (should fix): A population setup failure skips the pool producer instead of falling back to usable stock turf.

When: If the population pipeline cannot be created or a required private buffer allocation or binding fails, turf_populate returns false and the producer dispatch is skipped. Subsequent draws receive no newly produced turf even though the device supports the original shaders.

Do: Choose the stock shader and buffer path when population setup cannot be used, including pipeline and allocation failures.

**L2** (should fix): A population setup failure skips the pool producer instead of falling back to usable stock turf. *When:* If the population pipeline cannot be created or a required private buffer allocation or binding fails, turf_populate returns false and the producer dispatch is skipped. Subsequent draws receive no newly produced turf even though the device supports the original shaders. **Do:** Choose the stock shader and buffer path when population setup cannot be used, including pipeline and allocation failures.
Author
Contributor

The Simulated turf settings page at Default and Max in the earlier playable build. Max shows both the workgroup usage at activation and the live auto-adjusted usage.

Default

Default simulated turf settings

Max

Max simulated turf settings

The Simulated turf settings page at Default and Max in the earlier playable build. Max shows both the workgroup usage at activation and the live auto-adjusted usage. **Default** ![Default simulated turf settings](https://git.magicbean.dev/attachments/e9a8710d-5818-4dd0-ab81-1d2bd939a2e0) **Max** ![Max simulated turf settings](https://git.magicbean.dev/attachments/05ae44f9-4f1a-41c8-af4b-d53ae6d05560)
Assisted-by: OpenAI Codex
fix(vk): snapshot turf positions and retry buffer growth
Some checks failed
PR description / Title and description (pull_request_target) Successful in 7s
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Has been cancelled
CI / Third-party parts and guide screenshots (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
ee9b43f4cf
Assisted-by: OpenAI Codex
Author
Contributor

Following up on BeanBot’s review. L1 and L3 are fixed in ee9b43f4. The Windows build and focused game-free checks passed.

  • L2, stock fallback. A failure during actor population can occur after the stock blade producer has been skipped. Falling back at that point needs to restore the stock producer, the pool producer, and their matching buffers together. I’m leaving this open for a separate recovery path. The existing RX_VK_SIM_TURF_POOLS=0 switch still selects stock turf from startup.
  • L4, fade recovery. The workgroup sample reflects the blades that survived the current fade and the storage cap. Low usage can therefore occur in the same dense scene. Relaxing the fade from that signal alone can restart the density changes we saw in testing. I’m keeping the adjustment latched for the current Density and Reach until we have a recovery signal that distinguishes genuine headroom from work already trimmed.
Following up on [BeanBot’s review](https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/2772#issuecomment-88932). L1 and L3 are fixed in `ee9b43f4`. The Windows build and focused game-free checks passed. - **L2, stock fallback.** A failure during actor population can occur after the stock blade producer has been skipped. Falling back at that point needs to restore the stock producer, the pool producer, and their matching buffers together. I’m leaving this open for a separate recovery path. The existing `RX_VK_SIM_TURF_POOLS=0` switch still selects stock turf from startup. - **L4, fade recovery.** The workgroup sample reflects the blades that survived the current fade and the storage cap. Low usage can therefore occur in the same dense scene. Relaxing the fade from that signal alone can restart the density changes we saw in testing. I’m keeping the adjustment latched for the current Density and Reach until we have a recovery signal that distinguishes genuine headroom from work already trimmed.
Member
@review
BeanBot left a comment

Recommendation: Approve. The population and buffer-growth fixes address the reported replay-position and retry defects. The reviewed head still needs in-game validation and measurements of the new default path before its visual behavior and cost are known. Nothing blocking is left: what remains is for the author before merging (below). Recommend approval; not approved on the forge.

The change populates turf around Link, prioritizes nearby patches and adds density and reach controls. The follow-up snapshots Link’s position at submission and retries failed buffer growth, but population setup failure still drops turf and automatic fade remains latched.

Should fix (2): not blocking, but worth doing before merging.

  • L2 gpu/vk/vk_draw.cpp:12878: A population setup failure skips the pool producer instead of falling back to usable stock turf. When: If the population pipeline cannot be created or a required private buffer allocation or binding fails, turf_populate returns false and the producer dispatch is skipped. Subsequent draws receive no newly produced turf even though the device supports the original shaders. Do: Choose the stock shader and buffer path when population setup cannot be used, including pipeline and allocation failures.
  • L4 gpu/vk/sim_turf_population.h:90: Automatic fade only increases until the player changes settings. When: After a dense location exceeds the workgroup limit, moving to a sparse location leaves the increased fade power in force even when usage is well below the limit. Turf remains thinner for the rest of the session despite available capacity. Do: Reduce the fade gradually after sustained headroom, with hysteresis to avoid oscillation.

Testing before merging (2) (runs on the systems it can change; it doesn't hold the recommendation)

  • L5: The reviewed head has not been checked in game across the rendering paths it changes. When: The only reported preset and ceiling run used an earlier build; the head’s actor-centered population and stock fallback have no reported game run. Do: Run the head against the base in the same scene on Windows AMD, Linux NVIDIA and Steam Deck, including presets, movement, restart persistence, ceiling adjustment and the stock fallback.
  • L6: The cost of the new default population path is not measured. When: The new compute passes, barriers, buffer copies and larger allocations run during play, but the PR provides no comparable frame-time, 1% low or memory figures. Do: Measure interleaved runs of the base and head in the same representative field scenes and settings, reporting frame times, 1% lows and RAM/VRAM on the affected hardware.

@fix can do L2 and L4.

Since the last review (on f15f0d8571)
Resolved: L1 (The replay reads Link’s current live position instead of the position associated with the…); L3 (A failed buffer growth is never retried for the same demand.)
Still open: L2 (A population setup failure skips the pool producer instead of falling back to usable stock…); L4 (Automatic fade only increases until the player changes settings.); L5 (The reviewed head has not been checked in game across the rendering paths it changes.); L6 (The cost of the new default population path is not measured.)

Checks: Still running: 10 checks.

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

Does it help: Unproven. Presets and the workgroup warning were checked on an earlier Windows RX 7900 XT build; same-scene frame times and 1% lows against the pinned base are pending.

Other systems: The population and replay paths affect Windows and Linux, Vulkan devices and drivers, and stock-shader fallback. The PR reports Windows build and focused game-free checks, but head in-game, Linux, NVIDIA and fallback checks remain pending.

Switches: RX_VK_SIM_TURF_POOLS retains the stock fallback when set to 0; the population path is enabled by default where supported. The default’s performance and behavior across affected systems remain unmeasured.

Reviewed: ee9b43f4cf against 694ae5820a: Read AGENTS.md, CONTRIBUTING.md, sim_turf_capacity.h, sim_turf_population.h and sim_turf_dispatch.h; inspected the follow-up diff, relevant allocation and replay paths, and the changed turf tests. The full original diff, all changed files, referenced standards and architecture documents, and generated shader output were not read in full.; nothing run (a code review).

Checked and fine:

  • The snapshot follows each submission through the later-submit queue and resumed replay.
  • Failed growth leaves the previous buffer installed and permits renewed demand after the cooldown.

Testing: No code or tests were run. The author reports a Windows build and focused game-free checks passing; head in-game checks, broader hardware coverage and the full suite remain pending. CI is still running.

Overlaps and merge order: The PR says it supersedes #2241; no other overlap was established.


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

**Recommendation: Approve.** The population and buffer-growth fixes address the reported replay-position and retry defects. The reviewed head still needs in-game validation and measurements of the new default path before its visual behavior and cost are known. Nothing blocking is left: what remains is for the author before merging (below). Recommend approval; not approved on the forge. The change populates turf around Link, prioritizes nearby patches and adds density and reach controls. The follow-up snapshots Link’s position at submission and retries failed buffer growth, but population setup failure still drops turf and automatic fade remains latched. **Should fix (2)**: not blocking, but worth doing before merging. - **L2** `gpu/vk/vk_draw.cpp:12878`: A population setup failure skips the pool producer instead of falling back to usable stock turf. *When:* If the population pipeline cannot be created or a required private buffer allocation or binding fails, turf_populate returns false and the producer dispatch is skipped. Subsequent draws receive no newly produced turf even though the device supports the original shaders. **Do:** Choose the stock shader and buffer path when population setup cannot be used, including pipeline and allocation failures. - **L4** `gpu/vk/sim_turf_population.h:90`: Automatic fade only increases until the player changes settings. *When:* After a dense location exceeds the workgroup limit, moving to a sparse location leaves the increased fade power in force even when usage is well below the limit. Turf remains thinner for the rest of the session despite available capacity. **Do:** Reduce the fade gradually after sustained headroom, with hysteresis to avoid oscillation. **Testing before merging (2)** (runs on the systems it can change; it doesn't hold the recommendation) - **L5**: The reviewed head has not been checked in game across the rendering paths it changes. *When:* The only reported preset and ceiling run used an earlier build; the head’s actor-centered population and stock fallback have no reported game run. **Do:** Run the head against the base in the same scene on Windows AMD, Linux NVIDIA and Steam Deck, including presets, movement, restart persistence, ceiling adjustment and the stock fallback. - **L6**: The cost of the new default population path is not measured. *When:* The new compute passes, barriers, buffer copies and larger allocations run during play, but the PR provides no comparable frame-time, 1% low or memory figures. **Do:** Measure interleaved runs of the base and head in the same representative field scenes and settings, reporting frame times, 1% lows and RAM/VRAM on the affected hardware. `@fix` can do L2 and L4. **Since the last review** (on f15f0d857145) Resolved: L1 (The replay reads Link’s current live position instead of the position associated with the…); L3 (A failed buffer growth is never retried for the same demand.) Still open: L2 (A population setup failure skips the pool producer instead of falling back to usable stock…); L4 (Automatic fade only increases until the player changes settings.); L5 (The reviewed head has not been checked in game across the rendering paths it changes.); L6 (The cost of the new default population path is not measured.) **Checks:** Still running: 10 checks. <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Unproven. Presets and the workgroup warning were checked on an earlier Windows RX 7900 XT build; same-scene frame times and 1% lows against the pinned base are pending. **Other systems:** The population and replay paths affect Windows and Linux, Vulkan devices and drivers, and stock-shader fallback. The PR reports Windows build and focused game-free checks, but head in-game, Linux, NVIDIA and fallback checks remain pending. **Switches:** RX_VK_SIM_TURF_POOLS retains the stock fallback when set to 0; the population path is enabled by default where supported. The default’s performance and behavior across affected systems remain unmeasured. **Reviewed:** ee9b43f4cf90 against 694ae5820a37: Read AGENTS.md, CONTRIBUTING.md, sim_turf_capacity.h, sim_turf_population.h and sim_turf_dispatch.h; inspected the follow-up diff, relevant allocation and replay paths, and the changed turf tests. The full original diff, all changed files, referenced standards and architecture documents, and generated shader output were not read in full.; nothing run (a code review). **Checked and fine:** - The snapshot follows each submission through the later-submit queue and resumed replay. - Failed growth leaves the previous buffer installed and permits renewed demand after the cooldown. **Testing:** No code or tests were run. The author reports a Windows build and focused game-free checks passing; head in-game checks, broader hardware coverage and the full suite remain pending. CI is still running. **Overlaps and merge order:** The PR says it supersedes #2241; no other overlap was established. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.</sub>
fix(vk): guard turf statistics and record turf commands consistently
Some checks failed
PR description / Title and description (pull_request_target) Successful in 10s
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Has been cancelled
CI / Third-party parts and guide screenshots (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
7d98389a28
Assisted-by: OpenAI Codex
test(vk): remove unused fixture imports
Some checks failed
PR description / Title and description (pull_request_target) Successful in 8s
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Has been cancelled
CI / Third-party parts and guide screenshots (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
d9a9b89c8e
Assisted-by: OpenAI Codex
Member
@review
BeanBot left a comment

Recommendation: Approve. The current head produces actor-centered turf on the tested Windows AMD system, but the fallback, ceiling adjustment and other affected rendering systems still need in-game checks. The measured default is also 4.8% slower in the reported scene. Nothing blocking is left: what remains is for the author before merging (below). Recommend approval; not approved on the forge.

The change populates turf around Link, prioritizes nearby patches and adds density, reach and preset controls. It adds rendering work and measured a 0.44 ms increase in median frame time at the default settings in the reported scene.

Should fix (2): not blocking, but worth doing before merging.

  • L2 gpu/vk/vk_draw.cpp:12878: A population setup failure skips the pool producer instead of falling back to usable stock turf. When: If the population pipeline cannot be created or a required private buffer allocation or binding fails, turf_populate returns false and the producer dispatch is skipped. Subsequent draws receive no newly produced turf even though the device supports the original shaders. Do: Choose the stock shader and buffer path when population setup cannot be used, including pipeline and allocation failures.
  • L4 gpu/vk/sim_turf_population.h:90: Automatic fade only increases until the player changes settings. When: After a dense location exceeds the workgroup limit, moving to a sparse location leaves the increased fade power in force even when usage is well below the limit. Turf remains thinner for the rest of the session despite available capacity. Do: Reduce the fade gradually after sustained headroom, with hysteresis to avoid oscillation.

Testing before merging (1) (runs on the systems it can change; it doesn't hold the recommendation)

  • L5: The remaining rendering paths have not been checked in game on the current head. When: The Windows AMD gameplay run did not exercise the stock fallback or a ceiling-triggering scene, and NVIDIA and Linux gameplay runs are not reported. Do: Check the stock fallback and live ceiling adjustment on the current head, and exercise actor-centered turf and adjustment on NVIDIA and Linux.

@fix can do L2 and L4.

Since the last review (on ee9b43f4cf)
Resolved: L6 (The cost of the new default population path is not measured.)
Still open: L2 (A population setup failure skips the pool producer instead of falling back to usable stock…); L4 (Automatic fade only increases until the player changes settings.); L5 (The remaining rendering paths have not been checked in game on the current head.)

Checks: Still running: 10 checks.

Also noticed (2; not asked for, not blocking)
  • The reported default comparison is 4.8% slower in the tested scene; a matched-blade comparison could distinguish preset cost from population-pass cost.
  • CI is still running, and the graphics guide screenshot and restart persistence remain to be checked.
More: does it help, other systems, switches, what was read

Does it help: The feature works in the reported Windows AMD check. The default performance cost is measured: median FPS fell from 119.0 to 113.3 and 1% low FPS fell from 107.3 to 102.9 across two interleaved 60-second runs per revision; the comparison used each revision's default turf settings.

Other systems: The new Vulkan population and mesh-limit paths can affect other GPU drivers, Linux and devices with lower workgroup limits. The current head was checked in game on Windows AMD; Linux compiled and linked, while NVIDIA and the current-head ceiling and stock fallback paths remain to be checked in game.

Switches: RX_VK_SIM_TURF_POOLS defaults on when push descriptors are available and selects original shaders and buffers when set to 0; its new default costs 4.8% in the reported scene and has not been validated across affected systems. RX_VK_SIM_TURF_ADAPTIVE is removed because actor turf sizes buffers from demand; RX_VK_SIM_TURF_ACTOR is recorded as removed because actor turf is now the default.

Reviewed: d9a9b89c8e against 694ae5820a: Read the repository rules and pull request template, the changes since ee9b43f4, the population dispatch implementation and AutoFade policy, and the relevant dispatch and sample handling. Skimmed the overall change statistics and reported runs; the remaining changed files and full base diff were not read in full.; nothing run (a code review).

Checked and fine:

  • The reported current-head Windows AMD run exercised all five presets, movement and camera input, and a clean exit.
  • The newly added renderer guard covers turf_stats.

Testing: No commands from the project or tests were run. The reported Windows and Linux builds passed; the reported game-free suite had the same 211 failures on the PR and pinned main.

Overlaps and merge order: The pull request says it supersedes #2241; merge this instead of #2241 if accepted.


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

**Recommendation: Approve.** The current head produces actor-centered turf on the tested Windows AMD system, but the fallback, ceiling adjustment and other affected rendering systems still need in-game checks. The measured default is also 4.8% slower in the reported scene. Nothing blocking is left: what remains is for the author before merging (below). Recommend approval; not approved on the forge. The change populates turf around Link, prioritizes nearby patches and adds density, reach and preset controls. It adds rendering work and measured a 0.44 ms increase in median frame time at the default settings in the reported scene. **Should fix (2)**: not blocking, but worth doing before merging. - **L2** `gpu/vk/vk_draw.cpp:12878`: A population setup failure skips the pool producer instead of falling back to usable stock turf. *When:* If the population pipeline cannot be created or a required private buffer allocation or binding fails, turf_populate returns false and the producer dispatch is skipped. Subsequent draws receive no newly produced turf even though the device supports the original shaders. **Do:** Choose the stock shader and buffer path when population setup cannot be used, including pipeline and allocation failures. - **L4** `gpu/vk/sim_turf_population.h:90`: Automatic fade only increases until the player changes settings. *When:* After a dense location exceeds the workgroup limit, moving to a sparse location leaves the increased fade power in force even when usage is well below the limit. Turf remains thinner for the rest of the session despite available capacity. **Do:** Reduce the fade gradually after sustained headroom, with hysteresis to avoid oscillation. **Testing before merging (1)** (runs on the systems it can change; it doesn't hold the recommendation) - **L5**: The remaining rendering paths have not been checked in game on the current head. *When:* The Windows AMD gameplay run did not exercise the stock fallback or a ceiling-triggering scene, and NVIDIA and Linux gameplay runs are not reported. **Do:** Check the stock fallback and live ceiling adjustment on the current head, and exercise actor-centered turf and adjustment on NVIDIA and Linux. `@fix` can do L2 and L4. **Since the last review** (on ee9b43f4cf90) Resolved: L6 (The cost of the new default population path is not measured.) Still open: L2 (A population setup failure skips the pool producer instead of falling back to usable stock…); L4 (Automatic fade only increases until the player changes settings.); L5 (The remaining rendering paths have not been checked in game on the current head.) **Checks:** Still running: 10 checks. <details> <summary>Also noticed (2; not asked for, not blocking)</summary> - The reported default comparison is 4.8% slower in the tested scene; a matched-blade comparison could distinguish preset cost from population-pass cost. - CI is still running, and the graphics guide screenshot and restart persistence remain to be checked. </details> <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** The feature works in the reported Windows AMD check. The default performance cost is measured: median FPS fell from 119.0 to 113.3 and 1% low FPS fell from 107.3 to 102.9 across two interleaved 60-second runs per revision; the comparison used each revision's default turf settings. **Other systems:** The new Vulkan population and mesh-limit paths can affect other GPU drivers, Linux and devices with lower workgroup limits. The current head was checked in game on Windows AMD; Linux compiled and linked, while NVIDIA and the current-head ceiling and stock fallback paths remain to be checked in game. **Switches:** RX_VK_SIM_TURF_POOLS defaults on when push descriptors are available and selects original shaders and buffers when set to 0; its new default costs 4.8% in the reported scene and has not been validated across affected systems. RX_VK_SIM_TURF_ADAPTIVE is removed because actor turf sizes buffers from demand; RX_VK_SIM_TURF_ACTOR is recorded as removed because actor turf is now the default. **Reviewed:** d9a9b89c8ee5 against 694ae5820a37: Read the repository rules and pull request template, the changes since ee9b43f4, the population dispatch implementation and AutoFade policy, and the relevant dispatch and sample handling. Skimmed the overall change statistics and reported runs; the remaining changed files and full base diff were not read in full.; nothing run (a code review). **Checked and fine:** - The reported current-head Windows AMD run exercised all five presets, movement and camera input, and a clean exit. - The newly added renderer guard covers turf_stats. **Testing:** No commands from the project or tests were run. The reported Windows and Linux builds passed; the reported game-free suite had the same 211 failures on the PR and pinned main. **Overlaps and merge order:** The pull request says it supersedes #2241; merge this instead of #2241 if accepted. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.</sub>
HumanBean left a comment

-4% FPS is a big jump, can we optimize this?

-4% FPS is a big jump, can we optimize this?
Author
Contributor

@HumanBean wrote in #2772 (comment):

-4% FPS is a big jump, can we optimize this?

That's probably due to the different default presets, I'll run a test with similar blade counts.

@HumanBean wrote in https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/2772#issuecomment-89084: > -4% FPS is a big jump, can we optimize this? That's probably due to the different default presets, I'll run a test with similar blade counts.
erlo68 force-pushed feat/actor-centered-turf from d9a9b89c8e
Some checks failed
PR description / Title and description (pull_request_target) Successful in 8s
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Has been cancelled
CI / Third-party parts and guide screenshots (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
to c01242b5d0
Some checks failed
PR description / Title and description (pull_request_target) Successful in 5s
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Has been cancelled
CI / Third-party parts and guide screenshots (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
2026-11-29 11:18:39 +00:00
Compare
Author
Contributor

I reran the Castle Town drawbridge benchmark on main (01d6878b) and the PR (c01242b5) at similar blade counts. Main settled at 9,643 blades. The PR produced 9,560 at Density 13, Reach 25, a difference of 0.9%.

FPS was effectively the same at those settings. Main recorded 116.0 FPS and the PR recorded 115.8 FPS across two interleaved 60-second runs per build. The 0.2% difference was within the spread of the runs.

The PR's Default preset (Density 70, Reach 35) produced 62,923 blades in the same view, about 6.5 times main's count.

I reran the Castle Town drawbridge benchmark on main (`01d6878b`) and the PR (`c01242b5`) at similar blade counts. Main settled at **9,643 blades**. The PR produced **9,560** at **Density 13, Reach 25**, a difference of 0.9%. **FPS was effectively the same at those settings.** Main recorded **116.0 FPS** and the PR recorded **115.8 FPS** across two interleaved 60-second runs per build. The 0.2% difference was within the spread of the runs. The PR's **Default** preset (Density 70, Reach 35) produced **62,923 blades** in the same view, about **6.5 times** main's count.
Author
Contributor

Ok, may have found an Issue. It's not culling out of frame blades. So with similar bladecounts in total, performance is equal to main, but visual density is much lower on PR.

I'll work on making it camera sensitive, taking into account all available aspect ratios and also make it FOV sensible. This should restore the same visuals with equal performance.

Ok, may have found an Issue. It's not culling out of frame blades. So with similar bladecounts in total, performance is equal to main, but visual density is much lower on PR. I'll work on making it camera sensitive, taking into account all available aspect ratios and also make it FOV sensible. This should restore the same visuals with equal performance.
erlo68 force-pushed feat/actor-centered-turf from c01242b5d0
Some checks failed
PR description / Title and description (pull_request_target) Successful in 5s
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Has been cancelled
CI / Third-party parts and guide screenshots (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
to 88ba875d2c
Some checks failed
CI / What the change needs (pull_request) Blocked by required conditions
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Blocked by required conditions
CI / Third-party parts and guide screenshots (pull_request) Blocked by required conditions
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Blocked by required conditions
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Blocked by required conditions
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Blocked by required conditions
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Blocked by required conditions
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Blocked by required conditions
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Blocked by required conditions
CI / Website build and checks (pull_request) Blocked by required conditions
PR description / Title and description (pull_request_target) Failing after 6s
2026-11-29 18:36:43 +00:00
Compare
Author
Contributor

Rebased onto b6d274d7 and pushed 88ba875d. Game's is the default. The Simulated turf selector now switches live to Longshot, and each turf update uses one producer.

At the same Hyrule Field view, median FPS was 131.21 on main, 131.56 in Game's, and 131.01 in Longshot Default. Both PR modes fell within the observed spread. The full Windows mise suite found 226 failures on the PR, all reproduced on pinned main. The description has the measurements, failure list, and verified checklist items.

Rebased onto `b6d274d7` and pushed `88ba875d`. **Game's** is the default. The Simulated turf selector now switches live to **Longshot**, and each turf update uses one producer. At the same Hyrule Field view, median FPS was 131.21 on main, 131.56 in Game's, and 131.01 in Longshot Default. Both PR modes fell within the observed spread. The full Windows `mise` suite found 226 failures on the PR, all reproduced on pinned main. The description has the measurements, failure list, and verified checklist items.
Author
Contributor

Simulated turf settings

Game's keeps the original turf and hides the Longshot controls.

Simulated turf settings with Game's selected

Longshot reveals the presets, Density, Reach, and Fade start, with a live workgroup readout.

Simulated turf settings with Longshot Default selected at Density 55, Reach 41, and Fade start 0%

UI captures from build 2d9a3a3d.

### Simulated turf settings **Game's** keeps the original turf and hides the Longshot controls. ![Simulated turf settings with Game's selected](https://git.magicbean.dev/attachments/d84a25cf-01c3-469b-9092-281367654245) **Longshot** reveals the presets, Density, Reach, and Fade start, with a live workgroup readout. ![Simulated turf settings with Longshot Default selected at Density 55, Reach 41, and Fade start 0%](https://git.magicbean.dev/attachments/750ca135-0ae7-4f85-a6cd-b4153710862d) UI captures from build 2d9a3a3d.
Owner
@review
BeanBot left a comment

Recommendation: Approve. The new renderer works in the reported Windows AMD gameplay check, but its fallback and live ceiling adjustment still need verification, as do the NVIDIA and Linux paths. The stock fallback and automatic fade recovery also remain incomplete. Nothing blocking is left: what remains is for the author before merging (below). Recommend approval; not approved on the forge.

The change adds an optional actor-centered turf renderer with density, reach and fade controls, while retaining the game's renderer as the default. It adds shader variants and population logic in exchange for more control over turf.

Should fix (2): not blocking, but worth doing before merging.

  • L2 gpu/vk/vk_draw.cpp:12878: A population setup failure skips the pool producer instead of falling back to usable stock turf. When: If the population pipeline cannot be created or a required private buffer allocation or binding fails, turf_populate returns false and the producer dispatch is skipped. Subsequent draws receive no newly produced turf even though the device supports the original shaders. Do: Choose the stock shader and buffer path when population setup cannot be used, including pipeline and allocation failures.
  • L4 gpu/vk/sim_turf_population.h:90: Automatic fade only increases until the player changes settings. When: After a dense location exceeds the workgroup limit, moving to a sparse location leaves the increased fade power in force even when usage is well below the limit. Turf remains thinner for the rest of the session despite available capacity. Do: Reduce the fade gradually after sustained headroom, with hysteresis to avoid oscillation.

Testing before merging (1) (runs on the systems it can change; it doesn't hold the recommendation)

  • L5: The remaining rendering paths have not been checked in game on the current head. When: The Windows AMD gameplay run did not exercise the stock fallback or a ceiling-triggering scene, and NVIDIA and Linux gameplay runs are not reported. Do: Check the stock fallback and live ceiling adjustment on the current head, and exercise actor-centered turf and adjustment on NVIDIA and Linux.

@fix can do L2 and L4.

Since the last review (on d9a9b89c8e)
Still open: L2 (A population setup failure skips the pool producer instead of falling back to usable stock…); L4 (Automatic fade only increases until the player changes settings.); L5 (The remaining rendering paths have not been checked in game on the current head.)

Checks: Still running: 10 checks.

Also noticed (2; not asked for, not blocking)
  • The current-head Linux host build and UTF-8 path check and same-view main versus PR screenshots are still listed as pending.
  • CI is still running.
More: does it help, other systems, switches, what was read

Does it help: The feature is shown working on Windows AMD. In two samples of one Hyrule Field view, main measured 131.21 FPS, the PR's Game's mode 131.56 FPS, and Longshot Default 131.01 FPS; both differences were within the observed spread.

Other systems: The Vulkan population, mesh and live-switch paths can affect other GPU drivers and Linux. The current head has a Windows AMD gameplay check; NVIDIA and Linux gameplay checks remain outstanding.

Switches: RX_VK_SIM_TURF_POOLS defaults to enabled availability; setting it to 0 forces stock turf. Fresh profiles select Game's, with Longshot available through the menu.

Reviewed: 88ba875d2c against b6d274d779: Read the repository rules and pull request template, sim_turf_population.h, and the relevant dispatch and fallback code. Skimmed the diff, shader changes, replay changes, commit list and reported runs; the remaining changed files and full code paths were not read in full.; nothing run (a code review).

Checked and fine:

  • The reported Windows AMD measurements compare both renderer modes with the pinned main revision in the same view.
  • The turf actor callback is appended after the existing keyboard callback in the host interface.

Testing: No commands from the project were run. The author reports a current-head Windows AMD gameplay check and a Windows game-free suite comparison against main; the remaining rendering checks are listed in L5.

Overlaps and merge order: The description says this supersedes #2241.


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

**Recommendation: Approve.** The new renderer works in the reported Windows AMD gameplay check, but its fallback and live ceiling adjustment still need verification, as do the NVIDIA and Linux paths. The stock fallback and automatic fade recovery also remain incomplete. Nothing blocking is left: what remains is for the author before merging (below). Recommend approval; not approved on the forge. The change adds an optional actor-centered turf renderer with density, reach and fade controls, while retaining the game's renderer as the default. It adds shader variants and population logic in exchange for more control over turf. **Should fix (2)**: not blocking, but worth doing before merging. - **L2** `gpu/vk/vk_draw.cpp:12878`: A population setup failure skips the pool producer instead of falling back to usable stock turf. *When:* If the population pipeline cannot be created or a required private buffer allocation or binding fails, turf_populate returns false and the producer dispatch is skipped. Subsequent draws receive no newly produced turf even though the device supports the original shaders. **Do:** Choose the stock shader and buffer path when population setup cannot be used, including pipeline and allocation failures. - **L4** `gpu/vk/sim_turf_population.h:90`: Automatic fade only increases until the player changes settings. *When:* After a dense location exceeds the workgroup limit, moving to a sparse location leaves the increased fade power in force even when usage is well below the limit. Turf remains thinner for the rest of the session despite available capacity. **Do:** Reduce the fade gradually after sustained headroom, with hysteresis to avoid oscillation. **Testing before merging (1)** (runs on the systems it can change; it doesn't hold the recommendation) - **L5**: The remaining rendering paths have not been checked in game on the current head. *When:* The Windows AMD gameplay run did not exercise the stock fallback or a ceiling-triggering scene, and NVIDIA and Linux gameplay runs are not reported. **Do:** Check the stock fallback and live ceiling adjustment on the current head, and exercise actor-centered turf and adjustment on NVIDIA and Linux. `@fix` can do L2 and L4. **Since the last review** (on d9a9b89c8ee5) Still open: L2 (A population setup failure skips the pool producer instead of falling back to usable stock…); L4 (Automatic fade only increases until the player changes settings.); L5 (The remaining rendering paths have not been checked in game on the current head.) **Checks:** Still running: 10 checks. <details> <summary>Also noticed (2; not asked for, not blocking)</summary> - The current-head Linux host build and UTF-8 path check and same-view main versus PR screenshots are still listed as pending. - CI is still running. </details> <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** The feature is shown working on Windows AMD. In two samples of one Hyrule Field view, main measured 131.21 FPS, the PR's Game's mode 131.56 FPS, and Longshot Default 131.01 FPS; both differences were within the observed spread. **Other systems:** The Vulkan population, mesh and live-switch paths can affect other GPU drivers and Linux. The current head has a Windows AMD gameplay check; NVIDIA and Linux gameplay checks remain outstanding. **Switches:** RX_VK_SIM_TURF_POOLS defaults to enabled availability; setting it to 0 forces stock turf. Fresh profiles select Game's, with Longshot available through the menu. **Reviewed:** 88ba875d2c3d against b6d274d779da: Read the repository rules and pull request template, sim_turf_population.h, and the relevant dispatch and fallback code. Skimmed the diff, shader changes, replay changes, commit list and reported runs; the remaining changed files and full code paths were not read in full.; nothing run (a code review). **Checked and fine:** - The reported Windows AMD measurements compare both renderer modes with the pinned main revision in the same view. - The turf actor callback is appended after the existing keyboard callback in the host interface. **Testing:** No commands from the project were run. The author reports a current-head Windows AMD gameplay check and a Windows game-free suite comparison against main; the remaining rendering checks are listed in L5. **Overlaps and merge order:** The description says this supersedes #2241. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.</sub>
Owner

Thanks!

Thanks!
HumanBean changed title from WIP: feat(vk): populate simulated turf around Link to feat(vk): populate simulated turf around Link 2026-11-29 18:46:50 +00:00
HumanBean deleted branch feat/actor-centered-turf 2026-11-29 18:47:05 +00:00
Some checks failed
CI / What the change needs (pull_request) Blocked by required conditions
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Blocked by required conditions
CI / Third-party parts and guide screenshots (pull_request) Blocked by required conditions
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Blocked by required conditions
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Blocked by required conditions
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Blocked by required conditions
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Blocked by required conditions
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Blocked by required conditions
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Blocked by required conditions
CI / Website build and checks (pull_request) Blocked by required conditions
PR description / Title and description (pull_request_target) Failing after 6s
Some workflows are waiting to be reviewed.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
4 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!2772
No description provided.