Repository navigation
Conversation
… only agl_ndsr.pck's shaders, none of which this game runs; its agl_ndsr_vr chain (three stages packing the frame's colour, then the network to the output) is now drawn by the spatial scaler from the chain's first input, with the network's rectangles, and the stages before it are left out while the previous frame's network was drawn; a network variant with an sRGB curve, or a draw up_mfx_encode refuses, runs the chain Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…than its texture: the chain's first stage also reads one texture and writes one image (a quarter-size one), so it was taken for the network, the frame's colour was never recorded and MetalFX never drew; and the colour is taken only from a texture that is not an integer one (the packed intermediates are R32Uint). In Ocarina of Time on an M1 the network fa3033d05c0a41d6 is now drawn by MetalFX (1440x810 to 1920x1080) and the three stages before it are left out: the second submission's compute fell from about 4.4 ms to 0.5 ms a frame, gameplay from 24-25 to 27-30 fps at the 30 fps target Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-upscaler declaration next to main's nn::ndve movie-engine one Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…aler early return stays before main's threadgroup-spill setup in dispatch Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
60 FPS Validation on Apple Silicon: Tested this change over an extended 24,000+ frame (~7 minute) gameplay session in The Legend of Zelda: Ocarina of Time (
Note on CI Failure ( if (!cs->up_color && DM_GAME_UPSCALER_CHAIN_N && up_mfx_on() && up_chain_named(cs))Because |
…on-null stamp and directory, so clang-tidy's nullability check sees a non-null path; its count in this file went from 2 to 3 on main's latest code, and the ratchet failed every pull request on that base Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ported from seedds#1951 (open upstream) onto this branch: its own changes from its merge base with main, conflicts resolved. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01U35V38c6UYLbzyyPx6Up7P
…MetalFX or the skip leaves sharpened (DM_SHARPEN, contrast-adaptive, 0 to 1) DM_UPSCALER=off leaves the game's upscaler network out: up_mfx_encode_from draws its input rectangle bilinearly into its output rectangle instead of encoding MetalFX, for the single network (Donkey Kong Bananza, Splatoon Raiders) and for Ocarina of Time's chained agl_ndsr_vr alike (up_chain_dispatch, from the chain's colour, the stages before it left out as with MetalFX). A network that reads sRGB-encoded colour keeps running, as the bilinear draw would not decode it. DM_SHARPEN draws the result through copy.metal's new fsh (AMD CAS on the four neighbours) on its way into the game's image: after MetalFX the copy out of the scaler's texture becomes the sharpening draw (the straight path is not taken then), after the skip a scratch RGBA16F picture of the output size sits between the two draws. With the game's own network it does nothing. Both are in the launcher (Game's upscaler: Skipped; Sharpening), docs/settings.md and docs/env_switches.tsv. From EmmanueleC's swordboiMacNative (5f08715, Fixed resolution ... skipped upscaler + DM_SHARPEN): the skip and the sharpening only, rewritten for this branch's upscaler path (main's plus seedds#1951's chain); its fixed resolution is left out, as main's render scale and dynamic-resolution stub already hold Ocarina of Time at a fixed size. Co-Authored-By: EmmanueleC <emmanuelec@affarinoro.net> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01U35V38c6UYLbzyyPx6Up7P
|
Measured on an M1 Max (32-core GPU, On main without this PR, With it, the game's upscaler goes through MetalFX (3 runs each, alternating):
On a 2-minute standing route (same view at any frame rate): main 47.15 fps → combined with metalfx 52.9 fps, frame p99 23.2 → 21.3 ms. On the full |
…ale of the game's is drawn by MetalFX, or when MetalFX scales straight between the game's textures Without the upscale the hook (up_mfx_encode_from, seedds#1951's chained-upscaler path included) is never reached and nothing was generated, silently: devMlGUE's report on seedds#2279. Compile-checked on main ccd834e + seedds#1951; not run. Co-Authored-By: Claude <noreply@anthropic.com>
What and why
Ocarina of Time (
0400486024DEC000) upscales with agl's chained upscaler,agl_ndsr_vr.pck/agl_ndsr_vr_light.pck. That's four compute dispatches a frame where Donkey Kong Bananza'sagl_ndsr.pckuses one:DM_UPSCALER=metalfx(the launcher's Game's upscaler) only namedagl_ndsr.pck's shaders, so it did nothing in this game. On an M1 the chain took about 3.4–4.4 ms of every frame.This change:
game.pyfinds the chain's shaders in the shader map (DM_GAME_UPSCALER_CHAIN_KEYS).up_chain_dispatchdraws the network with MetalFX's spatial scaler from the colour the first dispatch read, using the network's own rectangles (up_mfx_encode_from), and leaves out the three stages before it.The option is the existing launcher setting Game's upscaler (
DM_UPSCALER), so players choose it. It changes the look of the upscaled picture: MetalFX's spatial scaler instead of the game's network.The game note (
dm/games/0400486024DEC000/README.md) describes the chain.Checked
0400486024DEC000v131072, Mac app, M1 (8-core GPU), macOS 26, handheld mode, 30 fps target. Played through the opening and some gameplay.upscaler chain fa3033d05c0a41d6_b: the network, no colour curve: MetalFX in HDR mode, thendrawn by MetalFX from the chain's colour, 1440x810 … → 1920x1080. The three earlier stages are left out. No red lines.dm/tools/tests/test_game_profile.pycovers the new chain keys (test_chain_from_shader_map). It and the GPU tests were not run locally; CI runs the tool tests.agl_ndsr_vr(none known besides this one), and iPhone.Docs
dm/games/0400486024DEC000/README.md)This touches
dm/games/game.pyandtest_game_profile.pynext to the movie-enhancement PR. Whichever lands second needs a small rebase.🤖 Generated with Claude Code