%general-entities; ]> Mesa-&mesa-version; Mesa Introduction to Mesa Mesa is an OpenGL compatible 3D graphics library. Mesa is updated relatively often. You may want to use the latest available &mesa-major-minor;.x mesa version. &lfs121_checked; Package Information Download (HTTP): Download (FTP): Download MD5 sum: &mesa-md5sum; Download size: &mesa-size; Estimated disk space required: &mesa-buildsize; Estimated build time: &mesa-time; Additional Downloads Recommended patch: (installs 2 demo programs for testing Mesa - not needed if you install the mesa-demos package) Mesa Dependencies Required , , and Recommended and (required for Vulkan support) (to provide VA-API support for some gallium drivers. Note that there is a circular dependency. You must build libva first without mesa's EGL and GLX support, install this package, and rebuild libva) (to build VDPAU drivers) (required for the r300, r600, and radeonsi drivers, and the LLVMpipe software rasterizer which can make the swrast driver much faster) (required for , GNOME, and recommended for ) (required for the Intel iris gallium driver) (required for the Intel vulkan driver) and (required for the Nouveau Vulkan driver) Choosing Mesa Drivers In the instructions below, all the available drivers are built. That will almost always work. However, it is not efficient. Depending on your video hardware, you probably need only specific drivers. The first thing you need to know is which type of video device you have. In some cases it is built into the CPU. In others it is a separate PCI card. In either case you can tell what video hardware you have by installing and running: lspci | grep VGA The video device is most likely one of three families: AMD, Intel, or Nvidia. See the Command Explanations for -D gallium-drivers=auto below to see what options are available for your specific video hardware (or emulated video hardware). You should probably add the swrast option as a backup driver. For 'platforms' you can select x11 and/or wayland. Note that in BLFS currently only Gnome and KDE can use wayland. If you are not going to use one of those desktop environments then you probably only want x11. For 'vulkan-drivers' you may want to limit the selection to your current hardware. These drivers are used by some specific applications. For example, ffmpeg (including ffplay) will use Vulkan instead of OpenGL for rendering video on the GPU. If you do not want to do this you may or may not want to install them. See the Command Explanations for -D vulkan-drivers=auto below to see what options are available for your specific video hardware (or emulated video hardware). You should probably add the swrast option as a backup driver unless you don't need Vulkan at all. Optional , , , , , mesa-demos (provides more than 300 extra demos to test Mesa; this includes the same programs added by the patch above), Bellagio OpenMAX Integration Layer (for mobile platforms), and libtizonia, &build-use-internet; Kernel Configuration Enable the following options in the kernel configuration and recompile the kernel if necessary: The corresponding Mesa Gallium3D driver name is provided as the comment for the configuration entries. If you don't know the name of the Mesa Gallium3D driver for your GPU, see below. , , , and may require firmware. See for details. Selecting or as y is not recommended. If it is, any required firmware must be built as a part of the kernel image or the initramfs for the driver to function correctly. The sub-entries under are used to ensure the AMDGPU kernel driver supports all GPUs using the radeonsi driver. They are not needed if you won't need itself. They may be unneeded for some GPU models. For swrast, is not strictly needed but recommended as an optimization. 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-add_xdemos-2.patch Install Mesa by running the following commands: mkdir build && cd build && meson setup .. \ --prefix=$XORG_PREFIX \ --buildtype=release \ -D platforms=x11,wayland \ -D gallium-drivers=auto \ -D vulkan-drivers=auto \ -D valgrind=disabled \ -D libunwind=disabled && ninja To test the results, issue: meson configure -D build-tests=true && ninja test. Now, as the root user: ninja install If desired, install the optional documentation by running the following commands as the root user: cp -rv ../docs -T /usr/share/doc/mesa-&mesa-version; Command Explanations --buildtype=release: This switch ensures a fully-optimized build, and disables debug assertions which will severely slow down the libraries in certain use-cases. Without this switch, build sizes can span into the 2GB range. -D gallium-drivers=auto: This parameter controls which Gallium3D drivers should be built: auto selects all Gallium3D drivers available for x86. With a comma-separated list, only a subset of these drivers will be built. If you precisely know which drivers you need, you can select them explicitly. For example, . r300 (for ATI Radeon 9000 or Radeon X series) r600 (for AMD/ATI Radeon HD 2000-6000 series) radeonsi (for AMD Radeon HD 7000 or newer AMD GPU models) nouveau (for supported NVIDIA GPUs, they are listed as all 3D features either DONE or N/A in the Nouveau status page) virgl (for a QEMU virtual GPU with virglrender support; note that BLFS is not built with virglrender) svga (for a VMWare virtual GPU) swrast (using CPU for 3D rasterization. Note that it's much slower than using a modern 3D-capable GPU, so it should be only used if the GPU is not supported by other drivers), iris (for Intel GPUs shipped with Broadwell or newer CPUs, or as a dedicated PCIe card) crocus (for Intel GMA 3000, X3000 series, 4000 series, or X4000 series GPUs shipped with chipsets, or Intel HD GPUs shipped with pre-Broadwell CPUs) i915 (for Intel GMA 900, 950, 3100, or 3150 GPUs shipped with chipsets or Atom D/N 4xx/5xx CPUs) zink (using Vulkan to implement OpenGL, it's not very useful on x86 as at now but it may replace other drivers for modern GPU models in the future) -D vulkan-drivers=auto: This parameter controls which Vulkan drivers should be built: auto selects all Vulkan drivers available for x86. With a comma-separated list, only a subset of these drivers will be built. If you precisely know which drivers you need, you can select them explicitly. For example, . amd (for AMD Radeon HD 7730 or newer AMD GPUs) intel (for Intel GPUs shipped with Skylake or newer CPUs, or as a dedicated PCIe card) intel_hasvk (for Intel GPUs shipped with Ivy Bridge, Haswell, or Broadwell CPUs) nouveau (for GTX 16XX, RTX 20XX, or newer NVIDIA GPUs) swrast (for using the CPU for 3D rasterization) Note that it's much slower than using a modern 3D-capable GPU, so it should be only used if the GPU is not supported by other drivers. "" (empty list, use if you've not installed and you don't plan to install ) -D platforms=...: This parameter controls which windowing systems will be supported. Available linux platforms are x11 and wayland. -D valgrind=disabled: This parameter disables the usage of Valgrind during the build process. Remove this parameter if you have Valgrind installed, and wish to check for memory leaks. -D libunwind=disabled: This parameter disables the usage of libunwind. meson configure -D build-tests=true: This command will reconfigure the build to set , but keep the other options specified in the meson setup command unchanged. It allows ninja test to build and run unit tests. : This parameter controls which Embedded Graphics Library support will be built. Available linux options are auto (default), x11, wayland, surfaceless, and drm. Contents Installed Programs Installed Libraries Installed DRI Drivers Installed VDPAU Drivers Installed Vulkan Drivers Installed Directories glxgears, glxinfo, mme_fermi_sim_hw_test, and mme_tu104_sim_hw_test libEGL.so, libGL.so, libGLESv1_CM.so, libGLESv2.so, libgbm.so, libglapi.so, and libxatracker.so crocus_dri.so, i915_dri.so, iris_dri.so, kms_swrast_dri.so, nouveau_dri.so, nouveau_drv_video.so, r300_dri.so, r600_dri.so, r600_drv_video.so, radeonsi_dri.so, radeonsi_drv_video.so, swrast_dri.so, virtio_gpu_dri.so, virtio_gpu_drv_video.so, vmwgfx_dri.so, and zink_dri.so libvdpau_nouveau.so, libvdpau_r600.so, and libvdpau_radeonsi.so libvdpau_virtio_gpu.so (Many of these drivers are hard-linked). libvulkan_intel_hasvk.so, libvulkan_intel.so, libvulkan_lvp.so, libvulkan_nouveau.so, and libvulkan_radeon.so $XORG_PREFIX/{include/{EGL,GLES,GLES2,GLES3,KHR}, $XORG_PREFIX/lib/{dri,vdpau}}, $XORG_PREFIX/share/drirc.d (contains workarounds for various applications, particularly browsers and games), $XORG_PREFIX/share/vulkan, and /usr/share/doc/mesa-&mesa-version; Short Descriptions glxgears is a GL demo useful for troubleshooting graphics problems glxgears glxinfo is a diagnostic program that displays information about the graphics hardware and installed GL libraries glxinfo libEGL.so provides a native platform graphics interface as defined by the EGL-1.4 specification libEGL.so libgbm.so is the Mesa Graphics Buffer Manager library libgbm.so libGLESv1_CM.so is the Mesa OpenGL ES 1.1 library libGLESv1_CM.so libGLES2.so is the Mesa OpenGL ES 2.0 library libGLES2.so libGL.so is the main Mesa OpenGL library libGL.so