Repository navigation
Engine: Ocarina of Time's movie at full speed, and the Mac game keeps running out of focus - #911
Conversation
… running out of focus Four patches on f25fa956: - 0092, 0093: seedds/nxnative#1331, the direct NDVE movie scaling, adapted to the pin (mtl_tex_gpu_written). - 0094: the direct scaling is on by default. DM_NVN_NDVE_MOVIE_DIRECT=0 turns it off. - 0095: DM_FOCUS_KEEP is on by default, so clicking into another app no longer freezes Tears of the Kingdom or Ocarina of Time.
|
Reviewed Two merge requirements remain:
One documentation correction: patch 0094’s added rendering paragraph says both “on by default” and “is off by default.” Please make that sentence match the new default. Assigned to v1.3.1. Patch numbers will be reconciled at merge time once the remaining requirements are met. |
The rendering paragraph that patch 0094 adds said the switch is on by default and later said it is off by default. The code turns it on unless DM_NVN_NDVE_MOVIE_DIRECT=0, so the second statement now says on by default.
|
Fixed the sentence in patch 0094 in I tested the patched build by hand on my Mac with Ocarina of Time. The title movie takes the direct path in every run. The log shows I did not run |
Ocarina of Time (
0400486024DEC000) runs its title movie at 30 fps with the audio drifting behind the picture. After the opening it freezes when another app takes the key window.What changes
Four engine patches on
f25fa956:0092,0093: Scale decoded NDVE movies on Metal and skip matched reconstruction seedds/nxnative#1331 by @givethesourceplox and @seedds. The decoded 1920x1080 movie frame is scaled into the 2560x1440 output with one bilinear Metal draw. The 13 NDVE reconstruction dispatches are skipped. The PR is based on a newer upstream.0093is adapted to the pin:mtl_pool_gpu_written(pool)becamemtl_tex_gpu_written(tex)in upstreame2b76d4e.0094: the direct scaling is on by default.DM_NVN_NDVE_MOVIE_DIRECT=0turns it off. It matches only Ocarina's two NDVE shader keys and the known dispatch sequence, so other games keep their path.0095:DM_FOCUS_KEEPis on by default on the Mac. Tears of the Kingdom and Ocarina of Time stop presenting and go silent out of focus. Clicking into another app froze the game until its window was clicked again.DM_FOCUS_KEEP=0restores the old behavior. Minimizing still pauses the game.Why
On an M2 Max the log shows 32.7 ms of GPU time per frame for the movie with 2 to 3 draws per frame (seedds/nxnative#1375). The freeze came right after
oe focus state → 2with no frame and no sound after it.Checked
tools/engine.py check: 62 patches apply cleanly tof25fa956.make GAME=0400486024DEC000 check_t_ndve_moviewith Metal validation on an M2 Max: passes. Before the adaptation it did not compile.dm/tools/env_switches.py --check,test_docs.py,test_env_switches.py: pass.49dff010b9832251,4f41ccf24f163e0d) are in theshader_map.tsvof an nxb-built Ocarina app.Not checked: a game run with these patches. Only the host changes, so a rebuild recompiles
dmhostand reuses the shaders and the pipeline archive.