Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - FBO flushing: (10 Items)
   
FBO flushing  
I am using QNX 6.5 on a Beagleboard (PowerVR) and see issues when using a FBO as a scratch buffer.  I have this senerio:


Main Window Surface
  Create a FBO to render to (FBO1)
    Create a second FBO to render to (FBO2)
       Render content1 to FBO2
    Render FBO2 to FBO1 as a texture
       Clear and Render content2 to FBO2
    Render FBO2 to FBO1 as a texture
  Render FBO1 to Window surface as a texture
SwapBuffers

What I see is that only "content2" is visible.  It seems that if I reuse the same FBO in a render cycle that the last 
thing I rendered gets displayed.  This is true even if I call glFlush or glFinish after I render the FBO texture.

Is there something in the driver which does not execute the texture operations until the flush or should this work?

Brian
Re: FBO flushing  
This is fixed in newer drivers, the work around is to use more fbos.

----- Original Message -----
From: Brian Edmond [mailto:community-noreply@qnx.com]
Sent: Sunday, May 06, 2012 12:33 PM
To: opengles-graphics <opengles-graphics@community.qnx.com>
Subject: FBO flushing

I am using QNX 6.5 on a Beagleboard (PowerVR) and see issues when using a FBO as a scratch buffer.  I have this senerio:


Main Window Surface
  Create a FBO to render to (FBO1)
    Create a second FBO to render to (FBO2)
       Render content1 to FBO2
    Render FBO2 to FBO1 as a texture
       Clear and Render content2 to FBO2
    Render FBO2 to FBO1 as a texture
  Render FBO1 to Window surface as a texture
SwapBuffers

What I see is that only "content2" is visible.  It seems that if I reuse the same FBO in a render cycle that the last 
thing I rendered gets displayed.  This is true even if I call glFlush or glFinish after I render the FBO texture.

Is there something in the driver which does not execute the texture operations until the flush or should this work?

Brian



_______________________________________________

OpenGL ES
http://community.qnx.com/sf/go/post92925
To cancel your subscription to this discussion, please e-mail opengles-graphics-unsubscribe@community.qnx.com
Re: FBO flushing  
Can you point me to a patch which addresses this?  I would like to check the version of my driver as it was provided by 
a customer.

I tried using more FBO's but I ran into another issue.  If I do the following:

Create FBO to render to
  Create FBO
    render content to FBO
  Render FBO as a texture
  Release FBO  
  Create FBO
    render content to FBO
  Render FBO as a texture
  Release FBO
  -- and so on many  times
Swap Buffers

I will eveentually run out of memory, or crash in a glClear (I assume out of memory as the system is low).  I assume the
 Release of the FBO is not freeing the memory because it is referenced somewhere and not released until the SwapBuffers?


Brian
Re: FBO flushing  
I'm not aware of the omap bsp roadmap. Someone else will have to comment.

----- Original Message -----
From: Brian Edmond [mailto:community-noreply@qnx.com]
Sent: Sunday, May 06, 2012 01:25 PM
To: opengles-graphics <opengles-graphics@community.qnx.com>
Subject: Re: FBO flushing

Can you point me to a patch which addresses this?  I would like to check the version of my driver as it was provided by 
a customer.

I tried using more FBO's but I ran into another issue.  If I do the following:

Create FBO to render to
  Create FBO
    render content to FBO
  Render FBO as a texture
  Release FBO  
  Create FBO
    render content to FBO
  Render FBO as a texture
  Release FBO
  -- and so on many  times
Swap Buffers

I will eveentually run out of memory, or crash in a glClear (I assume out of memory as the system is low).  I assume the
 Release of the FBO is not freeing the memory because it is referenced somewhere and not released until the SwapBuffers?


Brian




_______________________________________________

OpenGL ES
http://community.qnx.com/sf/go/post92927
To cancel your subscription to this discussion, please e-mail opengles-graphics-unsubscribe@community.qnx.com
Re: FBO flushing  
So do you know if that was ever released?  Or when the fix was done?

Also any comment on my other question about releasing the memory, is that a known issue also?
Re: FBO flushing  
I'm not sure what's been released or to who. You would need a 1.7 driver. The egl strings tell you which major version 
of the driver you're using.

However note the fix is to ghost (make addition copies) of render buffers. So if you were running out of memory using 
additional fbos, its quite likely you'll have the same issue with the newer driver. This kind of rendering really 
doesn't play well with deferred rendering tile based architectures. 

-Joel


----- Original Message -----
From: Brian Edmond [mailto:community-noreply@qnx.com]
Sent: Tuesday, May 08, 2012 09:52 AM
To: opengles-graphics <opengles-graphics@community.qnx.com>
Subject: Re: FBO flushing

So do you know if that was ever released?  Or when the fix was done?

Also any comment on my other question about releasing the memory, is that a known issue also?




_______________________________________________

OpenGL ES
http://community.qnx.com/sf/go/post92929
To cancel your subscription to this discussion, please e-mail opengles-graphics-unsubscribe@community.qnx.com
Re: FBO flushing  
To workaround this at the application level, do I just create extra render-buffers/textures?  Do I need to render the 
same content to the extra render-buffer/FBO? Or can I do something like this:

Create FBO-A
Create FBO-B (create 2 textures of dim. WxH, call glFrameBufferTexture2d on both)
Draw FBO-B to FBO-A
Re: FBO flushing  
That's should be fine. Just don't render to a texture and use it again to render to fbo0 or another texture.

----- Original Message -----
From: Chris Keating [mailto:community-noreply@qnx.com]
Sent: Saturday, May 19, 2012 07:03 PM
To: opengles-graphics <opengles-graphics@community.qnx.com>
Subject: Re: FBO flushing

To workaround this at the application level, do I just create extra render-buffers/textures?  Do I need to render the 
same content to the extra render-buffer/FBO? Or can I do something like this:

Create FBO-A
Create FBO-B (create 2 textures of dim. WxH, call glFrameBufferTexture2d on both)
Draw FBO-B to FBO-A



_______________________________________________

OpenGL ES
http://community.qnx.com/sf/go/post93219
To cancel your subscription to this discussion, please e-mail opengles-graphics-unsubscribe@community.qnx.com
Re: FBO flushing  
That's what I need to do though -- render to an offscreen, which gets rendered to another offscreen?  How can this be 
accomplished without upgrading the driver?
Re: FBO flushing  
That should be fine, just don't re-use the same object in multiple renders in the same frame.

----- Original Message -----
From: Chris Keating [mailto:community-noreply@qnx.com]
Sent: Saturday, May 19, 2012 08:20 PM
To: opengles-graphics <opengles-graphics@community.qnx.com>
Subject: Re: FBO flushing

That's what I need to do though -- render to an offscreen, which gets rendered to another offscreen?  How can this be 
accomplished without upgrading the driver?



_______________________________________________

OpenGL ES
http://community.qnx.com/sf/go/post93221
To cancel your subscription to this discussion, please e-mail opengles-graphics-unsubscribe@community.qnx.com