Emulator Issues #13307


Toggling "Manual Texture Sampling" twice while a game is running ruins shader cache (Ubershaders)

Added by SuperSamus 11 months ago.

% Done:


Operating system:
Issue type:
Relates to usability:
Relates to performance:
Relates to maintainability:
Regression start:
Fixed in:


Game Name?

Probably everything that depends on Manual Texture Sampling. Tested Skylanders: Spyro's Adventure (where FMVs have weird horizontal lines with it disabled).

Game ID? (right click the game in the game list, Properties, Info tab)


MD5 Hash? (right click the game in the game list, Properties, Verify tab, Verify Integrity button)

For some reason, Dolphin segfaults when trying to verify the game (Address boundary error)... I don't think it matters, though.

What's the problem? Describe what went wrong.

You start a game. While the game is running, you toggle "Manual texture sampling". When you do it a second time, Dolphin will recompile the shaders, for some reason.
If this happens while you are using ubershaders, the shader cache will be permanently ruined. That is:

  • If you just disabled "Manual texture sampling", then FMVs will have horizontal lines even if you then turn it back on. Forever.
  • If you just enabled "Manual texture sampling", then FMVs will not have horizontal lines even if you then turn it back off. Forever.

("Forever" until you delete the relevant shader cache, obviously. Also, only while ubershaders are on, since it uses a separate cache from ubershaders off.)

I repeat: Dolphin will recompile the shaders only when you toggle "Manual texture sampling" the second time. Not the third, not the fourth, not the fifth... (Until Dolphin is closed)
For example, if you open Dolphin, ubershaders off (which don't suffer from the issue), open the game, toggle "Manual texture sampling" twice (Dolphin will recompile the shaders), close the game, ubershaders on, and finally reopen the game, you can toggle "Manual texture sampling" how times you want, you won't reproduce the issue (because Dolphin won't recompile the shaders).

Tested only on Vulkan. Can't test on any other backend.

What steps will reproduce the problem?

  • Clear Dolphin's shader cache (for a clean reproduction environment);
  • Open Dolphin;
  • Make sure ubershaders are on (I used hybrid);
  • Open a game that requires "Manual texture sampling" for FMVs to not have weird lines;
  • While the game is open, toggle "Manual texture sampling" twice. Dolphin will recompile the shaders, for some reason;
  • Toggle "Manual texture sampling" how many times you want, it will now change nothing. Even closing Dolphin won't fix it: you'll need to delete the relevant shader cache.

Is the issue present in the latest development version? For future reference, please also write down the version number of the latest development version.


Is the issue present in the latest stable version?

No, it doesn't have ubershaders after all.

If the issue isn't present in the latest stable version, which is the first broken version? (You can find the first broken version by bisecting. Windows users can use the tool and anyone who is building Dolphin on their own can use git bisect.)

Didn't test.

If your issue is a graphical issue, please attach screenshots and record a three frame fifolog of the issue if possible. Screenshots showing what it is supposed to look like from either console or older builds of Dolphin will help too. For more information on how to use the fifoplayer, please check here:

Don't think it's anything useful. Attached while reproducing a video with "Manual texture sampling" on (but with the ruined cache, it was as is it was off).

What are your PC specifications? (CPU, GPU, Operating System, more)

AMD Ryzen 5600G
AMD RX 6700XT (Mesa git)
Linux NixOS 23.11 (unstable)

Is there anything else that can help developers narrow down the issue? (e.g. logs, screenshots,
configuration files, savefiles, savestates)

I do get spammed with this log:

VideoCommon/TextureCacheBase.cpp:2354 E[Video]: Memory stride too small (0 < 1280)


manual_texture.dff (2.06 MB) manual_texture.dff SuperSamus, 07/22/2023 07:41 PM

No data to display


Also available in: Atom PDF