[PATCH xserver 1/2] glx: Fix glXQueryContext for GLX_FBCONFIG_ID and GLX_RENDER_TYPE

Eric Anholt eric at anholt.net
Thu Sep 21 23:45:35 UTC 2017


Adam Jackson <ajax at redhat.com> writes:

> Just never filled in, oops. Seems to have gone unnoticed because
> normally glXQueryContext simply returns the values filled in by the
> client library when the context was created. The only path by which you
> normally get to a GLXQueryContext request is glXImportContext, and then
> only if the context is already indirect.
>
> However, that's a statement about Mesa's libGL (and anything else that
> inherited that bit of the SGI SI more or less intact). Nothing prevents
> a mischeivous client from issuing that request of a direct context, and
> if they did we'd be in trouble because we never bothered to preserve the
> associated fbconfig in the context state, so we'd crash looking up
> GLX_VISUAL_ID_EXT. So let's fix that too.

Looks like you missed the .config update in glxdri2.c?

This code is weird -- QueryContext and QueryContextInfoEXT are both
returning the same values, and the existing values we were giving were
only for QCIE.  This seems to be OK because the proto is the same for
both, and the glX call must be picking the attributes it cares about out
of the reply.  So, with the glxdri2.c fixed,

Reviewed-by: Eric Anholt <eric at anholt.net>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <https://lists.x.org/archives/xorg-devel/attachments/20170921/83623065/attachment.sig>


More information about the xorg-devel mailing list