fix(vk): the switch table has a row for each switch the source reads again, and a removed switch is no longer read #1527

Open
mooki wants to merge 2 commits from mooki/Longshot:fix/switch-table-rows into main
Member

Type: fix · Risk: low · Tested on: Linux, RTX 4090, NVIDIA 615.78.08 (in the game to the title, windowless; game-free checks; a Windows cross-build, never run) · Needs: none

TL;DR

The check that keeps the switch table and the source in step has failed on main since #1150 merged, and two more pull requests have added to it: eight names disagree. Seven switches are read but have no row in the table, and one removed switch is still read. This PR adds the seven rows and stops reading the removed one, so a run that sets it gets what the table already says. The check fails on main and passes here, and the suite gives main's failures and no others. I started the game to the title with the removed switch set: the start says it is gone and nothing else changes.

Breakdown

  • Who it helps: everyone who changes a switch or runs the checks: the table is the list of switches a start's log reports, and a check that is red on main hides the next real failure.
  • What was wrong: three pull requests opened before the table existed were merged after it, each reading a switch with no row, and one of them kept reading a switch the table had made a removed one.
  • What changes: the table gets rows for the seven switches, and the fast path for an invalidate no longer asks for the removed switch.
  • What does not change: every default, every switch's behaviour, the saves, the options file and the renderer's interface; a run that sets no switch does what it did.
  • How it was checked: the switch table check goes from 8 failing lines on main to ok, the invalidate check from a failure to passing, the whole suite fails the same names as main, three windowless starts in the game to the title (defaults; the removed switch set with and without the fast path's own switch) logged what the table says, and a Windows cross-build links with 0 warnings.
  • What is still open: nothing blocking; no Windows PC has run it (the cross-build only links).
  • Risk: low: seven table rows that nothing reads at run time but the start's report, and one removed condition for a switch no run sets.

Why

python -I -B tests/test_switch_table.py holds the table (gpu/vk/switches.def) and the source to each other: every RX_, HOS_ and LONGSHOT_ name the source reads has a row, and a removed name is read nowhere. On main @ a35130c0 it fails with eight lines. It passed on the commit before #1150 (0680a4062) and fails at #1150 (e332a5243), at #280 (6d949cf95) and at #1235 (e9478ed60), checked at each: #1150 added two of the lines, #280 five more and #1235 one.

All three pull requests were opened before the table existed (#1300, merged 2026-11-17 01:36) and merged after it. #1150's last rebase (onto main 6438c2ef) was not built or run, as its thread says, which is how a read of a switch #1309 had removed got through. The suite fails many names on every PC (34 on main here), so a new one is easy to read as one of main's own: #280's thread says "fails the same 43 tests as that main on this PC".

tests/test_invalidate_quick.py was failing for the same reason: it reads invalidate in gpu/vk/vk_replay.cpp and expects a condition #1309 deleted together with the switch.

The issue tracker was searched for the table, its check and each of the eight names (open and closed): nothing is open about this. Twelve open pull requests change gpu/vk/switches.def for their own switches; none of them adds, removes or changes one of these eight names, or tests/test_invalidate_quick.py.

How to reproduce

Seen on: Linux, RTX 4090 (the check needs no GPU); g++ 16.2.1, Python 3.12.16
Settings and switches: defaults
Steps: at main @ a35130c0, run python -I -B tests/test_switch_table.py, then python -I -B tests/test_invalidate_quick.py
Expected: ok: ... switches ... from the first, PASS: invalidate_quick's sources ... from the second
Actual: the first prints FAIL: the switch table and the source disagree: and eight lines; the second stops with ValueError: substring not found at its line 55

What changed

The table gets a row for each of the seven switches, and the one switch the table calls removed is no longer read. Two commits, each of which stands alone.

  • vk: invalidate_quick in gpu/vk/vk_replay.cpp no longer reads RX_VK_INVALIDATE_WAIT (its condition and its two lines of log and comment). That switch made invalidate catch the replay up for every range; #1309 deleted that read and made the name a GONE row ("it does nothing"), and #1150's fast path kept declining for it. Nothing in invalidate depends on the name now, so the fast path has no reason to.
  • tests: tests/test_invalidate_quick.py drops its quick-wait case and the switch from its list, and reads invalidate's texture branch as it is now (its tex_pages_any return, without the always #1309 removed). Every other assertion and case stays.
  • table: gpu/vk/switches.def gets RX_VK_INVALIDATE_QUICK (kill), HOS_VSYNC_YIELD (kill), HOS_SWITCH2 (kill, Windows), HOS_NFP_SEARCH, HOS_NFP_TRACE and HOS_SWITCH2_RUMBLE_TEST (diag) and LONGSHOT_NFC_DIR (player), each sorted in its place with what the game does unset and what setting it does, taken from the code and from the rows docs/development.md already has.

Measurements

Nothing to measure: a run that sets no switch does what it did, and the one removed condition reads a switch the table says does nothing.

Flags and settings

This PR adds table rows for seven switches that already exist and stops reading one that was removed; no switch changes its default.

Flag What it is Before this PR After this PR Effect Helps / doesn't help / untested Recommendation
RX_VK_INVALIDATE_QUICK An invalidate with nothing in its range to wait for keeps the calling thread's virtual core read, no row row: kill, bool; on by default None: =0 still gives the core up at every invalidate Helps: A/B and diagnosis. In the game: the start lists RX_VK_INVALIDATE_QUICK=0 (kill) and the invalidates line says off On for everyone, as shipped
RX_VK_INVALIDATE_WAIT A removed switch (GONE row) still read by the fast path: set, the fast path was declined read nowhere, as its row says A run that sets it now takes the fast path like any other In the game: the start says it is no longer a switch and the invalidates line says on Do not set
HOS_VSYNC_YIELD The vsync ticker waits by yielding under a millisecond read, no row row: kill, bool; off by default None Helps: nothing (the slower path); untested Off: only if the timer wait misbehaves
HOS_SWITCH2 =0 leaves a Switch 2 Pro Controller over USB to a bridge program (Windows) read, no row row: kill, bool; on by default None Untested here (Windows) On for everyone
HOS_SWITCH2_RUMBLE_TEST A test's: logs the controller's accelerometer at rest and in rumble (Windows) read, no row row: diag, bool; off None Untested here (Windows) Off: only for testing
HOS_NFP_SEARCH A test's: the NFC reader looks for a tag from the start read, no row row: diag, bool; off None Untested here Off: only for testing
HOS_NFP_TRACE Logs the game's NFC application area calls read, no row row: diag, bool; off None Untested here Off: only for debugging
LONGSHOT_NFC_DIR The folder of NFC tag files the Insert menu's NFC tab lists read, no row row: player, string; unset: the user's own folder None Untested here Unset for everyone

Testing

Tested: in the game first, then game-free; Linux (Omarchy, g++ 16.2.1, Python 3.12.16), RTX 4090, NVIDIA 615.78.08, at head 61ddd5322 (on main @ a35130c0).

  • In the game (windowless, in the side lane beside another game, RX_VK_VRAM_MB=9000, a fresh profile; build v3.0.0-rc.7-66-g61ddd5322 (source b5119521), made through the idle queue and the full-build lock over the finished work folder of main 310e7c9d, whose lift inputs and HLE set equal this head's: 106 of 522 units new, 63 s; the driver and pipeline caches copied as they were from another worker's warm copy of that main, whose game was running at that moment; the log shows the program cache loaded: 47867 program keys kept). Three starts of 200 s each, to the title screen (the last picture of each is the title; each ended at its wall, exit 124, with fatal=0 crash=0 devlost=0 kernel=0 nvrm=0, and 0 kernel driver lines (kmemsysDoCacheOp, NVRM: Xid) over the whole window, 19:55 to 20:06):
    1. Defaults: vk: switches set (10): HOS_HEADLESS=1 (diag), RX_VK_VRAM_MB=9000 (hw), ... with no line saying a switch is gone or unknown, and vk: invalidates with nothing to wait for keep their virtual core: on.
    2. RX_VK_INVALIDATE_QUICK=0 RX_VK_INVALIDATE_WAIT=1: vk: RX_VK_INVALIDATE_WAIT is set, and is no longer a switch (since 2026-11-16): it does nothing: the catch-up is only for ranges that may hold a GPU-written texture, then vk: switches set (11): ... RX_VK_INVALIDATE_QUICK=0 (kill) ..., and vk: invalidates with nothing to wait for keep their virtual core: off (RX_VK_INVALIDATE_QUICK=0 or invalidate's logs).
    3. RX_VK_INVALIDATE_WAIT=1 alone (the one run that shows the removed read's effect): the same line for the removed switch, and the invalidates line says on. On main, by its source, this run's line would say off.
      The frame counts in the runs' summaries are not measurements (another game was on the card). The fast path's counts line (vk: invalidates since the last readbacks line) did not appear: it comes after 3000 readbacks, and a start to the title has none.
  • Windows cross-build of this head (llvm-mingw clang 23.1.5, a fresh Windows-target lift, lift identity matched; through the idle queue, the full-build lock and the build slot): the renderer DLL and the game executable link, 66 of 66 host units compiled, 521 units in all (106 new, 415 cached; the 91 lifted units all cached), 0 warnings; gpu/vk/vk_replay.cpp was among the new units, and the 66 host units were all compiled new. Never run on Windows or Wine.
  • python -I -B tests/test_switch_table.py: on main @ a35130c0 it fails with eight lines (RX_VK_INVALIDATE_QUICK and the other six read with no row, RX_VK_INVALIDATE_WAIT removed and still read); here it prints ok: 691 switches (diag 285, tune 105, kill 108, attempt 81, hw 61, player 51), 139 removed, 699 names read.
  • python -I -B tests/test_invalidate_quick.py: on main it stops with ValueError: substring not found at its line 55; here its eight cases and the source reading all print PASS.
  • python -I -B tests/run_all.py --jobs 6 through the PC's idle queue, this branch against main, both run on main @ a6c8ed57 (the branch was rebased once more onto a35130c0 afterwards, which changed an AppImage script and its check only; the two checks above were run again on it): here 641 passed, 32 failed, 95 skipped; main 639 passed, 34 failed, 95 skipped. The two that fail on main and pass here are test_switch_table and test_invalidate_quick. The 32 that fail on both are not new: test_bug_report_defaults, test_compute_warm_apart, test_cpu_report, test_crt_options, test_damage_debug_menu, test_dev_packs, test_display_startup_failure, test_dlss_feature_size, test_failed_compile_keeps_objects, test_guest_imported, test_hud_layout_row, test_invalidate_vcore, test_libc_hooks, test_linux_preflight, test_linux_pressure, test_linux_update, test_log_open_failure, test_mirror_budget, test_missing_nup, test_mods_size_table, test_pending_guest_import, test_pipeline_play_cache, test_present_thread, test_profiling_mode, test_psychov35_fsr3_fg, test_readback_timeout_source, test_run_all_changed, test_slow_frames, test_target_image_pool, test_upscaler_rows, test_vcore_escape, test_walk_key.

Not tested: Windows runs: the cross-build links, but nothing was started on Windows or Wine, and the two Switch 2 controller rows describe Windows-only code, from reading it. The six host rows (HOS_NFP_SEARCH, HOS_NFP_TRACE, HOS_SWITCH2, HOS_SWITCH2_RUMBLE_TEST, HOS_VSYNC_YIELD, LONGSHOT_NFC_DIR) were not set in any run: only their table text is new. The fast path taken in play, and any speed: not run, and not claimed.

Must be tested:

  • None.

Risks

What could break: a run that sets RX_VK_INVALIDATE_WAIT=1 now keeps the virtual core at an invalidate with nothing to wait for, as a run without it does; its table row already says it does nothing, and it was never a switch to ship. Nothing else reads the table's text at run time except the start's list of what a run has set.

Turning it off: revert the commit; RX_VK_INVALIDATE_QUICK=0 turns the fast path itself off, as before.

Compatibility: Nothing changes: no saves, options file, shader or pipeline cache, vk ABI or builder tool is touched.

Issues

See #1150, #1309, #1300, #280 and #1235.

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).
  • Tested on my own PC where it runs (in the game, for a change the game runs), as Testing's Tested says; what
    can't be run by hand is in Testing's Not testable by hand, with why.
  • Measurements has a verdict, or one line saying why there is nothing to measure.
  • Nothing gets worse that I know of: any cost (speed, latency, memory, a setup that worked before) is measured and
    in Risks.
  • Testing names what was tested, what wasn't, and what must still be tested, where and how.
  • Rebased on current main (main @ a35130c01, where the game run was made; it merges with main @ 4b68c42be without a conflict).
  • python -I -B tests/run_all.py passes (any failure that also fails on main is named).
  • 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.
  • Switches documented (docs/development.md; the README for a menu row) and shipped at their recommended value.
  • Host code builds on both Windows (llvm-mingw) and Linux, with UTF-8 paths. (llvm-mingw clang 23.1.5, a fresh Windows lift of this tree, lift identity matched: the renderer DLL and the executable link, 66 of 66 host units compiled, 521 units (106 new, 415 cached), 0 warnings; never run on Windows. The Linux copy built (0 compile failures) and ran windowless, above. No path code is changed.)
  • A check under tests/ that reads changed source updated in this PR, not weakened.

New on this forge; not opened on GitHub.

**Type:** fix · **Risk:** low · **Tested on:** Linux, RTX 4090, NVIDIA 615.78.08 (in the game to the title, windowless; game-free checks; a Windows cross-build, never run) · **Needs:** none ## TL;DR The check that keeps the switch table and the source in step has failed on main since #1150 merged, and two more pull requests have added to it: eight names disagree. Seven switches are read but have no row in the table, and one removed switch is still read. This PR adds the seven rows and stops reading the removed one, so a run that sets it gets what the table already says. The check fails on main and passes here, and the suite gives main's failures and no others. I started the game to the title with the removed switch set: the start says it is gone and nothing else changes. ## Breakdown - **Who it helps:** everyone who changes a switch or runs the checks: the table is the list of switches a start's log reports, and a check that is red on main hides the next real failure. - **What was wrong:** three pull requests opened before the table existed were merged after it, each reading a switch with no row, and one of them kept reading a switch the table had made a removed one. - **What changes:** the table gets rows for the seven switches, and the fast path for an invalidate no longer asks for the removed switch. - **What does not change:** every default, every switch's behaviour, the saves, the options file and the renderer's interface; a run that sets no switch does what it did. - **How it was checked:** the switch table check goes from 8 failing lines on main to ok, the invalidate check from a failure to passing, the whole suite fails the same names as main, three windowless starts in the game to the title (defaults; the removed switch set with and without the fast path's own switch) logged what the table says, and a Windows cross-build links with 0 warnings. - **What is still open:** nothing blocking; no Windows PC has run it (the cross-build only links). - **Risk:** low: seven table rows that nothing reads at run time but the start's report, and one removed condition for a switch no run sets. ## Why `python -I -B tests/test_switch_table.py` holds the table (`gpu/vk/switches.def`) and the source to each other: every `RX_`, `HOS_` and `LONGSHOT_` name the source reads has a row, and a removed name is read nowhere. On main @ a35130c0 it fails with eight lines. It passed on the commit before #1150 (0680a4062) and fails at #1150 (e332a5243), at #280 (6d949cf95) and at #1235 (e9478ed60), checked at each: #1150 added two of the lines, #280 five more and #1235 one. All three pull requests were opened before the table existed (#1300, merged 2026-11-17 01:36) and merged after it. #1150's last rebase (onto main 6438c2ef) was not built or run, as its thread says, which is how a read of a switch #1309 had removed got through. The suite fails many names on every PC (34 on main here), so a new one is easy to read as one of main's own: #280's thread says "fails the same 43 tests as that main on this PC". `tests/test_invalidate_quick.py` was failing for the same reason: it reads `invalidate` in `gpu/vk/vk_replay.cpp` and expects a condition #1309 deleted together with the switch. The issue tracker was searched for the table, its check and each of the eight names (open and closed): nothing is open about this. Twelve open pull requests change `gpu/vk/switches.def` for their own switches; none of them adds, removes or changes one of these eight names, or `tests/test_invalidate_quick.py`. ## How to reproduce **Seen on:** Linux, RTX 4090 (the check needs no GPU); g++ 16.2.1, Python 3.12.16 **Settings and switches:** defaults **Steps:** at main @ a35130c0, run `python -I -B tests/test_switch_table.py`, then `python -I -B tests/test_invalidate_quick.py` **Expected:** `ok: ... switches ...` from the first, `PASS: invalidate_quick's sources ...` from the second **Actual:** the first prints `FAIL: the switch table and the source disagree:` and eight lines; the second stops with `ValueError: substring not found` at its line 55 ## What changed The table gets a row for each of the seven switches, and the one switch the table calls removed is no longer read. Two commits, each of which stands alone. - vk: `invalidate_quick` in `gpu/vk/vk_replay.cpp` no longer reads `RX_VK_INVALIDATE_WAIT` (its condition and its two lines of log and comment). That switch made `invalidate` catch the replay up for every range; #1309 deleted that read and made the name a `GONE` row ("it does nothing"), and #1150's fast path kept declining for it. Nothing in `invalidate` depends on the name now, so the fast path has no reason to. - tests: `tests/test_invalidate_quick.py` drops its `quick-wait` case and the switch from its list, and reads `invalidate`'s texture branch as it is now (its `tex_pages_any` return, without the `always` #1309 removed). Every other assertion and case stays. - table: `gpu/vk/switches.def` gets `RX_VK_INVALIDATE_QUICK` (kill), `HOS_VSYNC_YIELD` (kill), `HOS_SWITCH2` (kill, Windows), `HOS_NFP_SEARCH`, `HOS_NFP_TRACE` and `HOS_SWITCH2_RUMBLE_TEST` (diag) and `LONGSHOT_NFC_DIR` (player), each sorted in its place with what the game does unset and what setting it does, taken from the code and from the rows `docs/development.md` already has. ## Measurements Nothing to measure: a run that sets no switch does what it did, and the one removed condition reads a switch the table says does nothing. ### Flags and settings This PR adds table rows for seven switches that already exist and stops reading one that was removed; no switch changes its default. | Flag | What it is | Before this PR | After this PR | Effect | Helps / doesn't help / untested | Recommendation | |---|---|---|---|---|---|---| | `RX_VK_INVALIDATE_QUICK` | An invalidate with nothing in its range to wait for keeps the calling thread's virtual core | read, no row | row: kill, bool; on by default | None: `=0` still gives the core up at every invalidate | Helps: A/B and diagnosis. In the game: the start lists `RX_VK_INVALIDATE_QUICK=0 (kill)` and the invalidates line says `off` | On for everyone, as shipped | | `RX_VK_INVALIDATE_WAIT` | A removed switch (`GONE` row) | still read by the fast path: set, the fast path was declined | read nowhere, as its row says | A run that sets it now takes the fast path like any other | In the game: the start says it is no longer a switch and the invalidates line says `on` | Do not set | | `HOS_VSYNC_YIELD` | The vsync ticker waits by yielding under a millisecond | read, no row | row: kill, bool; off by default | None | Helps: nothing (the slower path); untested | Off: only if the timer wait misbehaves | | `HOS_SWITCH2` | `=0` leaves a Switch 2 Pro Controller over USB to a bridge program (Windows) | read, no row | row: kill, bool; on by default | None | Untested here (Windows) | On for everyone | | `HOS_SWITCH2_RUMBLE_TEST` | A test's: logs the controller's accelerometer at rest and in rumble (Windows) | read, no row | row: diag, bool; off | None | Untested here (Windows) | Off: only for testing | | `HOS_NFP_SEARCH` | A test's: the NFC reader looks for a tag from the start | read, no row | row: diag, bool; off | None | Untested here | Off: only for testing | | `HOS_NFP_TRACE` | Logs the game's NFC application area calls | read, no row | row: diag, bool; off | None | Untested here | Off: only for debugging | | `LONGSHOT_NFC_DIR` | The folder of NFC tag files the Insert menu's NFC tab lists | read, no row | row: player, string; unset: the user's own folder | None | Untested here | Unset for everyone | ## Testing **Tested:** in the game first, then game-free; Linux (Omarchy, g++ 16.2.1, Python 3.12.16), RTX 4090, NVIDIA 615.78.08, at head 61ddd5322 (on main @ a35130c0). - In the game (windowless, in the side lane beside another game, `RX_VK_VRAM_MB=9000`, a fresh profile; build `v3.0.0-rc.7-66-g61ddd5322 (source b5119521)`, made through the idle queue and the full-build lock over the finished work folder of main 310e7c9d, whose lift inputs and HLE set equal this head's: 106 of 522 units new, 63 s; the driver and pipeline caches copied as they were from another worker's warm copy of that main, whose game was running at that moment; the log shows the program cache loaded: `47867 program keys kept`). Three starts of 200 s each, to the title screen (the last picture of each is the title; each ended at its wall, exit 124, with `fatal=0 crash=0 devlost=0 kernel=0 nvrm=0`, and 0 kernel driver lines (`kmemsysDoCacheOp`, `NVRM: Xid`) over the whole window, 19:55 to 20:06): 1. Defaults: `vk: switches set (10): HOS_HEADLESS=1 (diag), RX_VK_VRAM_MB=9000 (hw), ...` with no line saying a switch is gone or unknown, and `vk: invalidates with nothing to wait for keep their virtual core: on`. 2. `RX_VK_INVALIDATE_QUICK=0 RX_VK_INVALIDATE_WAIT=1`: `vk: RX_VK_INVALIDATE_WAIT is set, and is no longer a switch (since 2026-11-16): it does nothing: the catch-up is only for ranges that may hold a GPU-written texture`, then `vk: switches set (11): ... RX_VK_INVALIDATE_QUICK=0 (kill) ...`, and `vk: invalidates with nothing to wait for keep their virtual core: off (RX_VK_INVALIDATE_QUICK=0 or invalidate's logs)`. 3. `RX_VK_INVALIDATE_WAIT=1` alone (the one run that shows the removed read's effect): the same line for the removed switch, and the invalidates line says `on`. On main, by its source, this run's line would say `off`. The frame counts in the runs' summaries are not measurements (another game was on the card). The fast path's counts line (`vk: invalidates since the last readbacks line`) did not appear: it comes after 3000 readbacks, and a start to the title has none. - Windows cross-build of this head (llvm-mingw clang 23.1.5, a fresh Windows-target lift, lift identity matched; through the idle queue, the full-build lock and the build slot): the renderer DLL and the game executable link, 66 of 66 host units compiled, 521 units in all (106 new, 415 cached; the 91 lifted units all cached), 0 warnings; `gpu/vk/vk_replay.cpp` was among the new units, and the 66 host units were all compiled new. Never run on Windows or Wine. - `python -I -B tests/test_switch_table.py`: on main @ a35130c0 it fails with eight lines (`RX_VK_INVALIDATE_QUICK` and the other six read with no row, `RX_VK_INVALIDATE_WAIT` removed and still read); here it prints `ok: 691 switches (diag 285, tune 105, kill 108, attempt 81, hw 61, player 51), 139 removed, 699 names read`. - `python -I -B tests/test_invalidate_quick.py`: on main it stops with `ValueError: substring not found` at its line 55; here its eight cases and the source reading all print `PASS`. - `python -I -B tests/run_all.py --jobs 6` through the PC's idle queue, this branch against main, both run on main @ a6c8ed57 (the branch was rebased once more onto a35130c0 afterwards, which changed an AppImage script and its check only; the two checks above were run again on it): here 641 passed, 32 failed, 95 skipped; main 639 passed, 34 failed, 95 skipped. The two that fail on main and pass here are `test_switch_table` and `test_invalidate_quick`. The 32 that fail on both are not new: test_bug_report_defaults, test_compute_warm_apart, test_cpu_report, test_crt_options, test_damage_debug_menu, test_dev_packs, test_display_startup_failure, test_dlss_feature_size, test_failed_compile_keeps_objects, test_guest_imported, test_hud_layout_row, test_invalidate_vcore, test_libc_hooks, test_linux_preflight, test_linux_pressure, test_linux_update, test_log_open_failure, test_mirror_budget, test_missing_nup, test_mods_size_table, test_pending_guest_import, test_pipeline_play_cache, test_present_thread, test_profiling_mode, test_psychov35_fsr3_fg, test_readback_timeout_source, test_run_all_changed, test_slow_frames, test_target_image_pool, test_upscaler_rows, test_vcore_escape, test_walk_key. **Not tested:** Windows runs: the cross-build links, but nothing was started on Windows or Wine, and the two Switch 2 controller rows describe Windows-only code, from reading it. The six host rows (`HOS_NFP_SEARCH`, `HOS_NFP_TRACE`, `HOS_SWITCH2`, `HOS_SWITCH2_RUMBLE_TEST`, `HOS_VSYNC_YIELD`, `LONGSHOT_NFC_DIR`) were not set in any run: only their table text is new. The fast path taken in play, and any speed: not run, and not claimed. **Must be tested:** - None. ## Risks **What could break:** a run that sets `RX_VK_INVALIDATE_WAIT=1` now keeps the virtual core at an invalidate with nothing to wait for, as a run without it does; its table row already says it does nothing, and it was never a switch to ship. Nothing else reads the table's text at run time except the start's list of what a run has set. **Turning it off:** revert the commit; `RX_VK_INVALIDATE_QUICK=0` turns the fast path itself off, as before. **Compatibility:** Nothing changes: no saves, options file, shader or pipeline cache, vk ABI or builder tool is touched. ## Issues See #1150, #1309, #1300, #280 and #1235. ## 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] Tested on my own PC where it runs (in the game, for a change the game runs), as Testing's Tested says; what can't be run by hand is in Testing's Not testable by hand, with why. - [x] Measurements has a verdict, or one line saying why there is nothing to measure. - [x] Nothing gets worse that I know of: any cost (speed, latency, memory, a setup that worked before) is measured and in Risks. - [x] Testing names what was tested, what wasn't, and what must still be tested, where and how. - [x] Rebased on current `main` (main @ a35130c01, where the game run was made; it merges with main @ 4b68c42be without a conflict). - [x] `python -I -B tests/run_all.py` passes (any failure that also fails on `main` is named). - [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] Switches documented (docs/development.md; the README for a menu row) and shipped at their recommended value. - [x] Host code builds on both Windows (llvm-mingw) and Linux, with UTF-8 paths. (llvm-mingw clang 23.1.5, a fresh Windows lift of this tree, lift identity matched: the renderer DLL and the executable link, 66 of 66 host units compiled, 521 units (106 new, 415 cached), 0 warnings; never run on Windows. The Linux copy built (0 compile failures) and ran windowless, above. No path code is changed.) - [x] A check under `tests/` that reads changed source updated in this PR, not weakened. --- New on this forge; not opened on GitHub.
RX_VK_INVALIDATE_WAIT=1 made invalidate catch the replay up for every range, not only
ranges that may hold a texture the GPU wrote. That read was deleted with the kill switches
(#1309, which made it a GONE row); #1150 then added invalidate_quick, written before that
change, which still declined its fast path for it. Nothing in invalidate depends on the
name any more, so the fast path no longer asks for it: a run that sets it gets what the
GONE row already says, nothing.

tests/test_invalidate_quick.py: drop the quick-wait case and the switch from its list, and
read invalidate's texture branch as it is now (its tex_pages_any return has no `always`
before it); the check was failing on main for that.

Assisted-by: Claude Sonnet 5.5
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
fix(vk): the switch table has rows for the seven switches the source reads and it lacks
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
CI / Conventional Commit title (pull_request) Successful in 6s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 9s
CI / Workflow lint (actionlint) (pull_request) Successful in 11s
Third-party parts / As their notes say (pull_request) Successful in 10s
Website / Website on Cloudflare (pull_request_target) Has been skipped
PR description / Description follows the template (pull_request_target) Successful in 4s
61ddd5322f
tests/test_switch_table.py was failing on main: three merged pull requests read a switch
without a row in gpu/vk/switches.def. #1150: RX_VK_INVALIDATE_QUICK (kill: on by default,
=0 gives the virtual core up at every invalidate, as before). #280: LONGSHOT_NFC_DIR
(player), HOS_NFP_SEARCH and HOS_NFP_TRACE (diag), HOS_SWITCH2 (kill, Windows) and
HOS_SWITCH2_RUMBLE_TEST (diag, Windows). #1235: HOS_VSYNC_YIELD (kill: =1 is the old yield
loop). All seven were already described in docs/development.md; the table now has them.

Assisted-by: Claude Sonnet 5.5
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
mooki changed title from WIP: fix(vk): the switch table has a row for each switch the source reads again, and a removed switch is no longer read to fix(vk): the switch table has a row for each switch the source reads again, and a removed switch is no longer read 2026-11-18 02:13:18 +00:00
Author
Member

Out of WIP: the Windows llvm-mingw cross-build of this head (61ddd5322) links the renderer DLL and the game executable with 0 warnings (521 units, gpu/vk/vk_replay.cpp among the 106 rebuilt); nothing was started on Windows. The box and Testing say so, and every box is now true.

Out of WIP: the Windows llvm-mingw cross-build of this head (61ddd5322) links the renderer DLL and the game executable with 0 warnings (521 units, `gpu/vk/vk_replay.cpp` among the 106 rebuilt); nothing was started on Windows. The box and Testing say so, and every box is now true.
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
CI / Conventional Commit title (pull_request) Successful in 6s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 9s
CI / Workflow lint (actionlint) (pull_request) Successful in 11s
Third-party parts / As their notes say (pull_request) Successful in 10s
Website / Website on Cloudflare (pull_request_target) Has been skipped
PR description / Description follows the template (pull_request_target) Successful in 4s
This pull request doesn't have enough approvals yet. 0 of 1 approvals granted.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u 'fix/switch-table-rows:mooki-fix/switch-table-rows'
git switch 'mooki-fix/switch-table-rows'
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!1527
No description provided.