fix(dlss): #2193's review notes: the tolerance as dlss_checks.h says it, each refused size logged once #2413

Merged
pmwork-personal merged 1 commit from fix/dlss-near-mode-nits into main 2026-11-11 18:46:45 +00:00
pmwork-personal commented 2026-11-11 17:59:14 +00:00 (Migrated from github.com)

#2193 was merged before I pushed hckrman101's three review notes to it, so they come here on their own. No behavior changes beyond a log line.

What changed

  • The comment says the real tolerance. prepare's comment (gpu/vk/vk_dlss.cpp, near line 300) said a size "a pixel or two" outside a range is taken. It now says what dlss_checks.h's mode_for takes: at most 1/64 of the range's largest size on each axis, 2 pixels at the least.
  • Each refused size is logged (review note). fail() in vk_temporal.cpp logs a reason again only when its pointer changes, and the refused message was one static buffer, so a second, different refused size was not logged until the 600th repeat. The message now has two buffers, and a new size goes into the other one: fail() sees a new pointer and logs it in its usual format. (Logging it in prepare as well could print a size twice when another reason came between two refusals, because fail()'s last reason is not reset on success.)
  • test_dlss_checks.py: the assert's message on its own line, like the other asserts (review note).

Tested

  • tests/run_all.py on Windows (llvm-mingw): 364 passed, 31 skipped, 1 failed: test_recorder_sync (its exit case), which fails the same way on untouched main on this PC.
  • A build of the branch compiles (vk_dlss.cpp). Not run in game: the change is a log message and a comment; the refused path itself is #2193's.

🤖 Generated with Claude Code

#2193 was merged before I pushed hckrman101's three review notes to it, so they come here on their own. No behavior changes beyond a log line. **What changed** - **The comment says the real tolerance.** `prepare`'s comment (`gpu/vk/vk_dlss.cpp`, near line 300) said a size "a pixel or two" outside a range is taken. It now says what `dlss_checks.h`'s `mode_for` takes: at most 1/64 of the range's largest size on each axis, 2 pixels at the least. - **Each refused size is logged** ([review note](https://git.magicbean.dev/MagicBeanDev/Hookshot/pulls/2193)). `fail()` in `vk_temporal.cpp` logs a reason again only when its pointer changes, and the refused message was one static buffer, so a second, different refused size was not logged until the 600th repeat. The message now has two buffers, and a new size goes into the other one: `fail()` sees a new pointer and logs it in its usual format. (Logging it in `prepare` as well could print a size twice when another reason came between two refusals, because `fail()`'s last reason is not reset on success.) - **`test_dlss_checks.py`:** the assert's message on its own line, like the other asserts ([review note](https://git.magicbean.dev/MagicBeanDev/Hookshot/pulls/2193)). **Tested** - `tests/run_all.py` on Windows (llvm-mingw): 364 passed, 31 skipped, 1 failed: `test_recorder_sync` (its exit case), which fails the same way on untouched main on this PC. - A build of the branch compiles (`vk_dlss.cpp`). Not run in game: the change is a log message and a comment; the refused path itself is #2193's. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
hckrman101 (Migrated from github.com) approved these changes 2026-11-11 18:24:24 +00:00
hckrman101 (Migrated from github.com) left a comment

Thanks for following these up. All three notes from #2193 are addressed, and nothing else changes behaviour.

  • Tolerance comment: it now matches dlss_checks.h mode_for: max_w / 64, with 2 at the least, on each axis.
  • Refused sizes: the two buffers plus the remembered rw/rh/ow/oh mean every change of size hands fail() a new pointer, so it logs right away. That includes going back and forth (A, B, A): each switch lands in the other buffer. A repeat of the same size keeps the same pointer, so it is still limited to every 600th time. Leaving prepare alone and relying on fail()'s own dedup is the right call, for the reason the description gives.
  • Test assert: the message is on its own line now. The check is unchanged.

CI: the only failure is test_native_astc_texture_count.py on windows-2022 part 1/2. Its fixture's std::scanf hits the CRT deprecation warning, which is treated as an error. This PR doesn't touch that test or anything it covers, so it isn't caused by this change. Everything else passes, including the DLSS/FSR 4 link check. The branch is 7 commits behind main but merges cleanly.

Thanks for following these up. All three notes from #2193 are addressed, and nothing else changes behaviour. - **Tolerance comment:** it now matches `dlss_checks.h` `mode_for`: `max_w / 64`, with 2 at the least, on each axis. - **Refused sizes:** the two buffers plus the remembered `rw/rh/ow/oh` mean every change of size hands `fail()` a new pointer, so it logs right away. That includes going back and forth (A, B, A): each switch lands in the other buffer. A repeat of the same size keeps the same pointer, so it is still limited to every 600th time. Leaving `prepare` alone and relying on `fail()`'s own dedup is the right call, for the reason the description gives. - **Test assert:** the message is on its own line now. The check is unchanged. CI: the only failure is `test_native_astc_texture_count.py` on windows-2022 part 1/2. Its fixture's `std::scanf` hits the CRT deprecation warning, which is treated as an error. This PR doesn't touch that test or anything it covers, so it isn't caused by this change. Everything else passes, including the DLSS/FSR 4 link check. The branch is 7 commits behind main but merges cleanly.
Commenting is not possible because the repository is archived.
No description provided.