Sign in to follow this  
gOOze

Pipeline stall

Recommended Posts

gOOze    100
Hi

Something very strange came up in my code for HDR rendering.

The fact to enable blending (via the application using glEnable(GL_BLEND) as well as via the CGFX pass state definition BlendEnable = true ), makes the whole program to stop for several seconds on the CG commands cgResetPassState and/or cgSetPassState.
That makes my program run at 0.05 fps instead of 60!!
I need to enable blending in order to blend the blurred targets to produce a blooming effect in my scene.

Does anyone have any idea what causes the pipeline to stall like that?

Thanks

Share this post


Link to post
Share on other sites
V-man    813
You call glEnable(GL_BLEND) and the FPS goes down to 0.05? How many objects/polygons are you rendering with blending enabled?

Share this post


Link to post
Share on other sites
mhagain    13430
That's not just a pipeline stall, that's a drop back to software emulation in either the fragment processing or blending stage of the pipeline. You're obviously doing something that's supported by your driver but not in hardware. Can you double-check your glBlendFunc and glBlendEquation, and make sure that you don't have too many shader instructions.

Share this post


Link to post
Share on other sites
gOOze    100
Thanks for your answers.

@V-man : I use additive blending in order to merge my blurred targets to get a blooming effect, this step being purely screen-space, I just draw basic fullscreen quads. The number of objects shouldn't be a problem here :)

@mhagain : I haven't thought about the software emulation, that would explain why this is sooooo slow.

I double checked everything and I actually found the cause. I declared my downsampled HDR render targets as [color=#1C2837][size=2]GL_RGBA16 instead of GL_RGBA16F_ARB... stupid mistake...[/size][/color]
[color=#1C2837][size=2]I thought GL_RGBA16 targets were internally represented as RGBA8 targets, so that would obviously mess up my blooming effect but I don't really see why my hardware complained about blending 2 [/size][/color][color=#1C2837][size=2]RGBA16 targets together [/size][/color][img]http://public.gamedev.net/public/style_emoticons/default/dry.gif[/img]

Thanks again!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this