PDA

View Full Version : Basic GPU Question



Olumide
09-14-2003, 10:45 PM
Hello,

I will like to know: Can the GPU communicate with (i.e. send back information to) the CPU?

- Olumide

DopeFish
09-14-2003, 11:14 PM
You can read back data from the various buffers (framebuffer, depth buffer, stencil buffer), and some specific extensions (occlusion query, nv_fence, etc) send data back as well

Olumide
09-14-2003, 11:16 PM
Originally posted by DopeFish:
You can read back data from the various buffers (framebuffer, depth buffer, stencil buffer), and some specific extensions (occlusion query, nv_fence, etc) send data back as well


I know. I know. But can the GPU communicate with the CPU???????

Thanks

- Olumide

john
09-14-2003, 11:44 PM
I know. I know. But can the GPU communitate with the CPU???????

well, you could get the graphics card to draw text in the frame buffer, capture that with glReadpixels and use OCR to interpret what the graphics card is trying to say.

Or, maybe you could use colours. The graphics card could fill the framebuffer with yellow when its happy, blue when its sad, red when its angry, green when its peaceful... that kind of thing.

Olumide
09-15-2003, 05:07 AM
I know this. What I will like to know is CAN THE GPU SEND BACK INFORMATION TO THE CPU???????????

Thanks

- Olumide

Mazy
09-15-2003, 05:08 AM
The cpu can get information, but the GPU cant push it. is that clear enough?

DJSnow
09-15-2003, 05:42 AM
to answer your question in general: no !
the communication between CPU -> GPU is oneway, this means that there is no regular (!) way to get your data back - there is no way to say to the GPU "hi GPU calculate the blabla out of blabla", what you meant - but, as already mentioned above there are several way to workaround this problem; but don't expect a good communication.

SeskaPeel
09-15-2003, 05:43 AM
Olumide : no

SeskaPeel.

knackered
09-15-2003, 05:53 AM
NV_fence is a form of GPU-to-CPU communication.

Mazy
09-15-2003, 06:05 AM
But thats also a poll test from the CPU side..

knackered
09-15-2003, 06:36 AM
Mmm, so he means can the GPU call a function resident in system memory?
Without the CPU expecting communication with the GPU (using a message system like a fence) then callbacks are the only other way surely....
Right, I've wasted enough time on this rubbish...back to work!

V-man
09-15-2003, 07:31 AM
What would be the point of this question?
WHat`s this about?

Olumide
09-15-2003, 07:39 AM
Originally posted by V-man:
What would be the point of this question?
WHat`s this about?


This is experimental. I'm thinking of farming out some software rendering tasks to the GPU.

I know ... I know ... the GPU is not a general purpose processor as its "instruction set" (if you can allow me to call it that) is quite limited ...

Thanks for not being upset by my "uniformedness"

- Olumide

AdrianD
09-15-2003, 07:58 AM
yes, the GPU can communicate with the CPU, but all this is completely hidden inside the drivers .
Most piece of hardware in a PC can do this(and does)!
did you ever heard of something called "interrupts" ?
Everytime a hardware wants special attention from the CPU, it creates an "interrupt", which causes the CPU to stop all curent processing and to call a perivously specified routine, wich handles whatever the hardware has requested.(this a very simplified description, if you want to know more, google for "interrupts")

Olumide
09-15-2003, 01:01 PM
Originally posted by AdrianD:
yes, the GPU can communicate with the CPU, but all this is completely hidden inside the drivers,
...
Everytime a hardware wants special attention from the CPU, it creates an "interrupt", which causes the CPU to stop all curent processing and to call a previously specified routine, wich handles whatever the hardware has requested.(this a very simplified description, if you want to know more, google for "interrupts")


Finally, someone is telling me what I want to hear. I know what interrupts are. You're right, interrupts CAN be used to send back informatiuon to the CPU but that requires that a seperate device driver be written.


Thanks


- Olumide