Somehow developers are able to deal with this, and I’m don’t see how GLSL changes that.
It used to be pretty obvious and transparent as to what was and wasn’t available. You just check the extension string; if the driver didn’t expose ARB_crossbar, you didn’t use it. The unspoken and unwritten pact between the driver developers and ISVs was that the things that were exposed (as well as a well-known subset of standard OpenGL functionality) would run in hardware.
With glslang, we just have no idea. A shader that ran today just fine may break because some moron on the ATi driver staff happened to change the compiler and it now blows the instruction limit where it did not before. Is there a solution for this?
By contrast, if a driver suddenly stops supporting ARB_crossbar, the software can detect this and turn off features appropriately. So, while it still is a driver bug, the game doesn’t suddenly run in software.
Basically, drivers can screw ISVs post release already. This just gives them a really, really easy way to do it. And it will happen. There’s no guarentee that an implementation of glslang will ever compile and run any shader at reasonable speed, and if it can’t, there’s no way to tell why. These are not acceptable risks for software development.
And I guarentee you that it will be one of the reasons why OpenGL will be used less and less frequently in games.
ARB_fragment_program (and PS2.x for that matter) may be dubbed “assembly” interfaces, but they clearly are not native machine code interfaces, and as such cannot be an ABIs.
Cass’s use of the term “ABI” is more for the idea that it is a standardized interface that is easily supported across multiple “compilers”. You can compile a C library on GCC (for Win32) and link it to a C program compiled with VC++.
One very important example is that ARB_fp abstracts away the register count.
If I recall correctly, the P4 has far more actual hardware registers than x86 calls for. What they do is they map registers from the native hardware to what the x86 opcode is looking for.
x86 is not (any longer) “native assembly”; modern x86 chips have microcoded “compilers” that translate x86 commands into native internal opcodes that are then executed. x86 now exists solely as an interface; a single target for compilers to compile to that multiple chips can code for.
However, I fundamentally dislike the idea of making hardware specifically for an ISA. I don’t like the fact that the ISA compilers for modern x86 chips are a part of the chip and not the external compiler. I understand why it is, but I still don’t like it. Most important of all, this must never happen with graphics shaders. The minute someone starts adding transistors for the purpose of making some outdated ISA work is a bad day for everyone; it’s the first step on the way to what x86 is now.
The way around that is to make the ISA good enough to handle a plethora of hardware, such that hardware vendors do not consider trying to rebuild their hardware to look more like the ISA. The compilation from the ISA to the hardware needs to be a real process, and the ISA should not in any way influence how hardware is made.