I was under the impression that GLSL didn’t have restrictions as to program length, register usage, etc, the way DirectX does.
You’ve been misinformed. There’s a lot of misinformation about glslang, particularly due to what 3DLabs (and John Carmack) wanted it to do.
Glslang as it stands today has two kinds of limits. There are the kinds of limits that are reasonably easy to quantify: number of vertex attributes available, number of varying floats, number of uniforms available. These are things that the user directly uses and can easily be quantified. There are glGet calls to acquire the values for these limits on a hardware-basis.
Then, there’s the other kind of limit. The kind of limit that glslang abstracts away. These limits are things that you can’t adiquately describe in a high-level language context. Things like instruction count (determined by compilation, so it’s hard to stay within the restrictions), number of temporary registers (the compiler determines how these are laid out), texture access dependencies (for R300/R420-class hardware only), and other hardware-dependent restructions that simply can’t be effectively communicated to the user in any meaningful way.
Glslang does not expose these limits. However, it does allow compilers to freely live within those limits. It allows a glslang compiler to fail for any implementation-dependent reason. This can include violating instruction limits, texture dependency limits and so forth.
This doesn’t let glslang get around those limitations; it just makes it that much harder for the user to know whether or not he has violated them. The theory is that, as hardware improves, we will stop running into those limits, so we won’t have much problem with them.
However, the design of glslang was concieved such that there is the possibility of transparent multipassing. That is, if a shader cannot be run in one pass on hardware, the compiler could actually break it up into multiple passes, rendered onto internal render targets, to produce the desired effect. If an implementation wanted to accomplish this, glslang allows for it by not exposing those limitations.