Skip to content

AMD 780M Vulkan renderer leads to corrupted textures #1176

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Not4ce opened this issue Apr 15, 2024 · 73 comments
Open

AMD 780M Vulkan renderer leads to corrupted textures #1176

Not4ce opened this issue Apr 15, 2024 · 73 comments
Labels
bug Something isn't working

Comments

@Not4ce
Copy link

Not4ce commented Apr 15, 2024

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)

log.txt

Tested with OpenGl that had no issues, followed by switching to Vulkan with issues (UMA frame buffer set to 6gigs on system)

@Not4ce Not4ce added the bug Something isn't working label Apr 15, 2024
@Exzap
Copy link
Member

Exzap commented Apr 15, 2024

Edited to update: Seems like VK_EXT_attachment_feedback_loop_layout is necessary on modern AMD architectures. There is a fork with a non-optimal implementation over at https://github.com/goeiecool9999/Cemu/tree/refs/heads/feedback_loop_layout which is good as a workaround but shouldn't be used on any non-affected GPUs. See my other response for more details

@Exzap
Copy link
Member

Exzap commented Apr 15, 2024

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 (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

@Not4ce
Copy link
Author

Not4ce commented Apr 15, 2024

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

@Not4ce
Copy link
Author

Not4ce commented Apr 15, 2024

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:
1 2 6f

Thank you for walking me through this

@Not4ce Not4ce closed this as completed Apr 15, 2024
@Not4ce Not4ce reopened this Apr 16, 2024
@Not4ce
Copy link
Author

Not4ce commented Apr 16, 2024

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

vulkan.bug_1.mp4

@Squall-Leonhart
Copy link
Contributor

Squall-Leonhart commented Jun 5, 2024

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.

@Not4ce
Copy link
Author

Not4ce commented Jun 11, 2024

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

@dstrnad
Copy link

dstrnad commented Sep 11, 2024

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?

@Exzap
Copy link
Member

Exzap commented Sep 11, 2024

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

@Not4ce
Copy link
Author

Not4ce commented Sep 17, 2024

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: 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

@goeiecool9999
Copy link
Collaborator

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.

@Not4ce
Copy link
Author

Not4ce commented Sep 18, 2024

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.

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:
Botw sample 1
Botw Sample 2

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)

Botw Accurate binaries on Botw Accurate binaries off

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

@dstrnad
Copy link

dstrnad commented Sep 18, 2024

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.

@dstrnad
Copy link

dstrnad commented Sep 18, 2024

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.

@goeiecool9999
Copy link
Collaborator

@dstrnad What version are your drivers? There have been lots of reports of instability with 24.8.1 (#1323), although mostly with different symptoms than you're describing. If you are on 24.8.1 and downgrading to 24.7.1 fixes the instability we know it's probably not anything I changed.

@dstrnad
Copy link

dstrnad commented Sep 23, 2024

@goeiecool9999 I’m on 24.3.1. I plan to test it under linux, so we can rule out any windows driver related issues.

@TheOneEyedGrimReaper
Copy link

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.

where can i download this build?
or i need to build it myself?

@goeiecool9999
Copy link
Collaborator

goeiecool9999 commented Sep 24, 2024

where can i download this build? or i need to build it myself?

@TheOneEyedGrimReaper
The interface isn't the most intuitive. At the bottom of the page I linked there's a section called "artifacts". Pick your platform from the list and click the small download icon on the right (edit: clicking the name works too).

@TheOneEyedGrimReaper
Copy link

where can i download this build? or i need to build it myself?

@TheOneEyedGrimReaper The interface isn't the most intuitive. At the bottom of the page I linked there's a section called "artifacts". Pick your platform from the list and click the small download icon on the right (edit: clicking the name works too).

lel.
so i was the blind.
thanks man.

@Not4ce
Copy link
Author

Not4ce commented Sep 25, 2024

@goeiecool9999 I’m on 24.3.1. I plan to test it under linux, so we can rule out any windows driver related issues.

This would be very much appreciated. Sorry for the late reply, @dstrnad is correct and testing on linux would help which i am unable to do

Cemu crashes after 30 minutes of use with exception x0409, which to my understanding is a stack buffer overrun, so something gets corrupted around 20-30minutes. As far as i can tell, the driver may not be the issue. I have tried 6 driver versions so far, ranging from 24.3.1 to 24.8.1 (including 3 seperate devices, and the technical preview drivers from amd)

Screenshot 2024-09-25 134629 Screenshot 2024-09-25 125310

I will also attach the actual crash log here, which i suspect may not help too much? But why not. If you need anything else, please let me know @goeiecool9999. So far, the crashes can happen at any time in shrine/overwold/zone, looks to be related to how long cemu was running
Screenshot 2024-09-25 124925

Cemu crash.zip

@goeiecool9999
Copy link
Collaborator

goeiecool9999 commented Sep 25, 2024

@Not4ce I'm not very familiar with the windows event viewer and I don't know if it contains useful information. If you could send cemu's log.txt after a crash instead that's more likely to contain a helpful clue. I'm mainly interested in seeing the stack trace at the end of the file.

@TheOneEyedGrimReaper
Copy link

@goeiecool9999
Hi again!
Can you check your cemu fork?

It tries to eat more than my actualy allocated vram and then freezes up my rog ally completely.

@goeiecool9999
Copy link
Collaborator

it tries to eat more than my actualy allocated vram and then freezes up my rog ally completely

I didn't change anything related to GPU memory allocation. Are you sure you're running out of VRAM and not regular memory?

@Valkyr2
Copy link

Valkyr2 commented Oct 7, 2024

Hi, tested your build, works like a charm for me. I'll test it further this week. thanks for sharing this

@TheOneEyedGrimReaper
Copy link

TheOneEyedGrimReaper commented Oct 7, 2024

it tries to eat more than my actualy allocated vram and then freezes up my rog ally completely

I didn't change anything related to GPU memory allocation. Are you sure you're running out of VRAM and not regular memory?

yep i'm sure of it.
somehow it sees my 6gb allocated vram for 10gb and when it's going over 6gb it freezes my rog ally.
the official cemu build that has the ground texture bug doesn't even try to eat more than 3gb of vram and i can play for hours without any other problem than the ground tex bug.

@goeiecool9999
Copy link
Collaborator

I found a memory leak and fixing it appears to make GPU memory usage stable. Let me know if this improves stability.
New build here: https://github.com/goeiecool9999/Cemu/actions/runs/11482812478

@dstrnad
Copy link

dstrnad commented Oct 23, 2024

I think you fixed it. I’ve been testing for an hour on linux (bazzite, Rog ally) and memory seems stable, no crashes so far and no glitches. I will test more, but good job 👍

@goeiecool9999
Copy link
Collaborator

goeiecool9999 commented Oct 31, 2024

At this point, im very curious as to why stable 2.2 reliably stutters more

I haven't been entirely scientific. I merged some changes from main that happened after the release of 2.2. So it could be one of those as well. Anyways, if the new driver really does make the problem go away that's preferable because like I said before, I'm not very happy with the implementation of my fix using the extension. I would probably want to rewrite it to get it in a merge-able state.

@aASDa213ASD
Copy link

aASDa213ASD commented Oct 31, 2024

@goeiecool9999 Regarding difference between your previous build and a new one

dcdfa82

image

5640d58

image

Summary

On average I'm getting around 5 frames more than I did on previous build, sometimes dcdfa82 jumps to 160 as well but it doesn't happen to keep that number and drop to 145-150-155 while 5640d58 is able to jump even higher to 163 and keep itself around 155 stable without random drops to 145 for 0 reason.
Good job I guess?

@goeiecool9999
Copy link
Collaborator

The performance penalty for the image memory barriers seems to be far less with mesa compared to windows. I would say that tiny of a difference is probably not statistically significant. The difference that Valkyr2 reported is more in line with my expectations.

@aASDa213ASD
Copy link

aASDa213ASD commented Oct 31, 2024

Anyway I assume that I'm cpu-necked so it's not like my renderer is overloaded with anything, GPU is under 50% load while couple of my cpu cores go up to 100%. Maybe that's why I can't see much of a difference.
If that would really help I could test windows as well in some future.

@goeiecool9999
Copy link
Collaborator

goeiecool9999 commented Oct 31, 2024

The term bottleneck really only applies when you're dealing with parallel processes where one process depends on the output of another (or a chain of processes). The CPU and GPU are effectively parallel processes. While the GPU is processing one frame the CPU can work on the next frame simultaneously. This means that a frame can take up to 1/fps seconds to process on the CPU AND 1/fps seconds to process on the GPU before you see stutters. Like with all pipelines there's a latency increase but the performance improvement of having both processors do work simultaneously is worth it in the vast majority of cases. If the GPU is the bottleneck (assuming no FPS cap) it would be active 100% of the time and the CPU would be idle some percent of the time waiting for the work queue to have space for the frame it just processed. If the CPU is the bottleneck the CPU is active 100% of the time and the GPU idles some of the time waiting for the work queue to be non-empty.
You're gonna think: "Well then obviously I'm CPU bottlenecked in Cemu". But it's not that straightforward because Cemu's main CPU thread busy-waits (I believe to avoid unpredictable scheduler latency or unnecessary core migrations). So you won't see the true idle time in monitoring tools.
The main takeaway is this: For ideal performance and for the term "bottleneck" to be meaningful the CPU and GPU should only wait for each other when the GPU work queue is either empty or full.

I'm going off of what others tell me but Breath of the Wild's engine on Wii U is designed in such a way where the CPU waits for the GPU to be completely idle somewhere during the frame. That means that the GPU will always be idle for some time during the frame until the CPU submits more work, no matter how fast or slow the CPU or GPU are. So even if the GPU was a potato you would not see 100% utilisation. You can improve the time between the CPU resuming when GPU is idle and the CPU submitting more work by getting a faster CPU, but you can also decrease the amount of time the CPU has to wait for the GPU to become idle by getting a faster GPU. Without measuring which of these delays is longer it's difficult to tell which component would give the biggest performance improvement (and even when you do it might not be obvious).

To tie it back to my point about the term "bottleneck": Normally if one component is a bottleneck upgrading the other wouldn't make a difference. In this scenario upgrading either can have a positive impact. So neither can be said to be a true bottleneck.
I don't know why I decided to type this out since you didn't ask, but maybe you find it interesting (or someone else).

(PS: I think GPU utilisation actually becomes a proxy for those delays I mentioned earlier. As the GPU approaches infinite speed GPU utilisation approaches zero. As the CPU approaches infinite speed GPU utilisation approaches 100%. So if GPU usage is 50% the CPU and GPU are evenly matched, when it's at 75% that means it's slower and may be worth upgrading. if GPU usage is 25% you might consider upgrading the CPU. I'm not sure. That part might be blatant misinformation 😅)

@aASDa213ASD
Copy link

aASDa213ASD commented Nov 2, 2024

@goeiecool9999 @Not4ce @Squall-Leonhart @Valkyr2 I'm back with some.. Let's just say I'm not sure if this is good or a bad thing that I'm about to report.
First of all thanks @goeiecool9999 for writing this all down for me, would never know Cemu works this way.

I'm now writing from my Windows 11 Pro 24H2 (OS Build 26100.2033) instance on the same exact PC, specs of which you can see above in this message.
My graphics driver is shown on AMD Adrenaline Software as follows (24.10.1 10/11/2024):
image

This exact driver has nothing to offer regarding Vulkan emulation issues on it's release notes which you can find here.

As well I downloaded Cemu 2.2 from latest releases again from here which also doesn't have any fixes regarding Vulkan emulation.

You already feel where I'm leading, right?

Not a single artefact problem on Cemu 2.2 on Windows 11 24H2 with 24.10.1 AMD GPU driver:
Untitled

On Linux, on the other hand Mesa and Vulkan-Radeon packages got updated recently so I checked that out as well - no changes I'm still artefacting.
image

Both Cemu are set up identically on both machines with the same resolution, graphics packs, etc.
I've Above 4GB decoding and Resizable bar features enabled on my bios if that matters.
Worth noting that I've played for almost an hour running around searching for anything related or similar to what I've used to see on Cemu 2.2 - nothing. Not a single artefact was found. Not a single visual glitch.
The only difference that really concerns me is that my Cemu title says [Vulkan] [Generic] on Linux while it shows [Vulkan] [AMD GPU] on Windows.

Here's my latest installed packages on Linux:

[aasda@arch ~]$ sudo pacman -Q | grep mesa
lib32-mesa 1:24.2.6-1
libva-mesa-driver 1:24.2.6-1
mesa 1:24.2.6-1
mesa-utils 9.0.0-5

[aasda@arch ~]$ sudo pacman -Q | grep vulkan
lib32-vulkan-icd-loader 1.3.295-1
lib32-vulkan-radeon 1:24.2.6-1
vulkan-headers 1:1.3.295-1
vulkan-icd-loader 1.3.295-1
vulkan-radeon 1:24.2.6-1

Least to say - I'm confused. I have tons of questions, perhaps everyone here as well.
If anyone has a single assumption or even a clue about why that works/doesn't work and what exactly affects it - please let me know because it drives me nuts when I don't understand something. If there's anything more I can provide/test/experiment with - let me know as well, will def do. Want this problem to be gone for good and we are getting close.

@Squall-Leonhart
Copy link
Contributor

it's worth noting (and something i've seen in Switch emulation too) that once a pipeline is cached in a good state, artifacts that occured on a bad build may not occur with that bad build after a good build has updated the cache.

@aASDa213ASD
Copy link

Well I removed all of my shaderCache folder and nothing really changed on Linux.
Windows is totally alright though. I hate it.

@aASDa213ASD
Copy link

@goeiecool9999 The water in Gerudo town is still cracked on 5640d58
image

@Squall-Leonhart
Copy link
Contributor

that requires accurate barriers turned on.

@aASDa213ASD
Copy link

@Squall-Leonhart Uh, yeah, that seems like a solution.
Btw, do you ever notice an interesting RED DOT in the distant fog that appears for a brief millisecond? Perhaps.. it can also be fixed with accurate barriers.

image

@Squall-Leonhart
Copy link
Contributor

the red dots back O_O

@aASDa213ASD
Copy link

aASDa213ASD commented Nov 12, 2024

@Squall-Leonhart easier to show than explain: https://www.twitch.tv/player_killer_paradigma/clip/WonderfulFitKathyNinjaGrumpy-4z-7KcYDoG9nqUpA

Here's its lowkey BLACK, but if I would get somewhat blue sky it would be red.

image

@Squall-Leonhart
Copy link
Contributor

Squall-Leonhart commented Nov 12, 2024

that looks like specular aliasing to me

i didn't see that in the clip... wtf.

@aASDa213ASD
Copy link

aASDa213ASD commented Nov 12, 2024

i didn't see that in the clip... wtf.

It's hard to catch if you have low refresh rate monitor like 60 for example, because I stream at 90 frames per second, but if you are at least 90hz you can easily catch this one single frame with black dot (easier to see on 0.25x speed but even there it's hard to get this exact frame)

It's not AS annoying as artifacts so I can even ignore it however that is.. here and I never saw anyone mentioning this.

And I mean it appears quite rarely and only in the distance, so if you don't happen to look far and have some wall infront of you - it's a non issue.

But if you look far that happens often, here's number 2:
image

@cooljimy84
Copy link

cooljimy84 commented Nov 28, 2024

I've made some more changes. This build might improve performance (but temper your expectations). I'm interested to hear if it does. https://github.com/goeiecool9999/Cemu/actions/runs/11602523437

So this version (appimage) fixes my issue with MK8 stuttering, it goes from a solid 60fps to sutter to 55fps then back up to 60fps.
AMD Ryzen 9 7940HS w/ Radeon 780M Graphics
linux 6.8.0-48-generic #48-Ubuntu SMP PREEMPT_DYNAMIC Fri Sep 27 14:04:52 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
libva info: VA-API version 1.20.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_1_20
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.20 (libva 2.12.0)
vainfo: Driver version: Mesa Gallium driver 24.0.9-0ubuntu0.2 for AMD Radeon Graphics (radeonsi, gfx1103_r1, LLVM 17.0.6, DRM 3.57, 6.8.0-48-generic)

Not sure if this helps, but all the textures were fine in MK8, just this very noticable stutter.

@Squall-Leonhart
Copy link
Contributor

24.12.1 has resolved the crashing issues, and seem to be generally better vulkan drivers then amd has released since about 24.3.1 (I mean, starcitizen is fixed too so yeah) so testing should be performed on those from now on.

@zorn-v
Copy link

zorn-v commented Dec 12, 2024

I've made some more changes. This build might improve performance (but temper your expectations). I'm interested to hear if it does. https://github.com/goeiecool9999/Cemu/actions/runs/11602523437

This build also fixes visual glitches on AMD GPU in Paper Mario: Color Splash
It looks like this in 2.5
изображение

@geowarin
Copy link

I've made some more changes. This build might improve performance (but temper your expectations). I'm interested to hear if it does. https://github.com/goeiecool9999/Cemu/actions/runs/11602523437

@goeiecool9999 This build fixes both the texture corruption and the frame pacing issues I have in BOTW.
Thank you!
I'm on Linux with a 7800XT

@dstrnad
Copy link

dstrnad commented Jan 23, 2025

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

Is there any update on the merge of this issue please? Been testing the last version from @goeiecool9999 for several months now, works great, fixes the issue, but would be nice to be able to officially update Cemu again. Thx

@cooljimy84
Copy link

I switched from the flatpak to appimage and the issue went away. I'm sure I could have found a newer vulkan for mint os, but path of least resistance wins.

@layard32
Copy link

layard32 commented Apr 3, 2025

I started having the texture corruption problem once I got a whqd monitor (with a 7700xt)... is there any update on the merge with main? Or could someone upload the @goeiecool9999 latest build, because the download's options are all expired. Thanks

@zorn-v
Copy link

zorn-v commented Apr 3, 2025

Also surprised why it is not merged to master.
Linux AppImage - https://dropmefiles.com/8evMd

@layard32
Copy link

layard32 commented Apr 3, 2025

Also surprised why it is not merged to master. Linux AppImage - https://dropmefiles.com/8evMd

Could you pass me the windows version? Thank you very much

@aASDa213ASD
Copy link

aASDa213ASD commented Apr 21, 2025

Also surprised why it is not merged to master. Linux AppImage - https://dropmefiles.com/8evMd

Could you pass me the windows version? Thank you very much

@layard32 So far as I tested months ago, it's fixed on windows drivers for RDNA3 gpus, the issue remains on Linux with any driver vulkan implementation eg amdvlk / radeon-vulkan. So on Linux you play with the build mister @goeiecool9999 created (thanks you SO MUCH), on windows you can play official cemu and things should be fine. Just make sure you have the latest adrenaline driver installed.

You can read my post about my windows vs linux tests here: #1176 (comment)

@Squall-Leonhart
Copy link
Contributor

Squall-Leonhart commented Apr 22, 2025

one reason this isn't merged as is, is it decimates performance on the nvidia driver.

it's fixed on windows drivers for RDNA3 gpus,

Absolutely, is not.

@aASDa213ASD
Copy link

aASDa213ASD commented Apr 23, 2025

@Squall-Leonhart uuh... how do you explain #1176 (comment) then?

no offence just trying to grasp your point

@Ammar-Sadaoui
Copy link

one reason this isn't merged as is, is it decimates performance on the nvidia driver.

it's fixed on windows drivers for RDNA3 gpus,

Absolutely, is not.

can be added as options to turn on and off ?

@Exzap
Copy link
Member

Exzap commented Apr 23, 2025

I am not sure what the current state of @goeiecool9999's fork is exactly but from what I understand it's not optimal and it can hurt performance on some drivers and it may not even cover all the cases where there is an actual feedback loop. The latter is a problem outside the scope of the fork, there are design decisions in Cemu's Vulkan renderer code that make it hard to implement the feedback loop extension.

I believe the better way forward, which is in line with what modern Vulkan wants us to do, is to also adopt VK_KHR_dynamic_rendering_local_read (together with VK_EXT_attachment_feedback_loop_layout). But it requires us to switch from renderpasses to dynamic rendering as well as fundamentally resdesign said core parts of the renderer so that we can properly and efficiently track feedback loop dependencies. Adopting the new extensions will lock out users on old GPUs because they don't get driver updates anymore. So it's not really as straightforward of a decision. On the upside I think it could help improve performance for everyone else, at least in theory. But we'll see if that turns out to be true.

This will all happen eventually but there are too many unknowns to give any sort of ETA. In the meantime you can use the fork.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests