Reputation: 28252
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.
Are there any documents that describe how the APIs themselves are implemented on a level above the card itself?
Upvotes: -1
Views: 160
Reputation: 160
PowerVR have open source drivers: https://developer.imaginationtech.com/solutions/open-source-gpu-driver/
but basically, yes convert the API calls into HW specific state and convert shaders to HW cpecific instructions.
For APIs like D3D up to DX11, the API tries to tell the driver everything it can about what it wants to achieve and then the driver translates that into whatever is best for the HW.
For something like Vulkan, the API tries to tell the HW what it has to do, leaving it much less room to do things in the best way for the HW although this does mean that the driver has much less work do.
Upvotes: 1
Reputation: 52092
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.
Upvotes: 2