AIGLX and direct rendering

Adam Jackson ajax at nwnk.net
Wed Sep 10 13:33:31 PDT 2008


On Wed, 2008-09-10 at 17:49 +0000, Lars Oliver Hansen wrote:
> Hi,
> 
> thanks to your list members I have direct rendering working now. I
> "wanted" this as it "sounds" faster than indirect rendering for 3D
> games and as I read that it is required for Compiz. However AIGLX is
> supposedly needed for Compiz too. Now AIGLX is "Accelerated Indirect
> GLX" and I again supposedly needed the setting
> LIBGL_ALWAYS_INDIRECT=true. For a 3D game I have a script which
> unloads Compiz and replaces it by MetaCity. If direct rendering is
> faster, is it possible to unload AIGLX or disable it for the game?

An OpenGL context can be either direct, or indirect.  Direct contexts
load a driver into the client and submit commands directly to the
hardware.  Indirect contexts send GLX protocol to the X server, which
then renders it "somehow".

Historically, indirect GLX was rendered with a software rasterizer.  It
worked but it's slow.  All AIGLX is, is the ability for the server to
load an accelerated 3d driver and handle indirect contexts that way.  It
happens to be the same driver as is used in direct contexts.

The reason you need AIGLX for compiz is because, with the open source
drivers, the GLX_EXT_texture_from_pixmap extension only works in
indirect contexts, because it only works when the pixmap and the texture
are in the same address space, and the only process with access to both
is the X server.

But, in the context of games, none of this matters, because you can have
as many GL contexts as you like.  Your game is just going to use a
direct context, so it doesn't matter whether the server accelerates
indirect contexts or not.  So it doesn't make sense to talk about
"unloading AIGLX".

- ajax

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <http://lists.x.org/archives/xorg/attachments/20080910/aa69131b/attachment.pgp>


More information about the xorg mailing list