I was profilering our game using Arm Graphics analyzer and noticed that in the profiler there is a column in the shader window called spilling uses.It said that when the number required for work registers it too great,it will store variable to RAM istead. And saidly most of our game shader program causes the register spilling. But something strange is that some shader program uses 8 uniform registers and 16 work registers and dosn not cause spilling while other shader programs with 16 uniform registers and only 8 work registers cause spilling. I wander if the maximun number of the uniform registers and work registers is fixed? Or the maximun allowed work registers have nothing to do with uniform registers number?
thank you for your reply. I know the more threads in compute shader will result in less registers, but i thought for normal shader like vertex/pixal shader,they have fix number of register assigned to them, is it wrong. And i also want to know that for those 8k or 16k registers, do them contain uniform register as well? Or just contain the temperary register(or work register in Arm Graphics analyzer)? I use quite a lot uniform variable in my shader program will result a large number of uniform registers, I wonder if it the reason cause the register spilling problem. Again, thank you for your help.
And i forget to said that the GPU i mentioned above is Mali, GPU for mobile phone.