Project

General

Profile

Actions

Emulator Issues #8053

closed

Shader Generation Slowdown/Framedrops/Stuttering

Added by JMC4789 over 9 years ago. Updated over 6 years 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-4869

Description

Game Name?

This effects most titles. Notably, in F-Zero GX, Metroid Prime 2/3 and several others, actual defects can be caused by the shader cache stuttering in dualcore mode. Other games just suffer from an inconsistent framerate that can be annoying to users as they play the game.

The Problem:

All modern graphics processors are flexible programmable processors, which use shaders as their application of choice. Dolphin uses shaders to emulate the entire fixed-function pipeline of the Gamecube/Wii GPU.

Updating the state of the GPU is exceedingly cheap on hardware, meaning there can be a lot of shaders being generated in short order.

It takes a reasonable amount of time to generate our shaders (with some maxing out at 30ms according to my tests in F-Zero GX) which guarantee that Dolphin cannot generate the shader in one frame. A second problem is that even when the shaders take less time to generate, there are often 30 - 40 shaders being generated in short order. Even at 1 - 2ms each, that would still lead to stuttering.

In order to partially quell this problem, Dolphin caches the shaders after they are generated. That means on subsequent uses, the shaders don't have to be generated. This does not work on all hardware configurations or drivers, though, and doesn't really solve the problem. Every time Dolphin updates, the cached shaders have to be thrown out currently anyway.


Related issues 7 (0 open7 closed)

Has duplicate Emulator - Emulator Issues #8618: Final Fantasy Crystal Chronicles: The Crystal Bearers Infinite shader caching.Duplicate

Actions
Has duplicate Emulator - Emulator Issues #8887: final fantasy cystal bearers slowdownDuplicate

Actions
Has duplicate Emulator - Emulator Issues #9081: Mario Kart Wii Race Start FPS DropDuplicate

Actions
Has duplicate Emulator - Emulator Issues #9150: Metroid prime trilogy fps slowdownDuplicate

Actions
Has duplicate Emulator - Emulator Issues #9189: Direct3D backend microstuttering shader cacheDuplicate

Actions
Has duplicate Emulator - Emulator Issues #9318: Beyond Good & Evil heavy stutterDuplicate

Actions
Has duplicate Emulator - Emulator Issues #10376: Lag/Stutter in Metal Arms with New System HardwareDuplicate

Actions
Actions

Also available in: Atom PDF