The problem is that glcontextmodes.c being imported from Mesa sources to GL/glx module of xorg-server does not include necessary server-related configuration files. This is resulting in e.g. VisualID being typedef'd differently from other glx files at least on amd64. Therefore attempt to copy visual config using glcontextmodes.c results in off-by-4byte error, and blue bits size is copied from alpha bit size, which preclude detection of matching visuals later.
Created attachment 4573 [details] [review] Patch to include dix-config.h before X.h if compiling from within xorg-server
Created attachment 4578 [details] [review] mesa-6.4.2-xorg-server-uses-bad-datatypes-breaking-AMD64-fdo5835.patch This is the patch I've applied to Red Hat packages for Fedora Core, which has been confirmed to resolve the problem: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=176976
OK, I've checked in this patch to Mesa CVS, both the 6.4 branch and the trunk. Closing bug now.
(In reply to comment #3) > OK, I've checked in this patch to Mesa CVS, both the 6.4 branch and the trunk. > Closing bug now. Brian, you should have committed the second patch which was actually discussed on xorg-devel and tested by Mike's users. Though the only diff is removed conditional on XFree86Server.
OK, fixed.
Still not fixed for me. glcontextmodes.c is not the only file that needs to include dix-config.h. Any file that end up including X.h will need dix-config.h. Not sure exactly what files that is but including dix-config.h in glheader.h and making sure HAVE_DIX_CONFIG is defined when building mesa sources in xorg works for me. I'm attaching my mesa and xorg diffs.
Created attachment 4608 [details] [review] patch to include dix-config.h
Created attachment 4609 [details] [review] making sure HAVE_DIX_CONFIG_H is defined
(In reply to comment #6) > Any file that end up including X.h will need dix-config.h. Couldn't the #include <dix-config.h> be added to X.h itself then?
X.h is part of the xproto package. It would be a bit ugly to have it include an xorg server config.h file. I think the best would be to have the server add -D_XSERVER64 to it's CFLAGS (when building glx and glcore) as then we wouldn't have to worry about having the mesa sources include dix-config.h.
(In reply to comment #10) > X.h is part of the xproto package. It would be a bit ugly to have it include an > xorg server config.h file. I agree, but doesn't that apply to glheader.h in the Mesa tree as well? I completely agree that this should ideally be solved in the xserver tree, but if I had to choose between glheader.h and X.h, I'd choose the latter because that would also cover other similar problems that may lurk somewhere.
glheader.h is at least not installed on the system. I've made a patch for xorg that adds -D_XSERVER64 to GLX_CFLAGS on 64bit machines and GLX_CFLAGS is added to CFLAGS when building all mesa sources. This should work OK and we don't have to modify Mesa at all. I'll commit this patch to the xgl branch once I've verified that it works.
Created attachment 4610 [details] [review] Adds -D_XSERVER64 to CFLAGS when building glx and mesa sources in 64bit machines
this is the exact reason dix-config.h was created. new files that are going to be compiled in the server should be using it. if dix-config.h inclusion is not guaranteed, then a whole bunch of assumptions the build system makes are invalid, and we're back to the bad old days of everything ever in CFLAGS. so please just make all the relevant files include dix-config.h.
OK. That means all mesa source files need to include dix-config.h. My glheader.h patch seams like the best way to accomplish that. I've already committed my CFLAGS patch to xorg xgl branch but I'll back that out as soon as mesa sources include dix-config.h properly.
Fixed in HEAD and xgl-0-0-1 as of today.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.