FSAA problem

Hi, I am having various problems getting my app to work correctly when FSAA is on.

If I call readpixels thousands of times and then render a triangle, the readpixels take about 100x longer then when FSAA is off.

If when I call readpixels I call glflush and then render a triangle, the triangle is never rendered, the screen flickers as though it is continually changing res.

If I only call readpixels a few times, say five, the triangle is rendered but I get white lines flickering across the screen.

The problem only occurs on my GF4 4600 machine and not on my GF2 PC.

I am fairly sure my card is ok since I have no other problems at all. The problem is linked to calling readpixels a large number of times with FSAA on, there are probably not many apps out there that do that.

Here are three executables that show the problem, source is included (it’s a very simple app). http://www.adrian.lark.btinternet.co.uk/FSAABug.zip

Is anyone able to reproduce the problem i describe?

This has happened under various detonator versions.

[This message has been edited by Adrian (edited 02-22-2003).]

Yes, I think readpixels is notoriously slow on current graphics cards. This is probably a bug in the drivers and/or hardware.

However, why would you want to call readpixels more than once per frame? Does everything work properly if you just call readpixels once?

As a side note, what version of glut are you using? It doesn’t want to run on my machine.

Readpixels is fast enough when FSAA is off. On 2 other machines(GF2 and GF3) it works fine with FSAA on, it’s just on my GF4600 there is a problem, weird.

I need to call readpixels many times per frame to calculate patch form factors for my realtime radiosity engine. If I call readpixels once, things pretty much work ok, apart from a white horizontal line randomly flickering around the screen (it’s almost unnoticeable).

I have now included glut in the download.

[This message has been edited by Adrian (edited 02-22-2003).]

[This message has been edited by Adrian (edited 02-22-2003).]

Hmm, all three binaries ran fine for me.

Fine on gf3 Ti200, AMD 2400+ XP with detonator 40.72…

Yep, they work fine for me, too.

I’m using a GeForce4 Ti 4200 with the 41.03 drivers.

On the note of performance, the GeForce4 Ti series downsamples at scanout, meaning that when readpixels is called with FSAA on, it’s having to do an operation that is not normally done on the video card (it may be reading all sub-pixel samples from the framebuffer and downsampling in the driver), and therefore is much less likely to be optimized.

[This message has been edited by Chalnoth (edited 02-23-2003).]

Originally posted by Chalnoth:
On the note of performance, the GeForce4 Ti series downsamples at scanout, meaning that when readpixels is called with FSAA on, it’s having to do an operation that is not normally done on the video card (it may be reading all sub-pixel samples from the framebuffer and downsampling in the driver), and therefore is much less likely to be optimized.

Interezting, what did it do in older hardware and why was it changed?

I just tested reading the depth component and it works fine. The problem only occurs when reading the colour or alpha component.