glx: Set ContextTag for all contexts
Currently, xorgGlxMakeCurrent() would set the context tag only for indirect GLX contexts. However, several other places expect to find a context for the tag or they would raise a GLXBadContextTag error, such as WaitGL() or WaitX(). Set the context tag for direct contexts as well, to avoid raising an error and possibly killing the client and set currentClient. Thanks to Erik Kurzinger <ekurzinger@nvidia.com> for spotting the issue. Signed-off-by: Olivier Fourdan <ofourdan@redhat.com> Reviewed-by: Adam Jackson <ajax@redhat.com> (cherry picked from commitc468d34c72
) (cherry picked from commitaad61e8e03
)
This commit is contained in:
parent
e754b473d1
commit
763f4fb278
|
@ -662,11 +662,12 @@ xorgGlxMakeCurrent(ClientPtr client, GLXContextTag tag, XID drawId, XID readId,
|
|||
glxc->readPriv = NULL;
|
||||
return __glXError(GLXBadContext);
|
||||
}
|
||||
|
||||
glxc->currentClient = client;
|
||||
glxServer.setContextTagPrivate(client, newContextTag, glxc);
|
||||
}
|
||||
|
||||
glxServer.setContextTagPrivate(client, newContextTag, glxc);
|
||||
if (glxc)
|
||||
glxc->currentClient = client;
|
||||
|
||||
if (prevglxc) {
|
||||
prevglxc->currentClient = NULL;
|
||||
if (!prevglxc->idExists) {
|
||||
|
|
Loading…
Reference in New Issue