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

Emil Velikov emil.l.velikov at gmail.com
Tue Dec 12 14:22:37 UTC 2017


On 6 December 2017 at 18:12, Adam Jackson <ajax at redhat.com> wrote:
> 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.
>
Right my bad. Could swear I saw a __glXSetCurrentContext call before
the ->bind() one.

-Emil


More information about the mesa-dev mailing list