Have a question about video driver development

Don Karnage

Platinum Member
Oct 11, 2011
2,865
0
0
Figured i would ask you guys. How hard is it to develop video card drivers? What sort of language are they developed and programmed in?
 

Markbnj

Elite Member <br>Moderator Emeritus
Moderator
Sep 16, 2005
15,682
14
81
www.markbetz.net
It's way up the hard scale :). I've never written one, but I imagine that they are mostly written in a combination of C, assembler, and custom GPU code.
 

N4g4rok

Senior member
Sep 21, 2011
285
0
0
Video drivers will mostly be written with a combination of C and Assembly, like most modern operating systems are written in.

Probably not much fun to deal with. A lot of work with bit-level operations. Plenty of geometry and Linear algebra, which will be a lot of work to program with low-level languages. Take a look at the drivers for the X windows system on linux. The source should be in there somewhere if you feel like digging around a bit.
 

iCyborg

Golden Member
Aug 8, 2008
1,388
94
91
http://www.anandtech.com/show/5880/...hly-driver-updates-releases-catalyst-126-beta

"Video drivers have effectively eclipsed Windows 95 in complexity and size in the last couple of years, which reflects the fact that these devices really have become processors, complete with all the intricacies of code compilation and scheduling, and basically in need of a mini-OS just to run them."


So I guess, very hard.
One could try browsing the open job positions at nVidia, AMD, Intel and see what the requirements are.
 

douglasb

Diamond Member
Apr 11, 2005
3,157
0
76
C++ is probably the highest-level language you can hope to be able to use, and even then, I think you would need to do a generous amount of work in ASM and C. Probably one of the single hardest things you could possibly program.
 

Cogman

Lifer
Sep 19, 2000
10,286
147
106
C++ is probably the highest-level language you can hope to be able to use, and even then, I think you would need to do a generous amount of work in ASM and C. Probably one of the single hardest things you could possibly program.

Meh.. It depends.

One person couldn't sit down and write a modern video driver, that is for sure. But that doesn't really mean that they are "the hardest things ever". They just have a metric ton of work needed.

Perhaps the most difficult area of the driver will be the compilers area. Drivers have to be able to compile GSGL, Microsofts shader language (whatever that is), opencl, and whatever pet project them company has all into an understandable language for their particular GPU architecture. There is a lot that goes into that stuff.

On the other side of the spectrum, the DVI/VGA controls or the OS interfacing layers really wouldn't be THAT complex, more tedious.

As someone else said, video drivers are pretty much their own operating system. And like operating systems, some parts are quit complex, other parts are just tedious work.
 

iCyborg

Golden Member
Aug 8, 2008
1,388
94
91
They just have a metric ton of work needed.

As someone else said, video drivers are pretty much their own operating system. And like operating systems, some parts are quit complex, other parts are just tedious work.
In my experience, "metric ton of work" invariably means complex. It's never really the case of 1 thing mapping to 1-2 independent functions and you just need lots of people going through them one by one. Unless they like to duplicate code a lot.

It's not the hardest, I would put OS and compilers above, but out of normal consumer software, it would probably be close to those. It's not the same "hardness" as say software analyzing LHC results for which you need Ph.D. in physics to understand, but I would imagine there's not much tedious/mechanical work involved either.
 

Cogman

Lifer
Sep 19, 2000
10,286
147
106
In my experience, "metric ton of work" invariably means complex. It's never really the case of 1 thing mapping to 1-2 independent functions and you just need lots of people going through them one by one. Unless they like to duplicate code a lot.

It's not the hardest, I would put OS and compilers above, but out of normal consumer software, it would probably be close to those. It's not the same "hardness" as say software analyzing LHC results for which you need Ph.D. in physics to understand, but I would imagine there's not much tedious/mechanical work involved either.

Well, let me put it this way. Writing a lot of reports for anything requires a lot of work (generally). However, The reports themselves really aren't all that complex.

Testing is somewhat the same way, it can take a lot a work to get right, but it really isn't complex.

I see many parts of video drivers (and drivers in general) in that line. Not really complex work, but a lot of it.
 

iCyborg

Golden Member
Aug 8, 2008
1,388
94
91
Hm, if that's your position on the vast majority of software, then OK. Otherwise, I just don't quite see what is it about the drivers that makes them different in this respect.
Like your two examples:
For OS interfacing layer - yes, you will have one function for each call that OS requires, however, the shitload of work is not writing one for each call (even though I'm sure there's a ton of them), but to write everything else to support the implementation of some particular call which will take 99% of development time. There are probably a dozen logical levels and hundreds of different things to do and consider until you get to the HW layer that will actually program something into the hardware.
Same with DVI/VGA, I could easily think of a whole bunch of stuff that will make matter complicated.