summaryrefslogtreecommitdiff
path: root/glx
diff options
context:
space:
mode:
authorOlivier Fourdan <ofourdan@redhat.com>2021-06-03 17:51:01 +0200
committerOlivier Fourdan <fourdan@gmail.com>2021-06-08 07:20:53 +0000
commitc468d34c7208c9041f9c077b54a00ae9cccad6a3 (patch)
tree253b8e8b7a9be976d8be7d7055a9bcc95e88ada8 /glx
parent6b47321bc6138bcd737b36e038aba904d56f1cf6 (diff)
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>
Diffstat (limited to 'glx')
-rw-r--r--glx/glxcmds.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/glx/glxcmds.c b/glx/glxcmds.c
index 2f69c794a..3f1bb9a71 100644
--- a/glx/glxcmds.c
+++ b/glx/glxcmds.c
@@ -664,9 +664,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) {