The call to XCreatePixmap() at http://mxr.mozilla.org/mozilla-central/source/toolkit/xre/glxtest.cpp#205 hardcodes the depth to be 32, while the call to glXCreatePixmap() on the next line uses the first GLXFBConfig returned by the previous glXChooseFBConfig() which doesn't necessarily have a depth of 32. This appears to work without error with Mesa hardware rendering, but it will cause a BadMatch error when glMakeCurrent(dpy, None, NULL) is called on line 246 with Mesa software rendering as Mesa attempts to XPutImage() a 24-bit pixmap created internally on the 32-bit pixmap supplied by Firefox. Not surprisingly, the first GLXFBConfig returned by glXChooseFBConfig() with Mesa software rendering has a depth of 24. This has a very easy fix, change the 32 in the call to XCreatePixmap to vInfo->depth. I've tested it on Firefox 9.0.1 on a 64-bit Fedora 16 system, and Firefox now works with Mesa software rendering.
Moving over to Toolkit -> General for further triage.
Status: UNCONFIRMED → NEW
Component: General → General
Ever confirmed: true
Product: Firefox → Toolkit
QA Contact: general → general
Version: unspecified → Trunk
Component: General → Graphics
Product: Toolkit → Core
QA Contact: general → thebes
Comment on attachment 586472 [details] [diff] [review] Fix glxtest pixmap creation Review of attachment 586472 [details] [diff] [review]: ----------------------------------------------------------------- Many thanks for the debugging and the patch!
Attachment #586472 - Flags: review?(bjacob) → review+
Also, support for Mesa software rendering is very important as it's the only way to make WebGL support ubiquitous without involving proprietary software (Mesa seems to be the only competitive open source software OpenGL implementation).
Assignee: nobody → nmiell
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla12
Status: ASSIGNED → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.