How did APIs and device drivers work together? Specifically in the case of GPUs

266 viewsOtherTechnology

How did APIs and device drivers work together? Specifically in the case of GPUs

In: Technology

2 Answers

Anonymous 0 Comments

APIs are like rules for how programs can talk to devices like GPUs. Device drivers are like translators that help programs communicate with specific devices using those rules. So, when a program wants to use a GPU to draw something, it talks to the device driver, which then tells the GPU what to do based on the rules set by the API.

Anonymous 0 Comments

Think of an API as a middle man, this middle man has to talk to two parties that speak in different languages, the games (as an example of a use-case as gpus have many) and the drivers.

So the middleman talks the language the games understands and talks in the language of drivers understand.

Why wouldn’t games just talk to drivers? It’s been done in the past but the problem is that this layer or middle man is just passed into the game, and it becomes very hard for developers to maintain, because the would need to hard pick and support a myriad of devices, without even considering all the platforms out there.