I have a case with four separate GLSL vertex shaders, where 1/4 of the scene is drawn with each of the shaders. This scene, running at a fixed 60 Hz, takes 100% of the CPU! Meanwhile, if I set the vertex shader once, and just draw the same scene (just not switching shaders), the same scene takes 5% of the CPU.
I can understand that the first bind of a specific shader would cause compilation and validation, but this CPU usage is each and every frame; not just the first time the shader is bound.
What can I do to prevent this problem? Spending all that CPU on just switching shaders is not an option for us; we'll have to go back to fixed-function processing.