fix: main's source checks pass again (15 red since #2574, #2617 and others), and the three bugs behind them #2656

Closed
notquiteog wants to merge 2 commits from notquiteog/fix/main-source-checks into main
notquiteog commented 2026-11-12 04:30:54 +00:00 (Migrated from github.com)

main's Game-free source regressions check is red: 15 source checks fail at de866017, from PRs that were merged without a rebase onto each other. This makes them pass again, and fixes the three real bugs that were behind four of them.

What was wrong

Real bugs (the checks were right):

  • RX_VK_CAPTURE_KEEP_OLD=0 and RX_VK_CAP_BLOCKS=0 turned the switch on (vk_memory.cpp, #2437). Both are on/off switches read as set-means-on. They read through env_on now, as line 1054 of the same file already did. (test_env_on)
  • Mouse camera: the view snapped back after first-person aim or Z-targeting (host/mouse_native.c, #2617). The mouse's kept angles were reset when the game takes the stick, but not when the camera leaves states 3 and 4, so on return the old angles were written over where the game had left the camera. (test_mouse_native: yaw 4 where -1 is expected)
  • DLSS could be widened into Ultra Performance below a third (dlss_checks.h, #2574). (w + 2) * 3 >= ow fixed 853x480 at 2560x1440 (853 × 3 = 2559) but also let a size one or two pixels under the third through, which mode_for then widens a range for. It is w * 3 + 2 >= ow now: a third rounded down, which is NGX's own Ultra Performance size, and no less. (test_dlss_checks: "below a third")

Stale translations: three English texts changed in vk_menu.cpp after the 13-language table was made (#1930's ocarina sentence in the gamepad hint, #2362's RADV note in the Mesh shaders hint, #2435's keyboard face in the Button prompts hint). Their 39 entries in menu_i18n.h are keyed and translated again. They are machine-made like the rest of the file and not reviewed by speakers. (test_menu_i18n)

Fixtures that cut source by its text and missed what the source gained:

Check What it lacked
test_wayland_libdecor_hint, test_display_startup_failure window_title() (#2116)
test_texel_buffer_ownership dead_import_bytes (#1906)
test_audio_biquad, test_audio_aux env_on in reverb_frame
test_mods_size_table a stub for hos_xinput_pads (#2435)
test_readback_part its marker matched #2458's forward declaration of wait_recorded
test_hdr_encode, test_framegen_preset, test_rumble_menu kEngine's retry and temporal_reset_failure (#2574)
test_linux_docker_packages its parser took the workflow's --no-update for a PPA

How it was tested

  • python -I -B tests/run_all.py on this branch (Linux, the emsdk's clang, glslang 16.6.0): 468 passed, 0 failed, 22 skipped (Windows-only, or needing dotnet / PIL / a Vulkan device). On de866017 without it: 15 failed.
  • The Vulkan back end builds from the branch (Linux, clang, with the NGX SDK).
  • In the game, RTX 5060 Ti 16 GB, driver 615.71.09, Linux (COSMIC, Wayland), Kokiri Forest, 2048x1152 output: DLSS at Ultra Performance (683x384), Performance, Balanced, Quality, 75%, 83%, 92% and Auto, 54 to 60 fps, each feature made once (feature 2 made ... 683x384 (683x384 to 683x384) -> 2048x1152, mode 3), no device lost.

Not tested

  • The mouse camera fix and the two capture switches are proven by their source checks, not by a run with a real mouse or with the switches set.
  • Windows (the fixtures are OS-neutral; CI will say).
  • The three re-translated menu texts were not read by a speaker of any of the 13 languages.

🤖 Generated with Claude Code

`main`'s *Game-free source regressions* check is red: 15 source checks fail at de866017, from PRs that were merged without a rebase onto each other. This makes them pass again, and fixes the three real bugs that were behind four of them. ## What was wrong **Real bugs (the checks were right):** - **`RX_VK_CAPTURE_KEEP_OLD=0` and `RX_VK_CAP_BLOCKS=0` turned the switch on** (`vk_memory.cpp`, #2437). Both are on/off switches read as set-means-on. They read through `env_on` now, as line 1054 of the same file already did. (`test_env_on`) - **Mouse camera: the view snapped back after first-person aim or Z-targeting** (`host/mouse_native.c`, #2617). The mouse's kept angles were reset when the game takes the stick, but not when the camera leaves states 3 and 4, so on return the old angles were written over where the game had left the camera. (`test_mouse_native`: yaw 4 where -1 is expected) - **DLSS could be widened into Ultra Performance below a third** (`dlss_checks.h`, #2574). `(w + 2) * 3 >= ow` fixed 853x480 at 2560x1440 (853 × 3 = 2559) but also let a size one or two pixels under the third through, which `mode_for` then widens a range for. It is `w * 3 + 2 >= ow` now: a third rounded down, which is NGX's own Ultra Performance size, and no less. (`test_dlss_checks`: "below a third") **Stale translations:** three English texts changed in `vk_menu.cpp` after the 13-language table was made (#1930's ocarina sentence in the gamepad hint, #2362's RADV note in the Mesh shaders hint, #2435's keyboard face in the Button prompts hint). Their 39 entries in `menu_i18n.h` are keyed and translated again. They are machine-made like the rest of the file and not reviewed by speakers. (`test_menu_i18n`) **Fixtures that cut source by its text and missed what the source gained:** | Check | What it lacked | |---|---| | `test_wayland_libdecor_hint`, `test_display_startup_failure` | `window_title()` (#2116) | | `test_texel_buffer_ownership` | `dead_import_bytes` (#1906) | | `test_audio_biquad`, `test_audio_aux` | `env_on` in `reverb_frame` | | `test_mods_size_table` | a stub for `hos_xinput_pads` (#2435) | | `test_readback_part` | its marker matched #2458's forward declaration of `wait_recorded` | | `test_hdr_encode`, `test_framegen_preset`, `test_rumble_menu` | `kEngine`'s `retry` and `temporal_reset_failure` (#2574) | | `test_linux_docker_packages` | its parser took the workflow's `--no-update` for a PPA | ## How it was tested - `python -I -B tests/run_all.py` on this branch (Linux, the emsdk's clang, glslang 16.6.0): **468 passed, 0 failed, 22 skipped** (Windows-only, or needing dotnet / PIL / a Vulkan device). On de866017 without it: 15 failed. - The Vulkan back end builds from the branch (Linux, clang, with the NGX SDK). - In the game, RTX 5060 Ti 16 GB, driver 615.71.09, Linux (COSMIC, Wayland), Kokiri Forest, 2048x1152 output: DLSS at Ultra Performance (683x384), Performance, Balanced, Quality, 75%, 83%, 92% and Auto, 54 to 60 fps, each feature made once (`feature 2 made ... 683x384 (683x384 to 683x384) -> 2048x1152, mode 3`), no device lost. ## Not tested - The mouse camera fix and the two capture switches are proven by their source checks, not by a run with a real mouse or with the switches set. - Windows (the fixtures are OS-neutral; CI will say). - The three re-translated menu texts were not read by a speaker of any of the 13 languages. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Owner

@Joey-Magnus reviewed on GitHub · 2026-11-12 14:33 UTC · original

Current main already has every part of this, through other PRs. On main at 51da0464, tests/run_all.py has only test_lift_cache failing here (a local issue), and every check this PR fixes passes. The PR now conflicts in nine test files.

  • The capture switches read through env_on: #2651 (1101a8e2), gpu/vk/vk_memory.cpp:937/960/995.
  • The mouse camera's kept angles after leaving states 3 and 4: #2653 (0ec31ff6).
  • The stale translations: #2654 (69465621).
  • The source fixtures (window_title, dead_import_bytes, kEngine's retry, the readback marker, the mods stubs): #2648 (9776c36d). The docker PPA parser: #2652 (f82caa6b).

The one piece main did differently is scene_size_fits in gpu/vk/dlss_checks.h. Main kept (w + 2) * 3 >= ow, and #2648 made tests/test_dlss_checks.cpp:29-33 require that one and two pixels under a third fit. So w * 3 + 2 would now fail main's own check. If you think sizes two pixels under should be refused (because mode_for widens them), that's worth its own small PR arguing against those test cases. Otherwise I'd suggest closing this one as superseded.

> [@Joey-Magnus](https://github.com/Joey-Magnus) reviewed on GitHub · 2026-11-12 14:33 UTC · [original](https://github.com/NotRexed/Hookshot/pull/2656#pullrequestreview-5876226972) Current main already has every part of this, through other PRs. On main at 51da0464, tests/run_all.py has only test_lift_cache failing here (a local issue), and every check this PR fixes passes. The PR now conflicts in nine test files. - The capture switches read through `env_on`: #2651 (1101a8e2), gpu/vk/vk_memory.cpp:937/960/995. - The mouse camera's kept angles after leaving states 3 and 4: #2653 (0ec31ff6). - The stale translations: #2654 (69465621). - The source fixtures (window_title, dead_import_bytes, kEngine's retry, the readback marker, the mods stubs): #2648 (9776c36d). The docker PPA parser: #2652 (f82caa6b). The one piece main did differently is `scene_size_fits` in gpu/vk/dlss_checks.h. Main kept `(w + 2) * 3 >= ow`, and #2648 made tests/test_dlss_checks.cpp:29-33 require that one and two pixels under a third fit. So `w * 3 + 2` would now fail main's own check. If you think sizes two pixels under should be refused (because `mode_for` widens them), that's worth its own small PR arguing against those test cases. Otherwise I'd suggest closing this one as superseded. <!-- github-sync:r:5876226972 -->
github-sync closed this pull request 2026-11-12 15:51:25 +00:00
Owner

@notquiteog commented on GitHub · 2026-11-12 15:15 UTC · original

Closing: main has all of this now through #2648, #2651, #2652, #2653, #2654 and #2661, as the review says. Thanks for checking it against main. The one thing that differs is scene_size_fits: main keeps the two-pixel tolerance with tests that say so, which is a deliberate choice and fine by me.

> [@notquiteog](https://github.com/notquiteog) commented on GitHub · 2026-11-12 15:15 UTC · [original](https://github.com/NotRexed/Hookshot/pull/2656#issuecomment-6827533029) Closing: main has all of this now through #2648, #2651, #2652, #2653, #2654 and #2661, as the review says. Thanks for checking it against main. The one thing that differs is `scene_size_fits`: main keeps the two-pixel tolerance with tests that say so, which is a deliberate choice and fine by me. <!-- github-sync:c:6827533029 -->
Commenting is not possible because the repository is archived.
No description provided.