Hello!
I am developing an 3D game for android.
But I am stucked at this long shader compilation time issue on SGX544MP.
I compared shader compilation time between Galaxy S3(MALI-400 MP) and S4(SGX 544MP).
With a same shader S3 only takes 6ms, but S4 takes 995ms.
As I know, SGX 544MP is much powerful than MALI-400MP. So it makes me confused.
Does anyone know this issue and solution for this?
Thank you for your help in advance.
-KS
Hi KS,
There are a number of reasons why it might be so comparatively slow. In particular - I believe ARM’s compiler doesn’t necessarily compile until first use of the shader (e.g. the first time it’s used in a draw call). Combatting this is generally referred to as “pre-warming” the shader - Unity for example has a step to pre-warm any shader you use to avoid this, by calling a dummy draw call. Our hardware tends not to do this (there are some late-stage optimisations but the shader is compiled), so you’ll find the entire cost of the shader compilation is up front. Out of interest - how are you measuring the shader compilation time?
Regardless, 995ms is still a long time! So the first thing I’d suggest you try in order to get around this - try using the GLSL optimiser built into PVRShaderEditor. Any pre-optimisations done with this will generally reduce the shader compilation time - sometimes significantly. Let us know if that helps!
Thanks,
Tobias