Glx and indirect rendering (opengl)

hi

does someone know why the "X11 (XFree 4.x Linux) GLX with indirect rendering"
stuff is so extreme slow (with slow i mean: fps[GLX] = fps[MesaX11]/20 )
and: why has the X-process 100% CPU-load and not my application?
(top shows nearly 100 CPU% for the X-process)
the problem is:
i) fps-measurement in the style:
while(false)
{
a = startclock();
doEventHandling();
doSomeOpenGLStuff();
switchglBuffers();
b = stopclock();
}
does not work
the difference b-a is very small - mostly 0
(but with mesaX11 and hw-rendering it has a sensible value)
ii) sdl-eventhandling is not usable.
(reaction time bigger than 10 sec. on a PIII/600)
and i can barely move the mouse while the app is running …

i have tried different versions of X 4.x with different GFX-cards.
the problem appears only with glx in indirect rendering mode.
MesaX11 and direct rendering (radeon, geforce, …) works as expected.

i use SDL 1.2 …—
klaus gieb

AFAIK, most (all?) GLX drivers require direct rendering - so if you ask
for anything else, you probably get software emulation instead.

Kind of make sense, considering that indirect rendering prevents the GPU
from rendering directly to the screen. It would have to render into an
off-screen buffer, and then use 2D blitting to blit that into display. It
could theoretically work, but doesn’t in my experience. (BTW, that’s
actually how double buffered “direct” rendering is done by most GLX
drivers… A hint as to why indirect rendering doesn’t, perhaps?)

//David Olofson — Programmer, Reologica Instruments AB

.- M A I A -------------------------------------------------.
| Multimedia Application Integration Architecture |
| A Free/Open Source Plugin API for Professional Multimedia |
----------------------------> http://www.linuxdj.com/maia -' .- David Olofson -------------------------------------------. | Audio Hacker - Open Source Advocate - Singer - Songwriter |-------------------------------------> http://olofson.net -'On Friday 19 April 2002 17:54, Klaus Gieb wrote:

hi

does someone know why the “X11 (XFree 4.x Linux) GLX with indirect
rendering” stuff is so extreme slow (with slow i mean: fps[GLX] =
fps[MesaX11]/20 ) and: why has the X-process 100% CPU-load and not my
application? (top shows nearly 100 CPU% for the X-process)

does someone know why the "X11 (XFree 4.x Linux) GLX with indirect rendering"
stuff is so extreme slow (with slow i mean: fps[GLX] = fps[MesaX11]/20 )
and: why has the X-process 100% CPU-load and not my application?
(top shows nearly 100 CPU% for the X-process)

Indirect == no OpenGL hardware == CPU is doing all the work == SLOW!

the problem is:
i) fps-measurement in the style:
while(false)
{
a = startclock();
doEventHandling();
doSomeOpenGLStuff();
switchglBuffers();
b = stopclock();
}
does not work
the difference b-a is very small - mostly 0
(but with mesaX11 and hw-rendering it has a sensible value)

last = SDL_GetTicks ();
frames = 0;

DoVideoInit ();

// Make sure we draw SOMETHING while we load - garbage screens suck!
glClear (GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
DrawYourLoadingScreen ();

DoAllOtherInitStuff ();

// Frame loop
while (!done)
{
    // Do this at the beginning of the frame, small speedup
	SDL_GL_SwapBuffers ();

    now = SDL_GetTicks ();
    if (now >= last + 250)
    {
        printf ("%4.2f fps\n", frames / (now - last) * 4.0f);
        last = now;
    }

    DoEventHandling ();
    DoSomeOpenGLStuff ();

    if (some_error_condition)
        done = true;

    frames++;
}

DoSomeShutdownStuff ();

This isn’t very clean, but it demonstrates a better framecounter. 1/4
second is about all that is reasonable for a person to read. The printf
most likely would be a function to draw the counter on the screen.

ii) sdl-eventhandling is not usable.
(reaction time bigger than 10 sec. on a PIII/600)
and i can barely move the mouse while the app is running …

I am betting you have no time to handle events since you don’t have a
working OpenGL implementation in hardware.

i have tried different versions of X 4.x with different GFX-cards.
the problem appears only with glx in indirect rendering mode.
MesaX11 and direct rendering (radeon, geforce, …) works as expected.

Indirect rendering is measured in seconds per frame, not frames per
second.On Fri, Apr 19, 2002 at 05:54:14PM +0200, Klaus Gieb wrote:


Joseph Carter Available in cherry and grape

“Debian: no hats or reptiles were harmed in the making of this distribution.”
– Paul Slootman

-------------- next part --------------
A non-text attachment was scrubbed…
Name: not available
Type: application/pgp-signature
Size: 273 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20020419/1aefc2e6/attachment.pgp