On Friday 04 February 2005 16:17, Roland Scheidegger wrote:
> Adam Jackson wrote:
> > I can't really mandate a policy since I haven't been contributing much to
> > r300, but I would like to hear how people think this should progress.
>
> I'm not so convinced that r200 and r300 driver (and radeon, for that
> matter) really should be only one driver. Why is it that bad to have 3
> drivers? Those chips just ARE different. Sure, the 2d parts are more or
> less identical and certainly should be only one driver, but that's
> already the case. DRM should probably be the same too, since the
> differences needed are pretty much limited to what packets it accepts.
> But I'm not exactly sure how you'd unify the dri code. While you cannot
> deny that the drivers indeed look very similar, there are still a lot of
> differences. You will inevitably end up with lots of "if Radeon do that,
> else" code (or did you have #ifdef's in mind, so you would share the
> same source files, but would compile it to 3 targets in the end?).

No, definitely not #ifdef hell, down that road lies madness.

We have this already though, in several drivers.  Savage3D and Savage4, Intel 
830/855/915, Voodoo3 and Voodoo4/5 even.  And I would expect that the 
differences in features between chips corresponds well to GL features for the 
most part, so they're natural boundaries for conditionals anyway.

> So you might be able to unify them, but I'd bet it won't look pretty.
> Of course, it depends on how dissimilar the chips actually are. IMHO the
> differences between radeon and r200 are too big to make unifying
> worthwile, I have only looked at the r300 driver briefly but the
> differences to r200 seem to be quite large too.

Documentation would be a large help here of course.  Have any of the r300 
developers asked ATI for the 3d docs?  Or even unbowdlerised r200 docs.  That 
would help greatly in seeing whether, for example, some of the r300 registers 
are also present on r200 and we just don't know it, per Vladimir's example 
earlier in the thread.

> As a side note, last time I checked ATI had 3 Direct3d drivers for the
> chips too. They have a unified package to install, and they may (no
> idea) share large parts of source code, but there are 3 distinct dlls in
> the end.

Direct3D drivers are not really an apples-to-apples comparison since they'll 
try to factor out as many conditionals as possible for that last 0.03fps in 
3dmark.  fglrx is probably a more fair comparison, and fglrx covers r200 
through r400 no problem.  If we assume that that's the more maintainable 
solution from ATI's perspective, I have trouble seeing how distinct drivers 
would be more maintainable for us.

As an example of what the non-unified road looks like, look at the glide 
source.  Despite successive chips being pretty much strict supersets in terms 
of functionality, they clone the entire tree for each chip.  I suspect the 
effort required to keep drivers unified is worth it in the long run.

- ajax

Attachment: pgpHAk28G5N2q.pgp
Description: PGP signature

Reply via email to