Emulator Issues #11994
GPU error when using Prefetch Custom Textures with 4-5GB+ texture pack - Leaks into Emulation
The Legend of Zelda: Four Swords FOR NINTENDO GAMECUBE (Disc 0, Revision 0)
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)
What's the problem? Describe what went wrong.
I'm working on an HD texture pack for FSA. When overall size of custom textures (as reported by Dolphin when prefetching is done) went over some size (up to about 5GB), game started stopping with GPU errors (invalid opcode ff or some other) in various places, guaranteed to happen when dark link uses hammer in eastern temple.
Further testing confirmed that problem is not caused by specific texture added to pack but by its overall big size combined with "prefetch custom textures" option. If size is reduced by removing any textures or this option is disabled, error no longer happens.
As shown in https://forums.dolphin-emu.org/Thread-using-upscaled-textures-causes-gpu-error, same error happen to other user with other titles as well.
What steps will reproduce the problem?
- Install texture pack over 5GB in size.
- Enable "Prefetch Custom Textrues"
- Play game it is designed for.
Is the issue present in the latest development version? For future reference, please also write down the version number of the latest development version.
Yes, version 5.0-11661
Is the issue present in the latest stable version?
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.)
Unknown, testing for issue takes considerable time so bisecting would preferably be avoided.
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
[Attach any fifologs if possible, write a description of fifologs and screenshots here to assist people unfamiliar with the game.]
What are your PC specifications? (CPU, GPU, Operating System, more)
Is there anything else that can help developers narrow down the issue? (e.g. logs, screenshots,
configuration files, savefiles, savestates)
GPU error screenshot is attached.
#3 Updated by v1993 about 1 year ago
I've recompiled Dolphin in debug build. So far I can say that option set
LDFLAGS='-fsanitize=address' CXXFLAGS='-march=native -O2 -g -fsanitize=address' CFLAGS='-march=native -O2 -g -fsanitize=address' cmake .. -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/home/v/.local -GNinja
still result in this problem. In addition, I get an error on game launch (using or not using custom textures doesn't affect it) in OGLTexture.cpp, line 209. Quick look suggests that that is an assert active only in debug builds.
By the way, this problem still happens on other video backends (including Null), but those don't fail an assert on startup in debug build.
-fsanitize=address seems to detect nothing. I also got crash in the game menu, for sure this time.
- Status changed from New to Accepted
- Subject changed from GPU error when using Prefetch Custom Textures with 4-5GB+ texture pack to GPU error when using Prefetch Custom Textures with 4-5GB+ texture pack - Leaks into Emulation
So, there is a weird error where texture packs can seemingly leak into the actual emulated state and cause crashes. I just don't know how it happens or why. I'd rather have an issue centered around the actual bug than the consequences of it down the line. This can be accepted for now, but I'll probably make an issue to replace it down the line.