Emulator Issues #9348
closedDX12 (8947) - Texture corruption and crashes with custom texture loading enabled
0%
Description
Xenoblade Chronicles | SX4E01 | MD5: f6110ec667a19c22c0163902f7474e54 (GCZ compressed image) | Dolphin 64-bit, build 8947
DX12 renderer enabled: with custom textures enabled (latest version of HD texture pack) there's texture corruption on the title screen. Dolphin crashes upon attempting to load a savegame, when the title screen's background scene changes, and upon starting the game if "dump textures" enabled. Textures appear to load blurry, then sharpen and move up+left slightly as if the standard textures are loaded then replaced by the HD versions. I've attached a screenshot showing the texture corruption. I can't take a video since ShadowPlay doesn't seem to like DX12.
Reproduce by running Xenoblade Chronicles in DX12 mode with the HD texture pack enabled. OGL and normal D3D both work fine. I extensively tested other settings being enabled/disabled and none have any effect on the bug, including running in Interpreter and JITIL mode with all of the "safest" settings selected.
Windows 10 Professional, 64-bit
Asus Z97-A/USB3.1
GTX 970, driver version 361.82 (an official but optional hotfix that resolves the "unmount your GPU" tray icon bug in W10)
Intel i5-4690K
16GB RAM
Samsung 840 Evo 500GB SSD
[Anything else here]
-
On the title screen with custom textures preloaded, Dolphin's RAM usage is ~7475 MB in OGL and ~7425 MB in D3D, but ~7725 MB in DX12.
-
The glitchy texture moves in sync the fog/cloud textures.
-
In OGL mode with custom textures disabled and texture dumping enabled, only a few dozen textures are dumped from the title screen. One of the textures is an image of the monado, which has coloring consistent with the texture corruption.
-
As I mentioned earlier, a blurry version of textures appears to load at first and is then replaced with a sharper version. This does not happen in OGL or D3D mode.
I'm not a programmer so this is just wild speculation, but based on all this I wonder if the standard textures and the custom textures are both being loaded, with the standard textures (partially?) overwriting the custom textures in RAM. This would explain the issues I'm experiencing and sounds similar to a bug I remember reading about in the monthly progress reports a while ago, where textures would overwrite each other in RAM.
Files
Updated by LuismaSP about 9 years ago
Mmm... this is strange, it runs perfect for me. Latest build of dolphin and texture pack. Windows 10 x64, GTX 970, i7 4790k, 16GB RAM, and Directx12 backend.
You tried to download the texture pack again?
Updated by wistfulmunching about 9 years ago
- File SX4E01-1.png SX4E01-1.png added
I went into freelook mode and took a close screenshot of the texture glitch, attached.
LuismaSP, I can try re-downloading the texture pack if you think that might help. Seems strange it would still work fine in OGL+D3D though. What GPU driver version are you running?
Updated by wistfulmunching about 9 years ago
I updated my GPU driver to the latest one but the texture glitch is still there.
I found a strange workaround. I enabled "texture format overlay" hoping to figure out how the second texture was being overlaid. This showed the texture formats on everything, but also fixed the broken texture. Disabling "texture format overlay" again leaves me with completely normal, working textures.
Earlier I thought ShadowPlay wasn't working with DX12, turns out I'd just not configured it to capture my desktop. I enabled that and made a recording: https://www.youtube.com/watch?v=XuntiI5_3jE
Updated by LuismaSP about 9 years ago
wistfulmunching wrote:
I went into freelook mode and took a close screenshot of the texture glitch, attached.
LuismaSP, I can try re-downloading the texture pack if you think that might help. Seems strange it would still work fine in OGL+D3D though. What GPU driver version are you running?
I´m running 361.75 version.
So, your problem can be solved by enabling/disabling the texture format overlay? I don´t know why, but sure that helps the developers to find the cause.
Updated by wistfulmunching about 9 years ago
Downloaded the latest Dolphin update (8961), renamed the Dolphin folder in My Documents to reset all the settings, uninstalled my GPU driver in safe mode and cleaned up with DDU, rebooted, installed the latest GPU driver again (361.91). No change.
Another person filed a similar issue ( https://bugs.dolphin-emu.org/issues/9346 ) and found an alternative workaround instead of showing texture formats: adjusting cache accuracy. The textures are messed up regardless of the cache accuracy setting Dolphin's started with, but moving it one notch in any direction redraws the screen and everything's fine afterward, at least in the short term. I haven't tried playing after doing this to see if it permanently solves the problem (or if the problem I'm having even occurs outside the title screen).
At some point along the way I seem to have fixed the issue with textures loading blurry at first and then going sharp. My speculation that it was loading the standard low-resolution assets and then replacing them with the HD versions seems to have been incorrect, as I noticed while I was still having the issue that the character portraits on the "Continue" (load) screen were definitely the updated ones from the HD pack - they were just much blurrier at first than they should be. I had some custom settings configured in the Nvidia Control Panel which may have been causing the issue (I restored defaults in the meantime) so I'll try to figure out how to reproduce it. The blurry-then-sharp problem only ever affected DX12 mode, not OpenGL or D3D11.
Also, I've been assuming until now that this is a known problem caused by the DX12 feature being so new and untested but I'll mention it just in case: with the DX12 renderer is selected, Dolphin randomly crashes when attempting to start Xenoblade Chronicles (and possibly other games but XBC is all I have to test with right now) or when opening the Graphics panel. I think it would be best if I opened a new issue for this: https://bugs.dolphin-emu.org/issues/9350
Updated by JMC4789 about 9 years ago
please test PR 3647 -> https://dl.dolphin-emu.org/prs/pr-3647-dolphin-latest-x64.7z
Updated by wistfulmunching about 9 years ago
JMC4789 wrote:
please test PR 3647 -> https://dl.dolphin-emu.org/prs/pr-3647-dolphin-latest-x64.7z
Got "4.0-8977-dirty" from your link, sorry but it didn't help.
I tried something I hadn't before and got an interesting result though. If I enable "Load Custom Textures" prior to the game starting I get what I showed in the screenshots and video I posted, but if I disable custom textures after the game starts and then re-enable them, the texture corruption gets weirder. I used free camera to take a closer look. Helpful at all?
Dolphin still crashes sometimes when the main menu's background scene changes. On the times when it doesn't, the texture corruption's gone when the background scene changes back to the normal monado one.
Updated by JMC4789 about 9 years ago
- Status changed from New to Fixed
Fixed in 4.0-9045 -> https://dolphin-emu.org/download/dev/07ff8379ba7b6451e7fbfa3fc2bd62f3822ede57/
Updated by wistfulmunching about 9 years ago
Confirmed, the issue's gone in 9050. Nice work!