Emulator Issues #13307
openToggling "Manual Texture Sampling" twice while a game is running ruins shader cache (Ubershaders)
0%
Description
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)
SSPE52
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.
5.0-19817
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 https://forums.dolphin-emu.org/Thread-green-notice-development-thread-unofficial-dolphin-bisection-tool-for-finding-broken-builds 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: https://wiki.dolphin-emu.org/index.php?title=FifoPlayer
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)
Files
No data to display