On Tue, Sep 22, 2009 at 01:47:50AM +0100, Dave Airlie wrote: > does the current feature use ifdefs in the C code to avoid calling > entrypoints if the feature isn't enabled? vs having null C functions in > the header files? > The first isn't generally a good idea as code doesn't get built when > the feature is off, so people editing around the feature can forget to > fix things inside the ifdefs, the second approach is a lot sounder > generally. It is the former right now. The patch series adopts the latter approach.
There is also one new macro for driver writers. Right now, driver functions are initialized by driver->Blah1 = implBlah1; driver->Blah2 = implBlah2; The patch series encourages drivers to switch to _MESA_INIT_BLAH_FUNCTIONS(driver, impl); It makes no difference when FEATURE_blah is enabled, but it compiles to nothing when the feature is disabled. The motivation is that, if impl is a driver-specific implementation, it reminds the author that the driver functions may be #if'ed to cut code size. If impl is a generic one from swrast or meta, the generic driver functions are not set to dd_function_table, as they are disabled. -- Regards, olv ------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ Mesa3d-dev mailing list Mesa3d-dev@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mesa3d-dev