Thanks for the fix, it certainly improves things under my ATI system that now behaves really nicely. I've merged and checked in the fix to Renderer.cpp, the colour changes I will have a think. Cheers, Robert
On Thu, Nov 25, 2010 at 12:43 PM, Tim Moore <[email protected]> wrote: > I think I've nailed this. There was a bug that was setting the State > _startTick to 0 in some threading modes, which would make the GPU bar > disappear. The fix is in osgViewer/Renderer.cpp. > Additionally, I implemented my hack to the statistics to give the same color > to statistics in the same frame. It's very interesting (at least to me :): > it shows that with my card (Nvidia GTX 460) on Linux, with vsync enabled, > GPU activity for a frame doesn't even start until SwapBuffers is called. > Here are some screenshots and the change to osgViewer/StatsHandler.cpp. > Tim > On Wed, Nov 24, 2010 at 6:06 PM, Robert Osfield <[email protected]> > wrote: >> >> Hi Tim, >> >> I have just checked in the following workaround: >> >> const GLubyte* renderer = glGetString(GL_RENDERER); >> std::string rendererString = renderer ? (const char*)renderer : ""; >> if (rendererString.find("Radeon")!=std::string::npos || >> rendererString.find("RADEON")!=std::string::npos) >> { >> // AMD/ATI drivers are producing an invalid enumerate error on >> the >> // glGetQueryiv(GL_TIMESTAMP, GL_QUERY_COUNTER_BITS_ARB, >> &bits); >> // call so work around it by assuming 64 bits for counter. >> setTimestampBits(64); >> //setTimestampBits(0); >> } >> else >> { >> GLint bits = 0; >> extensions->glGetQueryiv(GL_TIMESTAMP, >> GL_QUERY_COUNTER_BITS_ARB, &bits); >> setTimestampBits(bits); >> } >> >> I've tested this out on my ATI 4670 + Kubnutu 10.10 system and it >> kinda works, but not too well. Sometimes I get the orange bars >> appearing but typically quite a few frames in, and the bars often >> appear and then disappear, sometimes never to appear again. I've >> experimented with using adding a glFinish() to >> osg::State::frameCompleted() and this does stabilize things but it's >> still not 100% reliable. >> >> Any thoughts on why the timing doesn't seem reliable? It might simply >> be the the GL_TIMESTAMP code in the driver is flaky and just needs to >> be disabled completely for ATI cards. I guess there is chance that >> you see the instability under NVidia as well. >> >> Could you do an svn update and test the new code out to make sure >> there hasn't been a regression under NVidia. >> >> Cheers, >> Robert. >> >> Robert. >> _______________________________________________ >> osg-submissions mailing list >> [email protected] >> >> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org > > > _______________________________________________ > osg-submissions mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org > > _______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
