WIP: refactor(vk): 18 more kill switches and their older paths are deleted from the smaller renderer files #1325

Closed
HumanBean wants to merge 2 commits from HumanBean/Longshot:refactor/kill-switches-2 into main
Owner

Type: refactor · Risk: medium · Tested on: Linux, RTX 3090 · Needs: Windows (AMD or Intel); a card with 8 GB or less

Why

Track F of the renderer rework plan: the kill switches cut down to the ones that decide something. This is the second batch, the smaller renderer files, after the four large ones. Stacked on #1309: its commit is this branch's parent, so review the last commit only. See #1300 (the table).

What changed

18 more kill switches are gone with the older paths they selected. A run that sets none of them does what it did before; a run that still sets one is told at the start what became of it.

  • Removed: RX_VK_ALLOWED_AT_COUNT, B2T_CPU, BLOCK_BUFFERS, DLSS_ACTORS, DLSS_HDR, DLSS_IDLE_RELEASE, FALLBACK_LOADED, FSR4_UNROLL, IMAGES_VRAM_ONLY, JOB_STEAL, MODULE_IDS, NO_IMAGE_POOL, NO_MESH_WARNING, NO_READBACK_WAIT, PRESENT_AHEAD, REFLEX_SUBMIT_IDS, STARTUP_SCREEN, TARGET_BLOCKS (all RX_VK_), from 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, vk_progcache.cpp, fallback_loaded.h and four call sites in the large files.
  • gpu/vk/switches.def: each is a GONE row dated 2026-11-16; 460 renderer switches are left.
  • 18 kill switches in these files are kept: a tool or the README names them, the shader cache's stamp holds them, or they are a way out that measurement runs or a driver still need. Four removals were put back at review (RX_VK_AUTO_PRESET, RX_VK_AUTO_TUNE, RX_VK_SPARSE, RX_VK_DLSS_ACTOR_LIVE).
  • Tests: 12 files lose the cases about a deleted switch and keep their checks of the default. Docs: docs/development.md loses 5 rows and 7 clauses.

Made as #1309 was: an agent made the deletions, a second read every hunk against the old text. It found no change of behaviour and one fixture that would no longer compile, fixed.

One thing a player could notice: RX_VK_NO_MESH_WARNING only hid a message box. On Windows, a GPU without mesh shaders run with RX_VK_NO_MESH_FALLBACK set now always shows it.

Measurements

Verdict: nothing to measure against: no path a default run takes changed. One session ran as a check that it draws and holds its frame rate; its numbers are inside the spread of main's sessions in #1309.

Hardware: CachyOS (kernel 7.3.3), RTX 3090 24 GB, NVIDIA 620.70, Ryzen 9 7900X, 32 GB
Scene: Kokiri Forest, Hyrule Field, the Market; 2560x1440, no upscaler, HOS_FPS_MAX=1000; one session, standing then turning in each.

rw-f34:  kok still draws 2654 GPU 11.30 ms fps 66.3 | hyr still draws 1192 GPU 8.60 ms fps 93.8 | mkt still draws 2562 GPU 9.15 ms fps 65.1
         kok turn  draws 1833 GPU 10.40 ms fps 73.0 | hyr turn  draws  878 GPU 7.80 ms fps 99.8 | mkt turn  draws 1168 GPU 7.00 ms fps 83.9

Flags and settings

18 switches removed, none added or changed.

Testing

Tested: Linux, RTX 3090 (NVIDIA 620.70): built as a dev pack over base 8e9cfc3a; one session through the three areas. Every scene drew with main's draw counts and GPU times, the run ended on its own, and the log has no error line. Set on purpose, RX_VK_JOB_STEAL=0 was answered at the start with its GONE line.

Not tested:

  • tests/run_all.py was not run on this PC. 12 test files were edited by reading alone.
  • Windows, AMD, Intel, an integrated GPU, a small card. vk_vma.cpp's five removals decide where images are allocated under VRAM pressure, which this PC never reaches.
  • DLSS, FSR 4, Reflex and frame generation, whose files lost a switch each: the session ran with none of them.

Must be tested:

  • Windows AMD or Intel: a start and the three areas, expecting main's picture (Test Farm: @Beanstalk windows amd and windows intel: main against this PR, Kokiri Forest, Hyrule Field, the Market)
  • An RTX card with DLSS and frame generation on, and an AMD card with FSR 4: a few minutes of play, expecting main's picture.
  • A card with 8 GB or less: two laps of scripts/memtour.py.

Risks

What could break: a deletion that kept the wrong side changes behaviour for everyone on that path; the ones this PC does not run are the upscalers and low VRAM.

Turning it off: revert the commit.

Compatibility: a run that sets a removed switch gets the default and a log line. No cache is rebuilt, MKWVK_API_VERSION stays.

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:** refactor · **Risk:** medium · **Tested on:** Linux, RTX 3090 · **Needs:** Windows (AMD or Intel); a card with 8 GB or less ## Why Track F of the [renderer rework plan](https://git.magicbean.dev/MagicBeanDev/Longshot/wiki/Renderer-rework-plan): the kill switches cut down to the ones that decide something. This is the second batch, the smaller renderer files, after the four large ones. Stacked on #1309: its commit is this branch's parent, so review the last commit only. See #1300 (the table). ## What changed 18 more kill switches are gone with the older paths they selected. A run that sets none of them does what it did before; a run that still sets one is told at the start what became of it. - Removed: `RX_VK_ALLOWED_AT_COUNT`, `B2T_CPU`, `BLOCK_BUFFERS`, `DLSS_ACTORS`, `DLSS_HDR`, `DLSS_IDLE_RELEASE`, `FALLBACK_LOADED`, `FSR4_UNROLL`, `IMAGES_VRAM_ONLY`, `JOB_STEAL`, `MODULE_IDS`, `NO_IMAGE_POOL`, `NO_MESH_WARNING`, `NO_READBACK_WAIT`, `PRESENT_AHEAD`, `REFLEX_SUBMIT_IDS`, `STARTUP_SCREEN`, `TARGET_BLOCKS` (all `RX_VK_`), from `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`, `vk_progcache.cpp`, `fallback_loaded.h` and four call sites in the large files. - `gpu/vk/switches.def`: each is a `GONE` row dated 2026-11-16; 460 renderer switches are left. - 18 kill switches in these files are kept: a tool or the README names them, the shader cache's stamp holds them, or they are a way out that measurement runs or a driver still need. Four removals were put back at review (`RX_VK_AUTO_PRESET`, `RX_VK_AUTO_TUNE`, `RX_VK_SPARSE`, `RX_VK_DLSS_ACTOR_LIVE`). - Tests: 12 files lose the cases about a deleted switch and keep their checks of the default. Docs: `docs/development.md` loses 5 rows and 7 clauses. Made as #1309 was: an agent made the deletions, a second read every hunk against the old text. It found no change of behaviour and one fixture that would no longer compile, fixed. One thing a player could notice: `RX_VK_NO_MESH_WARNING` only hid a message box. On Windows, a GPU without mesh shaders run with `RX_VK_NO_MESH_FALLBACK` set now always shows it. ## Measurements **Verdict:** nothing to measure against: no path a default run takes changed. One session ran as a check that it draws and holds its frame rate; its numbers are inside the spread of main's sessions in #1309. Hardware: CachyOS (kernel 7.3.3), RTX 3090 24 GB, NVIDIA 620.70, Ryzen 9 7900X, 32 GB Scene: Kokiri Forest, Hyrule Field, the Market; 2560x1440, no upscaler, `HOS_FPS_MAX=1000`; one session, standing then turning in each. ``` rw-f34: kok still draws 2654 GPU 11.30 ms fps 66.3 | hyr still draws 1192 GPU 8.60 ms fps 93.8 | mkt still draws 2562 GPU 9.15 ms fps 65.1 kok turn draws 1833 GPU 10.40 ms fps 73.0 | hyr turn draws 878 GPU 7.80 ms fps 99.8 | mkt turn draws 1168 GPU 7.00 ms fps 83.9 ``` ### Flags and settings 18 switches removed, none added or changed. ## Testing **Tested:** Linux, RTX 3090 (NVIDIA 620.70): built as a dev pack over base 8e9cfc3a; one session through the three areas. Every scene drew with main's draw counts and GPU times, the run ended on its own, and the log has no error line. Set on purpose, `RX_VK_JOB_STEAL=0` was answered at the start with its `GONE` line. **Not tested:** - `tests/run_all.py` was not run on this PC. 12 test files were edited by reading alone. - Windows, AMD, Intel, an integrated GPU, a small card. `vk_vma.cpp`'s five removals decide where images are allocated under VRAM pressure, which this PC never reaches. - DLSS, FSR 4, Reflex and frame generation, whose files lost a switch each: the session ran with none of them. **Must be tested:** - Windows AMD or Intel: a start and the three areas, expecting main's picture (Test Farm: `@Beanstalk windows amd and windows intel: main against this PR, Kokiri Forest, Hyrule Field, the Market`) - An RTX card with DLSS and frame generation on, and an AMD card with FSR 4: a few minutes of play, expecting main's picture. - A card with 8 GB or less: two laps of `scripts/memtour.py`. ## Risks **What could break:** a deletion that kept the wrong side changes behaviour for everyone on that path; the ones this PC does not run are the upscalers and low VRAM. **Turning it off:** revert the commit. **Compatibility:** a run that sets a removed switch gets the default and a log line. No cache is rebuilt, `MKWVK_API_VERSION` stays. ## 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
Author
Owner

Tested in game: Linux, RTX 3090, NVIDIA 620.70: one session through Kokiri Forest, Hyrule Field and the Market at 2560x1440; every scene drew with main's draw counts and GPU times, no error line, and RX_VK_JOB_STEAL=0 got its removed-switch line.

Tested in game: Linux, RTX 3090, NVIDIA 620.70: one session through Kokiri Forest, Hyrule Field and the Market at 2560x1440; every scene drew with main's draw counts and GPU times, no error line, and RX_VK_JOB_STEAL=0 got its removed-switch line.
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:07 +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 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

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!1325
No description provided.