####################################### # # # The Mesa DRI SDK and its drivers. # # # ####################################### 1) What? Why? Where? -------------------- 1.1) What? ---------- The DRI SDK and the modularized dri drivers provide a clean and easy way of: * building the base mesa/dri libraries separately. * installing the libraries, their headers and pkgconfig files (SDK). * building drivers separately, against this sdk. 1.2) Why? --------- A modularized mesa tree allows for an easier and a more sensible development, packaging, maintainance and distribution model. Driver developers are more free to make updates to their respective drivers, and are therefor more easily able to sync up the different parts of their driver stacks. Packagers get fine grained control and a more sensible dependency tree. Maintainers can more easily provide driver updates, without having to update other parts of the installation. Users can quickly and easily update their drivers, getting bug-fixes and performance increases almost for free. Add the synergies between those 4 groups and their individual advantages (such as increased and more logical testing), and everyone wins bit time. 1.3) Where? ----------- Currently, at http://cgit.freedesktop.org/~libv/ http://cgit.freedesktop.org/~libv/mesa-dri-sdk/ contains the mesa tree, with different release and distribution versions tagged and patched to provide the SDK and the swrast driver. The other trees there, namely the mesa-dri-* ones, all provide the standalone build trees of one or multiple (but then related) dri drivers. i810: intel i8xx (i810 dir). i9xx: intel i915, i965 and newer (i915, i965 and intel dirs). mach64: ati rage (mach64 dir). mga: matrox G200 and G400 (mga dir). r128: ati rage 128 (r128 dir). radeon: ati radeon (radeon, r200, r300, r600 dirs). savage: s3 savage (savage dir). sis: sis chips (sis dir). tdfx: 3dfx voodoo (tdfx dir). unichrome: via unichrome (unichrome dir). The other driver trees from the src/mesa/drivers/dri were not modularized. Many of them are not useful, and the swrast driver does not link against the same objects as real dri drivers and is therefor built in tree. 1.4) How? --------- The SDK itself is purely additions to the mesa build system, and does not alter the actual mesa code. One can still build mesa the standard way. The drivers are fully autotooled, and their main dependencies (at this point) are libdrm and the DRI SDK (through pkg-config). Their layout is very simple and straightforward, except for the i9xx and radeon trees, where several drivers share code. The changes to the code were kept at an absolute minimum. The process for creating this was straightforward although quite laborious. First, the shared libraries and the pkg-config files were created and installed in the system. The individual driver trees were created from a single and relative simple template. Then the respective source files were copied over, and the Makefile.am adjusted to the Makefile of the mesa tree. The drivers were then build tested, and the required headers were installed in the system (via a simple script), and these were later added to the SDK build. This process was repeated for each version to create the individual SDKs. Later on, drivers were build tested against different versions of the SDK, and the appropriate dri pkgconfig limits were added. Add some iterations to figure out what the SDK and the drivers should really look like, and this then becomes a sizable amount of work. All distribution versions (5 currently) were run tested (glxinfo, glxgears) with at least 2 different drivers. 2) Versions. ------------ 2.1) SDK Versions. ------------------ All the SDK capable versions are in the dri-sdk- branches in this repository. The parent versions are tagged to match (or ammend) the mesa versions. SDK branches currently are: dri-sdk-7.0.3 dri-sdk-7.1.0 dri-sdk-7.2.0 dri-sdk-7.3.0 dri-sdk-7.4.0 dri-sdk-7.4.4 dri-sdk-7.5.0 dri-sdk-7.5.2 dri-sdk-7.6.1 dri-sdk-7.7.0 dri-sdk-debian-7.0.3-7 dri-sdk-debian-7.2-1ubuntu2 dri-sdk-debian-7.4-0ubuntu3 dri-sdk-debian-7.6.0-1ubuntu4 dri-sdk-debian-7.7-4 2.2) Driver Versions. --------------------- Tagged driver versions currently are: 7.0.3 7.0.4 7.1.0 7.2.0 7.3.0 7.4.4 7.5.0 7.5.2 7.6.0 7.6.1 7.7.0 7.7.1 These match the versions that pkg-config reports. 2.3) Distribution linked versions. ---------------------------------- : : Debian Lenny : dri-sdk-debian-7.0.3-7 : 7.0.4 Ubuntu Intrepid (8.10) : dri-sdk-debian-7.2-1ubuntu2 : 7.2.0 Ubuntu Jaunty (9.04) : dri-sdk-debian-7.4-0ubuntu3 : 7.4.0 Ubuntu Karmic (9.10) : dri-sdk-debian-7.6.0-1ubuntu4 : 7.6.0 Debian Squeeze : dri-sdk-debian-7.7-4 : 7.7.1 * If any of the above distributions is yours, then it should be trivial to build the exact matches. If not, it should be straightfoward to port the sdk patch of closely matching versions over. I will happily take in patches to support further distribution specific versions and to even integrate distribution build systems. * The mesa version of squeeze is likely to change. 3) Building and installing. --------------------------- 3.1) SDK. --------- Before autoconf (7.0.3): > make then choose the relevant linux-dri version, and ctrl-c the build. With autoconf: > ./autogen.sh [--prefix=/usr/] To build the SDK run: > make dri-sdk and the libmesadri and libmesadricommon shared libraries will be created. To install the full SDK run: > make dri-sdk-install 3.2) The swrast_dri.so driver. --------------------------------------- From mesa 7.1 the swrast_dri driver becomes available. This requires a slightly different build than standard drivers, and cannot be linked to libmesadricommon. So, from the mesa tree (assuming that configure has been run before): > make dri-swrast > make dri-swrast-install 3.3) Standalone DRI drivers. ---------------------------- When everything is set up correctly, it should be as easy as: > ./autogen.sh [--prefix=/usr/] > make > make install --- Hope that that covers most of what you need to know. Luc Verhaegen