Dolphin, the GameCube and Wii emulator - Forums

Full Version: [Feature Request] Synchronous Shaders being able to occur at start.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

Is it possible that the Synchronous Shaders (Default Mode), allows Compilation at the start? Currently only the Uber shaders can get Queued and compile before start. The reason I'm asking is that for lower power devices (Amlogic S922X chip 4GB Ram) the compiling of the sync Shaders is very noticable and the FPS drops to 0 temporarily freezing the game up.
If they were pre-compiled it should theoretically remove the drop that occurs.
I tried to make the change but the Shader code is over my head and I don't really know what I'm doing.

Also one more feature request. Would it be possible in the config text to be able to limit the FPS, like to say 30FPS while maintaining VSync? Tha would be a great feature too.

Otherwise keep up the great work on this amazing emulator, Cheers Team!! Big Grin

I'm a dev for EmuELEC which uses dolphin, which is why I'd like these enhancements.
Big Grin
Dolphin is already able to precompile shaders for all the pipeline configurations it knows of if you turn on Compile Shaders Before Starting. It's impossible to precompile shaders for every possible pipeline combination – there are more possible combinations than there are atoms in the universe.
(06-08-2023, 01:29 AM)JosJuice Wrote: [ -> ]Dolphin is already able to precompile shaders for all the pipeline configurations it knows of if you turn on Compile Shaders Before Starting. It's impossible to precompile shaders for every possible pipeline combination – there are more possible combinations than there are atoms in the universe.
Leaving the Shaders on default thought, pre-compile shaders before start, doesn't work. I don't get the loading bar because only the Uber shaders are queued when changed in config.
(06-08-2023, 05:38 PM)Langerz82 Wrote: [ -> ]Leaving the Shaders on default thought, pre-compile shaders before start, doesn't work. I don't get the loading bar because only the Uber shaders are queued when changed in config.

Like I said, Dolphin can only precompile shaders for the pipeline configurations it knows about.
(06-09-2023, 02:16 AM)JosJuice Wrote: [ -> ]Like I said, Dolphin can only precompile shaders for the pipeline configurations it knows about.
You obviously know about it more than I ever could. Just wondering why uber shaders for a game I tested had 60 or so shaders to compile, but changing it to the default shader it has none?
With ubershaders, Dolphin is able to enumerate every possible combination to compile, since there are only 60 or so. With specialized shaders, it can't do that, since there are more possible specialized shaders to compile than there are atoms in the universe.
ok I understand. Would it be possible to save the compiled shaders to disk at runtime? Is there a config option or does dump them on a clean exit? We use an external program that uses game controller to send a kill to the program? Would that affected dumping compiled shaders?
(06-12-2023, 11:07 AM)Langerz82 Wrote: [ -> ]Would it be possible to save the compiled shaders to disk at runtime?

Dolphin is already doing this.
(06-13-2023, 06:07 AM)JosJuice Wrote: [ -> ]Dolphin is already doing this.

It must not be saving to disk on our builds, because if I run the game during a certain part it always chokes only on the first play-through subsequent plays without quitting it doesnt at all. But when I exit and run the game again the same section, it freezes up again first time like it hasnt saved the shader. Is there some configuration I am missing? maybe a missing directory to store the shaders so it's not writing too it?
I looked through the code and for OpenGL,
g_Config.backend_info.bSupportsShaderBinaries = false;

Could that be th reason why it's not saving for OpenGL? I dont think we support Vulkan unfortunately.