Project

General

Profile

Actions

Emulator Issues #12646

closed

Shader stutter on Vulkan when using ubershaders

Added by shatteredlites over 2 years ago. Updated over 1 year ago.

Status:
Fixed
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:
5.0-17403

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?

Actions #1

Updated by JosJuice over 2 years 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.

Actions #2

Updated by shatteredlites over 2 years 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

Actions #3

Updated by shatteredlites over 2 years ago

Editing an INI? Where would such an option be?

Actions #4

Updated by JosJuice over 2 years 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.

Actions #5

Updated by JosJuice over 2 years 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.

Actions #6

Updated by JMC4789 over 2 years 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.

Actions #7

Updated by shatteredlites over 2 years 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.

Actions #8

Updated by iwubcode over 2 years 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.

Actions #9

Updated by JosJuice over 2 years ago

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

Updated by JMC4789 over 1 year ago

  • Status changed from New to Fixed
  • Fixed in set to 5.0-17403

Fixed to the degree we can fix it currently. Should behave perfectly on some graphics drivers, should no longer be way worse than D3D12.

Actions

Also available in: Atom PDF