[PATCH 0/5] Various GLX fixes

Adam Jackson ajax at redhat.com
Mon Feb 25 14:04:07 PST 2013


GLX's GetDrawableAttributes request works by simply dumping all the attributes
the server knows about to the client, and filtering on the client side.  Sadly
we only ever bothered to implement enough of that to make texture_from_pixmap
work.  This series fills in the rest of the bits that GLX 1.3 requires, and
then fixes an obvious sanity check bug around CreatePixmap.

This _doesn't_ fix piglit's tests for glXQueryDrawable as currently written,
because that test uses the GLX 1.2 API where Windows are always treated as
valid GLX drawables, and that path seems to be a bit funny at the moment.  In
our 1.2 compat we only autovivify a GLXWindow when MakeCurrent gets called on a
Window, and for some reason that I haven't deeply investigated yet that doesn't
seem to ever happen, or at least never result in a MakeCurrent protocol request
to the server.  This is... kind of okay?  The GetDrawableAttributes request
itself was only added in GLX 1.3 to support QueryDrawable and GetSelectedEvent,
which themselves were only necessary because 1.3 is what added pbuffers (which
have clobber events, and which can't be queried by core protocol requests.)

So you can argue that's a bug in the test, since using the 1.2 MakeCurrent
convention and then issuing a 1.3 request is a bit of an abuse.  But you can
also argue this is a bug in the server, since in principle it's legal for 1.2
and 1.3 clients to not merely coexist on one server but also to reference the
same XIDs.

Still, this is clearly less wrong than what we've got, and clients using the
1.3 API will find that glXQueryDrawable() actually works.

This series is also available as the glx-for-1.14 branch of my xserver tree:

http://cgit.freedesktop.org/~ajax/xserver/log/?h=glx-for-1.14

- ajax



More information about the xorg-devel mailing list