Hi Glenn, I'm open to "a" solution. Allowing use definition of a TimerImplemention is a workaround rather than a general solution.
I'd suggest raising this topic on osg-users to see what others think about the topic and how we might go about solving it. Could you post to osg-users noting the links you did at the beginning of this thread. Robert. On 9/27/07, Glenn Waldron <[EMAIL PROTECTED]> wrote: > Robert, > > You are correct, it is certainly a hack. QPC returns unpredictable and > sometimes negative clock values and that is going to cause performance > problems as well. > > Would you consider instead a way for the user to optionally provide their > own custom "TimerImplementation" to the Timer class? If so I will code this > up and submit it. > > Thanks again. -gw > > > On 9/27/07, Robert Osfield <[EMAIL PROTECTED]> wrote: > > > > HI Glenn, > > > > This feels like a real hack, forcing the a call to Timer::tick() to > > run on a particular processor will lead to a heavy performance hit, I > > can easily imagine this culling performance for any multi-threaded OSG > > app. > > > > I don't know of a solution but this certainly doesn't feel like a viable > one. > > > > Robert. > > > > On 9/27/07, Glenn Waldron <[EMAIL PROTECTED]> wrote: > > > Robert, > > > > > > This is a patch to osg::Timer that works around the problem with > > > QueryPerformanceCounter() on Athlon X2 processors under Windows XP. It's > a > > > documented problem that we've discussed on the list in the past. QPC on > > > Athlon X2's sometimes returns negative numbers and otherwise erroneous > > > information depending on the BIOS settings. Here's some background: > > > > > > http://channel9.msdn.com/ShowPost.aspx?PostID=156175 > > > http://support.microsoft.com/?id=896256 (an alleged fix > > > that didn't work for me) > > > > > > The patch simply ensures that > > > QueryPerformanceCounter/Frequency is always executed on > the > > > same logical processor. The changes are localized in #ifdef > ATHLONX2_QPFIX > > > blocks. > > > > > > Please consider this for inclusion. I'm not well-enough versed in CMake > to > > > configure the #define that way but perhaps that's an option too. Thanks! > > > This problem has been bugging me for a long time. -gw > > > > > > > > > -- > > > Glenn Waldron : Pelican Mapping : http://pelicanmapping.com : > 703-652-4791 > > > _______________________________________________ > > > 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 > > > > > > -- > > Glenn Waldron : Pelican Mapping : http://pelicanmapping.com : 703-652-4791 > _______________________________________________ > 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
