Jump to content
  • Advertisement
Sign in to follow this  
xissburg

How to do 'from scratch GPU programming'?

This topic is 3694 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I would like to know how I can send commands to the GPU through the CPU(assembly programming probably). Well, it is almost the samething as asking how is Direct3D/OpenGL implemented, how are they programmed? Any articles about? Its just a curiosity, to learn more about the very low level thing. Thanks.

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by xissburg
I would like to know how I can send commands to the GPU through the CPU(assembly programming probably). Well, it is almost the samething as asking how is Direct3D/OpenGL implemented, how are they programmed? Any articles about?

Its just a curiosity, to learn more about the very low level thing. Thanks.


It isn't possible to get direct access to your graphics card.

Even if it were possible you wouldn't want to work at that level. Programming at that level mostly involves direct register writes (which are completely different for each GPU). If you mess up, the GPU will hang, then you restart your computer.

OpenGL and D3D are implemented by your video card driver. These are written by kernel programmers.

If you are curious about this aspect of programming familiarize your self with the principles of operating systems first.

Share this post


Link to post
Share on other sites
Quote:
Original post by xissburg
I would like to know how I can send commands to the GPU through the CPU(assembly programming probably). Well, it is almost the samething as asking how is Direct3D/OpenGL implemented, how are they programmed? Any articles about?

Certainly not. This kind of information is covered by trade secrets, and usually will not be released unless you pay very large amounts of money. AMD/ATI releases some 'dumbed down' register information (ie. none of the cutting edge features) for open source driver development. If you really want to do this (which I definitely do not recommend), you could start looking around the OSS Linux ATI drivers.

Share this post


Link to post
Share on other sites
This is a bad idea for sure. Especially if you know nothing about the way a kernel works. *Start sarcasm* Pick up a book on kernel programming the Minix book comes to mind. You can get it for about $100 which will teach you the basics. Then get your self a linux distro and customize and play around with the kernel. While you are at it grab a ati video card because nvidia does not OSS its drivers. Then start poking around with the FGLRX drivers. When you fry your video card go buy and new one and try again. Eventually you should get the idea. *End Sarcasm*

No really it is a bad idea and not worth the trouble. If you want to get really low to the machine use Assembly and link to DX or GL from their but don't screw with the GPU.

Share this post


Link to post
Share on other sites
Quote:
Original post by blewisjr
When you fry your video card go buy and new one and try again. Eventually you should get the idea.


You cant fry the video card from the kernel. It is possible to do in the firmware however.

Share this post


Link to post
Share on other sites
Quote:
Original post by fpsgamer
You cant fry the video card from the kernel.

Yes you can. You can increase the GPU clock rate beyond its thermal tolerance level. NVidia even lets you do this from the driver panel, if you agree to a length legal agreement which will void all your warranty.

Share this post


Link to post
Share on other sites
Quote:
Original post by blewisjr While you are at it grab a ati video card because nvidia does not OSS its drivers. Then start poking around with the FGLRX drivers. When you fry your video card go buy and new one and try again. Eventually you should get the idea. *End Sarcasm*


As I said above Driver. And yes you can fry it from the kernel and the driver.

Share this post


Link to post
Share on other sites
Quote:
Original post by xissburg
Okay but, how is Direct3D/OpenGL programmed then? How do they do that?


Linux kernel video driver sources. Not the real thing, but about as close as you're likely to get.

As it happens, it's incredibly uninteresting stuff, including mostly magic numbers and debug output.

Then there's basically an API on top of that.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!