mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-23 22:00:13 +01:00
xlib: fix glXDestroyContext in Gallium frontends
when glx is built with -Dglx=xlib, the mishandle in glXDestroyContext causes glmark2 to exit unexpectedly. Error: Glmark2 needs OpenGL(ES) version >= 2.0 to run (but version string is: '(null)')! Error: Failed to add vertex shader from file None: Error: Failed to create the new program [build] <default>: Set up failed Gitlab: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3985 Signed-off-by: Luc Ma <luc@sietium.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21067>
This commit is contained in:
parent
8f928a95e1
commit
abe6d750e5
1 changed files with 8 additions and 2 deletions
|
|
@ -1392,8 +1392,14 @@ glXQueryExtension( Display *dpy, int *errorBase, int *eventBase )
|
||||||
PUBLIC void
|
PUBLIC void
|
||||||
glXDestroyContext( Display *dpy, GLXContext ctx )
|
glXDestroyContext( Display *dpy, GLXContext ctx )
|
||||||
{
|
{
|
||||||
if (ctx) {
|
GLXContext glxCtx = ctx;
|
||||||
GLXContext glxCtx = ctx;
|
|
||||||
|
if (glxCtx == NULL || glxCtx->xid == None)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (ctx->currentDpy) {
|
||||||
|
ctx->xid = None;
|
||||||
|
} else {
|
||||||
(void) dpy;
|
(void) dpy;
|
||||||
XMesaDestroyContext( glxCtx->xmesaContext );
|
XMesaDestroyContext( glxCtx->xmesaContext );
|
||||||
XMesaGarbageCollect();
|
XMesaGarbageCollect();
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue