r/GraphicsProgramming • • Dec 20 '21

Question x64 instructions for GPU stuff?

I am thinking about creating an OS, just for myself, but I wanna do 3D games on it. Can I just write my own driver for one specific GPU (nevermind the logistics, this is a hobby project. I just want to know if it is POSSIBLE), and how would I do that?

3 Upvotes

29 comments sorted by

View all comments

2

u/deeper-blue Dec 20 '21

Modern GPUs are complex beasts. I would start one level lower. Try to get ahold of an old 3dfx Voodoo card. Understand how it works: https://fabiensanglard.net/3dfx_sst1/ and then look at how existing glide drivers talk to it. Then you can try to directly send the required commands over PCI to draw you first triangle.

2

u/TheNextJohnCarmack Dec 20 '21

Thanks. I think I'll go even lower than that and try Ben Eater's self-proclaimed "worst graphics card" to start

1

u/deeper-blue Dec 20 '21

Good plan. Alternatively look into Mister FPGA. FPGAs can be a good way to learn more about hardware and especially how to write hardware software interop stuff.