Unexpected BadMatch error
Heinrich Janzing
h.janzing at myrealbox.com
Mon Dec 4 12:49:50 PST 2006
Hi,
I posted the following message on the mesa3d-users mailing list earlier today,
but it seems that's a fairly low traffic list. Since I really need help soon,
I figured I'd try again here...
I'm trying to develop a composite/window manager. I'm currently testing it on
Xgl. I'm linking to the mesa libGL rather than ATI's one.
The problem is, according to gdb, glXSelectEventSGIX is called from within
glXQueryDrawable, and generates a BadMatch (bad parameter attributes) error
(major opcode 148, minor opcode 22). According to the documentation I could
find, that shouldn't happen. What does this error mean? Here's the relevant
part of my source code:
Texture::Texture(Display* p_display, Pixmap pixmap)
{
#ifdef TRACE
cout << "TRACE: Texture::Texture(Display* p_display, Pixmap pixmap)"
<< endl;
#endif
setDisplay(p_display);
int pixmapAttr[] = {
GLX_TEXTURE_FORMAT_EXT, GLX_TEXTURE_FORMAT_RGBA_EXT,
None
};
GLXFBConfigInfo ci(p_display);
ci.init();
#ifdef VERBOSE
cout << "GLXPixmap using: ";
ci.printFbConfigInfo(ci.getBest());
#endif
GLXPixmap glxPixmap = glXCreatePixmap(getDisplay(), ci.getBest(),
pixmap,
pixmapAttr);
setGLXPixmap(glxPixmap);
unsigned int target;
glXQueryDrawable(getDisplay(), glxPixmap, GLX_TEXTURE_TARGET_EXT,
&target);
switch (target)
{
case GLX_TEXTURE_2D_EXT:
#ifdef VERBOSE
cout << "GLX pixmap texture target: GLX_TEXTURE_2D_EXT" << endl;
#endif
setTarget(GL_TEXTURE_2D);
break;
case GLX_TEXTURE_RECTANGLE_EXT:
#ifdef VERBOSE
cout << "GLX pixmap texture target: GLX_TEXTURE_RECTANGLE_EXT" <<
endl;
#endif
setTarget(GL_TEXTURE_RECTANGLE_ARB);
break;
default:
setTarget(0);
#ifdef VERBOSE
cout << "Unknown texture target for GLX pixmap!" << endl;
#endif
}
}
This is the gdb backtrace: (my errorhandler raises a segfault signal to force
core dump)
#0 0xffffe410 in __kernel_vsyscall ()
#1 0xb7b82770 in raise () from /lib/tls/i686/cmov/libc.so.6
#2 0x0804a085 in errorHandler (p_display=0x8056008, p_ee=0xbf846988)
at /home/penguin/projects/thesisprototype1/src/thesisprototype1.cpp:123
#3 0xb7ec7dfa in _XError () from /usr/lib/libX11.so.6
#4 0xb7ec99e4 in _XReply () from /usr/lib/libX11.so.6
#5 0xb7dd430e in glXSelectEventSGIX () from /usr/lib/fglrx/libGL.so.1
#6 0x08050ac7 in Texture (this=0x805c5e8, p_display=0x8056008,
pixmap=4194308)
at /home/penguin/projects/thesisprototype1/src/texture.cpp:70
#7 0x0804b966 in ClientWindow::updateTexture (this=0x805c538)
at /home/penguin/projects/thesisprototype1/src/clientwindow.cpp:140
#8 0x0804b9e9 in ClientWindow::render (this=0x805c538)
at /home/penguin/projects/thesisprototype1/src/clientwindow.cpp:109
#9 0x0804dbfb in WindowStack::render (this=0x805c4f8)
at /home/penguin/projects/thesisprototype1/src/windowstack.cpp:138
#10 0x0804eb16 in BasicRenderer::render (this=0xbf846c40, scene=@0xbf846c58)
at /home/penguin/projects/thesisprototype1/src/basicrenderer.cpp:67
#11 0x0804a1fd in start (display=0x8056008)
at /home/penguin/projects/thesisprototype1/src/thesisprototype1.cpp:101
#12 0x0804a664 in main ()
at /home/penguin/projects/thesisprototype1/src/thesisprototype1.cpp:60
It'd also be helpful to know where exactly all those extern _real_xxxxxxxxx
methods are actually implemented, so I can take a look at the source code
myself.
Thanks,
Heinrich
More information about the xorg
mailing list