feat(vk): MAKO Scaler as an Upscaler choice #3211
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/mods
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!3211
Loading…
Reference in a new issue
No description provided.
Delete branch "HumanBean/Longshot:feat/mako-scaler"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
The Upscaler setting takes a new choice, MAKO Scaler: MAKO's open spatial upscaler (GPL-3.0-or-later), in every build, on any GPU. It leaves the game's network out as Off does and enlarges each frame with a sharper filter and its own sharpening, driven by Sharpness. It adds no anti-aliasing of its own; the game's still runs. Only the scaler is taken: no MAKO frame generation (closed, non-commercial), no LSFG or LS1.
Read first:
gpu/vk/shaders/mako_scale.comp(its head lists the changes from the pinned original inthird_party/mako), thentemporal_spatial,stretch_recordandtemporal_mako_drewingpu/vk/vk_temporal.cpp.Testing
Tested: Linux (CachyOS), RTX 3090, NVIDIA 620.70.06, on earlier code, before the rebase onto
main@6b888fa3and the changes since:dev.py smokeheadless: PASS on defaults, and PASS with MAKO Scaler at 50% render resolution, Sharpness 80 (log: network left out, 1280x720 to 2560x1440 by MAKO's shader).On the head, rebased onto
main@b6330a5b(Linux), a compile check only: the renderer builds with symbols checked, andcargo check -p api -p longshot-game -p build-assetspasses.Quick checks on the previous head, rebased onto
main@6b888fa3, not a full run:test_dlssgandtest_vk_draw_overhead_leanfail, with the same compile errors onmain's files.cargo test -p api: 636 passed.cargo fmt --check: passes.run_all.pyand the other Rust tests were not run on this head.@klimovich008 tested the earlier head
d6e37e8fon a Steam Deck (comment below): switching, frame generation, Render resolution and Auto, and a GPU-time comparison against Off.Since #3222 the MAKO hints and docs no longer say its edges are unsmoothed (13 languages, machine-written).
Still to test:
Measurements
Verdict: not measured yet.
No fps or GPU time was compared. The shader makes 13 texture reads per output pixel, so its cost against Off needs numbers, on the Steam Deck above all.
Risks
No anti-aliasing beyond the game's own: edges can shimmer, more at low render resolutions and in generated frames. It is opt-in: no default, Auto (this PC) or quality preset picks it, and choosing another Upscaler turns it off. A saved
dlssvalue 10 is new. What players notice without choosing it: the new Sharpness hint text, and one more entry in the list.Checklist
Ready for review
main; the title is a Conventional Commit. (Not ticked: it also changes the Sharpness advice.)mise run testpasses (any failure that also fails onmainis named). (Not ticked: only quick checks on the head, no full run.)main, or Measurements says why there is nothing to measure. (Not ticked: not measured.)third_party/untouched; nothing GPL-incompatible. (third_party/makois new, unmodified upstream with its provenance note.)When it applies
tests/that reads changed source is updated, not weakened.recipes.toml.)mainand here, for a change that shows on screen. (Not yet taken.)Assisted-by:/Co-Authored-By:trailers.Ready to merge
main, measured again or a comment says why the numbers still hold.🤖 Generated with Claude Code
https://claude.ai/code/session_017vw8e2tPWCPNuu4UnUHJ7h
Tested in game: Linux (CachyOS), RTX 3090, NVIDIA 620.70.06, on the code before the base's latest rewrite and the Sharpness hint texts: headless smoke from kokiri-start passed on defaults and with MAKO Scaler at 50%; a session played by hand looked good, MAKO drew at 100/75/67/50% with no fatal line. Not tried: frame generation, switching upscalers while playing, HDR.
c697b28310d6e37e8fceTested on a Steam Deck:
d6e37e8fSetup: Steam Deck OLED, SteamOS 3.9.5 (kernel 7.2.7), Mesa 26.2.0-devel RADV (VANGOGH), stock 15 W, AC power. Built from
d6e37e8fon the Deck, as a player's build is. Every run was Market as a child (kokiri-start save, the Debug tab's teleport), 1280x720, uncapped, headless unless noted. Settings were changed while playing through the control bridge'soption_set(the menu's own setter), with a shot and the log read after each change.Works, with no Vulkan error, device loss or fatal line in any session:
MAKO: network 72ba090c70fe2614 left out, its input scaled by MAKO's shader (640x360 -> 1280x720), thenOff: ... stretched linearly).vk: sharpness: 80% on the 3D scene before the HUD) and never while MAKO drew.vk: drs: 100% -> 50%) with MAKO drawing at 640x360. 50 % is the floor with the default minimum scale; the 42 % floor was not tried.596 of the last 600 presents made by FSR 3.1andthe HUD laid over the made frames.Measurements (the Deck's standard test: Market as a child, uncapped, 3 alternating pairs, 150 s lead-in, stock 15 W). Both arms are this build at Render resolution 50 % and Sharpness 80 %; only the Upscaler differs:
vk: GPU time)At the same Sharpness, MAKO cost no more GPU time than Off on the Deck; it took about 0.4 ms a frame less in every pair. That fits MAKO's one pass replacing two: Off's linear stretch and Longshot's separate sharpening pass. The Deck is CPU-bound in Market, so fps doesn't move. MAKO against Off with both at Sharpness 0 (the scaler's own cost) was not A/B'd.
Checks:
run_all.py --strictond6e37e8fagainst mainf359e262(this stack's base), both on the Deck. Nothing fails only here: 52 checks fail, all of which also fail onf359e262on this machine.test_mako.pypasses.test_no_map_reload.pyfails on mainf359e262too, with the same message (a map change is asked outside world.travel: loader/tests.rs), which answers that checklist point.Not from this PR, seen while testing:
option_setof Dynamic resolution replies On, but the row reads Off again and Render resolution stays at its stop. That happens with every Upscaler and on mainf8b54338too, so Dynamic resolution was tested through Render resolution Auto instead.system/mods-tab faulted ... ran past the 5 ms of CPUappears once at start; it also does in main's runs on the Deck.Not tested here: HDR (no HDR output in these runs), Windows, and the Deck in Game Mode at 1280x800.
🤖 Generated with Claude Code
https://claude.ai/code/session_012MibRabbL9JhKKrsNVaBfg
d6e37e8fced403878567d40387856754424bb8a554424bb8a5e4d321036cWIP: feat(vk): MAKO Scaler as an Upscaler choiceto feat(vk): MAKO Scaler as an Upscaler choice