Mesa seems to be unable to handle 30bit TrueColor visuals
@gisburn
Submitted by Roland Mainz Assigned to mes..@..op.org
Description
An attempt to run "glxgears" on a Xserver which has a 30bit TrueColor visual results in the following error (note that the Xserver also supports 24bit and 16bit TrueColor visuals): -- snip -- % glxgears X Error of failed request: GLXBadContext Major opcode of failed request: 144 (GLX) Minor opcode of failed request: 5 (X_GLXMakeCurrent) Serial number of failed request: 39 Current serial number in output stream: 39 -- snip --
A quick check added in glxgears shows that the requested visual depth and the window depth are the same (30bit) so I assume this isn't the part which causes problems. On the Xserver side the following waring is printed: -- snip -- Mesa warning: XMesaCreateWindowBuffer: depth mismatch between visual and window! -- snip --
I've added the following debug code to the Mesa engine... -- snip -- Index: xc/extras/Mesa/src/mesa/drivers/x11/xm_api.c
RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/drivers/x11/xm_api.c,v retrieving revision 1.1.1.1 diff -u -2 -0 -r1.1.1.1 xm_api.c --- xc/extras/Mesa/src/mesa/drivers/x11/xm_api.c 16 Jun 2004 09:19:01 -0000 1.1.1.1 +++ xc/extras/Mesa/src/mesa/drivers/x11/xm_api.c 31 Mar 2005 13:08:09 -0000 @@ -1734,48 +1734,53 @@ #ifdef FX char *fxEnvVar; #endif int client = 0;
XMesaBuffer b = alloc_xmesa_buffer();
if (!b) {
return NULL;
}
(void) c;
#ifdef XFree86Server client = CLIENT_ID(((XMesaDrawable)w)->id); #endif
assert(v);
#ifdef XFree86Server if (GET_VISUAL_DEPTH(v) != ((XMesaDrawable)w)->depth) {
-
_mesa_warning(NULL, "XMesaCreateWindowBuffer: depth mismatch between
visual (%d) and window (%d)!\n",
-
(int)GET_VISUAL_DEPTH(v), (int)((XMesaDrawable)w)->depth);
-
return NULL;
-
} #else XGetWindowAttributes( v->display, w, &attr );
if (GET_VISUAL_DEPTH(v) != attr.depth) { -#endif
-
_mesa_warning(NULL, "XMesaCreateWindowBuffer: depth mismatch between
visual and window!\n");
-
_mesa_warning(NULL, "XMesaCreateWindowBuffer: depth mismatch between
visual (%d) and window (%d)!\n",
-
(int)GET_VISUAL_DEPTH(v), (int)attr.depth); return NULL;
Any ideas what may be going wrong here ?