From: Roland S. <rsc...@hi...> - 2005-08-30 22:10:54
|
Ian Romanick wrote: > I've been looking a bit at various Radeon 3D drivers lately. Frankly, > they are in a woeful state. For years, literally, we've talked about > unifying the radeon and r200 drivers. Now a new driver, r300, has > been added. Each time there is a change to core Mesa, someone has to > go in and make nearly identical changes in 3 separate drivers. Ouch. > > > We've procrastinated doing this work for a couple valid reasons. The > primary reason being that it's a rather large chunk of work to do. > The 3 drivers a very similar in places, but are, for the most part, > not quite identical. That makes the required changes more intrusive > than just renaming a bunch of common functions and fixing the > Makefiles. I think exactly this is the big problem. Almost identical at some places, but not quite. > The secondary reason, which follows from the previous, is that there > would be a lot of testing. We'd have to test numerous programs > across at least 3 different pieces of hardware. There is a lot of > opportunity for things to be subtly wrong, and we'd sure like to > catch those issues before they hit production. Depends on how you factor the code out. If you carefully start with things which are really identical, not much should go wrong (of course some testing is still needed). > In spite of those large issues, we need to do something. Put another > way, some progress towards unification would improve the situation. > That is exactly what I propose. We should create a new directory, > called radeon_common, and gradually migrate common code there. We'll > continue to have 3 separate drivers, but each of those drivers will > pull in code from the radeon_common directory. This is similar to > the way drivers pull in code from the common directory. > > Eventually "all" of the common code will end up in radeon_common. > Once we get to that point, it will be a much smaller step to unify > the drivers. Moreover, the testing burden is reduced because it is > spread out, in small pieces, over time. > > Am I off my rocker, or does this seem like a workable idea? If this > sounds reasonable, I'll go ahead and create the radeon_common Sounds like an interesting idea. Maybe it is the more succesful approach than to unify the driver completely (i.e. only one driver built). It would at least avoid the problem that you can't have different config options for driconf... Though the usefulness of the approach would strongly depend on that someone actually migrates code to radeon_common. I think everyone will be happy if you do it :-). btw if anyone is interested I still have an uptodate copy of the unified r100/r200 driver I tried some months ago (it is working except the driconf problem, plus a bug is somewhere lurking in the r200 part, there are some rendering problems I've never fixed because I was too lazy to find that bug...) Roland |