FBO performance - any experiences?

  • Follow


Hi all,

i am about to implement a FBO - based
image manipulation engine.
Basically it will load a texture, do some GLSL-based
manipulations with it - then apply another effect
and so on.

since i do not know too much about opengl driver internals,
i would like to ask how costly the involved commands
are:


	glGenFramebuffersEXT(...);
	glGenRenderbuffersEXT(...);

-> this should be nothing more than a lookup for the next free int	

	glBindRenderbufferEXT( GL_RENDERBUFFER_EXT, g_depthRenderBuffer );
	glRenderbufferStorageEXT( GL_RENDERBUFFER_EXT, GL_DEPTH_COMPONENT24, 
RENDERBUFFER_WIDTH, RENDERBUFFER_HEIGHT );

-> ?

GLenum status = glCheckFramebufferStatusEXT( GL_FRAMEBUFFER_EXT );

-> error state checking, should not be too much

	glBindFramebufferEXT( ... );
	glBindRenderbufferEXT( ... );

-> bind buffers, should not be too much

	glFramebufferTexture2DEXT( GL_FRAMEBUFFER_EXT,
							GL_COLOR_ATTACHMENT0_EXT,
							GL_TEXTURE_2D,
							g_dynamicTextureID, 0 );

-> is this expensive? what if the framebuffer and texture formats do not 
match?


do you have any hints where fbos are performance critical?
pbuffers were said to be slower because of the necessary context switches
and because they were provided by the windowing system, not
the opengl driver itself. so fbos should be much faster - can you 
confirm this?


best regards + thanks for any hint,
hendrik





0
Reply Hendrik 8/22/2005 2:54:33 PM

Hi,

I'm using FBO and I'm pretty satisfied with it. I've made some tests
where I render the scene from two different perpectives to 2 FBOs
(2048x2048) and then render them to the screen. With FBO I get 170 fps,
without them (I mean here rendering one of the perpectives directly to
the screen) I get 400 fps with a GeForce 6600GT.

When I use texture_rectangle I get a little bit more performance ~ 15%.

Note that FBOs currently do not work If you turn AF on.

In my application, the bottleneck is the pixel shader, so the FBOs is
not slowing down anything.

If you have a mismatched texture, an error will be returned and you
will have to search a better match. FBOs are faster then pbuffers and
they are easier to port.

By the way, what is "expensive" for u ? You should put numbers as well
as  target hardware, etc.

Cheers,

wpr

0
Reply wpr 8/23/2005 9:24:04 AM


Hi,

i was just wondering where the bottlenecks are.
but it seems that the fillrate is the bottleneck,
which is ok. in previous implementations
- using pbuffers - i had serious performance problems.


> When I use texture_rectangle I get a little bit more performance ~ 15%.
interesting ... if you do this on ati, you get
a huge performance loss (~50x! -- switch to software rendering?)

> Note that FBOs currently do not work If you turn AF on.
what do you mean by AF? antialiasing?

> If you have a mismatched texture, an error will be returned and you
> will have to search a better match. 
what is a mismatching texture? differing internal format?



best regards,
hendrik
0
Reply Hendrik 8/24/2005 9:13:31 AM

>>what do you mean by AF? antialiasing?

Anisotropic Filtering -> You won't be able to create FBO if AF is on.
note: NVIDIA says they will support anti-aliasing in FBO in future
drivers, they do not say anything about AF.

>> what is a mismatching texture? differing internal format?

I would say an incompatible one. It did not happen to me.
I'm not really sure what conditions would lead to an error here, I
would say If the hardware supports a texture format then it supports it
for FBO as well.
I think that the only problem you migh have is lack of memory.

Cheers.

0
Reply wpr 8/24/2005 9:57:51 AM

3 Replies
162 Views

(page loaded in 0.077 seconds)

Similiar Articles:





7/29/2012 1:31:43 AM


Reply: