PBO performance problems

glut_init.c, method __glutOpenWin32Connection(). I have changed this to look as follows:


  /* Clear (important!) and then fill in the window class structure. */
  memset(&wc, 0, sizeof(WNDCLASS));
  wc.style         = 0;//CS_OWNDC;
  wc.lpfnWndProc   = (WNDPROC)__glutWindowProc;
  wc.hInstance     = hInstance;
  wc.hIcon         = LoadIcon(hInstance, "GLUT_ICON");
  wc.hCursor       = 0;//LoadCursor(hInstance, IDC_ARROW);
  wc.hbrBackground = NULL;
  wc.lpszMenuName  = NULL;
  wc.lpszClassName = classname;

The AWT code (Mustang b65, awt_Component.cpp line 384 method FillClassInfo) looks like this:


void AwtComponent::FillClassInfo(WNDCLASSEX *lpwc)
{
    lpwc->cbSize        = sizeof(WNDCLASSEX);
    lpwc->style         = 0L;//CS_OWNDC;
    lpwc->lpfnWndProc   = (WNDPROC)::DefWindowProc;
    lpwc->cbClsExtra    = 0;
    lpwc->cbWndExtra    = 0;
    lpwc->hInstance     = AwtToolkit::GetInstance().GetModuleHandle(),
    lpwc->hIcon         = AwtToolkit::GetInstance().GetAwtIcon();
    lpwc->hCursor       = NULL;
    lpwc->hbrBackground = NULL;
    lpwc->lpszMenuName  = NULL;
    lpwc->lpszClassName = GetClassName();
    //Fixed 6233560: PIT: Java Cup Logo on the title bar of top-level windows look blurred, Win32
    lpwc->hIconSm       = AwtToolkit::GetInstance().GetAwtIconSm();
}

My change to the GLUT WNDCLASS structure didn’t change the performance…

As far as dumping the GLUT-chosen PIXELFORMATDESCRIPTOR, check out win32_glx.c method glxChooseVisual(), and insert the following at line 227:


    fprintf( stderr, "Chosen pixel format (%d):\n", pf );
    fprintf( stderr, "   DoubleBuffered: %d\n"
                     "   Stereo: %d\n"
                     "   HardwareAccelerated: %d\n"
                     "   DepthBits: %d\n"
                     "   StencilBits: %d\n"
                     "   Red: %d\n"
                     "   Green: %d\n"
                     "   Blue: %d\n"
                     "   Alpha: %d\n"
                     "   Red Accum: %d\n"
                     "   Green Accum: %d\n"
                     "   Blue Accum: %d\n"
                     "   Alpha Accum: %d\n",
                     (match->dwFlags & PFD_DOUBLEBUFFER) != 0,
                     (match->dwFlags & PFD_STEREO) != 0,
                     (match->dwFlags & PFD_GENERIC_ACCELERATED) != 0,
                     match->cDepthBits,
                     match->cStencilBits,
                     match->cRedBits,
                     match->cGreenBits,
                     match->cBlueBits,
                     match->cAlphaBits,
                     match->cAccumRedBits,
                     match->cAccumGreenBits,
                     match->cAccumBlueBits,
                     match->cAccumAlphaBits );

Oh in case I haven’t said this, I’m using the latest glut-3.7 libraries.

Just to add that I have been able to reproduce the performance problem on a Dell Precision workstation with an NVidia Quadro 980XGL, again dual display configuration. Driver version 81.65 (WHQL) if I remember correctly.

I’m beginning to wonder if this is a bug in the NVidia drivers, uncovered maybe by some peculiar setup of the AWT. For what it’s worth I should probably consider posting a link to this thread on some NVidia developers forum.

Please do raise this issue on the NVidia forums. It is very unlikely there is anything in JOGL specifically which is triggering this problem, which would probably make it difficult to find a workaround even if we tracked down the root cause. I’m pretty swamped at the moment so can’t promise a quick response on helping to debug the problem from our end.

I’m pleased to report that the latest NVidia Forceware drivers (84.25) for Windows XP Professional 64-bit have resolved this issue; PBO works as expected, on dual-head dual-core CPU configurations! In general, I found this to be the best driver in conjunction with JOGL so far. I haven’t had a chance yet to confirm this with the latest 32-bit XP drivers.

Thanks for following up. This is a big relief as I didn’t see any obvious differences in how JOGL and LWJGL were managing their OpenGL contexts and further couldn’t see how any differences could manifest in this behavior. Please post whether the 32-bit drivers fix the problem there as well.

More good news: I can confirm the problems did exist under Win32 (x86) with NVidia driver version 81.98 and have disappeared since I installed version 84.21!

Thanks again. While there is probably something different between how JOGL and LWJGL manage their OpenGL contexts I have looked through and instrumented the source code for both libraries and don’t see any obvious differences which could result in this. I’m glad to hear NVidia’s latest drivers solve the problem and since the root cause is obviously there I have closed the associated JOGL bug as “won’t fix”.