The MASM Forum

General => The Campus => Topic started by: Magnum on August 12, 2013, 01:42:27 PM

Title: GPU programming
Post by: Magnum on August 12, 2013, 01:42:27 PM
I am looking for an example of programming for my GPU.

I found some code but it is 16 bit.

I also found some that will tell you the features of your graphics card with source code as well.

Vielen Dank meinen Damen und Herren,

Andy
Title: Re: GPU programming
Post by: sinsi on August 12, 2013, 09:16:14 PM
You have different levels of programming
1. Basic VGA, 640x480 with 16 colours or 320x200 with 256 colours
2. VESA, this is the standard now for real mode, anything your video card supports
3. Things like CUDA, basically a scripting language I think - only works with Windows
What are you after here?
Title: Re: GPU programming
Post by: daydreamer on August 13, 2013, 02:17:48 AM
Pixelshader?
Title: Re: GPU programming
Post by: Magnum on August 13, 2013, 03:03:53 AM
I am interested in Vesa programming.

Andy
Title: Re: GPU programming
Post by: Gunther on August 13, 2013, 03:10:55 AM
Hi Andy,

Quote from: Magnum on August 13, 2013, 03:03:53 AM
I am interested in Vesa programming.

please be a bit patient; I'll post next a VESA example in real mode. Enough stuff to test and study.

Gunther
Title: Re: GPU programming
Post by: Zen on August 13, 2013, 03:31:49 AM
MAGNUM,
The well-known graphics hardware manufacturers have developer websites dedicated to this type of thing.
For example: NVIDIA GPU Programming Guide (https://developer.nvidia.com/nvidia-gpu-programming-guide)

...And, not surprisingly,...if you GOOGLE the term: GPU programming (http://www.google.com/#bav=on.2,or.&fp=472b88d4249af280&q=GPU+programming),...you will get a result with a HUMONGEOUS number of interesting links.
Title: Re: GPU programming
Post by: Magnum on August 13, 2013, 05:11:49 AM
Mobile IntelĀ® 4 Series Express
Chipset Family

vbestate.exe shows (Code and exe are attached.)

vesa bios extension ver. 3.0:
VESA
Intel Cantiga Graphics Chip Accelerated VGA
Intel Cantiga Graphics Controller

total memory 65472 Kbyte

normal RAMDAC operation
Title: Re: GPU programming
Post by: Farabi on August 14, 2013, 06:34:04 PM
If you want to use the full capabilites of your GPU it would be hard, there is no standard among them. But if you check the windows system properly, you'll find that when youre not installing your driver, windows had a basic generic drivers that utilize VESA, and when you installing your driver, the basic driver is replaced. I forget which file it was, its extension was .drv or. .sys or something. If you dissasmble GDI32 (Is it ilegall? Education purpose I guess?) you may see that most of the function is only had 1 call, it was, to the driver.
Title: Re: GPU programming
Post by: Magnum on August 14, 2013, 11:05:16 PM
Thanks for the info.

I was hoping to use it for non-graphic use, using just their registers, but it looks like their fast registers can only be used in certain ways.
Title: Re: GPU programming
Post by: Farabi on August 15, 2013, 04:37:07 PM
Quote from: Magnum on August 14, 2013, 11:05:16 PM
Thanks for the info.

I was hoping to use it for non-graphic use, using just their registers, but it looks like their fast registers can only be used in certain ways.

I used OpenGL to doing such a things. You wont believe how fast a SiS mirage doing a matrix calculations compared to a dual core prosessors, and it was only clocked at 400 Mhz.
Title: Re: GPU programming
Post by: daydreamer on August 15, 2013, 06:17:52 PM
I tried some pixelshader programming, even tried nvasm but its only for first generation shaders
Best i modded some rtrt shader with great textures
this is how it looked like

Title: Re: GPU programming
Post by: Farabi on August 15, 2013, 08:04:46 PM
I dont have such a advance device. I tried to use ARB programming language or something but I dont know how to feed an input and retrieve the output. Maybe anyone had such an info? GPU is a multi milions core that worked at once. I saw one of its example code but on C++ which I cannot understand. If they used C it should be readable. Assembler like ARB is preferable.