Hi Guillaume, The async reading of PBO's is very sensitive to pixel formats, frustratingly so. I would recommend reading up on topic and trying experimenting as you have being doing. Hit the right combination of formats and usage and your get great performance, fall of this fast path supported by the driver and it suddenly becomes far slower.
Robert. On Fri, Oct 28, 2011 at 4:55 PM, Poirier, Guillaume <[email protected]> wrote: > Hi, > > I checked the osgscreencapture example (from 2.9.8). It seems to only work > asynchronously if I use the --rgba flag (time for read pixels = 0.045694ms > time for memcpy = 1.5924ms) which sets the pixel format to GL_BGRA. Any other > combination and the read-back slows down quite significantly (time for read > pixels = 8.7473ms time for memcpy = 1.2335ms). > > My case is slightly different since I am trying to read-back from a FBO float > texture instead of the framebuffer directly. I tried using GL_RGBA32F_ARB as > internal format, GL_BGRA as source format, and GL_FLOAT as source type, > ping-ponging between 2 PBOs and textures, and doing the read-back in the > first camera but without success... > > Has anyone managed to read a texture asynchronously into a PBO and could > suggest ideas ? > > > cheers, > > > guillaume > > > > -----Original Message----- > From: [email protected] > [mailto:[email protected]] On Behalf Of J.P. Delport > Sent: October-20-11 12:54 AM > To: Poirier, Guillaume > Cc: osg users > Subject: Re: [osg-users] OSG question on asynchronous texture readback > > Hi, > > the GPURegionOfInterestCallback does not do async read at the moment, > but you can have a look at the osgscreencapture example. Specifically > check the code path for the --double-pbo command line option. > > Also see this page, it has the best explanation of async pbo I've come > across. > > http://www.songho.ca/opengl/gl_pbo.html > > Getting data from GPU to CPU is still a bottleneck for many apps, make > sure you send back as little as possible. > > cheers > jp > > On 19/10/2011 19:13, Poirier, Guillaume wrote: >> Hello J-P, >> >> I saw on the OSG forum archives your GPURegionOfInterestCallback code. >> Can it provide asynchronous GPU -> CPU readback ? >> >> I don't know much about PBO and I currently does the readback by simply >> attaching an image to my RTT camera, however it >> >> slows down the application significantly. Can you show an example of how >> to use the GPURegionOfInterestCallback ? >> >> cheers, >> >> guillaume >> > > -- > This message is subject to the CSIR's copyright terms and conditions, e-mail > legal notice, and implemented Open Document Format (ODF) standard. > The full disclaimer details can be found at > http://www.csir.co.za/disclaimer.html. > > This message has been scanned for viruses and dangerous content by > MailScanner, > and is believed to be clean. > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

