[ab4fdfc] | 1 | <?xml version="1.0" encoding="UTF-8"?>
|
---|
[6732c094] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
[868c7c2] | 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 |
|
---|
[c0a8c0dc] | 7 | <!ENTITY mesa-download-http "https://mesa.freedesktop.org/archive/mesa-&mesa-version;.tar.xz">
|
---|
[e1e58be] | 8 | <!ENTITY mesa-download-ftp " ">
|
---|
[a0dc9ee] | 9 | <!ENTITY mesa-md5sum "f5cf225770a50bf7fcaffb7a16ce4705">
|
---|
[b8b314f5] | 10 | <!ENTITY mesa-size "28 MB">
|
---|
[a0dc9ee] | 11 | <!ENTITY mesa-buildsize "825 MB (with docs, add 404 MB for tests)">
|
---|
| 12 | <!ENTITY mesa-time "4.1 SBU (with docs; add 1.3 SBU for tests; both with parallelism=4)">
|
---|
[868c7c2] | 13 | ]>
|
---|
| 14 |
|
---|
[7a395d1] | 15 | <sect1 id="mesa" xreflabel="Mesa-&mesa-version;">
|
---|
| 16 | <?dbhtml filename="mesa.html"?>
|
---|
[868c7c2] | 17 |
|
---|
[7a395d1] | 18 | <title>Mesa-&mesa-version;</title>
|
---|
[868c7c2] | 19 |
|
---|
[7a395d1] | 20 | <indexterm zone="mesa">
|
---|
| 21 | <primary sortas="a-Mesa">Mesa</primary>
|
---|
[868c7c2] | 22 | </indexterm>
|
---|
| 23 |
|
---|
| 24 | <sect2 role="package">
|
---|
[7a395d1] | 25 | <title>Introduction to Mesa</title>
|
---|
[868c7c2] | 26 |
|
---|
[eb425b4] | 27 | <para>
|
---|
| 28 | <application>Mesa</application> is an OpenGL compatible 3D graphics
|
---|
| 29 | library.
|
---|
| 30 | </para>
|
---|
[868c7c2] | 31 |
|
---|
[fdcf97c7] | 32 | <note>
|
---|
| 33 | <para>
|
---|
| 34 | <application>Mesa</application> is updated relatively often. You may
|
---|
| 35 | want to use the latest available &mesa-major-minor;.x mesa version.
|
---|
| 36 | </para>
|
---|
| 37 | </note>
|
---|
| 38 |
|
---|
[b9874725] | 39 | &lfs121_checked;
|
---|
[ca0c29cc] | 40 |
|
---|
[868c7c2] | 41 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 42 | <itemizedlist spacing="compact">
|
---|
| 43 | <listitem>
|
---|
[de938a4e] | 44 | <para>
|
---|
[7a395d1] | 45 | Download (HTTP): <ulink url="&mesa-download-http;"/>
|
---|
[de938a4e] | 46 | </para>
|
---|
[868c7c2] | 47 | </listitem>
|
---|
| 48 | <listitem>
|
---|
[de938a4e] | 49 | <para>
|
---|
[7a395d1] | 50 | Download (FTP): <ulink url="&mesa-download-ftp;"/>
|
---|
[de938a4e] | 51 | </para>
|
---|
[868c7c2] | 52 | </listitem>
|
---|
| 53 | <listitem>
|
---|
[de938a4e] | 54 | <para>
|
---|
[7a395d1] | 55 | Download MD5 sum: &mesa-md5sum;
|
---|
[de938a4e] | 56 | </para>
|
---|
[868c7c2] | 57 | </listitem>
|
---|
| 58 | <listitem>
|
---|
[de938a4e] | 59 | <para>
|
---|
[7a395d1] | 60 | Download size: &mesa-size;
|
---|
[de938a4e] | 61 | </para>
|
---|
[868c7c2] | 62 | </listitem>
|
---|
| 63 | <listitem>
|
---|
[de938a4e] | 64 | <para>
|
---|
[7a395d1] | 65 | Estimated disk space required: &mesa-buildsize;
|
---|
[de938a4e] | 66 | </para>
|
---|
[868c7c2] | 67 | </listitem>
|
---|
| 68 | <listitem>
|
---|
[de938a4e] | 69 | <para>
|
---|
[7a395d1] | 70 | Estimated build time: &mesa-time;
|
---|
[de938a4e] | 71 | </para>
|
---|
[868c7c2] | 72 | </listitem>
|
---|
| 73 | </itemizedlist>
|
---|
[1334c9a] | 74 |
|
---|
[625079b6] | 75 | <bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
---|
[a07e9eb] | 76 | <itemizedlist spacing="compact">
|
---|
[ab75b52] | 77 | <!-- 9 Apr 23. Change to unversioned patch since it never changes. -->
|
---|
[a07e9eb] | 78 | <listitem>
|
---|
[eb425b4] | 79 | <para>
|
---|
| 80 | Recommended patch:
|
---|
[3edc406] | 81 | <ulink url="&patch-root;/mesa-add_xdemos-2.patch"/>
|
---|
[7a395d1] | 82 | (installs 2 demo programs for testing Mesa - not needed if you
|
---|
[713981db] | 83 | install the <ulink url="https://archive.mesa3d.org/demos/">
|
---|
[39dd48b] | 84 | mesa-demos</ulink> package)
|
---|
[ace536a] | 85 | </para>
|
---|
[eeb29511] | 86 | </listitem>
|
---|
| 87 | </itemizedlist>
|
---|
[1334c9a] | 88 |
|
---|
[7a395d1] | 89 | <bridgehead renderas="sect3">Mesa Dependencies</bridgehead>
|
---|
[868c7c2] | 90 |
|
---|
| 91 | <bridgehead renderas="sect4">Required</bridgehead>
|
---|
[7b74537e] | 92 | <para role="required">
|
---|
[df343952] | 93 | <xref linkend="xorg7-lib"/>,
|
---|
[e2aae21f] | 94 | <xref linkend="libdrm"/>, and
|
---|
| 95 | <xref linkend="Mako"/>
|
---|
[eb425b4] | 96 | </para>
|
---|
[868c7c2] | 97 |
|
---|
[606dfd4] | 98 | <bridgehead renderas="sect4">Recommended</bridgehead>
|
---|
[eb425b4] | 99 | <para role="recommended">
|
---|
[d2f50ba] | 100 |
|
---|
[c833c06] | 101 | <itemizedlist spacing="compact">
|
---|
| 102 | <listitem>
|
---|
| 103 | <para>
|
---|
| 104 | <xref linkend="glslang"/> and <xref linkend="vulkan-loader"/>
|
---|
| 105 | (required for Vulkan support)
|
---|
| 106 | </para>
|
---|
| 107 | </listitem>
|
---|
| 108 | <listitem>
|
---|
| 109 | <para>
|
---|
| 110 | <xref linkend="libva"/> (to provide VA-API support for some
|
---|
| 111 | gallium drivers. Note that there is a circular dependency.
|
---|
| 112 | You must build <application>libva</application> first without
|
---|
| 113 | mesa's EGL and GLX support, install this package, and rebuild
|
---|
| 114 | <application>libva</application>)
|
---|
| 115 | </para>
|
---|
| 116 | </listitem>
|
---|
| 117 | <listitem>
|
---|
| 118 | <para>
|
---|
| 119 | <xref linkend="libvdpau"/> (to build VDPAU drivers)
|
---|
| 120 | </para>
|
---|
| 121 | </listitem>
|
---|
| 122 | <listitem>
|
---|
| 123 | <para>
|
---|
| 124 | <xref linkend="llvm"/> (required for the r300, r600, and radeonsi
|
---|
| 125 | drivers, and the LLVMpipe software rasterizer which can make the
|
---|
| 126 | swrast driver much faster)
|
---|
| 127 | </para>
|
---|
| 128 | </listitem>
|
---|
| 129 | <listitem>
|
---|
| 130 | <para>
|
---|
| 131 | <xref linkend="wayland-protocols"/> (required for
|
---|
| 132 | <xref role="nodep" linkend='plasma-build'/>,
|
---|
| 133 | GNOME, and recommended for
|
---|
| 134 | <xref role="nodep" linkend='gtk3'/>)
|
---|
| 135 | </para>
|
---|
| 136 | </listitem>
|
---|
[b8b314f5] | 137 | <listitem>
|
---|
| 138 | <para>
|
---|
[68df8455] | 139 | <xref linkend="libclc"/> (required for the Intel iris
|
---|
| 140 | gallium driver)
|
---|
| 141 | </para>
|
---|
| 142 | </listitem>
|
---|
| 143 | <listitem>
|
---|
| 144 | <para>
|
---|
| 145 | <xref linkend="ply"/> (required for the Intel vulkan driver)
|
---|
[b8b314f5] | 146 | </para>
|
---|
| 147 | </listitem>
|
---|
| 148 | <listitem>
|
---|
| 149 | <para>
|
---|
| 150 | <xref linkend="cbindgen"/> and <xref linkend="rust-bindgen"/>
|
---|
[68df8455] | 151 | (required for the Nouveau Vulkan driver)
|
---|
[b8b314f5] | 152 | </para>
|
---|
| 153 | </listitem>
|
---|
[c833c06] | 154 | </itemizedlist>
|
---|
[606dfd4] | 155 | </para>
|
---|
[60bcf481] | 156 |
|
---|
[87a677a] | 157 | <note>
|
---|
| 158 | <para>
|
---|
| 159 | <emphasis role="bold">Choosing Mesa Drivers</emphasis>
|
---|
| 160 | </para>
|
---|
| 161 |
|
---|
| 162 | <para>
|
---|
| 163 | In the instructions below, all the available drivers are built. That
|
---|
| 164 | will almost always work. However, it is not efficient. Depending on
|
---|
| 165 | your video hardware, you probably need only specific drivers.
|
---|
| 166 | </para>
|
---|
| 167 |
|
---|
| 168 | <para>
|
---|
| 169 | The first thing you need to know is which type of video device you
|
---|
[de36458] | 170 | have. In some cases it is built into the CPU. In others it is a
|
---|
[87a677a] | 171 | separate PCI card. In either case you can tell what video hardware you
|
---|
[68df8455] | 172 | have by installing <xref linkend='pciutils'/> and running:
|
---|
[87a677a] | 173 | </para>
|
---|
| 174 |
|
---|
[68df8455] | 175 | <screen role='nodump'><userinput>lspci | grep VGA</userinput></screen>
|
---|
[87a677a] | 176 |
|
---|
| 177 | <para>
|
---|
| 178 | The video device is most likely one of three families: AMD, Intel, or
|
---|
[68df8455] | 179 | Nvidia. See the Command Explanations for
|
---|
| 180 | <parameter>-D gallium-drivers=auto</parameter> below to
|
---|
[87a677a] | 181 | see what options are available for your specific video hardware (or
|
---|
| 182 | emulated video hardware). You should probably add the swrast option as
|
---|
| 183 | a backup driver.
|
---|
| 184 | </para>
|
---|
| 185 |
|
---|
| 186 | <para>
|
---|
| 187 | For 'platforms' you can select x11 and/or wayland. Note that in BLFS
|
---|
| 188 | currently only Gnome and KDE can use wayland. If you are not going to
|
---|
| 189 | use one of those desktop environments then you probably only want x11.
|
---|
| 190 | </para>
|
---|
| 191 |
|
---|
| 192 | <para>
|
---|
| 193 | For 'vulkan-drivers' you may want to limit the selection to your
|
---|
| 194 | current hardware. These drivers are used by some specific applications.
|
---|
| 195 |
|
---|
| 196 | For example, ffmpeg (including ffplay) will use Vulkan instead of
|
---|
| 197 | OpenGL for rendering video on the GPU. If you do not want to do this
|
---|
| 198 | you may or may not want to install them.
|
---|
[68df8455] | 199 | See the Command Explanations for
|
---|
| 200 | <parameter>-D vulkan-drivers=auto</parameter> below to
|
---|
| 201 | see what options are available for your specific video hardware (or
|
---|
| 202 | emulated video hardware). You should probably add the swrast option
|
---|
| 203 | as a backup driver unless you don't need Vulkan at all.
|
---|
[87a677a] | 204 | </para>
|
---|
| 205 | </note>
|
---|
| 206 |
|
---|
[07584d8] | 207 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
| 208 | <para role="optional">
|
---|
[57bcce9] | 209 | <xref linkend="libgcrypt"/>,
|
---|
[751dd1e] | 210 | <xref linkend="libunwind"/>,
|
---|
[b4d0b5a] | 211 | <xref linkend="lm_sensors"/> <!-- for libsensors according to Meson -->,
|
---|
[57bcce9] | 212 | <xref linkend="nettle"/>,
|
---|
[b4d0b5a] | 213 | <xref linkend="valgrind"/>,
|
---|
[9dc1c31] | 214 | <ulink url="https://archive.mesa3d.org/demos/">mesa-demos</ulink>
|
---|
[1cdb1f7] | 215 | (provides more than 300 extra demos to test
|
---|
[973dabe9] | 216 | <application>Mesa</application>; this includes the same programs added by
|
---|
[b4d0b5a] | 217 | the patch above),
|
---|
[17aa21c] | 218 | <ulink url="https://omxil.sourceforge.net/">Bellagio OpenMAX Integration
|
---|
[e929885e] | 219 | Layer</ulink> (for mobile platforms), and
|
---|
| 220 | <!--<ulink url="https://github.com/KhronosGroup/glslang">glslang</ulink>
|
---|
| 221 | (for vulkan drivers),-->
|
---|
[b4d0b5a] | 222 | <ulink url="https://github.com/tizonia/tizonia-openmax-il/wiki/Tizonia-OpenMAX-IL/">
|
---|
[e929885e] | 223 | libtizonia</ulink>,
|
---|
| 224 | <!-- <ulink url="https://github.com/KhronosGroup/Vulkan-Loader">Vulkan-Loader</ulink> -->
|
---|
[07584d8] | 225 | </para>
|
---|
[bee072a] | 226 | <!--
|
---|
[9065a56b] | 227 | <note>
|
---|
[fd2f9a2] | 228 | <para>
|
---|
[e4fbb24] | 229 | The instructions below assume that
|
---|
[d2f50ba] | 230 | <application>LLVM</application> with the r600/amdgpu and host backends
|
---|
| 231 | and run-time type information (RTTI - needed for nouveau) are installed.
|
---|
| 232 | You will need to modify the instructions if you
|
---|
| 233 | choose not to install all of these. For an explanation of Gallium3D see
|
---|
[e83a3bb] | 234 | <ulink url="https://en.wikipedia.org/wiki/Gallium3D"/>.
|
---|
[fd2f9a2] | 235 | </para>
|
---|
[9065a56b] | 236 | </note>
|
---|
[bee072a] | 237 | -->
|
---|
[0f256d6] | 238 |
|
---|
| 239 | &build-use-internet;
|
---|
| 240 |
|
---|
[868c7c2] | 241 | </sect2>
|
---|
| 242 |
|
---|
[797182d] | 243 | <sect2 role="kernel" id="mesa-kernel"
|
---|
| 244 | xreflabel='Mesa Kernel Configuration'>
|
---|
[2c92dada] | 245 | <title>Kernel Configuration</title>
|
---|
| 246 |
|
---|
| 247 | <para>
|
---|
| 248 | Enable the following options in the kernel configuration and
|
---|
| 249 | recompile the kernel if necessary:
|
---|
| 250 | </para>
|
---|
| 251 |
|
---|
[5ca8d70] | 252 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
| 253 | href="mesa-kernel.xml"/>
|
---|
[2c92dada] | 254 |
|
---|
| 255 | <note>
|
---|
| 256 | <para>
|
---|
| 257 | The corresponding Mesa Gallium3D driver name is provided as the
|
---|
| 258 | comment for the configuration entries. If you don't know the name
|
---|
| 259 | of the Mesa Gallium3D driver for your GPU, see <xref
|
---|
| 260 | linkend="mesa-gallium-drivers"/> below.
|
---|
| 261 | </para>
|
---|
| 262 |
|
---|
| 263 | <para>
|
---|
| 264 | <option>CONFIG_DRM_RADEON</option>,
|
---|
| 265 | <option>CONFIG_DRM_AMDGPU</option>,
|
---|
| 266 | <option>CONFIG_DRM_NOUVEAU</option>, and
|
---|
[d4102ce] | 267 | <option>CONFIG_DRM_I915</option> may require firmware.
|
---|
| 268 | See <xref linkend='postlfs-firmware'/> for details.
|
---|
[2c92dada] | 269 | </para>
|
---|
| 270 |
|
---|
| 271 | <para>
|
---|
[d4102ce] | 272 | Selecting <option>CONFIG_DRM_RADEON</option> or
|
---|
| 273 | <option>CONFIG_DRM_AMDGPU</option> as
|
---|
| 274 | <quote><literal>y</literal></quote> is not recommended. If it is, any
|
---|
| 275 | required firmware must be built as a part of the kernel image or the
|
---|
| 276 | initramfs for the driver to function correctly.
|
---|
[2c92dada] | 277 | </para>
|
---|
| 278 |
|
---|
| 279 | <para>
|
---|
| 280 | The sub-entries under <option>CONFIG_DRM_AMDGPU</option> are used
|
---|
[d4102ce] | 281 | to ensure the AMDGPU kernel driver supports all GPUs using the
|
---|
[2c92dada] | 282 | <literal>radeonsi</literal> driver. They are not needed if you
|
---|
[d4102ce] | 283 | won't need <option>CONFIG_DRM_AMDGPU</option> itself. They
|
---|
[2c92dada] | 284 | may be unneeded for some GPU models.
|
---|
| 285 | </para>
|
---|
| 286 |
|
---|
| 287 | <para>
|
---|
| 288 | For <literal>swrast</literal>, <option>CONFIG_DRM_VGEM</option>
|
---|
[797182d] | 289 | is not strictly needed but recommended as an optimization.
|
---|
[2c92dada] | 290 | </para>
|
---|
| 291 | </note>
|
---|
[117b4e9] | 292 | <indexterm zone="mesa mesa-kernel">
|
---|
| 293 | <primary sortas="d-mesa">mesa</primary>
|
---|
| 294 | </indexterm>
|
---|
[2c92dada] | 295 | </sect2>
|
---|
| 296 |
|
---|
[868c7c2] | 297 | <sect2 role="installation">
|
---|
[7a395d1] | 298 | <title>Installation of Mesa</title>
|
---|
[a07e9eb] | 299 | <para>
|
---|
[51c08f3] | 300 | If you have downloaded the xdemos patch (needed if testing the Xorg
|
---|
| 301 | installation per BLFS instructions), apply it by running the following
|
---|
| 302 | command:
|
---|
[a07e9eb] | 303 | </para>
|
---|
| 304 |
|
---|
[ab75b52] | 305 | <!--<screen><userinput>patch -Np1 -i ../mesa-&mesa-version;-add_xdemos-1.patch</userinput></screen>-->
|
---|
[3edc406] | 306 | <screen><userinput>patch -Np1 -i ../mesa-add_xdemos-2.patch</userinput></screen>
|
---|
[1334c9a] | 307 |
|
---|
[054e926] | 308 | <!-- Note that freedreno, vc4, and virgl all need special support from
|
---|
[d2f50ba] | 309 | libdrm - renodr
|
---|
| 310 | For me, libdrm does not mention virgl, but mesa accepts it. AFAICS
|
---|
| 311 | freedreno is for qualcom hardware, libdrm will build for it on suitable
|
---|
| 312 | systems. VC4 is for the Broadcom VC4 used in the raspberry pi - ken -->
|
---|
[bee072a] | 313 | <!--
|
---|
[d2f50ba] | 314 | <note>
|
---|
| 315 | <para>
|
---|
| 316 | The measurements above, and the Contents below, are for a full build.
|
---|
| 317 | Many people will not wish to install drivers they cannot use, so the
|
---|
| 318 | following paragraphs explain how to limit the drivers, and give an
|
---|
| 319 | example which can be be reduced or amended as necessary.
|
---|
| 320 | </para>
|
---|
| 321 | </note>
|
---|
| 322 |
|
---|
[bee072a] | 323 | -->
|
---|
| 324 | <!--
|
---|
[d2f50ba] | 325 | <para>
|
---|
| 326 | The (non-gallium) DRI drivers available in X86 are auto, <emphasis>or
|
---|
| 327 | alternatively a choice from</emphasis> i915, i965, nouveau, r100, r200,
|
---|
| 328 | and swrast. Use 'auto' to build all available DRI drivers, or use an
|
---|
| 329 | empty string (DRI_DRIVERS="") if you wish to only build gallium drivers.
|
---|
| 330 | </para>
|
---|
| 331 |
|
---|
| 332 | <para>
|
---|
| 333 | The platforms ("window systems") available for X86 linux are x11, wayland,
|
---|
[bee072a] | 334 | drm, and surfaceless. By not specifying anything, the meson
|
---|
[17ae4374] | 335 | build-system will build for all these platforms if you have the
|
---|
| 336 | dependencies, identical to if you had specified '-Dplatforms=auto'.
|
---|
[d2f50ba] | 337 | </para>
|
---|
| 338 |
|
---|
| 339 | <para>
|
---|
| 340 | Modify the commands below for your desired drivers. The drivers listed
|
---|
| 341 | below will cover most modern video cards and virtual machines. For help in
|
---|
[c6cb93b] | 342 | selecting drivers see <ulink url="https://docs.mesa3d.org/systems.html"/>.
|
---|
[bee072a] | 343 | -->
|
---|
[ef936e4] | 344 | <!-- these two don't seem to be mentioned in that mesa link -->
|
---|
[bee072a] | 345 | <!--
|
---|
[ef936e4] | 346 | For intel drivers, specify crocus for i965 gen 4 through to haswell, iris
|
---|
| 347 | for broadwell and later.
|
---|
[d2f50ba] | 348 | </para>
|
---|
| 349 |
|
---|
| 350 | <note>
|
---|
| 351 | <para>
|
---|
| 352 | Although the nouveau drivers can be built for both gallium and dri, the
|
---|
| 353 | i915 driver can only be built for one or the other.
|
---|
| 354 | </para>
|
---|
| 355 | </note>
|
---|
| 356 |
|
---|
[ef936e4] | 357 | <screen><userinput>GALLIUM_DRV="crocus,i915,iris,nouveau,r600,radeonsi,svga,swrast,virgl"
|
---|
[d2f50ba] | 358 | DRI_DRIVERS="i965,nouveau"</userinput></screen>
|
---|
[bee072a] | 359 | -->
|
---|
[43149b8] | 360 |
|
---|
[b565745d] | 361 | <!-- https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22021 -->
|
---|
[92202f73] | 362 | <!-- No longer needed
|
---|
[b565745d] | 363 | <para>
|
---|
| 364 | Remove two unneeded references to LLVM headers to avoid a build
|
---|
| 365 | failure with LLVM 17 or later:
|
---|
| 366 | </para>
|
---|
| 367 |
|
---|
| 368 | <screen><userinput>sed '/Scalar.h/d;/Utils.h/d' \
|
---|
| 369 | -i src/gallium/auxiliary/gallivm/lp_bld_init.c</userinput></screen>
|
---|
[92202f73] | 370 | -->
|
---|
[eb425b4] | 371 | <para>
|
---|
[7a395d1] | 372 | Install <application>Mesa</application> by running the following
|
---|
[eb425b4] | 373 | commands:
|
---|
| 374 | </para>
|
---|
[868c7c2] | 375 |
|
---|
[b565745d] | 376 | <screen><userinput>mkdir build &&
|
---|
[b3f053c5] | 377 | cd build &&
|
---|
[a85e5ce] | 378 |
|
---|
[c833c06] | 379 | meson setup .. \
|
---|
| 380 | --prefix=$XORG_PREFIX \
|
---|
| 381 | --buildtype=release \
|
---|
| 382 | -D platforms=x11,wayland \
|
---|
| 383 | -D gallium-drivers=auto \
|
---|
| 384 | -D vulkan-drivers=auto \
|
---|
| 385 | -D valgrind=disabled \
|
---|
| 386 | -D libunwind=disabled &&
|
---|
[f7bc172] | 387 |
|
---|
[b3f053c5] | 388 | ninja</userinput></screen>
|
---|
[868c7c2] | 389 |
|
---|
[b3f053c5] | 390 | <para>
|
---|
[5ba1d98e] | 391 | To test the results, issue:
|
---|
[68df8455] | 392 | <command>meson configure -D build-tests=true && ninja test</command>.
|
---|
[b3f053c5] | 393 | </para>
|
---|
[f7bc172] | 394 | <!-- All 88 tests passed for me for 22.3.3 [pierre]
|
---|
[28818fd3] | 395 | All 90 tests passed for me for 23.1.0 [bdubbs]
|
---|
[b968722] | 396 | 89 Tests passed for me, 1 timeout on 23.1.8 [rahul]
|
---|
[92202f73] | 397 | All 98 tests passed for me for 23.3.1 [bdubbs]
|
---|
[bee072a] | 398 | -->
|
---|
[ef936e4] | 399 |
|
---|
[eb425b4] | 400 | <para>
|
---|
| 401 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
| 402 | </para>
|
---|
[ff55539b] | 403 |
|
---|
[b3f053c5] | 404 | <screen role="root"><userinput>ninja install</userinput></screen>
|
---|
[a07e9eb] | 405 |
|
---|
[eb425b4] | 406 | <para>
|
---|
[a07e9eb] | 407 | If desired, install the optional documentation by running
|
---|
| 408 | the following commands as the
|
---|
[eb425b4] | 409 | <systemitem class="username">root</systemitem> user:
|
---|
| 410 | </para>
|
---|
[91859cf] | 411 |
|
---|
[3713bc71] | 412 | <screen role="root"
|
---|
[8c25fe7] | 413 | remap="doc"><userinput>cp -rv ../docs -T /usr/share/doc/mesa-&mesa-version;</userinput></screen>
|
---|
[5a883bc4] | 414 |
|
---|
[868c7c2] | 415 | </sect2>
|
---|
| 416 |
|
---|
[a07e9eb] | 417 | <sect2 role="commands">
|
---|
| 418 | <title>Command Explanations</title>
|
---|
[d2f50ba] | 419 |
|
---|
[95e8211] | 420 | <para>
|
---|
[3918112a] | 421 | <parameter>--buildtype=release</parameter>: This switch ensures a
|
---|
[d2f50ba] | 422 | fully-optimized build, and disables debug assertions which will
|
---|
[ec77633] | 423 | severely slow down the libraries in certain use-cases. Without this
|
---|
| 424 | switch, build sizes can span into the 2GB range.
|
---|
[95e8211] | 425 | </para>
|
---|
[869bf46b] | 426 |
|
---|
[d2f50ba] | 427 | <para>
|
---|
[2c92dada] | 428 | <anchor id='mesa-gallium-drivers' xreflabel='Mesa Gallium3D Drivers'/>
|
---|
[68df8455] | 429 | <parameter>-D gallium-drivers=auto</parameter>: This parameter
|
---|
[c833c06] | 430 | controls which Gallium3D drivers should be built:
|
---|
| 431 |
|
---|
| 432 | <itemizedlist spacing="compact">
|
---|
| 433 | <listitem>
|
---|
| 434 | <para>
|
---|
| 435 | <literal>auto</literal> selects all Gallium3D drivers available
|
---|
[68df8455] | 436 | for x86. With a comma-separated list, only a subset of these
|
---|
[c833c06] | 437 | drivers will be built. If you precisely know which drivers you
|
---|
[68df8455] | 438 | need, you can select them explicitly. for example.
|
---|
| 439 | <option>-D gallium-drivers=radeonsi,iris,swrast</option>.
|
---|
[c833c06] | 440 | </para>
|
---|
| 441 | </listitem>
|
---|
| 442 | <listitem>
|
---|
| 443 | <para>
|
---|
| 444 | <literal>r300</literal> (for ATI Radeon 9000 or Radeon X series)
|
---|
| 445 | </para>
|
---|
| 446 | </listitem>
|
---|
| 447 | <listitem>
|
---|
| 448 | <para>
|
---|
| 449 | <literal>r600</literal> (for AMD/ATI Radeon HD 2000-6000 series)
|
---|
| 450 | </para>
|
---|
| 451 | </listitem>
|
---|
| 452 | <listitem>
|
---|
| 453 | <para>
|
---|
| 454 | <literal>radeonsi</literal> (for AMD Radeon HD 7000 or newer AMD GPU models)
|
---|
| 455 | </para>
|
---|
| 456 | </listitem>
|
---|
| 457 | <listitem>
|
---|
| 458 | <para>
|
---|
[0538ffc] | 459 | <literal>nouveau</literal> (for supported NVIDIA GPUs, they are
|
---|
[c833c06] | 460 | listed as all <quote>3D features</quote> either <quote>DONE</quote> or
|
---|
| 461 | <quote>N/A</quote> in
|
---|
| 462 | <ulink url='https://nouveau.freedesktop.org/FeatureMatrix.html'>the Nouveau
|
---|
| 463 | status page</ulink>)
|
---|
| 464 | </para>
|
---|
| 465 | </listitem>
|
---|
| 466 | <listitem>
|
---|
| 467 | <para>
|
---|
| 468 | <literal>virgl</literal> (for a QEMU virtual GPU
|
---|
| 469 | with <application>virglrender</application> support; note that BLFS
|
---|
| 470 | <xref linkend='qemu'/> is not built with
|
---|
| 471 | <application>virglrender</application>)
|
---|
| 472 | </para>
|
---|
| 473 | </listitem>
|
---|
| 474 | <listitem>
|
---|
| 475 | <para>
|
---|
| 476 | <literal>svga</literal> (for a VMWare virtual GPU)
|
---|
| 477 | </para>
|
---|
| 478 | </listitem>
|
---|
| 479 | <listitem>
|
---|
| 480 | <para>
|
---|
| 481 | <literal>swrast</literal> (using CPU for 3D
|
---|
| 482 | rasterisation. Note that it's much slower than using a modern
|
---|
| 483 | 3D-capable GPU, so it should be only used if the GPU is not supported
|
---|
| 484 | by other drivers),
|
---|
| 485 | </para>
|
---|
| 486 | </listitem>
|
---|
| 487 | <listitem>
|
---|
| 488 | <para>
|
---|
| 489 | <literal>iris</literal> (for Intel GPUs shipped with Broadwell
|
---|
[68df8455] | 490 | or newer CPUs, or as a dedicated PCIe card)
|
---|
[c833c06] | 491 | </para>
|
---|
| 492 | </listitem>
|
---|
| 493 | <listitem>
|
---|
| 494 | <para>
|
---|
| 495 | <literal>crocus</literal> (for Intel GMA 3000, X3000 series,
|
---|
| 496 | 4000 series, or X4000 series GPUs shipped with chipsets,
|
---|
| 497 | or Intel HD GPUs shipped with pre-Broadwell CPUs)
|
---|
| 498 | </para>
|
---|
| 499 | </listitem>
|
---|
| 500 | <listitem>
|
---|
| 501 | <para>
|
---|
| 502 | <literal>i915</literal> (for Intel GMA 900, 950, 3100, or 3150 GPUs
|
---|
| 503 | shipped with chipsets or Atom D/N 4xx/5xx CPUs)
|
---|
| 504 | </para>
|
---|
| 505 | </listitem>
|
---|
[68df8455] | 506 | <listitem>
|
---|
| 507 | <para>
|
---|
| 508 | <literal>zink</literal> (using Vulkan to implement OpenGL,
|
---|
| 509 | it's not very useful on x86 as at now but it may replace other
|
---|
| 510 | drivers for modern GPU models in the future)
|
---|
| 511 | </para>
|
---|
| 512 | </listitem>
|
---|
| 513 | </itemizedlist>
|
---|
| 514 | </para>
|
---|
| 515 |
|
---|
| 516 | <para>
|
---|
| 517 | <parameter>-D vulkan-drivers=auto</parameter>: This parameter
|
---|
[5844abce] | 518 | controls which Vulkan drivers should be built:
|
---|
[68df8455] | 519 |
|
---|
| 520 | <itemizedlist spacing="compact">
|
---|
| 521 | <listitem>
|
---|
| 522 | <para>
|
---|
| 523 | <literal>auto</literal> selects all Vulkan drivers available
|
---|
| 524 | for x86. With a comma-separated list, only a subset of these
|
---|
| 525 | drivers will be built. If you precisely know which drivers you
|
---|
| 526 | need, you can select them explicitly. for example.
|
---|
[3038a588] | 527 | <option>-D vulkan-drivers=amd,nouveau,swrast</option>.
|
---|
[68df8455] | 528 | </para>
|
---|
| 529 | </listitem>
|
---|
| 530 |
|
---|
| 531 | <listitem>
|
---|
| 532 | <para>
|
---|
| 533 | <literal>amd</literal> (for AMD Radeon HD 7730 or newer AMD GPUs)
|
---|
| 534 | </para>
|
---|
| 535 | </listitem>
|
---|
| 536 |
|
---|
| 537 | <listitem>
|
---|
| 538 | <para>
|
---|
| 539 | <literal>intel</literal> (for Intel GPUs shipped with Skylake
|
---|
| 540 | or newer CPUs, or as a dedicated PCIe card)
|
---|
| 541 | </para>
|
---|
| 542 | </listitem>
|
---|
| 543 |
|
---|
| 544 | <listitem>
|
---|
| 545 | <para>
|
---|
| 546 | <literal>intel_hasvk</literal> (for Intel GPUs shipped with
|
---|
| 547 | Ivy Bridge, Haswell, or Broadwell CPUs)
|
---|
| 548 | </para>
|
---|
| 549 | </listitem>
|
---|
| 550 |
|
---|
| 551 | <listitem>
|
---|
| 552 | <para>
|
---|
| 553 | <literal>nouveau</literal> (for GTX 16XX, RTX 20XX, or
|
---|
| 554 | newer NVIDIA GPUs)
|
---|
| 555 | </para>
|
---|
| 556 | </listitem>
|
---|
| 557 |
|
---|
| 558 | <listitem>
|
---|
| 559 | <para>
|
---|
| 560 | <literal>swrast</literal> (using CPU for 3D rasterisation.
|
---|
| 561 | Note that it's much slower than using a modern 3D-capable GPU,
|
---|
| 562 | so it should be only used if the GPU is not supported by other
|
---|
| 563 | drivers)
|
---|
| 564 | </para>
|
---|
| 565 | </listitem>
|
---|
[5844abce] | 566 |
|
---|
| 567 | <listitem>
|
---|
| 568 | <para>
|
---|
| 569 | <literal>""</literal> (empty list, use
|
---|
[0538ffc] | 570 | <option>-D vulkan-drivers=""</option> if you've not installed and
|
---|
[5844abce] | 571 | you don't plan to install <xref linkend='vulkan-loader'/>)
|
---|
| 572 | </para>
|
---|
| 573 | </listitem>
|
---|
[c833c06] | 574 | </itemizedlist>
|
---|
[d2f50ba] | 575 | </para>
|
---|
[bee072a] | 576 |
|
---|
[eb425b4] | 577 | <para>
|
---|
[68df8455] | 578 | <parameter>-D platforms=...</parameter>: This parameter
|
---|
[bee072a] | 579 | controls which windowing systems will be supported. Available
|
---|
| 580 | linux platforms are x11 and wayland.
|
---|
[eb425b4] | 581 | </para>
|
---|
[bee072a] | 582 |
|
---|
[2993b2f] | 583 | <para>
|
---|
[68df8455] | 584 | <parameter>-D valgrind=disabled</parameter>: This parameter disables
|
---|
[d2f50ba] | 585 | the usage of Valgrind during the build process. Remove this parameter
|
---|
| 586 | if you have Valgrind installed, and wish to check for memory leaks.
|
---|
[2993b2f] | 587 | </para>
|
---|
| 588 |
|
---|
[42117d4e] | 589 | <para>
|
---|
[68df8455] | 590 | <parameter>-D libunwind=disabled</parameter>: This parameter disables
|
---|
[42117d4e] | 591 | the usage of libunwind.
|
---|
| 592 | </para>
|
---|
| 593 |
|
---|
[a07e9eb] | 594 | <para>
|
---|
[68df8455] | 595 | <command>meson configure -D build-tests=true</command>: This command will
|
---|
| 596 | reconfigure the build to set <option>-D build-tests=true</option>, but
|
---|
[adcccac] | 597 | keep the other options specified in the <command>meson setup</command>
|
---|
| 598 | command unchanged. It allows <command>ninja test</command> to build and
|
---|
| 599 | run unit tests.
|
---|
[b4d0b5a] | 600 | </para>
|
---|
| 601 |
|
---|
[3713bc71] | 602 | <para>
|
---|
[68df8455] | 603 | <option>-D egl-native-platform="..."</option>: This parameter
|
---|
[869bf46b] | 604 | controls which Embedded Graphics Library support will be built. Available
|
---|
| 605 | linux options are auto (default), x11, wayland, surfaceless, and drm.
|
---|
[3713bc71] | 606 | </para>
|
---|
| 607 |
|
---|
[371ff30] | 608 | </sect2>
|
---|
| 609 |
|
---|
[868c7c2] | 610 | <sect2 role="content">
|
---|
| 611 | <title>Contents</title>
|
---|
| 612 |
|
---|
| 613 | <segmentedlist>
|
---|
[1263ab1e] | 614 | <segtitle>Installed Programs</segtitle>
|
---|
[42117d4e] | 615 | <segtitle>Installed Libraries</segtitle><!-- in /usr/lib -->
|
---|
[e929885e] | 616 | <segtitle>Installed DRI Drivers</segtitle><!-- in /usr/lib/dri -->
|
---|
| 617 | <segtitle>Installed VDPAU Drivers</segtitle><!-- in /usr/lib/vdpau -->
|
---|
| 618 | <segtitle>Installed Vulkan Drivers</segtitle><!-- in /usr/lib -->
|
---|
[ba2ac60] | 619 | <segtitle>Installed Directories</segtitle>
|
---|
[868c7c2] | 620 |
|
---|
| 621 | <seglistitem>
|
---|
[eb425b4] | 622 | <seg>
|
---|
[b8b314f5] | 623 | glxgears,
|
---|
| 624 | glxinfo,
|
---|
| 625 | mme_fermi_sim_hw_test, and
|
---|
| 626 | mme_tu104_sim_hw_test
|
---|
[eb425b4] | 627 | </seg>
|
---|
[42117d4e] | 628 | <seg>
|
---|
| 629 | libEGL.so,
|
---|
| 630 | libGL.so,
|
---|
| 631 | libGLESv1_CM.so,
|
---|
| 632 | libGLESv2.so,
|
---|
| 633 | libgbm.so,
|
---|
[7b9b069] | 634 | libglapi.so, and
|
---|
| 635 | libxatracker.so
|
---|
[42117d4e] | 636 | </seg>
|
---|
[eb425b4] | 637 | <seg>
|
---|
[2c92dada] | 638 | <!-- d3dadapter9.so (optional)
|
---|
| 639 | I guess this is useless today, Wine applications use Vulkan
|
---|
| 640 | through libvkd3d, and new games with native Linux support
|
---|
| 641 | likely uses Vulkan directly. -->
|
---|
| 642 | <!-- Begin gallium DRI drivers (*_dri.so) and VA-API drivers
|
---|
| 643 | (*_drv_video.so): this is the full set -->
|
---|
[ef936e4] | 644 | crocus_dri.so,
|
---|
[b3f053c5] | 645 | i915_dri.so,
|
---|
[db480be] | 646 | iris_dri.so,
|
---|
[b3f053c5] | 647 | kms_swrast_dri.so,
|
---|
| 648 | nouveau_dri.so,
|
---|
[d2f50ba] | 649 | nouveau_drv_video.so,
|
---|
[bee072a] | 650 | r300_dri.so,
|
---|
[d2f50ba] | 651 | r600_dri.so,
|
---|
| 652 | r600_drv_video.so,
|
---|
[b3f053c5] | 653 | radeonsi_dri.so,
|
---|
| 654 | radeonsi_drv_video.so,
|
---|
| 655 | swrast_dri.so,
|
---|
[d2f50ba] | 656 | virtio_gpu_dri.so,
|
---|
[b8b314f5] | 657 | virtio_gpu_drv_video.so,
|
---|
| 658 | vmwgfx_dri.so, and
|
---|
| 659 | zink_dri.so
|
---|
[e4fbb24] | 660 | <!-- End DRI Drivers -->
|
---|
[e929885e] | 661 | </seg>
|
---|
| 662 | <seg>
|
---|
[e4fbb24] | 663 | <!-- Begin VDPAU drivers -->
|
---|
[d2f50ba] | 664 | libvdpau_nouveau.so,
|
---|
| 665 | libvdpau_r600.so, and
|
---|
[b3f053c5] | 666 | libvdpau_radeonsi.so
|
---|
[f7bc172] | 667 | libvdpau_virtio_gpu.so
|
---|
[e4fbb24] | 668 | <!-- End VDPAU drivers -->
|
---|
[ef936e4] | 669 | (Many of these drivers are hard-linked).
|
---|
[eb425b4] | 670 | </seg>
|
---|
[e929885e] | 671 | <seg>
|
---|
| 672 | libvulkan_intel_hasvk.so,
|
---|
| 673 | libvulkan_intel.so,
|
---|
[b8b314f5] | 674 | libvulkan_lvp.so,
|
---|
| 675 | libvulkan_nouveau.so, and
|
---|
[e929885e] | 676 | libvulkan_radeon.so
|
---|
| 677 | </seg>
|
---|
[eb425b4] | 678 | <seg>
|
---|
[869bf46b] | 679 | <!-- $XORG_PREFIX/include/GL is installed by xorg-protos -->
|
---|
| 680 | $XORG_PREFIX/{include/{EGL,GLES,GLES2,GLES3,KHR},
|
---|
[bee072a] | 681 | $XORG_PREFIX/lib/{dri,vdpau}},
|
---|
[d2f50ba] | 682 | $XORG_PREFIX/share/drirc.d (contains workarounds for various applications,
|
---|
[f72bfbe1] | 683 | particularly browsers and games),
|
---|
[e929885e] | 684 | $XORG_PREFIX/share/vulkan,
|
---|
[7b9b069] | 685 | and /usr/share/doc/mesa-&mesa-version;
|
---|
[eb425b4] | 686 | </seg>
|
---|
[868c7c2] | 687 | </seglistitem>
|
---|
| 688 | </segmentedlist>
|
---|
[d3ef1e4] | 689 |
|
---|
[4437f63] | 690 | <variablelist>
|
---|
| 691 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 692 | <?dbfo list-presentation="list"?>
|
---|
| 693 | <?dbhtml list-presentation="table"?>
|
---|
| 694 |
|
---|
| 695 | <varlistentry id="glxgears">
|
---|
[eb50ddde] | 696 | <term><command>glxgears</command></term>
|
---|
[4437f63] | 697 | <listitem>
|
---|
[eb425b4] | 698 | <para>
|
---|
| 699 | is a GL demo useful for troubleshooting graphics
|
---|
[4c24eb0a] | 700 | problems
|
---|
[eb425b4] | 701 | </para>
|
---|
[7a395d1] | 702 | <indexterm zone="mesa glxgears">
|
---|
[4437f63] | 703 | <primary sortas="b-glxgears">glxgears</primary>
|
---|
| 704 | </indexterm>
|
---|
| 705 | </listitem>
|
---|
| 706 | </varlistentry>
|
---|
| 707 |
|
---|
| 708 | <varlistentry id="glxinfo">
|
---|
[eb50ddde] | 709 | <term><command>glxinfo</command></term>
|
---|
[4437f63] | 710 | <listitem>
|
---|
[eb425b4] | 711 | <para>
|
---|
| 712 | is a diagnostic program that displays information about the
|
---|
[4c24eb0a] | 713 | graphics hardware and installed GL libraries
|
---|
[eb425b4] | 714 | </para>
|
---|
[7a395d1] | 715 | <indexterm zone="mesa glxinfo">
|
---|
[4437f63] | 716 | <primary sortas="b-glxinfo">glxinfo</primary>
|
---|
| 717 | </indexterm>
|
---|
| 718 | </listitem>
|
---|
| 719 | </varlistentry>
|
---|
| 720 |
|
---|
[25f6d94] | 721 | <varlistentry id="libEGL">
|
---|
[a07e9eb] | 722 | <term><filename class="libraryfile">libEGL.so</filename></term>
|
---|
[25f6d94] | 723 | <listitem>
|
---|
[eb425b4] | 724 | <para>
|
---|
[a07e9eb] | 725 | provides a native platform graphics interface as
|
---|
[4c24eb0a] | 726 | defined by the EGL-1.4 specification
|
---|
[eb425b4] | 727 | </para>
|
---|
[7a395d1] | 728 | <indexterm zone="mesa libEGL">
|
---|
[25f6d94] | 729 | <primary sortas="c-libGL">libEGL.so</primary>
|
---|
| 730 | </indexterm>
|
---|
| 731 | </listitem>
|
---|
| 732 | </varlistentry>
|
---|
| 733 |
|
---|
[a07e9eb] | 734 | <varlistentry id="libgbm">
|
---|
| 735 | <term><filename class="libraryfile">libgbm.so</filename></term>
|
---|
| 736 | <listitem>
|
---|
| 737 | <para>
|
---|
| 738 | is the <application>Mesa</application> Graphics Buffer
|
---|
[4c24eb0a] | 739 | Manager library
|
---|
[a07e9eb] | 740 | </para>
|
---|
[7a395d1] | 741 | <indexterm zone="mesa libgbm">
|
---|
[a07e9eb] | 742 | <primary sortas="c-libgbm">libgbm.so</primary>
|
---|
| 743 | </indexterm>
|
---|
| 744 | </listitem>
|
---|
| 745 | </varlistentry>
|
---|
| 746 |
|
---|
| 747 | <varlistentry id="libGLESv1_CM">
|
---|
| 748 | <term><filename class="libraryfile">libGLESv1_CM.so</filename></term>
|
---|
| 749 | <listitem>
|
---|
| 750 | <para>
|
---|
[4c24eb0a] | 751 | is the <application>Mesa</application> OpenGL ES 1.1 library
|
---|
[a07e9eb] | 752 | </para>
|
---|
[7a395d1] | 753 | <indexterm zone="mesa libGLESv1_CM">
|
---|
[a07e9eb] | 754 | <primary sortas="c-libGLESv1_CM">libGLESv1_CM.so</primary>
|
---|
| 755 | </indexterm>
|
---|
| 756 | </listitem>
|
---|
| 757 | </varlistentry>
|
---|
| 758 |
|
---|
| 759 | <varlistentry id="libGLES2">
|
---|
| 760 | <term><filename class="libraryfile">libGLES2.so</filename></term>
|
---|
| 761 | <listitem>
|
---|
| 762 | <para>
|
---|
[4c24eb0a] | 763 | is the <application>Mesa</application> OpenGL ES 2.0 library
|
---|
[a07e9eb] | 764 | </para>
|
---|
[7a395d1] | 765 | <indexterm zone="mesa libGLES2">
|
---|
[a07e9eb] | 766 | <primary sortas="c-libGLES2">libGLES2.so</primary>
|
---|
| 767 | </indexterm>
|
---|
| 768 | </listitem>
|
---|
| 769 | </varlistentry>
|
---|
| 770 |
|
---|
[ba2ac60] | 771 | <varlistentry id="libGL">
|
---|
[a07e9eb] | 772 | <term><filename class="libraryfile">libGL.so</filename></term>
|
---|
[ba2ac60] | 773 | <listitem>
|
---|
[eb425b4] | 774 | <para>
|
---|
[4c24eb0a] | 775 | is the main <application>Mesa</application> OpenGL library
|
---|
[eb425b4] | 776 | </para>
|
---|
[7a395d1] | 777 | <indexterm zone="mesa libGL">
|
---|
[ba2ac60] | 778 | <primary sortas="c-libGL">libGL.so</primary>
|
---|
| 779 | </indexterm>
|
---|
| 780 | </listitem>
|
---|
| 781 | </varlistentry>
|
---|
[bee072a] | 782 |
|
---|
[4437f63] | 783 | </variablelist>
|
---|
| 784 |
|
---|
[868c7c2] | 785 | </sect2>
|
---|
[d3ef1e4] | 786 |
|
---|
[868c7c2] | 787 | </sect1>
|
---|