mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 21:40:08 +01:00
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.
This commit is contained in:
parent
49fbdd18ed
commit
521e4b9b7e
1 changed files with 6 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue