PDA

View Full Version : FSAA problem



Adrian
02-22-2003, 10:48 AM
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).]

Chalnoth
02-22-2003, 06:04 PM
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.

Adrian
02-22-2003, 06:21 PM
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).]

jra101
02-22-2003, 07:40 PM
Hmm, all three binaries ran fine for me.

rgpc
02-23-2003, 01:05 AM
Fine on gf3 Ti200, AMD 2400+ XP with detonator 40.72...

Chalnoth
02-23-2003, 01:50 AM
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).]

Adrian
02-23-2003, 04:49 AM
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.