GLXPixmap and radeon driver

Michel Dänzer michel at tungstengraphics.com
Thu Apr 3 01:16:47 PDT 2008


On Wed, 2008-04-02 at 21:10 +0100, Glynn Clements wrote:
> Michel Dänzer wrote:
> 
> > > Actually, the symptoms suggest that this would have to be a
> > > client-side (libGL) issue, and the specific driver is only triggering
> > > the bug.
> > 
> > The error is generated because you're trying to render to a GLXPixmap,
> > which the drivers don't support without DRI2.
> 
> Is it not possible for libGL to trap this? glXMakeCurrent returns a
> boolean status; it would be nice if it would just return false without
> requiring the application to deal with the error. But there may well
> be issues which I'm overlooking here.

You may have a point in this particular case, but the GLX spec defines
various other conditions where glXMakeCurrent may generate other X11
protocol errors anyway.


> > > > or maybe check for GLX >= 1.3 or something like that.
> > > 
> > > AFAICT, GLX Pixmaps are GLX 1.0. They certainly work with some
> > > implementations which claim GLX 1.2 (e.g. the "nv" driver and Cygwin's
> > > XWin.exe), 
> > 
> > Because they use software rendering.
> 
> Right; although the error occurs in spite of the fact that I'm
> creating an indirect rendering context. Is this a consequence of
> AIGLX?

Yes, the limitation lies in the interface to the DRI driver, which is
used for indirect rendering as well with AIGLX.


> > Which points to another possible test for a workaround: if the context
> > uses direct rendering and GLX_EXT_texture_from_pixmap is in the server
> > and client extensions but not the GLX extensions, you probably can't
> > render to GLXPixmaps.
> 
> The context is always created for indirect rendering:
> 
> 	    ctx = glXCreateContext(dpy, vi, NULL, GL_FALSE);

Actually, the rest of the test should still work (so long as the
environment variable LIBGL_ALWAYS_INDIRECT isn't set). I agree it's kind
of an ugly hack in any case though. Maybe others have ideas for better
solutions.


-- 
Earthling Michel Dänzer           |          http://tungstengraphics.com
Libre software enthusiast         |          Debian, X and DRI developer




More information about the xorg mailing list