Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
DM_UPSCALER=metalfx on Ocarina of Time lists the _vr packs' upscaler …
…keys: test_game_profile covers the other packs, so the keys of agl_ndsr_vr.pck and agl_ndsr_vr_light.pck are in the shader map test the way agl_ndsr.pck's are; UPSCALER_SOURCE documents that these are the upscaler's sources and points at where the option refuses a variant it cannot draw
  • Loading branch information
bryanjeal committed Nov 6, 2026
commit b25cfcd2264fd746172e46bf367d28d421db6f86
4 changes: 3 additions & 1 deletion dm/games/game.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@ def by_build(main_id): # the profile whose build rows register this main build


# agl's upscaler network (NDSR), by where the shader map found each key: the compute shaders of agl_ndsr.pck (Donkey Kong Bananza's 24 in its release library, Splatoon Raiders' 20 in its debug one)
UPSCALER_SOURCE = re.compile(r'/agl_ndsr\.pck#')
# and of its variants agl_ndsr_vr.pck and agl_ndsr_vr_light.pck: The Legend of Zelda: Ocarina of Time (Switch 2) upscales with agl_ndsr_vr.pck's, so DM_UPSCALER=metalfx left its network
# running. A variant the host cannot draw (its colour, its rectangles) is refused there and runs as the game's (nvn_mtl.m up_mfx_wanted, up_mfx_encode)
UPSCALER_SOURCE = re.compile(r'/agl_ndsr(?:_vr(?:_light)?)?\.pck#')


def upscaler_keys(g):
Expand Down
5 changes: 3 additions & 2 deletions dm/tools/tests/test_game_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ def test_rejected_tokens(self):
'cs_other.bin\t2\tcompute\t7629d857a0a93833\t/Lib/agl/agl_resource.Nin_Ounce_NVN2.debug.sarc.zs/agl_ndsr.pck#NDSR@0xeb4c0\n'
'cs_other.bin\t3\tcompute\t7629d857a0a93833\t/Lib/agl/agl_resource.Nin_Ounce_NVN2.release.sarc.zs/agl_ndsr.pck#NDSR@0x124a00\n' # a key twice: once
'ps_other.bin\t4\tpixel\t0e423e497f1e3355\t/Lib/agl/agl_resource.Nin_Ounce_NVN2.release.sarc.zs/agl_ndsr.pck#NDSR@0x1247d8\n' # the pack's draw shaders: not the upscaler
'cs_other.bin\t5\tcompute\t0123456789abcdef\t/Lib/agl/agl_resource.Nin_Ounce_NVN2.release.sarc.zs/agl_common.sharcb#BAHS@0x40\n')
'cs_other.bin\t5\tcompute\t0123456789abcdef\t/Lib/agl/agl_resource.Nin_Ounce_NVN2.release.sarc.zs/agl_common.sharcb#BAHS@0x40\n'
'cs_other.bin\t6\tcompute\tfa3033d05c0a41d6\t/Lib/agl/agl_resource.Nin_Ounce_NVN2.release.sarc.zs/agl_ndsr_vr_light.pck#NDSR@0x84910\n') # the other packs hold upscalers too (Ocarina of Time)


def macros(shader_map):
Expand All @@ -64,7 +65,7 @@ def test_from_shader_map(self):
none = ['#define DM_GAME_UPSCALER_KEYS ""', '#define DM_GAME_UPSCALER_N 0'] # the launcher hides the setting
self.assertEqual(macros(None), none)
self.assertEqual(macros(MAP.split('cs_other.bin')[0]), none)
self.assertEqual(macros(MAP), ['#define DM_GAME_UPSCALER_KEYS "7629d857a0a93833,c56db3d5a0f1b5af"', '#define DM_GAME_UPSCALER_N 2'])
self.assertEqual(macros(MAP), ['#define DM_GAME_UPSCALER_KEYS "7629d857a0a93833,c56db3d5a0f1b5af,fa3033d05c0a41d6"', '#define DM_GAME_UPSCALER_N 3']) # the _vr_light pack's key too: Ocarina of Time's upscaler is not in agl_ndsr.pck


if __name__ == '__main__':
Expand Down
Loading