Dolphin, the GameCube and Wii emulator - Forums

Full Version: Lag Free dolphin experience with Ubershaders?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Wanted to make a thread for this years ago, right after uber shaders got added on dolphin, but then I thought that someone would notice and report so I ignored it.

The Issue:
Pretty sure everyone here know what used to happen with dolphin before Ubershaders, the game would run flawless frame pace and audio until a random shader that you don't have appears then you would get lag and even the audio would hiccup or something, right and if I played the game to create all shader cache I would never get this issue again, unless of course some new shader cache appears but other than that you experience 100% lag free.

I assume that using Ubershaders I shouldn't ever get any lag right, but unfortunate I get the above experience from time to time, it appears, some times it gets 30min to happen others take 5min, very random, I hate it bc it not only freeze for a moment the image but also the audio.

What is worse yet is that nowadays even when I play without using Ubershaders, the default settings Synchronous, creating all shaders from the game I will still get those random lags after minutes or so, what's going on here?

Before I start to test again today I would like to ask what Video Backend you recommend for me, bc I tried all of them even using dolphin and the game at a SSD doesn't help, however I haven't tested the lastest dolphin for a time now.

Hopefully anyone else who noticed this can post here too, what are you thoughts about this? I don't get this with no other emu, RPCS3, CEMU, No$GBA, DuckStation, PPSSPP etc

I still use various older versions of dolphin just bc of this issue, bc I prefer to create all the shader cache so I can have a better experience in the 2nd/3rd playthough than get random lags/freezes.

BTW: This is not the issue that Tasoulious says here that issue is just a strutter after 5min or so, it doesn't lag the audio, tbh it doesn't bother me, it's not that annoying to see a little strutter after minutes.

Oh Devs please don't get the wrong idea, for 1st playthough even with this issue lastest dolphin is the best experience also dolphin is gorgeous nowadays I just don't like that issue at all that prevents me from using the lastest versions xD , if you like to replay your games many times I would use an older version, in the end I hate myself for notice an issue like this. -_-
First of all, what version of Dolphin are you using? That's critical to this issue, as many stutter sources are still being hunted down and latest master will give the best experience.
I can test out dolphin-master-5.0-13963-x64 right now

Forgot to tell that Ishiiruka dolphin, before get Ubershaders added, didn't had the issue either and Ishiiruka at that time was the only that had Full Async shaders compilation.

Can anyone starts Smash melee, play adventure mode walk until the 10 Yoshis appears, when they appears I get the lag I'm talking about, also get the same lag when items pop in in the stage sometimes, I noticed that if I use 4xSSAA and or Per Pixel Lightning alongside with Speed Up Disk Transfer makes it happens much more, and D3D11 and D3D12 seems better when dealing with this issue.

this area with 10 Yoshi
https://imgur.com/a/UinUe6n

Got to reproduce the issue in 2 minutes in Sonic Heroes Shadow first stage, D3D12 with 3xIR, 4xSSA, Per Pixel Lightning and Speed Up Disk Transfer all them enabled, and in 58sec with Vulkan with the same setup, it lags/freezes so hard that not even using audio stretch option helps.
(04-29-2021, 09:43 AM)hyperspeed Wrote: [ -> ]I can test out dolphin-master-5.0-13963-x64 right now

So you haven't tested Dolphin master?
(04-29-2021, 10:32 AM)MayImilae Wrote: [ -> ]So you haven't tested Dolphin master?

the melee and sonic heroes report are from dolphin-master-5.0-13963-x64
I wasn't able to reproduce the problem with super smash melee with my desktop in profile. The spec in case you don't waiting to look is a r7 3700x, 48gb ram(ddr4 3200) and rtx 2070. That said I did check compile shaders before start. I was using direct 11 by the way. I don't know if you using async ubershader or sync ubershader. The option that the Ishiiruka build use for async is the skip drawing in the current dolphin builds. If you use sync ubershader with 3xir and 4x ssa you putting a lot of gpu load on you card that might be causing it to lag. In general it recommend to async ubershader since it isn't as demanding while assuming no driver or other issue similar in removing stutters from shader generation. You could see if there a graphic card driver update that might help.
(04-29-2021, 10:53 AM)themaster123 Wrote: [ -> ]I wasn't able to reproduce the problem with super smash melee with my desktop in profile. The spec in case you don't waiting to look is a r7 3700x, 48gb ram(ddr4 3200) and rtx 2070. That said I did check compile shaders before start. I was using direct 11 by the way. I don't know if you using async ubershader or sync ubershader. The option that the Ishiiruka build use for async is the skip drawing in the current dolphin builds. If you use sync ubershader with 3xir and 4x ssa you putting a lot of gpu load on you card that might be causing it to lag. In general it recommend to async ubershader since it isn't as demanding while assuming no driver or other issue similar in removing stutters from shader generation. You could see if there a graphic card driver update that might help.

What your settings do you have 4xSSAA, Per Pixel Lightning and Speed Up Disk Transfer all them enabled?

You sure you won't get any audio hiccup at very least?

But why older dolphin versions don't have the issue something is not right here, but maybe I only need to have a more modern CPU and GPU huh, new architecture from both may help.

btw: even at 1xIR I still get the issue though.

Also get the same issue on a notebook with i7 7700HQ with a 1050ti.
I enabled them all included the 3x ir and sync ubershader for my test. I general don't use those settings though and play melee al lot on gamecube in the past so I would have notice any thing serious off but I only test those setting tell the the point you point out. I don't use ssaa, Per Pixel Lightning and Speed Up Disk Transfer in general and usually use aysnc uburshader for the reason a already post with default setting outside of 3x ir. I do have a laptop with the i7 7700hq and a gtx 1070 I could check with but I don't remember have problem with it either with the setting I have post above. I do play the game a decent amount in dolphin and never had any major problems with that game in performence or audio.
So the start of this is built on a misconception.

hyperspeed Wrote:Pretty sure everyone here know what used to happen with dolphin before Ubershaders, the game would run flawless frame pace and audio until a random shader that you don't have appears then you would get lag

That is incorrect. There are many potential sources of stutter within Dolphin, but shader compilation stuttering was by far the biggest one. So many people have mistakenly thought that ALL stuttering was due to shader compilation, and that ubershaders would make all stuttering go away. But nope, we have other less prominent sources of stutter, mostly in our JIT.

hyperspeed Wrote:if I played the game to create all shader cache I would never get this issue again, unless of course some new shader cache appears but other than that you experience 100% lag free.

The method of playing through the whole game and then not getting stutters affects ALL stuttering that can be solved by building up a cache, not just shader compilation caching. There may be stutters that this brute force solution solves that ubershaders does not. Also, even this brute force method cannot fix everything, and never has been able to fix everything. For example, JIT cache clears result in stutters that ubershaders and even the brute force cache accumulation method cannot solve.

hyperspeed Wrote:I will still get those random lags after minutes or so, what's going on here?

There is not enough in your description to know exactly what the issue is. This could be a cache flush, drive issue, random other software spiking, or even just windows scheduler seeing Dolphin's CPU thread and being like "you don't need this" for a fraction of a second. Those are all known sources of stutter in Dolphin that were not solved by ubershaders. These are hard, hard things to fix and also, they are not new. How a particular game behaves in particular versions of the JIT and your precise system specs will vary of course, so just saying "but doing XYZ doesn't do it in 3.0-500" doesn't mean all that much as it's likely just happening elsewhere but you can't see it due to other stutters. And yes, your extremely precise system specs, like your CPU cache size, memory speed, precise windows version, drive specifications, even other applications running on your computer are all factors in those every few-minute-scale stutters. For example, RGB software can be a major source of stutter. It was on my machine at least, but it may not be on yours.

Basically, this is hard. And it has never been nor will it ever be simple.
yes you're right, well if you guys are aware of this makes me feel much better, older builds used to have odd issues like this one too https://bugs.dolphin-emu.org/issues/5384
not related to shader cache at all so i believe jit and even the dsp emulation maybe are to blame for this problem.

Thanks for the replys @MayImilae and @themaster123 i really appreciate it!!
Pages: 1 2