FFT/drawpixel speed test

one thing is clear the read/draw pixels is NOT the bottleneck the FFT code is
any halfdcent card (eg tnt1) can do a readpixels of 10million pixels a second (very conservative number)

I do not know what the FFT program does exactly, but the read/drawPixels numbers look a bit slow to me. A Wildcat 5110 can do drawPixels at around 500 Mb/sec (Megabytes) for a variety of pixel formats. It’ll do readPixels at about 200 Mb/sec.

Now say you’re drawing and reading a full screen (1024x768 RGB). That is roughly 2.5Mb of data. Reading and drawing that should take 2.5/200 + 2.5/500 seconds, or about 57 fps.

Getting 8 fps on FFTdemo is way off from that number. Thus that makes me wonder what is going on. The effectiveness of draw/readPixels will go down if you read many small images (there is overhead to setup the DMA transfers, turn around the bus etc). Maybe there is some data copying going on in FFTdemo, or extra computation that should not be there. I would suggest to use Vtune and see where most of the time is spent.

Barthold

Well, with the function above, I get 8 fps , without it I get 60+ (synched). And this is 640x480, GL_RGB for the window and the readpixels.
I realize that readpixels has a high bandwidth, but I’m guessing that its the setup cost (latency) that’s killing mesince it has to be done every refresh. I will test a few times and see what happens, but does anyone see anything in my code that shouldn’t be there?
Joe

Are you entirely sure that you have a plain RGB buffer without destination alpha? That would cause a format mismatch and force the driver to do pixel conversions. Just a thought …

Anyway
[ul][li]*FFTMaze 0.19 fps[/li]*FFTDemo 1.95~2.25 fps[/ul]

On Radeon DDR 32, Athlon 700

Dual 2Ghz Zeon, 1Gb Ram, FireGL 2, WinXP

Crashes.

Try a test loop that does readPixels in a buffer, then immediately calls drawPixels on the same buffer. Then flush and call swap. That should give you a good measure of how fast you can read and draw images. I would also leave the (un)pack alignment at its default (which is 4 I believe)

The code you posted has some computation in it, like computing the average etc. Take all that out.

Barthold