Mesa-12.0.1
      
      
        
          Introduction to Mesa
        
        
          Mesa is an OpenGL compatible 3D
          graphics library.
        
        
          This package is known to build and work properly using an LFS-7.10
          platform.
        
        
          Package Information
        
        
        
          Additional Downloads
        
        
        
          Mesa Dependencies
        
        
          Required
        
        
          Xorg
          Libraries, libdrm-2.4.70, and Python-2.7.12
        
        
          Recommended
        
        
          elfutils-0.167 (required for Gallium3D
          radeonsi driver), libva-1.7.1 (to build drivers for supported
          hardware, note that there is a circular dependency. You must build
          libva first without EGL and GLX
          support, install this package, and rebuild libva.), libvdpau-1.1.1
          (to build VDPAU drivers), LLVM-3.8.1 (required
          for Gallium3D r300, r600 and radeonsi drivers and also for llvmpipe
          which is intended to be the fastest of the three sw rasterizers,
          see http://www.mesa3d.org/faq.html#part3)
        
        
          Optional
        
        
          libgcrypt-1.7.3, Nettle-3.2,
          (Wayland-1.11.0 required for Plasma-5.7.3 and for GNOME), mesa-demos
          (provides more than 300 extra demos to test Mesa; this includes the same programs added by
          the patch above), and Bellagio OpenMAX Integration
          Layer (for mobile platforms)
        
        
          ![[Note]](../images/note.png) 
          
            Note
          
          
            The instructions below assume that elfutils and LLVM with the r600/amdgpu and host backends
            are installed. You will need to modify the instructions if you
            choose not to install them. Please note that elfutils and LLVM are required for the Gallium3D r300, r600,
            radeonsi, and SWR drivers. For an explanation of Gallium3D please
            see https://en.wikipedia.org/wiki/Gallium3D.
          
         
        
          User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/mesa
        
       
      
        
          Installation of Mesa
        
        
          If you have downloaded the xdemos patch (needed if testing the Xorg
          installation per BLFS instructions), apply it by running the
          following command:
        
        
patch -Np1 -i ../mesa-12.0.1-add_xdemos-1.patch
        
          Install Mesa by running the
          following commands:
        
        
          ![[Note]](../images/note.png) 
          
            Note
          
          
            Add wayland to the --with-egl-platforms option below if you plan on
            building Plasma-5.7.3 or GNOME.
          
         
        
GLL_DRV="nouveau,r300,r600,radeonsi,svga,swrast,swr" &&
sed -i "/pthread-stubs/d" configure.ac      &&
sed -i "/seems to be moved/s/^/: #/" bin/ltmain.sh &&
./autogen.sh CFLAGS='-O2' CXXFLAGS='-O2'    \
            --prefix=$XORG_PREFIX           \
            --sysconfdir=/etc               \
            --enable-texture-float          \
            --enable-gles1                  \
            --enable-gles2                  \
            --enable-osmesa                 \
            --enable-xa                     \
            --enable-gbm                    \
            --enable-glx-tls                \
            --with-egl-platforms="drm,x11"  \
            --with-gallium-drivers=$GLL_DRV &&
unset GLL_DRV &&
make
        
          If you have applied the xdemos patch, build the demo programs by
          running the following command:
        
        
make -C xdemos DEMOS_PREFIX=$XORG_PREFIX
        
          To test the results, issue: make
          check.
        
        
          Now, as the root user:
        
        
make install
        
          If you have built the demo programs, install them by running the
          following command as the root user:
        
        
make -C xdemos DEMOS_PREFIX=$XORG_PREFIX install
        
          If desired, install the optional documentation by running the
          following commands as the root
          user:
        
        
install -v -dm755 /usr/share/doc/mesa-12.0.1 &&
cp -rfv docs/* /usr/share/doc/mesa-12.0.1
       
      
        
          Command Explanations
        
        
          sed -i ...
          configure.ac: This sed removes a dependency on the
          libpthread-stubs package which is
          useless on Linux.
        
        
          sed -i ...
          bin/ltmain.sh: This sed silences several useless
          and annoying warnings from libtool.
        
        
          CFLAGS="-O2"
          CXXFLAGS="-O2": By default, Autoconf sets CFLAGS and CXXFLAGS to "-g -O2".
          That results in binaries and libraries being built with debugging
          symbols which make them bigger. Override the default flags to omit
          -g compiler flag so the final libraries are smaller.
        
        
          --enable-texture-float:
          This switch enables floating-point textures and render buffers.
          Please consult docs/patents.txt to
          see if there are any legal issues if you use this feature.
        
        
          --enable-gles1: This switch
          enables support for the OpenGL ES 1.x API.
        
        
          --enable-gles2: This switch
          enables support for the OpenGL ES 2.x API.
        
        
          --enable-osmesa: This
          switch enables building the libOSMesa
          library.
        
        
          --enable-xa: This switch
          enables building of the XA X Acceleration API (Required for VMware
          3D Driver).
        
        
          --enable-gbm: This switch
          enables building of the Mesa
          Graphics Buffer Manager library.
        
        
          --enable-glx-tls: This
          switch enables TLS (Thread Local Storage) support in GLX.
        
        
          --with-egl-platforms="...":
          This parameter controls which platforms EGL will be built for.
          Available platforms are drm, x11 and wayland.
        
        
          --with-gallium-drivers="...": This
          parameter controls which Gallium3D drivers should be built.
          Available drivers are: i915, ilo, nouveau, r300, r600, radeonsi,
          svga, swrast, and swr. You will need to remove r300, r600,
          radeonsi, and swr from the list if you did not install elfutils and LLVM with the r600/amdgpu and host backends.
        
        
          --enable-r600-llvm-compiler: Use this
          switch to enable an experimental R600 LLVM backend for graphics shaders which claims
          to speed up the driver.
        
       
      
        
          Contents
        
        
          
            
              Installed Programs:
              glxgears and glxinfo
            
            
              Installed Libraries:
              libEGL.so, libgbm.so, libglapi.so,
              libGLESv1_CM.so, libGLESv2.so, libGL.so, libOSMesa.so,
              libswrAVX.so, libswrAVX2.so, libxatracker.so,
              libXvMCnouveau.so, and libXvMCr600.so
            
            
              Installed Directories:
              $XORG_PREFIX/{include/{EGL,GL,GLES,GLES2,GLES3,KHR},lib/{dri,vdpau}}
              and /usr/share/doc/mesa-12.0.1 (optional)
            
           
         
        
          
            Short Descriptions
          
          
            
            
              
                | 
                    glxgears
                   | 
                    is a GL demo useful for troubleshooting graphics
                    problems.
                   | 
              
                | 
                    glxinfo
                   | 
                    is a diagnostic program that displays information about
                    the graphics hardware and installed GL libraries.
                   | 
              
                | 
                    libEGL.so | 
                    provides a native platform graphics interface as defined
                    by the EGL-1.4 specification.
                   | 
              
                | 
                    libgbm.so | 
                    is the Mesa Graphics
                    Buffer Manager library.
                   | 
              
                | 
                    libGLESv1_CM.so | 
                    is the Mesa OpenGL ES
                    1.1 library.
                   | 
              
                | 
                    libGLES2.so | 
                    is the Mesa OpenGL ES
                    2.0 library.
                   | 
              
                | 
                    libGL.so | 
                    is the main Mesa OpenGL
                    library.
                   | 
              
                | 
                    libOSMesa.so | 
                    is the Mesa Off-screen
                    Rendering library.
                   | 
              
                | 
                    libxatracker.so | 
                    is the Xorg Gallium3D acceleration library.
                   | 
            
          
         
       
      
        Last updated on 2016-08-27 13:19:14 -0700