summaryrefslogtreecommitdiff
path: root/glx
diff options
context:
space:
mode:
authorNeil Roberts <neil@linux.intel.com>2014-12-01 16:06:17 -0500
committerKeith Packard <keithp@keithp.com>2014-12-09 14:15:55 -0800
commitc1455f76c6b1aa4ecaacb2221a687244285aa44b (patch)
tree1ddd4b3769721cb5818005161ea1dc02f08d91c5 /glx
parent6704bb0ed7a10dabe8ef3bb3adf8b8a7f29a78f0 (diff)
glx: Add implementation of __GLXContext->loseCurrent for direct ctxts
This adds a dummy implementation for the loseCurrent function in __GLXContext for direct contexts which just returns GL_TRUE. Without this then the X server can crash if receives a MakeCurrent message for a direct context because it will attempt to call loseCurrent when cleaning up the client in the callback for ClientStateGone. [ajax: added assumed s-o-b line] Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=86531 Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Neil Roberts <neil@linux.intel.com> Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'glx')
-rw-r--r--glx/glxcmds.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/glx/glxcmds.c b/glx/glxcmds.c
index bd6cb8dc0..e836af8d5 100644
--- a/glx/glxcmds.c
+++ b/glx/glxcmds.c
@@ -198,6 +198,12 @@ __glXdirectContextDestroy(__GLXcontext * context)
free(context);
}
+static int
+__glXdirectContextLoseCurrent(__GLXcontext * context)
+{
+ return GL_TRUE;
+}
+
_X_HIDDEN __GLXcontext *
__glXdirectContextCreate(__GLXscreen * screen,
__GLXconfig * modes, __GLXcontext * shareContext)
@@ -209,6 +215,7 @@ __glXdirectContextCreate(__GLXscreen * screen,
return NULL;
context->destroy = __glXdirectContextDestroy;
+ context->loseCurrent = __glXdirectContextLoseCurrent;
return context;
}