Hi Forum,
I was playing around with the number of interactions in a loop for a shader which initially reported 32 WR and 54 UR registers by malioc.
As the number of iterations increased the number of allocated UR kept on increasing to 58,60,64 and so on whereas the WR number remained 32.
What is the reason for this behaviour? Since according to the use case of UR, we generally don't expect constants and uniform data to increase as the number of iterations increase.
Regards,
Swapnil
For that shader, I'd expect that the loop is getting fully unrolled, at which point "i / NUM_SAMPLES" is a constant than can be precomputed and stored in uniform registers.