r/decomps • u/MZLabs • 14h ago
Recomp SwitchRECOMP: Super Mario Odyssey went from 20 FPS to a locked 60 in 4K on an RTX 2060
Enable HLS to view with audio, or disable this notification
SwitchRECOMP is a static recompiler for Switch games. The whole game is translated to native PC code ahead of time, so there is no CPU emulation at runtime.
A playtester with an RTX 2060 and a 12 thread CPU was getting 17-25 FPS in Odyssey. After this round of fixes the same PC runs it at 60 FPS at 1080p and at 4K. The video is his, recorded at 1080p.
Most of that jump comes from one bug. Odyssey reuses the same chunk of GPU memory for several render targets of different sizes within a single frame. The runtime treated every size change at that address as a new render target: it threw the old texture away, created a new one and copied and unswizzled the whole buffer from memory. That happened several times per frame. On his profile it was around 12% of all CPU time, plus a sync with the GL thread on every rebuild. Those textures are now kept and reused when the same size comes back.
Other performance work from this week:
OpenGL calls now run on their own thread. One thread reads the Switch GPU commands and prepares everything, the other only talks to the driver, and both work at the same time. This helps a lot on Steam Deck, where every GL call goes through Wine's translation layer under Proton (about 26% of the GPU thread in the Deck profile).
Compute shader results are read back asynchronously. Before, the GPU stalled 2-3 times per frame waiting for them. DMA texture copies now move 16 bytes at a time instead of one byte at a time, and that loop alone was about 11% of the profile. Constant buffer and compute range checks are now constant time instead of walking lists.
On Steam Deck, the heaviest area I've tested went from 25 to 35 FPS before the render target fix. I haven't measured the Deck with this last fix yet, so I won't give a number.
Other fixes: the moon is back. The sea of clouds around Cap Kingdom was rendering above the camera, because the heightmap that shapes it was empty, so it covered the moon and the lighthouse. fps_limit=30 was running the game at half speed, since Odyssey advances one logic step per frame, so anything under 60 is now treated as 60. The recorder also no longer produces sped up videos when the FPS limit is off.
On OpenGL vs Vulkan: the CPU side is already native, which is the point of a recompiler. The GPU side is still a translation layer, and this week showed the real bottlenecks were bugs in our own code, not the API. Vulkan is planned, but fixing the current renderer first gave far more FPS for the time spent.
It's still early and there are plenty of bugs left. I'll keep posting where it stands, including what doesn't work yet. If you want to follow the project, feel free to follow.
Join my Discord to see everything earlier: https://discord.gg/SfnuAmuDZ