(In reply to comment #9)
> Ian, is this patch committed?
It is not. When this code is used, the GLSL compiler inlines *everything*, and programs quickly become too large (or use too many registers) to run in hardware. We're going to have to do some work on the GLSL compiler before we can properly implement this. I don't have a good solution for right now.

(In reply to comment #10)
> We're going to have to do some work on the GLSL compiler before we
> can properly implement this.
Ian, can you tell me what are the bugs filed against GLSL that are linked to this issue?