[Mesa-dev] [PATCH 1/3] glx: Move vertex array protocol state into the indirect backend (v2)

Adam Jackson ajax at redhat.com
Wed Dec 6 18:12:12 UTC 2017


On Wed, 2017-12-06 at 14:50 +0000, Emil Velikov wrote:

> > +       * have setup the context, as it needs to query server attributes.
> > +       *
> > +       * At the point this is called gc->currentDpy is not initialized
> > +       * nor is the thread's current context actually set. Hence the
> > +       * cleverness before the GetString calls.
> > +       */
> > +      __GLXattribute *state = gc->client_state_private;
> > +      if (state && state->array_state == NULL) {
> > +         gc->currentDpy = gc->psc->dpy;
> > +         __glXSetCurrentContext(gc);
> 
> Unless I'm misreading the SendMakeCurrentRequest rework (patch 2/3)
> __glXSetCurrentContext() will be called, hence these two lines +
> respective comment could be omitted.

Pretty sure you're misreading something. This is the ->bind hook, if it
succeeds then MakeContextCurrent will call __glXSetCurrentContext.
Since we have not yet returned, we have not yet succeeded, and
__glXSetCurrentContext has not yet been called, so we must do it
ourselves.

- ajax


More information about the mesa-dev mailing list