What do drivers do actually?

While I have been using OpenGL for a few years, I don’t think I ever understand what drivers really do. Maybe I should post it in the beginner group…
Someone knows articles explain what drivers really do?
When people find a bug, the driver is often blamed. Why?

On a basic level, a driver takes instructions
from some application, and turn them into
actual control sequences for hardware. This
may include anything from data type
conversion (float->8bit for color components)
to major parts of the API (say, frustum or
backface culling, depending on hardware

Because each family of hardware works
differently (internally), each family of
drivers has different performance tradeoffs
and different ‘hot areas’ for bugs, so when
you see behaviour that works on 3 card
families but doesn’t on the 4th, chances are
the bug is in the driver.

It’s a mix between an interpreter, a compiler, and a glorified memcpy.

  • Matt

uhm… a driver isn’t a compiler, nor an intepreter, and it might do memcopy, but it isn’t that, eihter. the second poster was more right.

a driver is a layer of abstraction. in the same sense that you might have a chauffer to drive your car so you don’t need to know how to operate a vehicle but just give high level commands (e.g. “take me to the nearest pub”), a driver is part of the o/s that does stuff. =)

For instance… the exact code (at the instruction level, i mean) to draw a triangle is different on all graphics h/w, right? the opcodes to get a triangle happening on a GeForce is different than on a Voodoo…
BUT!!! you have a driver to translate the glBegin() yadda yadda into the opcodes specific for a given card. (Actually, it’s not QUITE that simple… the glBegin is part of an API which talks to a driver for the card, which talks to the card)

drivers are problematic for bugs because

  1. they’re written by third parties, but
  2. they get supervisor privledges(although 'm not sure abotuthe story with VxDs in windows (yadda yadda bulls!$t))

incidentialy, Sun insist that THEY write the device drivers for their SunOS and solaris for this very reason.


Originally posted by john:
a driver isn’t a compiler, nor an intepreter, and it might do memcopy, but it isn’t that, eihter. the second poster was more right.

John, I think Matt was actually answering with a joke (as one of nVidia’s 3D software engineers, he is involved in developing the Detonator drivers: he should know what a driver is ! ).

Best regards.


Actually, I kind like the interpreter, compiler and memcopy analogy.

interpreter : john said it, drawing a triangle is different on each card. So it interprets the call an transform it in something the hardware can understand.

compiler : Display lists are compiled into a machine code

memcpy : Got to bring all those textures and vertices to the card so that we can use them with our interpreted and compiled code!!

[This message has been edited by Gorg (edited 01-26-2001).]

Nope, you guys are all wrong. It’s magic.

I kind of like the sound of that “take me to the nearest pub” command. Will that be implemented anytime in the near future?

Wait, you guys got it ALL wrong. A driver is a person who is driving. Sorry for the technical terms, it couldn’t be avoided.

>uhm… a driver isn’t a compiler, nor an
>intepreter, and it might do memcopy, but it
>isn’t that, eihter. the second poster was
>more right.

Being the second poster, and coming from both
tools and driver backgrounds, I appreciate the
analogy mcraighead made – it’s quite profound.

However, perhaps it was less informative than
possible for purposes of answering the original
question :slight_smile:

yer… okay… i didn’t realise that the second poster actually WROTE drivers. =)

but!! drivers aren’t just a graphics thing. You have printer drivers (so, where’s the display list?), keyboard drivers (so those wacky europeans with more keys can cope, so where’s the memcpy?), cd-rom drivers, sound card drivers, drivers for the optional portable attachable coffee machine device, and so on.

so… drivers are not a graphics only thing, you see. =)

so… i mean, i appreciate he was making a hoke, but… if you think about it, almost any program can be reduced to an interpreter/compiler and memcopy thing. so, as an “ANALOGY” it was far from profound, and very… er… vague. but it was amusing =)


[This message has been edited by john (edited 01-29-2001).]