Dolphin, the GameCube and Wii emulator - Forums

Full Version: What exactly causes shader cache stuttering?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4
For those curious, here's the PR.

@Jhonn: I have heard that they will be more demanding on the computer… is that true?
(01-16-2016, 02:21 AM)leolam Wrote: [ -> ]@Jhonn: I have heard that they will be more demanding on the computer… is that true?

I have no idea. At least on the systems from my signature I didn't notice any performance drop at all...
In an ideal implementation, the old shader system would be used, too, and the ubershaders would only be needed while the traditional ones were being compiled. Ubershaders are definitely faster than pausing the game to compile fresh shaders, so it should kill (or at least reduce) stuttering, without effecting the bits which were already fine.

techloomp

I feel like best/simplest/most effective solution is somehow omitted. Personally I think the best way to solve shader compilation stuttering would be to:

1. Gather necessary shaders - in "oryginal" form, just the "bytes/code" before it is transformed into PC GPU shaders
2. Save them on disk, or remotely through some REST API with game identiefier and hash (global database for each game, anyone playing Wii game through Dolphin could be sending game "oryginal" shader "bytes/code")
3. Per request, on target pc/GPU/driver transform all gathered "original" shaders to PC GPU shaders, compile it: a) when user whants (without actually playing game) or b) when users starts a game and wants to wait till all the shaders will be compiled or c) when user starts a game - in seperate thread
4. Now we have pre-compiled PC GPU shaders per game - use it (check hash) if it is available, if not do point 2
5. When Dolphin will detect GPU/driver change - do point 3

The idea is to have all the "original bytes/code" that have to be transformed to PC GPU shaders for each game (to gather most of them at least one person would have to actually finish whole game). This can be later offered as downloadable package for game. Dolphin will have to re-compile it each time when GPU/driver change - save it and re-use.

What is wrong with my thinking ? Isn't that best/simplest to implement solution ?
That's kind of like one of the proposed uses of shader UIDs which we've seen recently. We can't have exactly the same 'stuff' from the original game all the time, as often the 'stuff' required isn't in an individual GLSL file, but is instead part of the runtime state of the machine/emulator. That means that there could still be Dolphin updates which invalidate the UIDs. There're also infrastructure/implementations issues - someone would have to host this database of shader UIDs and maintain it, and someone has to make the thing in the first place (although that may be simpler than doing it with Ubershaders). Less popular games are also less likely to have a full shader database available, so will still stutter, and the first user to play each game after a breaking change will also have stutter. Finally, there's an issue that the data may count as a derivative work of the original game, so there may be copyright issues when sharing it.
It's literally the ideas that were already mentioned, and lol, that's not something I would call simple, especially as it would need a server infrastructure.
As someone who mostly plays shitty, obscure games, I do not like that solution. It does not help me in my enjoyment of shitty, obscure games.

techloomp

(12-14-2016, 01:02 AM)leolam Wrote: [ -> ]It's literally the ideas that were already mentioned, and lol, that's not something I would call simple, especially as it would need a server infrastructure.

Yeah, but setting up server and simple REST service for it is like 8h of actual work (or less) - this is very simple task (figuring out how to protect it would be bigger challenge).

techloomp

(12-14-2016, 01:17 AM)JMC47 Wrote: [ -> ]As someone who mostly plays shitty, obscure games, I do not like that solution.  It does not help me in my enjoyment of shitty, obscure games.

Yeah, but you playing shitty, obscure games you would make them work better for everyone else (beside I think you aren't only one playing those).
Yeah, but, there are thousands of games on the Wii, this isn't a real solution.
Pages: 1 2 3 4