Dolphin, the GameCube and Wii emulator - Forums

Full Version: Accuracy is the mantra yet Dolphin stutters itself to infinity
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
...and beyond basically. Look, guys, I really appreciate what you're doing here, I've been following the development of Dolphin for a long time and seems like you're at the point now where it's getting really awesome... but just what the hell is up with the stuttering that plagues this emulator since God knows when? Is it still that shader issue that was identified half a century ago? It's just sad that when I speed up my games I see an avarage framerate of over 100 yet when I aim for a vsynced smooth 60 fps I still get stuttering.

Please, just focus on the important issues instead of doing stuff that seems pointless for the near future. For example why is there a DX12 AND a Vulkan backend? These low level APIs are complex as fuck, one of them is more than enough to work on (stick with Vulkan, just saying) so how about coming up with a solution to those shaders instead? There's this constant mantra about how important accuracy is yet the way I remember it games did not really stutter all the time on the original Wii and GameCube consoles. How is that accurate then?
Because that's the host machine state, not the emulator itself.

The stuttering is unavoidable; you can look at any modern emulator and see it. Cemu, Citra, PPSSPP, etc. The only solution that has been presented and completed results in missing graphics (sometimes permanent in the case of some EFB Copies.)

If you have some great idea on how to fix shader stuttering without an immense amount of work, feel free to go ahead and say it. I'm all ears.

edit: I don't mean to sound snarky, but, everyone asks "why don't you fix shader stuttering" but does anyone know how to fix it? We have a plan, but it's an immense amount of work and it's not something that just anyone can do.
Devs that don't know what to do for shader stuttering are working on all the other features, aka the Vulkan and D3D12 backends (one person knew how to do D3D12 and basically wrote it all by himself and then left it in a halfworking state)
(12-07-2016, 01:57 PM)JMC47 Wrote: [ -> ]edit: I don't mean to sound snarky, but, everyone asks "why don't you fix shader stuttering" but does anyone know how to fix it? We have a plan, but it's an immense amount of work and it's not something that just anyone can do.
That's really good to hear. Anyway I don't know what the solution is (I'm no programmer, not even close so this will be just speculation) but they way I see it there are multiple approaches to fixing this stuff:

- Usually a game runs at 60 fps which means that there is a 16ms window where the emulator can compile shaders without causing stuttering. Speeding up the process maybe? We have these awesome new APIs, maybe there's a solution they could provide.

- Pre-compiling shaders: I wouldn't mind letting Dolphin run for hours just to compile shaders if that means I'll have an experience with minimal stuttering instead of the carneval of stutter that is happening now.

- Creating a universal shader base the emulator can work with. I remember there was talk about doing this years ago and if I'm not mistaken someone said that it's totally possible.
There are so many shaders that you could let your computer compile shaders for an eternity and you won't make a dent for realistic game usage. We can only pre-compiling shaders only can work for the shaders we know exist. Sure, a few popular games would work, but that isn't a real solution.

The problem is really that graphics cards aren't optimized at compiling shaders on the fly. So, we have to figure out a way to pre-compile them if we ever want to avoid stuttering. The idea is to hand write a massive, insane shader (or small subset) that can handle any possible situation the GC/Wii can throw at our GPUs. Then, instead of pausing to compile shaders, we can sub that in (with a performance penalty that won't matter for good graphics cards...) while the faster shaders are generated on the fly.

It's just a massive amount of work and it's going to be a while before this is finished.
Btw, why don't provide async shader compilation under Hacks ? Is that a way to encourage someone to work on a proper solution ?
Because it's a gross hack that makes dolphin pretty unstable.


Additionally, people contribute what they want to see in Dolphin. We're not looking to sell a product, and anybody can fork dolphin and focus on what they like.
(12-07-2016, 03:24 PM)JMC47 Wrote: [ -> ]There are so many shaders that you could let your computer compile shaders for an eternity and you won't make a dent for realistic game usage. We can only pre-compiling shaders only can work for the shaders we know exist. Sure, a few popular games would work, but that isn't a real solution.

The problem is really that graphics cards aren't optimized at compiling shaders on the fly. So, we have to figure out a way to pre-compile them if we ever want to avoid stuttering. The idea is to hand write a massive, insane shader (or small subset) that can handle any possible situation the GC/Wii can throw at our GPUs. Then, instead of pausing to compile shaders, we can sub that in (with a performance penalty that won't matter for good graphics cards...) while the faster shaders are generated on the fly.
This is a bit worrying... how much of a performance hit will we see? So far Dolphin was pretty light on the GPU-side so I hope I won't see my GTX 970 slowing down to a crawl.
(12-08-2016, 08:12 PM)Zaxx Wrote: [ -> ]This is a bit worrying... how much of a performance hit will we see? So far Dolphin was pretty light on the GPU-side so I hope I won't see my GTX 970 slowing down to a crawl.

A 970 should be fine. It's currently not optimized but you can see if you can run it https://github.com/dolphin-emu/dolphin/pull/3163 (near the bottom are builds)
(12-08-2016, 08:12 PM)Zaxx Wrote: [ -> ]This is a bit worrying... how much of a performance hit will we see? So far Dolphin was pretty light on the GPU-side so I hope I won't see my GTX 970 slowing down to a crawl.

The idea is that it uses the generic shader while compiling the specialized shader. So there should be little performance hit unless you only want to run on that generic shader, which would have a huge hit (And I think what the current PR does?)
Pages: 1 2 3