Originally posted by LeJimster
View Post
Announcement
Collapse
No announcement yet.
Intel's Mesa On-Disk Shader Cache Maturing, Radeon Devs Not Yet Convinced
Collapse
X
-
Originally posted by LeJimster View PostAs far as I'm concerned a shader cache is needed for games like The Talos Principle.
ogl_bDisableShaderCaching = 1
ren_bMultiThreadedRendering = 0Last edited by dungeon; 14 July 2016, 05:20 AM.
Comment
-
Originally posted by tarceri View PostTo keep things simple we don't actually cache the IR. We just check the sha1 and either say yes we have seen this before and skip the creation of the IR or no we haven't and compile as normal. At the end of the line the driver backend also needs to cache/load its own binary format but that's pretty straight forward. The ugly part is that because we keep things simple by not storing the IR it means we have to do extra checks if we need to fallback to a full recompile rather than just using a cached IR we need to recomplie from source but this should be rare and again once its cached it wont happen again until Mesa is upgraded (in which case the cache object is removed and we fallback to a full recompile).
It's been some time (couple months), but I seem to remember trying to wrap my head around glsl to blob serialization parts of your code and logic in glsl/linker.cpp. No need to get touchy though, way I've reviewed your code was by reading patches is chronological order.
One thing that messed with me iirc was that _some_ of early patches did more than what commit message suggested which tends to mess with me, but chances are that got fixed in subsequent RFC-worthy rebases.
Thanks for your efforts though.
Comment
-
@dungeon
Serious Engine 3.5 (Serious Sam 3) and Serious Engine 4 (The Talos Principle) precache shaders, that's correct. If you change drivers for the same card (it looks like the PCIID is used to identify) it is sometimes useful to delete the cache (gamedir/Temp/ShaderCache). But i doubt anybody will notice if the gfx driver cached it before - and those engines are definitely not affected by that change. Source 2 engine games like CS:GO seemed to stutter once a new shader was used - i guess there a cache can help much - stuttering in a competitive shooter is always bad.
Comment
-
-
Originally posted by Kano View Post@dungeon
Serious Engine 3.5 (Serious Sam 3) and Serious Engine 4 (The Talos Principle) precache shaders, that's correct. If you change drivers for the same card (it looks like the PCIID is used to identify) it is sometimes useful to delete the cache (gamedir/Temp/ShaderCache). But i doubt anybody will notice if the gfx driver cached it before - and those engines are definitely not affected by that change. Source 2 engine games like CS:GO seemed to stutter once a new shader was used - i guess there a cache can help much - stuttering in a competitive shooter is always bad.
If we ever get to the state where VR gaming really takes off, this will need to be addressed. Luckily we aren't there yet.
Comment
-
Originally posted by Kano View Post@dungeon
Serious Engine 3.5 (Serious Sam 3) and Serious Engine 4 (The Talos Principle) precache shaders, that's correct. If you change drivers for the same card (it looks like the PCIID is used to identify) it is sometimes useful to delete the cache (gamedir/Temp/ShaderCache). But i doubt anybody will notice if the gfx driver cached it before - and those engines are definitely not affected by that change.
Comment
-
Yes, it is optimal - it will compile it once (as it must do that) then cache it to the disk once in the lifetime and you will never ever see it again... after that all is butter smooth
So if you are amdgpu-pro user like you isn't , do this an enjoy
ogl_bDisableShaderCaching = 1
ren_bMultiThreadedRendering = 0Originally posted by Kano View PostNo idea why MT should be bad, did you do any Talos benchmarks?
So the best is to disable both if you use amdgpu-pro.Last edited by dungeon; 14 July 2016, 03:15 PM.
Comment
Comment