On 6 December 2017 at 18:12, Adam Jackson <a...@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 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev