summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Fourdan <ofourdan@redhat.com>2021-06-03 17:51:01 +0200
committerMatt Turner <mattst88@gmail.com>2021-06-14 21:23:48 +0000
commit2a83c840c8f38281b7f93b5522e20a71f6723b08 (patch)
tree2e5ae64310c6a7ebebe00ba59cb46acf2eead1f4
parent394b6cc1cf614ba7b13db7976b0739035da86d28 (diff)
downloadxserver-2a83c840c8f38281b7f93b5522e20a71f6723b08.tar.gz
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. 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 commit c468d34c7208c9041f9c077b54a00ae9cccad6a3)
-rw-r--r--glx/glxcmds.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/glx/glxcmds.c b/glx/glxcmds.c
index 2d77fb3e3..d148c79bf 100644
--- a/glx/glxcmds.c
+++ b/glx/glxcmds.c
@@ -650,9 +650,10 @@ xorgGlxMakeCurrent(ClientPtr client, GLXContextTag tag, XID drawId, XID readId,
}
glxc->currentClient = client;
- glxServer.setContextTagPrivate(client, newContextTag, glxc);
}
+ glxServer.setContextTagPrivate(client, newContextTag, glxc);
+
if (prevglxc) {
prevglxc->currentClient = NULL;
if (!prevglxc->idExists) {