7730e12c9e
resolves: rhbz#1729925
41 lines
1.6 KiB
Diff
41 lines
1.6 KiB
Diff
From 045add84927051a33569ed701097e1fd514bf0ca Mon Sep 17 00:00:00 2001
|
|
From: Adam Jackson <ajax@redhat.com>
|
|
Date: Fri, 16 Aug 2019 14:56:19 -0400
|
|
Subject: [PATCH xserver 12/15] glx: Fix previous context validation in
|
|
xorgGlxMakeCurrent
|
|
|
|
vnd has already verified that the context tag is valid before this gets
|
|
called, and we only set the context tag private data to non-null for
|
|
indirect clients. Mesa happens to be buggy and doesn't send MakeCurrent
|
|
requests nearly as much as it should for direct contexts, but if you fix
|
|
that, then unbinding a direct context would fail here with
|
|
GLXBadContextTag.
|
|
|
|
Sadly Mesa will still need to carry a workaround here for broken
|
|
servers, but we should still fix the server.
|
|
|
|
(cherry picked from commit 95dcc81cb122e5a4c5b38e84ef46eb872b2e1431)
|
|
---
|
|
glx/glxcmds.c | 4 +---
|
|
1 file changed, 1 insertion(+), 3 deletions(-)
|
|
|
|
diff --git a/glx/glxcmds.c b/glx/glxcmds.c
|
|
index 54d452e58..75e42823c 100644
|
|
--- a/glx/glxcmds.c
|
|
+++ b/glx/glxcmds.c
|
|
@@ -574,10 +574,8 @@ xorgGlxMakeCurrent(ClientPtr client, GLXContextTag tag, XID drawId, XID readId,
|
|
/* Look up old context. If we have one, it must be in a usable state. */
|
|
if (tag != 0) {
|
|
prevglxc = glxServer.getContextTagPrivate(client, tag);
|
|
- if (!prevglxc)
|
|
- return __glXError(GLXBadContextTag);
|
|
|
|
- if (prevglxc->renderMode != GL_RENDER) {
|
|
+ if (prevglxc && prevglxc->renderMode != GL_RENDER) {
|
|
/* Oops. Not in render mode render. */
|
|
client->errorValue = prevglxc->id;
|
|
return __glXError(GLXBadContextState);
|
|
--
|
|
2.21.0
|
|
|