From: Jakob B. <wal...@gm...> - 2010-03-25 17:58:31
|
On Thu, Mar 25, 2010 at 3:12 PM, George Sapountzis <gsa...@gm...> wrote: > I pushed this to master, swrastg_dri was added to the autoconf build > system only. > > I also did a merge with gallium-resources for st/dri at > ~gsap7/gallium-resources-merge-drisw, it basically reverts the old > conversion, merges and redoes the conversion because there were a lot > of conflicts, hope this is ok. Hi George, Let me first of say that despite my negative tone in the following text I do really like what you have done, thanks for figuring it out and doing the work. I really don't like the way you reuse the dri state tracker file to produce two different o file form the same c file. Magic defines on the build line that make the c file take different paths make the code harder to read and there is a big chance that some paths just bit rot. However to does seems to be very limited. And I also realize that the is no way around it due to the fact that you have to work against two different dri_util.h files and as such two different dri interfaces. I have attached 4 patches that I like to run by you before pushing. 0001 is rather trivial and is just a code cleanup that adds dri2 prefix for functions that are in the dri2.c file. 0002 just removes the drisw.h from the drm build and dri[1|2].h from the sw build, just to be extra sure we don't use the wrong functions in the wrong place (you get a build time warning plus a link error, instead of just a link error). 0003 moves drisw into dri/sw and the drm dri files into dri/drm, yet again for clarity. 0004 moves the common files into a common directory. One thing that could be done to reduce the amount of #ifdefs would be to move the tables from dri_screen.c into drisw.c and dri2.c. And create a "virtual" function on the screen for flush_frontbuffer alloc_texture and so on. Comments please? Cheers Jakob. PS: I hope I didn't sound to negative... |