WIP: feat(host): the host's switches join the table: every HOS_ and LONGSHOT_ name the game reads has a row #1326

Closed
HumanBean wants to merge 3 commits from HumanBean/Longshot:feat/host-switch-table into main
Owner

Type: feat · Risk: low · Tested on: Linux, RTX 3090 · Needs: a Windows build

Why

#1300 gave every renderer switch a row, so a log shows what a run set and a misspelt name is said. The host reads 216 more names (HOS_, LONGSHOT_) with the same problem: a bug report's log does not say which were set, and a typo does nothing silently. Track F of the renderer rework plan. Stacked on #1309 and the second kill-switch batch: review the last commit only.

What changed

  • gpu/vk/switches.def gains the host's 216 switches, each read once from its code: 90 diagnostics, 50 that turn something off, 24 player settings, 24 numbers, 20 that turn on something nobody ships, 8 that follow the PC.
  • gpu/vk/switches.h: the start's vk: switches set line now names host switches too, and a HOS_ name that is no switch gets its line. A LONGSHOT_ name that is no switch is passed over, because the launcher and the Builder set names of their own.
  • host/hos_main.c: the three removed HOS_ names (HOS_FIX_RES, HOS_RECORD_STUTTERS, HOS_SCENE_NATIVE) become GONE rows; its own list keeps only TOTK_MINIMAL_LAYOUT.
  • tests/test_switch_table.py scans for all three families. docs/development.md and AGENTS.md say a new HOS_ or LONGSHOT_ read needs a row.

No switch's behaviour changes.

Measurements

Nothing to measure: one more log line at the start.

Testing

Tested: Linux, RTX 3090 (NVIDIA 620.70): built as a dev pack; one session through Kokiri Forest, Hyrule Field and the Market with a made-up name and a removed one set. The log said:

vk: HOS_NOT_A_SWITCH is set, and is not a switch of this build: a misspelt name, or one from another build
vk: HOS_FIX_RES is set, and is no longer a switch (since 2026-11-11): it does nothing
vk: switches set (11): HOS_NO_SDL=1 (kill), HOS_INPUT_EXCLUSIVE=1 (diag), HOS_INPUT_LIVE=<a path> (diag), HOS_FULLSCREEN=1 (player), HOS_AUDIO=0 (kill), HOS_DISCORD=0 (kill), RX_VK_FRAME_LOG=<a path> (diag), HOS_FPS_MAX=1000 (player), HOS_FPS_LOG=1 (diag), RX_VK_AUTO_PRESET=0 (kill), HOS_WINDOW_SIZE=2560x1440 (tune)

Not tested:

  • tests/run_all.py was not run on this PC; tests/test_switch_table.py has not run with the host's rows.
  • Windows. Names read only inside _WIN32 blocks were found by the same text scan, but nothing was compiled there.
  • The rows' wording: each kind and default came from one reading of the code, with no second reader as the renderer's rows had.

Must be tested:

  • A Windows start from the launcher, reading the log's switches set line: the launcher's own HOS_ settings should appear as switches, and none as "not a switch of this build". If one does, the table lacks a row.

Risks

What could break: a wrong row misdescribes a switch in the log; a missing row calls a real switch a stranger. Neither changes what the game does.

Turning it off: revert the commit.

Compatibility: none: no cache, no interface, no setting changes.

Issues

See #1300

Checklist

Everyone

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

When it applies

  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.
  • Numbers from the same PC, scene and settings, at least 2 interleaved runs each, the median reported.
  • Switches documented (docs/development.md; the README for a menu row) and shipped at their recommended value.
  • A check under tests/ that reads changed source updated in this PR, not weakened.
  • Host code builds on both Windows (llvm-mingw) and Linux, with UTF-8 paths. Built on Linux only here.
  • Docs updated.

🤖 Generated with Claude Code

https://claude.ai/code/session_017vw8dzCsAL3UdW7ft8ptL9

**Type:** feat · **Risk:** low · **Tested on:** Linux, RTX 3090 · **Needs:** a Windows build ## Why #1300 gave every renderer switch a row, so a log shows what a run set and a misspelt name is said. The host reads 216 more names (`HOS_`, `LONGSHOT_`) with the same problem: a bug report's log does not say which were set, and a typo does nothing silently. Track F of the [renderer rework plan](https://git.magicbean.dev/MagicBeanDev/Longshot/wiki/Renderer-rework-plan). Stacked on #1309 and the second kill-switch batch: review the last commit only. ## What changed - `gpu/vk/switches.def` gains the host's 216 switches, each read once from its code: 90 diagnostics, 50 that turn something off, 24 player settings, 24 numbers, 20 that turn on something nobody ships, 8 that follow the PC. - `gpu/vk/switches.h`: the start's `vk: switches set` line now names host switches too, and a `HOS_` name that is no switch gets its line. A `LONGSHOT_` name that is no switch is passed over, because the launcher and the Builder set names of their own. - `host/hos_main.c`: the three removed `HOS_` names (`HOS_FIX_RES`, `HOS_RECORD_STUTTERS`, `HOS_SCENE_NATIVE`) become `GONE` rows; its own list keeps only `TOTK_MINIMAL_LAYOUT`. - `tests/test_switch_table.py` scans for all three families. `docs/development.md` and `AGENTS.md` say a new `HOS_` or `LONGSHOT_` read needs a row. No switch's behaviour changes. ## Measurements Nothing to measure: one more log line at the start. ## Testing **Tested:** Linux, RTX 3090 (NVIDIA 620.70): built as a dev pack; one session through Kokiri Forest, Hyrule Field and the Market with a made-up name and a removed one set. The log said: ``` vk: HOS_NOT_A_SWITCH is set, and is not a switch of this build: a misspelt name, or one from another build vk: HOS_FIX_RES is set, and is no longer a switch (since 2026-11-11): it does nothing vk: switches set (11): HOS_NO_SDL=1 (kill), HOS_INPUT_EXCLUSIVE=1 (diag), HOS_INPUT_LIVE=<a path> (diag), HOS_FULLSCREEN=1 (player), HOS_AUDIO=0 (kill), HOS_DISCORD=0 (kill), RX_VK_FRAME_LOG=<a path> (diag), HOS_FPS_MAX=1000 (player), HOS_FPS_LOG=1 (diag), RX_VK_AUTO_PRESET=0 (kill), HOS_WINDOW_SIZE=2560x1440 (tune) ``` **Not tested:** - `tests/run_all.py` was not run on this PC; `tests/test_switch_table.py` has not run with the host's rows. - Windows. Names read only inside `_WIN32` blocks were found by the same text scan, but nothing was compiled there. - The rows' wording: each kind and default came from one reading of the code, with no second reader as the renderer's rows had. **Must be tested:** - A Windows start from the launcher, reading the log's `switches set` line: the launcher's own `HOS_` settings should appear as switches, and none as "not a switch of this build". If one does, the table lacks a row. ## Risks **What could break:** a wrong row misdescribes a switch in the log; a missing row calls a real switch a stranger. Neither changes what the game does. **Turning it off:** revert the commit. **Compatibility:** none: no cache, no interface, no setting changes. ## Issues See #1300 ## Checklist ### Everyone - [x] One topic. - [x] The title is a Conventional Commit (`type(scope): description`) of the status line's type. - [x] Why gives the reason plainly and links the issues that fit (the tracker searched). - [x] Measurements has a verdict, or one line saying why there is nothing to measure. - [x] Testing names what was tested, what wasn't, and what must still be tested, where and how. - [x] Rebased on current `main`. - [ ] `python -I -B tests/run_all.py` passes (any failure that also fails on `main` is named). Not run on this PC; left to the forge's checks. - [x] No game files, dumps, build output or generated files. - [x] `third_party/` untouched (a new folder with a `PROVENANCE.md` instead). - [x] The license is OK: GPL-3.0-or-later, nothing incompatible and nothing decompiled. ### When it applies - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. - [x] Numbers from the same PC, scene and settings, at least 2 interleaved runs each, the median reported. - [x] Switches documented (docs/development.md; the README for a menu row) and shipped at their recommended value. - [x] A check under `tests/` that reads changed source updated in this PR, not weakened. - [ ] Host code builds on both Windows (llvm-mingw) and Linux, with UTF-8 paths. Built on Linux only here. - [x] Docs updated. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_017vw8dzCsAL3UdW7ft8ptL9
refactor(vk): 93 kill switches and the older paths they kept are deleted from the four large renderer files
All checks were successful
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
Website / Website on Cloudflare (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 7s
Guide screenshots / Guide images and local UI source review (pull_request) Successful in 11s
Third-party parts / As their notes say (pull_request) Successful in 14s
CI / Workflow lint (actionlint) (pull_request) Successful in 19s
PR description / Description follows the template (pull_request_target) Successful in 5s
Website / Website on Cloudflare (pull_request_target) Has been skipped
b9805ef295
The renderer rework plan's track F. A kill switch turned off, or back to an older way, something that is on for
every PC; nobody ships with one set, and each kept an old path alive. vk_draw.cpp 32, vk_texture.cpp 21,
vk_replay.cpp 20, vk_memory.cpp 20: the read and the path are gone, the default is the only behaviour, and each name
is a GONE row of gpu/vk/switches.def, so a run that still sets one is told. 26 are kept, each for a reason (a value
set by a tool or named in the README, a default that follows the PC, a young fix's way out).

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dzCsAL3UdW7ft8ptL9
refactor(vk): 18 more kill switches and their older paths are deleted from the smaller renderer files
Some checks failed
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
Website / Website on Cloudflare (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 8s
PR description / Description follows the template (pull_request_target) Successful in 13s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 14s
CI / Workflow lint (actionlint) (pull_request) Successful in 20s
Website / Website on Cloudflare (pull_request_target) Has been skipped
Third-party parts / As their notes say (pull_request) Successful in 23s
5742f65ca1
The renderer rework plan's track F, after the four large files (#1309). vk_vma.cpp, vk_main.cpp, vk_temporal.cpp,
vk_xfer.cpp, vk_dlss.cpp, vk_fsr4.cpp, vk_jobs.cpp, vk_reflex.cpp, vk_framegen.cpp, vk_programs.cpp and vk_progcache.cpp
lose the read and the path; each name is a GONE row of gpu/vk/switches.def. 18 are kept: the README or a script
names them, the shader cache's stamp holds them, or they are a way out that measurement runs or a driver still need.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dzCsAL3UdW7ft8ptL9
feat(host): the host's switches join the table: every HOS_ and LONGSHOT_ name the game reads has a row
Some checks failed
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
Website / Website on Cloudflare (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 13s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 15s
CI / Workflow lint (actionlint) (pull_request) Successful in 17s
Third-party parts / As their notes say (pull_request) Successful in 17s
Website / Website on Cloudflare (pull_request_target) Has been skipped
PR description / Description follows the template (pull_request_target) Successful in 5s
2e0743237d
The renderer rework plan's track F. gpu/vk/switches.def gains the host's 216 switches (89 diagnostics, 50 that turn
something off, 23 player settings, 24 numbers, 20 that turn on something nobody ships, 8 that follow the PC), read
once each from the code. The start's report names them when set and says a HOS_ name that is none; a LONGSHOT_ name
that is none is passed over (the launcher and the Builder have their own). The host's three removed HOS_ names become
GONE rows.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8dzCsAL3UdW7ft8ptL9
Author
Owner

Tested in game: Linux, RTX 3090, NVIDIA 620.70: one session through Kokiri Forest, Hyrule Field and the Market; the start's log named the 11 switches set with their kinds, called HOS_NOT_A_SWITCH a stranger and HOS_FIX_RES removed.

Tested in game: Linux, RTX 3090, NVIDIA 620.70: one session through Kokiri Forest, Hyrule Field and the Market; the start's log named the 11 switches set with their kinds, called HOS_NOT_A_SWITCH a stranger and HOS_FIX_RES removed.
Author
Owner

Folded into #1309, which now carries this commit with the others of the same topic. Closing this one.

Folded into [#1309](https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/1309), which now carries this commit with the others of the same topic. Closing this one.
Author
Owner

Closed: its commit is in #1309 now.

Closed: its commit is in #1309 now.
HumanBean closed this pull request 2026-11-17 04:30:09 +00:00
Some checks failed
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
Website / Website on Cloudflare (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 13s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 15s
CI / Workflow lint (actionlint) (pull_request) Successful in 17s
Third-party parts / As their notes say (pull_request) Successful in 17s
Website / Website on Cloudflare (pull_request_target) Has been skipped
PR description / Description follows the template (pull_request_target) Successful in 5s

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/Longshot!1326
No description provided.