Consistent Stutters including Pokémon Ultra Sun

Issue:
I’ve been getting a lot of stutters on Citra with my computer, which I believed I could power through with a very high end PC. Are there any settings I can use to improve performance? My PC is undergoing very low usage when running games and is still experiencing long stutters between scene transitions and “slow down, catch up” moments during gameplay, especially notable through slowed down and sped up audio.

System Information

  • Operating System: Windows 11
  • CPU: AMD Ryzen 9 5950X 16-Core Processor (32 CPUs), 3.4 GHz
  • GPU: NVIDIA GeForce RTX 3090
  • Citra Version (found in title bar): Citra Nightly 1811
  • Game: Pokémon Ultra Sun, among others
  • Screenshot of Issue (include the full Citra window including titlebar):

Diagnostic Log
citra_log.txt (26.5 KB)

The log file is incomplete. Make sure you follow the steps carefully:

  1. Open Citra, then go to File>Open Citra Folder (Citra>Open Citra Folder if on MacOS) and open up the log folder. Now keep that open in the background.
  2. Launch your game and encounter the problem; crash/slowdown/glitch and close Citra if it doesn’t do so by itself. Do not restart Citra as that will wipe the log of important information!
  3. Now upload the log file in this chat.

citra_log.txt (170.1 KB)

Thought I followed those steps the first time, but here’s the second attempt :slight_smile:

System Information for Support

Client Version                               Nightly 1813   HEAD-3b6ffd9
Operating System                             Windows 10 Version 2009
CPU                                          AMD Ryzen 9 5950X 16-Core Processor             | AVX2 | FMA
Graphics API                                 OpenGL 4.3.0
Graphics Renderer                            NVIDIA GeForce RTX 3090/PCIe/SSE2
GPU Driver Version                           526.47
CPU JIT                                      [x]
Hardware Renderer                            [x]
Hardware Shader                              [x]
Hardware Shader, Accurate Multiplication     [x]
Shader JIT                                   [x]
System Region                                -1
Shader Disk Cache                            [x]

I did not find anything wrong in your log file. Please wait for a human moderator to assist.

There are two types of “normal” stutter to keep in mind with Pokemon games:

  1. Shader generation stutter. The Disk Shader cache stores the shaders that Citra encounters so that the next time you encounter them, Citra won’t need to generate them again. Which reduces stutter caused by shader generation over time.
    You can generally see this when you encounter a new effect. You’ll see a small stutter. The next time you encounter the same effect, it won’t stutter anymore. That’s the Disk Shader Cache at work.

  2. CRO loading/unloading. Pokemon games abuse this on basically every transition. Be it when going into battle, entering new zones or building, ect. This basically loads and unloads the 3DS’ equivalent of .dll, causing them to get reJITted every time. That causes stutter. There’s nothing we can do about this currently. Everyone experiences this.

Can you describe when exactly you’re experiencing these stutters?

Ah, I think I’m experiencing the CRO loading/unloading primarily, as it’s largely around area transitions and camera movements, which makes sense. Is there an easy way to minimize the frequency of Shader generation stutter at least, such as pre-loading shaders before runtime, or using someone else’s shader cache?

Preloading shaders isn’t possible. Citra doesn’t know what shaders it will encounter until it encounters them in-game. There isn’t an easy way to figure this out before even launching the game.
We do have something in development which may improve shader generation stutter, but you’ll have to wait a bit longer.
Using somebody else’s shader cache is considered piracy because shaders contain copyrighted game code. Hence, doing this is illegal. It’s also highly unlikely to be useful, since shaders are hardware and driver specific. Trying to use shaders that were made on different hardware or drivers will just make Citra reject the shaders to avoid issues.