Mesa-23.3.1

Mesa の概要

Mesa は OpenGL 互換の 3D グラフィックライブラリです。

[注記]

注記

Mesa は頻繁に更新されています。 mesa の最新バージョン 23.3.x があれば、それを利用することもできます。

[注記]

注記

LFS や依存パッケージが本ブックに示す最新安定バージョンでなかった場合には、BLFS 開発版においては、パッケージのビルドや処理実行が適切に行われないことがあります。

パッケージ情報

  • ダウンロード (HTTP): https://mesa.freedesktop.org/archive/mesa-23.3.1.tar.xz

  • ダウンロード MD5 sum: 2abfce1ef9d9ae3ab780da12b27f72ea

  • ダウンロードサイズ: 18 MB

  • 必要ディスク容量: 621 MB (ドキュメント込み, テスト実施時はさらに 266 MB)

  • 概算ビルド時間: 3.1 SBU (ドキュメント込み、テスト実施時はさらに 0.6 SBU, いずれも parallelism=4)

追加のダウンロード

Mesa の依存パッケージ

必須

Xorg ライブラリ, libdrm-2.4.118, Mako-1.3.0

推奨

任意

libgcrypt-1.10.3, libunwind-1.6.2, lm-sensors-3-6-0 , Nettle-3.9.1, Valgrind-3.22.0, 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,

Kernel Configuration

Enable the following options in the kernel configuration and recompile the kernel if necessary:

Device Drivers --->
  Graphics support --->
    <*/M>   Direct Rendering Manager (XFree86 4.1.0 and higher DRI support) --->
                                                                      ...  [DRM]
    # For r300 or r600:
    < /*/M> ATI Radeon                                              [DRM_RADEON]
    # For radeonsi:
    < /*/M> AMD GPU                                                 [DRM_AMDGPU]
    [*]       Enable amdgpu support for SI parts                 [DRM_AMDGPU_SI]
    [*]       Enable amdgpu support for CIK parts               [DRM_AMDGPU_CIK]
      Display Engine Configuration --->
      [*]   AMD DC - Enable new display engine                      [DRM_AMD_DC]
    # For nouveau:
    < /*/M> Nouveau (NVIDIA) cards                                 [DRM_NOUVEAU]
    # For i915, crocus, or iris:
    < /*/M> Intel 8xx/9xx/G3x/G4x/HD Graphics                         [DRM_I915]
    # For swrast:
    < /*/M> Virtual GEM provider                                      [DRM_VGEM]
    # For svga:
    < /*/M> DRM driver for VMware Virtual GPU                       [DRM_VMWGFX]
[注記]

注記

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 Mesa Gallium3D Drivers below.

CONFIG_DRM_RADEON, CONFIG_DRM_AMDGPU, CONFIG_DRM_NOUVEAU, and CONFIG_DRM_I915 may require firmware. See About Firmware for details.

Selecting CONFIG_DRM_RADEON or CONFIG_DRM_AMDGPU 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 CONFIG_DRM_AMDGPU are used to ensure the AMDGPU kernel driver supports all GPUs using the radeonsi driver. They are not needed if you won't need CONFIG_DRM_AMDGPU itself. They may be unneeded for some GPU models.

For swrast, CONFIG_DRM_VGEM is not strictly needed but recommended as an optimization.

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

以下のコマンドを実行して Mesa をビルドします。

mkdir build &&
cd    build &&

meson setup                   \
      --prefix=$XORG_PREFIX   \
      --buildtype=release     \
      -Dplatforms=x11,wayland \
      -Dgallium-drivers=auto  \
      -Dvulkan-drivers=auto   \
      -Dvalgrind=disabled     \
      -Dlibunwind=disabled    \
      ..                      &&

ninja

To test the results, issue: meson configure -Dbuild-tests=true && ninja test.

root ユーザーになって以下を実行します。

ninja install

任意インストールのドキュメントを導入したい場合は、root ユーザーになって以下を実行します。

cp -rv ../docs -T /usr/share/doc/mesa-23.3.1

コマンド説明

--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.

-Dgallium-drivers=auto: This parameter controls which Gallium3D drivers should be built. auto selects all Gallium3D drivers available for x86: 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 QEMU virtual GPU with virglrender support; note that BLFS qemu-8.2.0 is not built with virglrender), svga (for VMWare virtual GPU), swrast (using CPU for 3D rasterisation; 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), 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). You may replace auto with a comma-separated list to build only a subset of these drivers if you precisely know which drivers you need, for example -Dgallium-drivers=radeonsi,iris,swrast.

-Dplatforms=...: This parameter controls which windowing systems will be supported. Available linux platforms are x11 and wayland.

-Dvulkan-drivers=auto: This switch enables support for the Vulkan graphics API. It automatically builds all graphics drivers that are available for Vulkan. If you wish to build specific drivers, valid options include 'amd', 'intel', 'intel_hasvk', and 'swrast'. If you do not want Vulkan support, change 'auto' to "".

-Dvalgrind=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.

-Dlibunwind=disabled: This parameter disables the usage of libunwind.

meson configure -Dbuild-tests=true: This command will reconfigure the build to set -Dbuild-tests=true, but keep the other options specified in the meson setup command unchanged. It allows ninja test to build and run unit tests.

-Degl-native-platform="...": This parameter controls which Embedded Graphics Library support will be built. Available linux options are auto (default), x11, wayland, surfaceless, and drm.

パッケージ構成

インストールプログラム: glxgears and glxinfo
インストールライブラリ: libEGL.so, libGL.so, libGLESv1_CM.so, libGLESv2.so, libgbm.so, libglapi.so, and libxatracker.so
Installed DRI Drivers: 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, and vmwgfx_dri.so
Installed VDPAU Drivers: libvdpau_nouveau.so, libvdpau_r300.so libvdpau_r600.so, and libvdpau_radeonsi.so libvdpau_virtio_gpu.so (Many of these drivers are hard-linked).
Installed Vulkan Drivers: libvulkan_intel_hasvk.so, libvulkan_intel.so, libvulkan_lvp.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-23.3.1

概略説明

glxgears

GL のデモプログラム。グラフィックにて何か問題があった場合のトラブルシューティングとなります。

glxinfo

グラフィックハードウェアや、インストールされている GL ライブラリの情報を表示する診断プログラムです。

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

主要な Mesa OpenGL ライブラリ。