Originally posted by bridgman
View Post
Announcement
Collapse
No announcement yet.
It's Getting Close Whether The OpenGL On-Disk Shader Cache Will Happen For Mesa 17.0
Collapse
X
-
-
Originally posted by pal666 View Postnumber one is multithreaded driver. radeonsi already has in-memory cache
- Likes 1
Comment
-
Originally posted by shmerl View Post
This doesn't make sense. The whole point of cache is to store the compiled result. Each GPU has its own architecture, so compiled shaders are specific to the GPU. They are not compatible with each other. That's the whole point of shaders being in the intermediary format, and at the same time running on different hardware with different machine instructions. They are compiled for each GPU! But you can cache them if you are on the same hardware. So your idea isn't feasible.
It wouldn't shorten the loading time, quite the opposite, but it removes stuttering in-game.
Comment
-
Originally posted by geearf View Post
Technically you could store the uncompiled shaders and compile them on loading instead of in-game, like Cemu does.
It wouldn't shorten the loading time, quite the opposite, but it removes stuttering in-game.
Comment
-
Originally posted by shmerl View Post
Some games do that. Even better, why can't games take care of caching itself? They can cache compiled shaders for given GPU, and skip compilation, if next time the same GPU is used.
That was the way Mesa devs were able to quickly add support for GL 4.1 (and GL_ARB_get_program_binary) without actually doing the work of figuring out how to cache compiled shaders. The new work to automatically cache shaders is fairly trivial compared to the underlying work here enabling the loading and storing of shaders at all, whether by an automatic cache or by manual GL calls from the game.
Comment
-
Originally posted by shmerl View PostEven better, why can't games take care of caching itself?
I am curious about the pros and cons of drivers vs applications doing that work.
Aside from that I got curious, we already got in-memory shader cache, and isn't it the first major step to in disk cache? It seems like serializing the memory to disk with a few ids for the driver and game should be fairly easy, why is that not the case?
Originally posted by smitty3268 View Post
They can, except not on Mesa because it will just report the binaries as invalidated each time.
That was the way Mesa devs were able to quickly add support for GL 4.1 (and GL_ARB_get_program_binary) without actually doing the work of figuring out how to cache compiled shaders. The new work to automatically cache shaders is fairly trivial compared to the underlying work here enabling the loading and storing of shaders at all, whether by an automatic cache or by manual GL calls from the game.
- Likes 1
Comment
Comment