Cemu
Cemu copied to clipboard
AMD 780M Vulkan renderer leads to corrupted textures
Current Behavior
Enabling vulkan on rdna 3 based cards, such as 780m igpus break pebbles and textures in-game. Also broken shadows that eventually garble and have corrupted textures. Observed in MK8 and BOTW. No graphical or texture enhancements applied, can be replicated on two seperate 780m devices
Vram allocation does not change anything. Only fixed by changing renderer to OpenGL, and seems to be Rdna3/780m specific. Was unable to test on a discrete rdna3 card, no issue on Rdna2 and Nvidia counterparts (6800xt and 3070)
Expected Behavior
Nil graphical issues and not garbled textures
Steps to Reproduce
Enabling vulkan renderer Playing any game: Breath of the wild etc
System Info (Optional)
OS: Windows 11 22631.3374 KB5035942 GPU: 780M on Ryzen Z1 Extreme and 7840u
Emulation Settings (Optional)
Default with no mods or changed
Also Tested with: BCML enabled Second Wind enabled No graphical mods or changes on 1.2.6 and 2.0 cemu
Logs (Optional)
Tested with OpenGl that had no issues, followed by switching to Vulkan with issues (UMA frame buffer set to 6gigs on system)
AMD has a track record of needing 1-2 years to get their drivers up to standard (we have reports like this for every new generation). This combined with the fact that it works on everything else points towards an issue with their driver. However, we don't know for certain unless someone does some digging. I will keep this open for visibility and in case someone with the affected hardware and the necessary know-how wants to look into this.
Something you can do to help in the meantime is upload a Vulkan validation log. The steps to do this are:
- Download the Vulkan SDK and install it from here (you can uninstall it afterwards)
- Restart your PC
- Open Cemu (use a recent version like v2.0-78), in the menu tick
Debug -> Logging -> Vulkan validation layer - Trigger the glitch (avoid doing too much other stuff, it makes the log harder to read)
- Upload log.txt
AMD has a track record of needing 1-2 years to get their drivers up to standard (we have reports like this for every new generation). This combined with the fact that it works on everything else points towards an issue with their driver. However, we don't know for certain unless someone does some digging. I will keep this open for visibility and in case someone with the affected hardware and the necessary know-how wants to look into this.
Thank you for getting back. I had a similar line of thought and I found this very strange, as I am unable to replicate this on RDNA 2
As per AMDs own documentation, their vulkan implementation is the exact same on both RDNA 2 and 3. I wish I had a discrete RDNA 3 card to test this, but if a future driver update from AMD remedies the issue, I will update or close this ticket
As it stands, I am disappointed at amd, as all handheld devices use AMD Apus, and I am unable to distinguish if this is an APU driver or RDNA 3 issue
PS: I tried seperate driver versions and ddu with no success. Thank you for keeping an eye on this
Something you can do to help in the meantime is upload a Vulkan validation log. The steps to do this are:
1. Download the Vulkan SDK and install it from [here](https://sdk.lunarg.com/sdk/download/latest/windows/vulkan-sdk.exe) (you can uninstall it afterwards) 2. Restart your PC 3. Open Cemu (use a recent version like v2.0-78), in the menu tick `Debug -> Logging -> Vulkan validation layer` 4. Trigger the glitch (avoid doing too much other stuff, it makes the log harder to read) 5. Upload log.txt
The last version I tried which is this was broken
However, 2.0-78 has seemingly fixed the issue! Heres the log attached below with vulkan debugger
What I can conclude is the last version I had downloaded (2.0-46) just did not play nice. Strangely my 6800xt never had issues with any version (including 1.2.6), so its rdna3 driver related bug on older builds log.txt
Image of 1.2.6 corruption:
Thank you for walking me through this
Welp, @Exzap turns out Cemu2.0-78 only fixes the pebbles or greatly reduces the amount of initial corruption. After further playing the game and wind waker, the issue is still present. I have recorded a video for reference and the prior vulkan debug log is still valid
As usual, I'm unable to replicate this on my desktops with rdna2 and ampere cards and can reliably repeat this on any 780m based device like Ally/Win. The only fix is using OpenGL and rolling back drivers doesn't change anything
Kindly let me know if you require further logs or information, kind regards
https://github.com/cemu-project/Cemu/assets/167106518/90821224-c345-43a7-bb59-38f82fcb9135
As per AMDs own documentation, their vulkan implementation is the exact same on both RDNA 2 and 3. I wish I had a discrete RDNA 3 card to test this, but if a future driver update from AMD remedies the issue, I will update or close this ticket
Their Hardware ISA however, is not. RDNA3 has an ISA bug with signedness reinterpretation for example.
More recent findings have come to light regarding the Gfx11 Delta colour changes and their assumption of a general compressed layout for resources + abitrary reinterpretation for DCC introduced somewhat of a perfect storm for graphical misbehavior if assumptions have been made, or if a particular sampler needs a particular layout when attempting to reuse it in a feedback loop.
RDNA2 is affected under very specific conditions, the van gogh in the steam deck for instance has artifacts in WWHD, and the same set of extensions that should resolve RDNA3's texture layout misbehavior resolved similar troubles DXVK had with RDNA2 in games such as GTA4, with RDNA3 no known operations will result in a DCC being disabled, which was not highlighted in the ISA manual but had to be dug out of their PAL or MESA commits. GPU-Open has not been updated for these ISA changes either.
As per AMDs own documentation, their vulkan implementation is the exact same on both RDNA 2 and 3. I wish I had a discrete RDNA 3 card to test this, but if a future driver update from AMD remedies the issue, I will update or close this ticket
Their Hardware ISA however, is not. RDNA3 has an ISA bug with signedness reinterpretation for example.
More recent findings have come to light regarding the Gfx11 Delta colour changes and their assumption of a general compressed layout for resources + abitrary reinterpretation for DCC introduced somewhat of a perfect storm for graphical misbehavior if assumptions have been made, or if a particular sampler needs a particular layout when attempting to reuse it in a feedback loop.
RDNA2 is affected under very specific conditions, the van gogh in the steam deck for instance has artifacts in WWHD, and the same set of extensions that should resolve RDNA3's texture layout misbehavior resolved similar troubles DXVK had with RDNA2 in games such as GTA4, with RDNA3 no known operations will result in a DCC being disabled, which was not highlighted in the ISA manual but had to be dug out of their PAL or MESA commits. GPU-Open has not been updated for these ISA changes either.
Hey, thank you for clarifying that and filling in the gaps. I assumed 2 and 3 used the same ISA but that certainly explains the discrepency here
As far as I can tell, all RDNA3 cards are affected including someone I know with a 7900XTX. Seems like its a waiting game for RDNA 3 users which is a shame, as a lot of portables are/will be based on RDNA 3/3.5
Just fyi, similar issue was recently fixed in ryujinx and sudachi. Tested on BOTW. Dont know if it is exactly the same issue, but the artifacts/ glitches looked exactly the same in the switch version like they look in cemu. So there might be a way to fix it despite the fact that it is probably RDNA driver related?
They implemented the VK_EXT_attachment_feedback_loop_layout extension which fixed it. This extension has been on our radar for a while since it would probably also help us improve performance.
Unfortunately it's not trivial to implement the extension and since I am bogged down by other work right now I can't work on it anytime soon. But if anyone else wants to take a shot that would be appreciated
For context ryujinx' PR: https://github.com/Ryujinx/Ryujinx/pull/7226
They implemented the
VK_EXT_attachment_feedback_loop_layoutextension which fixed it. This extension has been on our radar for a while since it would probably also help us improve performance. Unfortunately it's not trivial to implement the extension and since I am bogged down by other work right now I can't work on it anytime soon. But if anyone else wants to take a shot that would be appreciatedFor context ryujinx' PR: Ryujinx/Ryujinx#7226
Even though you guys cant work on it anytime soon, I appreciate the heads up with this being on your radar. As more gaming handhelds ship with amd apus, this being broken on 24.8.1 still mean the most popular gaming handhelds are locked out (Rog ally, legion go, acer, zotac devices)
But i appreciate the ongoing improvements that go into cemu and the work that contributors put in. I am hopeful this will be resolved one day
I've experimented with VK_EXT_attachment_feedback_loop_layout in order to try and fix a different issue on Vega GPU's. Using the extension didn't show any difference in behaviour on that card, but I'm curious if it could fix these issues. If you want to help test it there's a build available here: https://github.com/goeiecool9999/Cemu/actions/runs/10904371233
The implementation is pretty messy at the moment so if it improves rendering there will be more work required to get it in a merge-able state. But at least it could give us an idea about whether or not it would work.
I've experimented with
VK_EXT_attachment_feedback_loop_layoutin order to try and fix a different issue on Vega GPU's. Using the extension didn't show any difference in behaviour on that card, but I'm curious if it could fix these issues. If you want to help test it there's a build available here: https://github.com/goeiecool9999/Cemu/actions/runs/10904371233 The implementation is pretty messy at the moment so if it improves rendering there will be more work required to get it in a merge-able state. But at least it could give us an idea about whether or not it would work.
Hi just tested, and I want to report back, that fork completely solves the issue!
First boot was weird, with app losing 60% of its frametime, but subsequent boots have been flawless. Here are some screenshots:
By default, it has "Accurate barriers (vulkan)" enabled under Debug. Keeping that off seem to cause no issue, with enabled costing 2-3 miliseconds in frametime vs off (in action)
Overall, I plan on using this build for a longer session after this. Texture corruption from pebbles and all the aliasing seem to be resolved for now. Thank you the heads up, I will be passing this onto some personal acquintances that have been waiting for a cemu resolution, and so far so good
I tried finding a log file, there was none. But if you require any further info/logs, please let me know😊. @dstrnad might also find this useful, if they have a similar use case
I can also confirm that this fork seems to completely fix the issue. No black/ colourful glitches anymore. I tested on Rog Ally. Accurate barriers settings on/off makes no difference now, the issue is gone. Good job @goeiecool9999 and thanks for the heads up @Not4ce. I will finally try to play the game now, if I can test anything else just let me know. It would be awesome if this could get merged at some point.
Bad news, the fork sometimes crashes when opening or exiting inventory and map menus. Weird is that I can open or close the map/ inventory couple of times (even like 10,20,30 times) and it is ok, but then it randomly freezes the whole game and cemu crashes. I deleted all shader caches to be sure, but still happens.