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

Show parent comments

3

u/the_Demongod Dec 20 '21

Obviously nothing is completely impenetrable, I'm sure Nvidia and AMD have teams of experts trying to reverse engineer each others' ISAs. It's just probably outside the capabilities of one person. Modern hardware is definitely a FOSS enthusiast's worst nightmare, it's absurdly complicated and the fine details of the architecture represent the company's entire value on the market. That's why if you work in e.g. an Intel fab, it's incredibly silo'd and you're not allowed to know anything beyond the immediate knowledge required to do your job. In principle you can sniff the packets being sent to the GPU, but I don't see how you could manage to make the GPU do anything useful with the information you'd be able to glean from that.

I don't know why you'd want to do this anyways, if you want to learn more about GPUs you should just build your own. I don't imagine you'd be able to eke any real capability out of a full-size GPU from the information you'd garner by sniffing binary on the PCIe bus, so by building your own you'd learn a whole lot more and wouldn't be sacrificing much hardware capability since you're not going to be able to make a real GPU do anything interesting this way anyways.

-9

u/TheNextJohnCarmack Dec 20 '21

That sucks. Fuck AMD and fuck NVIDIA, and most of all fuck their hardware. And fuck their software too. Sounds like it'll be easier to develop an entire computer entirely from scratch than to develop just a fucking driver.

Well anyway, thanks for the help. I appreciate it.

3

u/IQueryVisiC Dec 20 '21

There are FOSS drivers for Linux. AMD always opened their spec and NVIDIA has been reverse engineered at least the old models in my old notebooks which cannot run the new Windows.

At least Vulkan should be possible. I still believe that the drivers mostly cater to some games and guess what they want. With Vulkan you are much closer to the metal.

May I invite you to write an OS for r/AtariJaguar . They are completely open about the Spec. No NDA like on Japanese stuff. Also Intel integrated graphics is completely open I think. And it is quite good in its later iterations.