From: Brian P. <br...@va...> - 2001-06-05 14:18:06
|
"Mike A. Harris" wrote: > > On Tue, 5 Jun 2001, Marcelo E. Magallon wrote: > > > > For all of our XFree86 4.x releases, we have shipped XFree86 but > > > have replaced the Mesa that comes with it with the standalone > > > Mesa from the mesa3d project hacked to support DRI. > > > > > > The reason for this is that we need software OpenGL working on > > > both 4.x and 3.3.6, and DRI hardware acceleration on 4.x. > > > > Hmmm... isn't this what Brian did? Your problem is that the 3.3.6 > > server doesn't have the GLX extension. The proper hack ;-) is to teach > > the libGL in the XFree86 4 sources about fakeglx, and I'm under the > > impression Brian did this. > > Brian, can you comment on this? If it is in fact true I'd like > to discuss it a bit deeper so that I understand what is going on > with it all. I just implemented this last week (and am still making tweaks). Basically, I've modified the libGL that's included with XFree86 so that it can render to displays which lack the GLX extension. First, libGL checks if the given display supports the GLX extension. If so, we use the usual GLX code to either send GLX protocol to the server or use the DRI to do 3D rendering. If the display does not have the GLX extension (ala XFree86 3.3.6) then I fallback to Xlib-based software rendering (like stand-alone Mesa). "fakeglx", BTW, is an emulation of the GLX programming API which uses ordinary Xlib calls. "xmesa" is the actual Mesa device driver for rendering via Xlib. Another terminology note: "GLX" refers to three things: the X server extension, the OpenGL wire protocol, and the X/OpenGL programming API. I've done this work in the DRI tree on the mesa-3-5-branch branch. Currently, the Xlib software rendering code gets built into libGL. Alternately, we could dynamically load the rendering code as a module, like the DRI driver. I'm afraid that the later might be too error prone though. A few more comments below... > > > There were some oddball chicken and egg dependancy problems with > > > this solution, and so we've decided instead of having a separate > > > Mesa package, to take the Mesa package and fold it into the > > > XFree86 src.rpm. > > > > ugh. > > I agree. I've successfully got it to build finally, but not > without severely evil specfile hacks. > > > > Here is what would IMHO be the best - at least from my viewpoint > > > as a distributor/package maintainer: > > > > hi from one of the guys that has your job on the Debian side... > > Hi. ;o) > > I don't know how Debian handles backwards compatibility with > upgrades, etc.. but that is also part of the headache for me. > Making sure nothing breaks with this. > > > > The easiest method (for me) would be if the Mesa that comes with > > > XFree86 had the 3.3.6 compatibility built right into it, and was > > > perhaps an Imake directive to enable at X build time > > > (BuildMesaSupport336?). This would make our hack unnecessary, > > > and would make package maintenance much simpler as well. I'd > > > much rather spend my time hacking on and contributing to XFree86 > > > itself than on packaging nightmares in unfamiliar turf... ;o) > > > > Again, your problem is that Mesa in the XFree86 4 sources doesn't work > > unless the Xserver knows about the GLX extension (IOW, you'll also have > > Ok. > > > a problem with an XF4 server that doesn't have the GLX module > > installed). Mesa works with 3.3.6 servers because it has a "fake" GLX > > inside it, that is, it nevers sends GLX requests to the server, but it > > handles all of that internally. > > Ok, you're refering to standalone Mesa right? Or the one > included with XFree86? I'm assuming the former. > > > And again, I think Brian already did the necessary work... (I haven't > > really tested) > > If that is true then what I am looking for above is already > implemented? Does Mesa 3.4.2 that comes with XFree86 4.1.0 > support OpenGL on 3.3.6 servers? Brian? No. There wasn't time to implement this and do extensive testing in time for XFree86 4.1.0. I don't know which XFree86 release will get this new libGL code. > If so, I can completely eliminate the separate Mesa package and > add a few more names to the people-to-buy-beer list. ;o) Unfortunatley, I think you'll still need it for a while. Have you looked at the BuildGLXLibrary configuration variable? I think that might disable building XFree86's libGL entirely. -Brian |