Project

General

Profile

Emulator Issues #12646

Shader stutter on Vulkan when using ubershaders

Added by shatteredlites 3 months ago. Updated 3 months ago.

Status:
New
Priority:
Normal
Assignee:
-
% Done:

0%

Operating system:
N/A
Issue type:
Bug
Milestone:
Regression:
No
Relates to usability:
No
Relates to performance:
No
Easy:
No
Relates to maintainability:
No
Regression start:
Fixed in:

Description

With other emus getting async shader compilation and disk shader cache on Vulkan without stutter I'm wondering why dolphin hasn't taken the same approach. Iirc at the time ubershaders were implemented it was said AMD VK didn't have a shader pipeline but this doesn't seem to be the case anymore. Will this ever be looked at again to work better in the future? Or am I mistaken and the Dolphin approach is completely diff for a reason?

History

#1 Updated by JosJuice 3 months ago

  • Status changed from New to Questionable

I'm unsure what you're requesting here. Dolphin already has asynchronous shader compilation and a disk shader cache. Currently the shader compilation isn't multithreaded by default, but you can make it so by editing the INI files.

#2 Updated by shatteredlites 3 months ago

JosJuice wrote:

I'm unsure what you're requesting here. Dolphin already has asynchronous shader compilation and a disk shader cache. Currently the shader compilation isn't multithreaded by default, but you can make it so by editing the INI files.

I just know ubershaders on AMD Vulkan Will still produce stutter when shader are compiled and other emus have seemed to not suffer from this at all so I was kinda curious why Dolphin hasn't been updated to work as smoothly. Only DX11 gives a stutter free exp atm

#3 Updated by shatteredlites 3 months ago

Editing an INI? Where would such an option be?

#4 Updated by JosJuice 3 months ago

  • Status changed from Questionable to New

Ah, so right now the shader compilation on Vulkan is blocking, even when using hybrid ubershaders?

Resetting the status of this issue so someone who knows more about Vulkan can take a look instead of me.

#5 Updated by JosJuice 3 months ago

The option for multithreading is ShaderPrecompilerThreads under [Settings] in GFX.ini. But this doesn't really fix stuttering, it just reduces the time it takes to compile multiple shaders at once.

#6 Updated by JMC4789 3 months ago

Note that Dolphin is different than other modern emulators in that it's generating shaders to emulate a fixed-function pipeline GPU. I'm guessing that newer emulators are emulating shader-based GPUs, which is a different challenge in general and not really all that related unless they're generating/compiling shadows on demand.

As far as I remember, Stenzek said there was some stuttering on Vulkan Ubershaders due to pipeline changes even when using Ubershaders. D3D11 is the only backend that I remember not suffering from either the pipeline issues or driver inefficiencies. If there's some tech in newer emulators that can work-around this issue, I'd love to know, though.

#7 Updated by shatteredlites 3 months ago

Yea hybrid is what I keep it on and there's always stutter as if it wasn't on. DX11 works with hybrid perfectly though.

#8 Updated by iwubcode 3 months ago

Can someone update the title so that it properly reflects the issue? Ex: "Remove/Reduce shader stutter on Vulkan when using Ubershaders".

I've thought the same but have never looked into it. One thing I'd love someone to get to is to switch us over from skipping the GLSL step and generating SPIRV directly. I'm not sure how much (if any) impact that would have on this issue though.

#9 Updated by JosJuice 3 months ago

  • Subject changed from [Feature Request] Update Ubershaders to Shader stutter on Vulkan when using ubershaders

Also available in: Atom PDF