SDL digest, Vol 1 #343 - 40 msgs

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] =3D
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)

AFAIK, most (all?) GLX drivers require direct rendering - so if you ask
well, idon’t know. i’m no x-programmer. but the GL_RENDERER sais
"Mesa GLX indirect redering" (whatever that means)
mesa without hw-accelleration sais “Mesa X11”

for anything else, you probably get software emulation instead.
hmm, yes it sounds sensible but “GLX indirect redering” is
about 20x slower than software Mesa (why?)

well if you want to “test” the effect, set “Mode 0600” in the
DRI section of your X config and run a opengl app. as normal user
make sure, you use the glx libGL.so (on most systems named
libGL.so._glx and is located in /usr/X11R6/lib or /usr/lib

Kind of make sense, considering that indirect rendering prevents the GPU=20
from rendering directly to the screen. It would have to render into an=20
off-screen buffer, and then use 2D blitting to blit that into display. It=
=20
could theoretically work, but doesn’t in my experience. (BTW, that’s=20
actually how double buffered “direct” rendering is done by most GLX=20
drivers… A hint as to why indirect rendering doesn’t, perhaps?)
ok. this could be so, but it still doesn’t explain why X need’s (and gets!)
allmost all CPU-time. and the rendering-thread (if there is one - i don’t
know …) and my app seems to run "asynchronously"
e.g.
int go = 1;
int a = clock();
int frames = 0;
while (go)
{
doAllGLRendering();
frames++;
if ((clock() - a)/1000 > 1000)
go = 0;
}
will produce a very huge frames value (> 10000) in one second.
but i see only about 2 or 3 frames …
(why?)—
klaus

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] =3D
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)

AFAIK, most (all?) GLX drivers require direct rendering - so if you
ask

well, idon’t know. i’m no x-programmer. but the GL_RENDERER sais
"Mesa GLX indirect redering" (whatever that means)
mesa without hw-accelleration sais “Mesa X11”

Exactly. What makes you think you get Mesa s/w when the server decides
it can’t do h/w accelerated rendering? Mesa s/w is a library, and runs in
your process, whereas anything to do with GLX will have to run in the X
server process. (Or at least on the same machine as the X serever, to be
correct.)

for anything else, you probably get software emulation instead.

hmm, yes it sounds sensible but “GLX indirect redering” is
about 20x slower than software Mesa (why?)

Crappy implementation…? Software mesa is probably pretty optimized
after all, especially considering that it renders correctly, as opposed
to any reasonably “fast” s/w implementation.

well if you want to “test” the effect, set “Mode 0600” in the
DRI section of your X config and run a opengl app. as normal user
make sure, you use the glx libGL.so (on most systems named
libGL.so._glx and is located in /usr/X11R6/lib or /usr/lib

No need - I’ve seen it, although because of my GLX driver not supporting
the display configuration I was using. Also results in “indirect
rendering”.

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

ok. this could be so, but it still doesn’t explain why X need’s (and
gets!) allmost all CPU-time. and the rendering-thread (if there is one

  • i don’t know …) and my app seems to run “asynchronously”

Sure it does! :slight_smile: The X server is “doing” the rendering, regardless of
there being h/w acceleration or not.

Consider running GLX over the network, and it becomes rather obvious that
that’s the way to do it. (Although it seems like the XFree86 s/w
rasterizer could use some optimization… heh)

If you’ve actually tried running “SDL 2D” programs oven a 10 Mbit
network, you’ll know what I mean… :slight_smile:

//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 20:20, Klaus Gieb wrote: