GLXPixmap and radeon driver
Michel Dänzer
michel at tungstengraphics.com
Wed Apr 2 09:05:34 PDT 2008
On Wed, 2008-04-02 at 16:44 +0100, Glynn Clements wrote:
> Michel Dänzer wrote:
>
> > > 2. Is there anything which it can do to determine that it can't use a
> > > GLXPixmap (without terminating the program)?
> >
> > It could catch the error,
>
> The code already checks all return values. The problem is that
> glXMakeCurrent() doesn't just return false and generate an X error, it
> terminates the program.
It's the default Xlib error handler that terminates the program. See the
XSetErrorHandler manpage. I'm not sure if Xlib isn't too broken to be
able to recover from this though...
> 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.
> > 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.
I realize that GLX 1.3 isn't technically a requirement, just that
rendering to GLXPixmaps should probably work with any implementation
that claims to be 1.3 or newer.
> but other implementations (i.e. the "radeon" driver) die.
>
> In any case, glXCreateGLXPixmap() is returning a valid XID. The
> problem only occurs if you try to use it.
GLXPixmaps can be used for GLX_EXT_texture_from_pixmap, they just can't
be rendered to without DRI2.
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.
Hope this helps,
--
Earthling Michel Dänzer | http://tungstengraphics.com
Libre software enthusiast | Debian, X and DRI developer
More information about the xorg
mailing list