feat(menu): Mesh shaders is a launch switch, not a menu row #2881

Closed
github-sync wants to merge 2 commits from github/pr/2881 into main
Owner

@hckrman101 opened this pull request on GitHub · 2026-11-12 18:22 UTC · original
Merged on GitHub in 8694e3c6bd

What

The Graphics tab no longer has a "Mesh shaders" row (Automatic / Native / Compute). The choice is now a launch switch, RX_VK_MESH_SHADERS, set in hookshot_env.txt or the environment:

  • RX_VK_MESH_SHADERS=native: the GPU's own mesh shaders for every draw (a GPU without them still uses the compute path).
  • RX_VK_MESH_SHADERS=compute: the compute path on every GPU.
  • Unset, or any other value: Automatic, exactly as before (including Compute on Linux AMD, #2245, and the Navi 21/22 task + mesh default on Windows).

RX_VK_FORCE_MESH_FALLBACK=1 still forces Compute over it, as it did over the row. The log line is now vk: mesh shaders: <mode>, from <where>: <path>, so a log shows whether the choice came from the default or a switch.

Why

Changing the row made the next start translate every shader again and drop the pipeline caches: several minutes of work. On Compute, a card that has mesh shaders also gets the slower fallback path with pop-in. A player has no reason to change it; it is a troubleshooting and developer switch.

What changes for players

  • The row is gone from the menu (and its translations).
  • A mesh_shaders= line in an existing hookshot_options.ini no longer changes anything. If it says Native or Compute, the log names it once and points to RX_VK_MESH_SHADERS. The menu's next save removes the line; the game no longer writes it.
  • A player who had set Native or Compute is back on Automatic. If that changes their GPU's mesh path (for example Compute on an NVIDIA card), their shaders are translated again once on the next start. Players who never touched the row see no change.
  • Setting RX_VK_MESH_SHADERS also changes the program cache's stamp, because the stamp already includes every RX_VK_MESH* switch's text. So setting or clearing it translates the shaders again once, even when the resulting path is the same.

Docs

  • readme: the row is removed from the option table, and the Mesh shaders note now describes the switch.
  • docs/development.md: RX_VK_MESH_SHADERS has a line next to RX_VK_TASK_MESH_FALLBACK.

Tests

  • New tests/test_mesh_mode_switch.py. It compiles and runs the rule: the switch chooses, any other value is Automatic, RX_VK_FORCE_MESH_FALLBACK wins, and an old ini line chooses nothing. It also checks the source: the device reads the switch, nothing from the ini line reaches the choice, the Linux AMD rule is kept, the menu has no row or ini key for it, and save() drops the old line.
  • Updated: test_menu_sections, test_menu_i18n, test_audio_output_menu, test_stick_dead_zone.
  • The tests that read the changed files pass. The one exception is test_readme_menu_rows, which already fails on main because "Skip opening" (#2827) has no readme line. It fails the same way with this change and has no new failure.
  • The Vulkan renderer builds.

Not tested

No game was run. The log lines, an options file with an old mesh_shaders= line, and the switch on a real GPU have not been tried in-game.

> [@hckrman101](https://github.com/hckrman101) opened this pull request on GitHub · 2026-11-12 18:22 UTC · [original](https://github.com/NotRexed/Hookshot/pull/2881) > **Merged on GitHub** in https://git.magicbean.dev/MagicBeanDev/Hookshot/commit/8694e3c6bdbef9ea44f37e07a1ffcadbc449f0cf ## What The Graphics tab no longer has a "Mesh shaders" row (Automatic / Native / Compute). The choice is now a launch switch, `RX_VK_MESH_SHADERS`, set in `hookshot_env.txt` or the environment: - `RX_VK_MESH_SHADERS=native`: the GPU's own mesh shaders for every draw (a GPU without them still uses the compute path). - `RX_VK_MESH_SHADERS=compute`: the compute path on every GPU. - Unset, or any other value: Automatic, exactly as before (including Compute on Linux AMD, #2245, and the Navi 21/22 task + mesh default on Windows). `RX_VK_FORCE_MESH_FALLBACK=1` still forces Compute over it, as it did over the row. The log line is now `vk: mesh shaders: <mode>, from <where>: <path>`, so a log shows whether the choice came from the default or a switch. ## Why Changing the row made the next start translate every shader again and drop the pipeline caches: several minutes of work. On Compute, a card that has mesh shaders also gets the slower fallback path with pop-in. A player has no reason to change it; it is a troubleshooting and developer switch. ## What changes for players - The row is gone from the menu (and its translations). - A `mesh_shaders=` line in an existing `hookshot_options.ini` no longer changes anything. If it says Native or Compute, the log names it once and points to `RX_VK_MESH_SHADERS`. The menu's next save removes the line; the game no longer writes it. - A player who had set Native or Compute is back on Automatic. If that changes their GPU's mesh path (for example Compute on an NVIDIA card), their shaders are translated again once on the next start. Players who never touched the row see no change. - Setting `RX_VK_MESH_SHADERS` also changes the program cache's stamp, because the stamp already includes every `RX_VK_MESH*` switch's text. So setting or clearing it translates the shaders again once, even when the resulting path is the same. ## Docs - readme: the row is removed from the option table, and the Mesh shaders note now describes the switch. - docs/development.md: `RX_VK_MESH_SHADERS` has a line next to `RX_VK_TASK_MESH_FALLBACK`. ## Tests - New `tests/test_mesh_mode_switch.py`. It compiles and runs the rule: the switch chooses, any other value is Automatic, `RX_VK_FORCE_MESH_FALLBACK` wins, and an old ini line chooses nothing. It also checks the source: the device reads the switch, nothing from the ini line reaches the choice, the Linux AMD rule is kept, the menu has no row or ini key for it, and save() drops the old line. - Updated: test_menu_sections, test_menu_i18n, test_audio_output_menu, test_stick_dead_zone. - The tests that read the changed files pass. The one exception is test_readme_menu_rows, which already fails on main because "Skip opening" (#2827) has no readme line. It fails the same way with this change and has no new failure. - The Vulkan renderer builds. ## Not tested No game was run. The log lines, an options file with an old `mesh_shaders=` line, and the switch on a real GPU have not been tried in-game. <!-- github-sync:item:2881 -->
The Graphics tab's Mesh shaders row (Automatic, Native, Compute) is gone.
Changing it made the next start translate every shader again and drop the
pipeline caches, and Compute on a card with mesh shaders took the slower
fallback with pop-in: a troubleshooting switch, not a player's setting.

RX_VK_MESH_SHADERS=native or compute (hookshot_env.txt or the environment)
now chooses; unset or any other value is Automatic, unchanged (Compute on
Linux AMD, the Navi 21/22 task + mesh default on Windows).
RX_VK_FORCE_MESH_FALLBACK=1 stays Compute over it. The log line says the
mode and where it came from (vk: mesh shaders: <mode>, from <where>: ...).
The rule is gpu/vk/mesh_mode.h, checked by tests/test_mesh_mode_switch.py.

For players: a mesh_shaders= line in hookshot_options.ini no longer chooses
anything. With Native or Compute in it the log names it once and points to
the switch; the menu's next save drops the line, and the game no longer
writes it. A player who had Native or Compute set is back on Automatic,
which translates their shaders again once on the next start where that
changes their GPU's mesh path. Setting the switch also changes the program
cache stamp (every RX_VK_MESH* switch's text is in it), so setting or
clearing it translates again once.

The row's translations are removed from menu_i18n.h; readme's option table
and note and docs/development.md are updated.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Fable 5.2 <[email protected]>
github-sync closed this pull request 2026-11-12 19:03:19 +00:00
Commenting is not possible because the repository is archived.
No description provided.