Dolphin, the GameCube and Wii emulator - Forums

Full Version: Question about shader cache
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
First off I would like to apologize for making this thread. I did try and search for this topic but didnt really turn up with a conclusive answer. I think this is where all my woes are coming from.

So now basically what I would like to know, is how does it work? From my understanding (which is limited so sorry if I am wrong) is that you need to play a game once to build up the shader cache. Okay got that. Now where I get confused is how does the shader cache work once its built? Does it work for the entire game? Or does it only work for certain assets? Does it rebuild it self every time I open the game? Could it be causing problems because its not in the same HDD as dolphin? Which would be strange because technically, the Shade Cache folder is in my SSD...

For example playing Super Smash Bros. Brawl if I play on a new map I get massive stutter and fps drops. But yet if I play on a map earlier it will play for the most part okay. Another example is on Wind Waker. If I got into a new dungeon or room I will get a brief stutter. If I open a chest (sometimes) I will get a stutter. Sailing, I always randomly will get a stutter its never in the same spot its just random. Is this the work of the shader cache not working? I have the shade caches built (see pic) or what could it be? Is this considered NORMAL??

If this is the case, does that mean I would have to pretty much complete a game the first time with stuttering just so that the second time playing is smooth? Again sorry for posting this I just would like to have my games play perfectly and hopefully I will have a better understanding of this.
It's unavoidable currently; it's the GPU itself taking forever and stalling.
(08-21-2014, 03:37 AM)JMC47 Wrote: [ -> ]It's unavoidable currently; it's the GPU itself taking forever and stalling.

So its my gpu that causing my stuttering and not the shader cache? I set my gpu to maximum performance under the nvidia control panel and I monitor my clock speed and it never drops.
It doesn't matter if the clock drops, any GPU will do this because they're just inefficient at this.
Okay so is the gpu controlling the shader cache then or does the shader cache have nothing to do with this? Sorry I am just a little confused.
I'm not really a GPU guy, I could be messing up the explanation totally. The point is, when the shaders are generated, it stutters because our computers can't keep up. The actual gamecube/wii didn't have any need to do this because native console. The reason we cache the shaders is so that next time it runs into that shader, is just loads it and there's no stuttering.
Its okay I appreciate the explanation. So is it possible to eliminate the stutter entirely or basically it is normal to get that stutter then? Because if that is the case I am not sure I understand why I get the stuttering when I am sailing on WW. The sea uses the same textures and so do the crows nests that pop up. But if this is normal I wont spend hours trying to tweak it Big Grin Another question I had, is that I did read on here somewhere that an idea was thrown around about uploading a shader cache for games and then you could download them individually. Would that work at all for future dolphin updates?
Well - Im just reading about this also. It's not that easy to just copy/paste the cache because each combination of cpu/gpu/os/dolphin may generate them little different.
I don't know how it works in emulator world, but in PHP (Symfony/Doctrine) we just have cache warmup/proxy generation etc. But I don't think that with games it's possible to do it like this without actually play game triggering shaders...
Shader compilation is done on the CPU, not on the GPU. But it's not under control of Dolphin.
I've been thinking about that for a while; from what I read, uber shader + async would be the best solution but it requires tons of work. As far as I know, the only requirement to compile a shader is it's source code, right? Dolphin already caches the shader in binary form, but because of that it's tied to that specific GPU/driver used during the compile time. What about adding an option to dump shader source code and another option to "pre compile" those shader dumps, would that be feasible? That way we could distribute packs of shader sources of a particular game, the user would download that pack somewhere and compile them ahead of time (that's what PC games do, isn't?) to prevent stuttering...
Pages: 1 2 3