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

1

u/Flannelot Dec 20 '21

You'd probably need to start with an open source driver to have any chance of success. Just learning to use a 3D engine is a long project, let alone writing your own.

NVidia still dont release the source code for 3D drivers.

https://nvidia.custhelp.com/app/answers/detail/a_id/1849/~/why-arent-the-nvidia-linux-drivers-open-source

But there is a reverse engineered open source alternative:

https://nouveau.freedesktop.org/

-2

u/TheNextJohnCarmack Dec 20 '21

Except aren't these built for Linux? I was hoping for something closer to the metal.

1

u/specialpatrol Dec 20 '21

A driver is designed to take specific kind of hardware and interface with a specific OS. There is no lower level. You would take the code here and change it's interface to work with whatever interface you come up with for your OS.