From: Brian Paul Date: Tue, 29 Sep 2009 16:24:27 +0000 (-0600) Subject: glx: fix glXQueryContext(GLX_RENDER_TYPE) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=521e4b9b7e3c79e7362f7cbd594a2e8cf74cdfe4;p=mesa.git glx: fix glXQueryContext(GLX_RENDER_TYPE) The renderType parameter to CreateContext() was never used. Also, it was often passed as zero. Now when it's zero we check if the context is RGBA or CI mode and set it accordingly. Fixes bug 24211. --- diff --git a/src/glx/x11/glxcmds.c b/src/glx/x11/glxcmds.c index af3e559f999..cd4aede74e4 100644 --- a/src/glx/x11/glxcmds.c +++ b/src/glx/x11/glxcmds.c @@ -398,6 +398,10 @@ CreateContext(Display * dpy, XVisualInfo * vis, _XError(dpy, &error); return None; } + if (renderType == 0) { + /* Initialize renderType now */ + renderType = mode->rgbMode ? GLX_RGBA_TYPE : GLX_COLOR_INDEX_TYPE; + } } else { mode = fbconfig; @@ -484,6 +488,8 @@ CreateContext(Display * dpy, XVisualInfo * vis, gc->imported = GL_TRUE; } + gc->renderType = renderType; + return gc; }