|
|
2127ff |
From 1607ac6870f7cf67c30b96529ea5ca389c771a3d Mon Sep 17 00:00:00 2001
|
|
|
5f5628 |
From: Olivier Fourdan <ofourdan@redhat.com>
|
|
|
5f5628 |
Date: Thu, 3 Jun 2021 17:51:01 +0200
|
|
|
5f5628 |
Subject: [PATCH xserver 27/27] glx: Set ContextTag for all contexts
|
|
|
5f5628 |
|
|
|
5f5628 |
Currently, xorgGlxMakeCurrent() would set the context tag only for
|
|
|
5f5628 |
indirect GLX contexts.
|
|
|
5f5628 |
|
|
|
5f5628 |
However, several other places expect to find a context for the tag or
|
|
|
5f5628 |
they would raise a GLXBadContextTag error, such as WaitGL() or WaitX().
|
|
|
5f5628 |
|
|
|
5f5628 |
Set the context tag for direct contexts as well, to avoid raising an
|
|
|
2127ff |
error and possibly killing the client and set currentClient.
|
|
|
5f5628 |
|
|
|
5f5628 |
Thanks to Erik Kurzinger <ekurzinger@nvidia.com> for spotting the issue.
|
|
|
5f5628 |
|
|
|
5f5628 |
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
|
|
|
5f5628 |
Reviewed-by: Adam Jackson <ajax@redhat.com>
|
|
|
5f5628 |
(cherry picked from commit c468d34c7208c9041f9c077b54a00ae9cccad6a3)
|
|
|
2127ff |
(cherry picked from commit aad61e8e03311eb8bae4f7db59e65634733eadc2)
|
|
|
5f5628 |
---
|
|
|
2127ff |
glx/glxcmds.c | 5 +++--
|
|
|
2127ff |
1 file changed, 3 insertions(+), 2 deletions(-)
|
|
|
5f5628 |
|
|
|
5f5628 |
diff --git a/glx/glxcmds.c b/glx/glxcmds.c
|
|
|
2127ff |
index 1b9ad6d14..8b2170306 100644
|
|
|
5f5628 |
--- a/glx/glxcmds.c
|
|
|
5f5628 |
+++ b/glx/glxcmds.c
|
|
|
2127ff |
@@ -662,10 +662,11 @@ xorgGlxMakeCurrent(ClientPtr client, GLXContextTag tag, XID drawId, XID readId,
|
|
|
2127ff |
glxc->readPriv = NULL;
|
|
|
2127ff |
return __glXError(GLXBadContext);
|
|
|
5f5628 |
}
|
|
|
2127ff |
+ }
|
|
|
5f5628 |
|
|
|
2127ff |
+ glxServer.setContextTagPrivate(client, newContextTag, glxc);
|
|
|
2127ff |
+ if (glxc)
|
|
|
5f5628 |
glxc->currentClient = client;
|
|
|
5f5628 |
- glxServer.setContextTagPrivate(client, newContextTag, glxc);
|
|
|
2127ff |
- }
|
|
|
5f5628 |
|
|
|
5f5628 |
if (prevglxc) {
|
|
|
5f5628 |
prevglxc->currentClient = NULL;
|
|
|
5f5628 |
--
|
|
|
5f5628 |
2.31.1
|
|
|
5f5628 |
|