[Mesa-users] glColor4f() is blocked for more than 400 millisecond

Wei, Brian Brian.Wei at agcocorp.com
Tue Oct 12 16:00:03 PDT 2010


Hello mesa3d experts:

I have a powerpc based terminal that purely use software-rendering of mesa3d (with the following config)
   ./configure --host=powerpc-linux --build=i486-linux-gnu --with-driver=xlib --with-x

Sometimes simply execution of glColor4f(red,green,blue,alpha) is blocked for more than 400 millisecond.

My code is as following. HAL::getTime() is a simple function to get Linux system in milliseconds. It get system time since application starts up. It always works well so I don'be believe anything is wrong with this function.  I printed out the time before and after execution of glColor4f(). Debug output shows that glColor4f() is blocked for 445 ms.

Any suggestion will be highly appreicated.

Brian Wei, PhD
Senior Product Engineer
Global Technology By AGCO (GTA)
AGCO Corporation
420 Lincoln Blvd, P.O.Box 4100,
Hesston, KS, 67062
Phone: (620)327-5517, Fax: (620)327-6399


Source code:
---------------------

 // use gettimeofday for native LINUX system
int32_t getTime()
{
  /** linux-2.6 */
  static timespec ts;
  clock_gettime(CLOCK_MONOTONIC, &ts);
  const int32_t ci_now = int32_t(ts.tv_sec)*1000 + int32_t(ts.tv_nsec/1000000);
  return ci_now - getStartUpTime();
}

mapColor_c::glColor4f()
{
        std::cout << HAL::getTime()<< " mapLayer_c::glColor4f(void) line: " << __LINE__<< std::endl; //This is line 47
        float red=f_Red();
        float green=f_Green();
        float blue = f_Blue();
        float alpha = f_Alpha();
        std::cout << HAL::getTime()<< " mapLayer_c::glColor4f(void) line: " << __LINE__<< std::endl;//Line 52
        ::glColor4f(red, green, blue, alpha);
        std::cout << HAL::getTime()<< " mapLayer_c::glColor4f(void) line: " << __LINE__<< std::endl;//54
}

Debug printout:
---------------------
42758 mapLayer_c::glColor4f(void) line: 47
42758 mapLayer_c::glColor4f(void) line: 52
43203 mapLayer_c::glColor4f(void) line: 54


::glColor4f() is blocked for
   43203-42758 = 445




This email is intended solely for the use of the individual to whom it is addressed and may contain confidential and/or privileged material. Any views or opinions presented are solely those of the author and do not necessarily represent those of AGCO. If you are not the intended recipient, be advised that you have received this email in error and that any use, dissemination, forwarding, printing or copying of this email is strictly prohibited. Neither AGCO nor the sender accepts any responsibility for viruses and it is your responsibility to scan and virus check the e-mail and its attachment(s) (if any).


More information about the mesa-users mailing list