Emulator Issues #11898

Shader compilation UID cache increases in size across Dolphin builds

Added by ryanebola16 over 1 year ago. Updated 7 months ago.

% Done:


Operating system:
Issue type:
Relates to usability:
Relates to performance:
Relates to maintainability:
Regression start:
Fixed in:


Game Name?

Super Smash Bros. Brawl loaded through Gecko OS

Game ID? (right click the game in the game list, Properties, Info tab)


MD5 Hash? (right click the game in the game list, Properties, Verify tab, Verify Integrity button)

WIIScrubber edited ISO, only replaces music and intro video. Works fine on Dolphin and real Wii.

What's the problem? Describe what went wrong.

This problem is more noticeable when "Compile Shaders Before Starting" is checked. Even in the past ~10 builds before my current build, the number of shaders compiled for Dolphin has been increasing. Numbers reported below are with D3D11 but this problem occurs on all video backends.

00000000.uidcache that has been used for multiple Dolphin builds on 5.0-11231
Shaders compiled for Gecko OS: 11227
Shaders compiled for Brawl without Gecko OS: 773

Deleting 00000000.uidcache before starting 5.0-11231
Shaders compiled for Gecko OS: 226
Shaders compiled for Brawl without Gecko OS: 773

Not sure it will help, but I attached my 00000000.uidcache that causes dolphin to generate 11227 shaders when using Gecko OS on 5.0-11231.

What steps will reproduce the problem?

  1. Check "Compile Shaders Before Starting"
  2. Launch Super Smash Bros. Brawl through Gecko OS across multiple builds of Dolphin
  3. Notice that the compiled shader number will increase as you perform step 2
  4. Deleting 00000000.uidcache before starting emulation will reduce the number of compiled shaders

Is the issue present in the latest development version? For future reference, please also write down the version number of the latest development version.


Is the issue present in the latest stable version?

I can't remember if 5.0 had an equivalent of "Compile Shaders Before Starting" so I didn't test it but this issue has been around since "Compile Shaders Before Starting" was an option (and likely before that).

What are your PC specifications? (CPU, GPU, Operating System, more)

Win 10 Pro x64
Intel Core i7-4702MQ CPU @2.20GHz
GeForce GT 750M
2x 8GB Hynix 1600MHz
GeForce Game Ready Driver 425.31

Is there anything else that can help developers narrow down the issue? (e.g. logs, screenshots,
configuration files, savefiles, savestates)

Despite #11572 being fixed, Stenzek's statement may still apply:
"Sounds like Gecko OS is sending an incorrect configuration to the GPU, and these are getting persisted in the UID cache the next boot. I've verified some of the other "bad" register combinations on hardware and they just cause broken rendering, not GPU hangs. But I haven't tested the sourcerow one specifically.

IMO, the fix is to log a warning and either replace it with a default value, or fail the shader compiling in the first place and skip the draw. Matching the excact "undefined" behavior on the hardware could be tricky because sometimes the behavior is based on the last thing drawn/whatever was last in the registers." (110 KB) ryanebola16, 11/20/2019 06:26 AM

Related issues

Has duplicate Emulator - Emulator Issues #11685: Gecko causes Dolphin to crashDuplicate


#1 Updated by JMC4789 7 months ago

  • Status changed from New to Accepted

That probably explains why the startup is so much of a bastard on my computer.

#2 Updated by JMC4789 7 months ago

#3 Updated by ryanebola16 7 months ago

  • Assignee set to Stenzek

Assigning to Stenzek since the duplicate issue was assigned to them. If I remember correctly, this problem no longer crashes the emulator but still occurs so I'm not copying over the milestone or regression start.

Also available in: Atom PDF