I'm wondering about how exactly OpenGL and DirectX drivers work. From what I know, they basically take in calls in their various APIs, and output a stream of bytecode instructions that head off to the GPU to be executed.
I know GPU chipmakers are extremely secretive about the details of their specifications. Are there any documents that describe how the APIs themselves are implemented on a level above the card itself?
AMD has released some specification documents that you may find interesting.
The Gallium3D folks are building on top of that to produce open drivers for recent Radeon cards. You can check out the source.