source: x/installing/mesa.xml@ 3b98d805

12.0 12.1 12.2 gimp3 kea ken/TL2024 ken/tuningfonts lazarus plabs/newcss python3.11 rahul/power-profiles-daemon renodr/vulkan-addition trunk xry111/for-12.3 xry111/llvm18 xry111/spidermonkey128 xry111/xf86-video-removal
Last change on this file since 3b98d805 was d4102ce, checked in by Bruce Dubbs <bdubbs@…>, 15 months ago

Wording changes.

  • Property mode set to 100644
File size: 21.6 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
7 <!ENTITY mesa-download-http "https://mesa.freedesktop.org/archive/mesa-&mesa-version;.tar.xz">
8 <!ENTITY mesa-download-ftp "ftp://ftp.freedesktop.org/pub/mesa/mesa-&mesa-version;.tar.xz">
9 <!ENTITY mesa-md5sum "0dce0342dbf08dc5afbaf51e729da1a1">
10 <!ENTITY mesa-size "18 MB">
11 <!ENTITY mesa-buildsize "458 MB (with docs, add 221 MB for tests)">
12 <!ENTITY mesa-time "2.2 SBU (With docs; add 2.3 SBU for tests; both with parallelism=4)">
13]>
14
15<sect1 id="mesa" xreflabel="Mesa-&mesa-version;">
16 <?dbhtml filename="mesa.html"?>
17
18
19 <title>Mesa-&mesa-version;</title>
20
21 <indexterm zone="mesa">
22 <primary sortas="a-Mesa">Mesa</primary>
23 </indexterm>
24
25 <sect2 role="package">
26 <title>Introduction to Mesa</title>
27
28 <para>
29 <application>Mesa</application> is an OpenGL compatible 3D graphics
30 library.
31 </para>
32
33 <note>
34 <para>
35 <application>Mesa</application> is updated relatively often. You may
36 want to use the latest available &mesa-major-minor;.x mesa version.
37 </para>
38 </note>
39
40 &lfs113_checked;
41
42 <bridgehead renderas="sect3">Package Information</bridgehead>
43 <itemizedlist spacing="compact">
44 <listitem>
45 <para>
46 Download (HTTP): <ulink url="&mesa-download-http;"/>
47 </para>
48 </listitem>
49 <listitem>
50 <para>
51 Download (FTP): <ulink url="&mesa-download-ftp;"/>
52 </para>
53 </listitem>
54 <listitem>
55 <para>
56 Download MD5 sum: &mesa-md5sum;
57 </para>
58 </listitem>
59 <listitem>
60 <para>
61 Download size: &mesa-size;
62 </para>
63 </listitem>
64 <listitem>
65 <para>
66 Estimated disk space required: &mesa-buildsize;
67 </para>
68 </listitem>
69 <listitem>
70 <para>
71 Estimated build time: &mesa-time;
72 </para>
73 </listitem>
74 </itemizedlist>
75
76 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
77 <itemizedlist spacing="compact">
78 <!-- 9 Apr 23. Change to unversioned patch since it never changes. -->
79 <listitem>
80 <para>
81 Recommended patch:
82 <ulink url="&patch-root;/mesa-add_xdemos-2.patch"/>
83 (installs 2 demo programs for testing Mesa - not needed if you
84 install the <ulink url="https://archive.mesa3d.org/demos/">
85 mesa-demos</ulink> package)
86 </para>
87 </listitem>
88 </itemizedlist>
89
90 <bridgehead renderas="sect3">Mesa Dependencies</bridgehead>
91
92 <bridgehead renderas="sect4">Required</bridgehead>
93 <para role="required">
94 <xref linkend="xorg7-lib"/>,
95 <xref linkend="libdrm"/>, and
96 <xref linkend="Mako"/>
97 </para>
98
99 <bridgehead renderas="sect4">Recommended</bridgehead>
100 <para role="recommended">
101
102 <xref role="first" linkend="libva"/> (to provide VA-API support for some
103 gallium drivers, note that there is a circular dependency. You must
104 build <application>libva</application> first without EGL and GLX support,
105 install this package, and rebuild <application>libva</application>),
106
107 <xref linkend="libvdpau"/> (to build VDPAU drivers),
108
109 <xref linkend="llvm"/> (required for Gallium3D, nouveau, and radeonsi
110 drivers and for swrast, the software rasterizer which is sometimes referred
111 to as llvmpipe. See <ulink role="nodep"
112 url="https://docs.mesa3d.org/systems.html"/> for more information), and
113
114 <xref linkend="wayland-protocols"/> (required for
115 <xref role="nodep" linkend='plasma5-build'/>,
116 GNOME, and recommended for <xref role="nodep" linkend='gtk3'/>)
117 </para>
118
119 <bridgehead renderas="sect4">Optional</bridgehead>
120 <para role="optional">
121 <xref linkend="libgcrypt"/>,
122 <xref linkend="libunwind"/>,
123 <xref linkend="lm_sensors"/> <!-- for libsensors according to Meson -->,
124 <xref linkend="nettle"/>,
125 <xref linkend="valgrind"/>,
126 <ulink url="https://archive.mesa3d.org/demos/">mesa-demos</ulink>
127 (provides more than 300 extra demos to test
128 <application>Mesa</application>; this includes the same programs added by
129 the patch above),
130 <ulink url="https://omxil.sourceforge.net/">Bellagio OpenMAX Integration
131 Layer</ulink> (for mobile platforms),
132 <ulink url="https://github.com/KhronosGroup/glslang">glslang</ulink>
133 (for vulkan drivers),
134 <ulink url="https://github.com/tizonia/tizonia-openmax-il/wiki/Tizonia-OpenMAX-IL/">
135 libtizonia</ulink>, and
136 <ulink url="https://github.com/KhronosGroup/Vulkan-Loader">Vulkan-Loader</ulink>
137 </para>
138<!--
139 <note>
140 <para>
141 The instructions below assume that
142 <application>LLVM</application> with the r600/amdgpu and host backends
143 and run-time type information (RTTI - needed for nouveau) are installed.
144 You will need to modify the instructions if you
145 choose not to install all of these. For an explanation of Gallium3D see
146 <ulink url="https://en.wikipedia.org/wiki/Gallium3D"/>.
147 </para>
148 </note>
149-->
150 </sect2>
151
152 <sect2 role="kernel" id="mesa-kernel">
153 <title>Kernel Configuration</title>
154
155 <para>
156 Enable the following options in the kernel configuration and
157 recompile the kernel if necessary:
158 </para>
159
160<screen><literal>Device Drivers ---&gt;
161 Graphics support ---&gt;
162 &lt;*/M&gt; Direct Rendering Manager (XFree86 ... support) ---&gt; [CONFIG_DRM]
163 &lt; /M&gt; ATI Radeon [CONFIG_DRM_RADEON] # For r300 or r600
164 &lt; /M&gt; AMD GPU [CONFIG_DRM_AMDGPU] # For radeonsi
165 [*] Enable AMDGPU support for SI parts [CONFIG_DRM_AMDGPU_SI]
166 [*] Enable AMDGPU support for CIK parts [CONFIG_DRM_AMDGPU_CIK]
167 Display Engine Configuration
168 [*] AMD DC - Enable new display engine [CONFIG_DRM_AMD_DC]
169 &lt;*/M&gt; Nouveau (NVIDIA) cards [CONFIG_DRM_NOUVEAU] # For nouveau
170 &lt;*/M&gt; Intel 8xx/9xx/G3x/G4x/HD Graphics [CONFIG_DRM_I915] # For i915, crocus, or iris
171 &lt; /*/M&gt; DRM driver for VMware Virtual GPU [CONFIG_DRM_VMWGFX] # For svga
172 &lt; /*/M&gt; Virtual GEM provider [CONFIG_DRM_VGEM] # For swrast</literal></screen>
173
174 <note>
175 <para>
176 The corresponding Mesa Gallium3D driver name is provided as the
177 comment for the configuration entries. If you don't know the name
178 of the Mesa Gallium3D driver for your GPU, see <xref
179 linkend="mesa-gallium-drivers"/> below.
180 </para>
181
182 <para>
183 <option>CONFIG_DRM_RADEON</option>,
184 <option>CONFIG_DRM_AMDGPU</option>,
185 <option>CONFIG_DRM_NOUVEAU</option>, and
186 <option>CONFIG_DRM_I915</option> may require firmware.
187 See <xref linkend='postlfs-firmware'/> for details.
188 </para>
189
190 <para>
191 Selecting <option>CONFIG_DRM_RADEON</option> or
192 <option>CONFIG_DRM_AMDGPU</option> as
193 <quote><literal>y</literal></quote> is not recommended. If it is, any
194 required firmware must be built as a part of the kernel image or the
195 initramfs for the driver to function correctly.
196 </para>
197
198 <para>
199 The sub-entries under <option>CONFIG_DRM_AMDGPU</option> are used
200 to ensure the AMDGPU kernel driver supports all GPUs using the
201 <literal>radeonsi</literal> driver. They are not needed if you
202 won't need <option>CONFIG_DRM_AMDGPU</option> itself. They
203 may be unneeded for some GPU models.
204 </para>
205
206 <para>
207 For <literal>swrast</literal>, <option>CONFIG_DRM_VGEM</option>
208 is not strictly needed but recommended as an optimization.
209 You will also need to select at least a working DRM or framebuffer
210 driver. For a system booted with EFI, the configuration
211 in <xref linkend="uefi-kernel"/> is sufficient. For a system booted
212 with BIOS, <quote>VESA VGA graphics support</quote>
213 <!-- TODO: it should be replaced with CONFIG_DRM_SIMPLEDRM as well,
214 but the LFS grub configuration does not initialize the FB so it
215 won't work with BIOS boot. -->
216 (<option>CONFIG_FB_VESA</option>, under
217 <quote>Frame buffer Devices => Support for frame buffer
218 devices</quote>) is sufficient. However a dedicated DRM or framebuffer
219 driver may provide additional functionalities.
220 </para>
221 </note>
222 </sect2>
223
224 <sect2 role="installation">
225 <title>Installation of Mesa</title>
226
227 <para>
228 If you have downloaded the xdemos patch (needed if testing the Xorg
229 installation per BLFS instructions), apply it by running the following
230 command:
231 </para>
232
233<!--<screen><userinput>patch -Np1 -i ../mesa-&mesa-version;-add_xdemos-1.patch</userinput></screen>-->
234<screen><userinput>patch -Np1 -i ../mesa-add_xdemos-2.patch</userinput></screen>
235
236 <!-- Note that freedreno, vc4, and virgl all need special support from
237 libdrm - renodr
238 For me, libdrm does not mention virgl, but mesa accepts it. AFAICS
239 freedreno is for qualcom hardware, libdrm will build for it on suitable
240 systems. VC4 is for the Broadcom VC4 used in the raspberry pi - ken -->
241<!--
242 <note>
243 <para>
244 The measurements above, and the Contents below, are for a full build.
245 Many people will not wish to install drivers they cannot use, so the
246 following paragraphs explain how to limit the drivers, and give an
247 example which can be be reduced or amended as necessary.
248 </para>
249 </note>
250
251-->
252<!--
253 <para>
254 The (non-gallium) DRI drivers available in X86 are auto, <emphasis>or
255 alternatively a choice from</emphasis> i915, i965, nouveau, r100, r200,
256 and swrast. Use 'auto' to build all available DRI drivers, or use an
257 empty string (DRI_DRIVERS="") if you wish to only build gallium drivers.
258 </para>
259
260 <para>
261 The platforms ("window systems") available for X86 linux are x11, wayland,
262 drm, and surfaceless. By not specifying anything, the meson
263 build-system will build for all these platforms if you have the
264 dependencies, identical to if you had specified '-Dplatforms=auto'.
265 </para>
266
267 <para>
268 Modify the commands below for your desired drivers. The drivers listed
269 below will cover most modern video cards and virtual machines. For help in
270 selecting drivers see <ulink url="https://docs.mesa3d.org/systems.html"/>.
271-->
272 <!-- these two don't seem to be mentioned in that mesa link -->
273<!--
274 For intel drivers, specify crocus for i965 gen 4 through to haswell, iris
275 for broadwell and later.
276 </para>
277
278 <note>
279 <para>
280 Although the nouveau drivers can be built for both gallium and dri, the
281 i915 driver can only be built for one or the other.
282 </para>
283 </note>
284
285<screen><userinput>GALLIUM_DRV="crocus,i915,iris,nouveau,r600,radeonsi,svga,swrast,virgl"
286DRI_DRIVERS="i965,nouveau"</userinput></screen>
287-->
288
289 <para>
290 Install <application>Mesa</application> by running the following
291 commands:
292 </para>
293
294<screen><userinput>mkdir build &amp;&amp;
295cd build &amp;&amp;
296
297meson setup \
298 --prefix=$XORG_PREFIX \
299 --buildtype=release \
300 -Dplatforms=x11,wayland \
301 -Dgallium-drivers=auto \
302 -Dvulkan-drivers="" \
303 -Dvalgrind=disabled \
304 -Dlibunwind=disabled \
305 .. &amp;&amp;
306
307ninja</userinput></screen>
308
309 <para>
310 To test the results, issue:
311 <command>meson configure -Dbuild-tests=true &amp;&amp; ninja test</command>.
312 </para>
313<!-- All 88 tests passed for me for 22.3.3 [pierre]
314 All 90 tests passed for me for 23.1.0 [bdubbs]
315-->
316
317 <para>
318 Now, as the <systemitem class="username">root</systemitem> user:
319 </para>
320
321<screen role="root"><userinput>ninja install</userinput></screen>
322
323 <para>
324 If desired, install the optional documentation by running
325 the following commands as the
326 <systemitem class="username">root</systemitem> user:
327 </para>
328
329<screen role="root"
330 remap="doc"><userinput>install -v -dm755 /usr/share/doc/mesa-&mesa-version; &amp;&amp;
331cp -rfv ../docs/* /usr/share/doc/mesa-&mesa-version;</userinput></screen>
332
333 </sect2>
334
335 <sect2 role="commands">
336 <title>Command Explanations</title>
337
338 <para>
339 <parameter>--buildtype=release</parameter>: This switch ensures a
340 fully-optimized build, and disables debug assertions which will
341 severely slow down the libraries in certain use-cases. Without this
342 switch, build sizes can span into the 2GB range.
343 </para>
344
345 <para>
346 <anchor id='mesa-gallium-drivers' xreflabel='Mesa Gallium3D Drivers'/>
347 <parameter>-Dgallium-drivers=auto</parameter>: This parameter
348 controls which Gallium3D drivers should be built.
349 <literal>auto</literal> selects all Gallium3D drivers available
350 for x86: <literal>r300</literal> (for ATI Radeon 9000 or Radeon X
351 series), <literal>r600</literal> (for AMD/ATI Radeon HD 2000-6000
352 series), <literal>radeonsi</literal> (for AMD Radeon HD 7000 or newer
353 AMD GPU models), <literal>nouveau</literal>
354 (for Supported NVIDIA GPUs, they are listed as all
355 <quote>3D features</quote> <quote>DONE</quote> in <ulink
356 url='https://nouveau.freedesktop.org/FeatureMatrix.html'>the Nouveau
357 status page</ulink>), <literal>virgl</literal> (for QEMU virtual GPU
358 with <application>virglrender</application> support; note that BLFS
359 <xref linkend='qemu'/> is not built with
360 <application>virglrender</application>), <literal>svga</literal>
361 (for VMWare virtual GPU), <literal>swrast</literal> (using CPU for 3D
362 rasterisation; note that it's much slower than using a modern
363 3D-capable GPU, so it should be only used if the GPU is not supported
364 by other drivers), <literal>iris</literal> (for Intel GPUs shipped
365 with Broadwell or newer CPUs), <literal>crocus</literal> (for Intel
366 GMA 3000, X3000 series, 4000 series, or X4000 series GPUs shipped with
367 chipsets, or Intel HD GPUs shipped with pre-Broadwell CPUs),
368 <literal>i915</literal> (for Intel GMA 900, 950, 3100, or 3150 GPUs
369 shipped with chipsets or Atom D/N 4xx/5xx CPUs). You may replace
370 <literal>auto</literal> with a comma-separated list to build only
371 a subset of these drivers if you precisely know which drivers you
372 need, for example
373 <option>-Dgallium-drivers=radeonsi,iris,swrast</option>.
374 </para>
375<!--
376 <para>
377 <parameter>-Dosmesa=true</parameter>: This switch enables building
378 the <filename class="libraryfile">libOSMesa</filename> library and
379 provides Gallium3D support in it. It requires the swrast gallium driver.
380 </para>
381-->
382
383 <para>
384 <parameter>-Dplatforms="..."</parameter>: This parameter
385 controls which windowing systems will be supported. Available
386 linux platforms are x11 and wayland.
387 </para>
388
389 <para>
390 <parameter>-Dvulkan-drivers=""</parameter>: This switch allows choosing
391 which Vulkan drivers are built. The default is auto, but this requires
392 the optional dependencies <application>glslang</application> and
393 <application>Vulkan-Loader</application>. Vulkan is a newer API
394 designed for utilizing the GPUs with a performance better than OpenGL,
395 but nothing in BLFS benefits from it for now. So we pass an empty
396 list in order to remove the need for these dependencies.
397 </para>
398
399 <para>
400 <parameter>-Dvalgrind=disabled</parameter>: This parameter disables
401 the usage of Valgrind during the build process. Remove this parameter
402 if you have Valgrind installed, and wish to check for memory leaks.
403 </para>
404
405 <para>
406 <parameter>-Dlibunwind=disabled</parameter>: This parameter disables
407 the usage of libunwind.
408 </para>
409
410 <para>
411 <command>meson configure -Dbuild-tests=true</command>: This command will
412 reconfigure the build to set <option>-Dbuild-tests=true</option>, but
413 keep the other options specified in the <command>meson setup</command>
414 command unchanged. It allows <command>ninja test</command> to build and
415 run unit tests.
416 </para>
417
418 <para>
419 <option>-Degl-native-platform="..."</option>: This parameter
420 controls which Embedded Graphics Library support will be built. Available
421 linux options are auto (default), x11, wayland, surfaceless, and drm.
422 </para>
423
424 </sect2>
425
426 <sect2 role="content">
427 <title>Contents</title>
428
429 <segmentedlist>
430 <segtitle>Installed Programs</segtitle>
431 <segtitle>Installed Libraries</segtitle><!-- in /usr/lib -->
432 <segtitle>Installed Drivers</segtitle><!-- in /usr/lib/<subdir> -->
433 <segtitle>Installed Directories</segtitle>
434
435 <seglistitem>
436 <seg>
437 glxgears and glxinfo
438 </seg>
439 <seg>
440 libEGL.so,
441 libGL.so,
442 libGLESv1_CM.so,
443 libGLESv2.so,
444 libgbm.so,
445 libglapi.so, and
446 libxatracker.so
447 </seg>
448 <seg>
449 <!-- d3dadapter9.so (optional)
450 I guess this is useless today, Wine applications use Vulkan
451 through libvkd3d, and new games with native Linux support
452 likely uses Vulkan directly. -->
453 <!-- Begin gallium DRI drivers (*_dri.so) and VA-API drivers
454 (*_drv_video.so): this is the full set -->
455 crocus_dri.so,
456 i915_dri.so,
457 iris_dri.so,
458 kms_swrast_dri.so,
459 nouveau_dri.so,
460 nouveau_drv_video.so,
461 r300_dri.so,
462 r600_dri.so,
463 r600_drv_video.so,
464 radeonsi_dri.so,
465 radeonsi_drv_video.so,
466 swrast_dri.so,
467 virtio_gpu_dri.so,
468 virtio_gpu_drv_video.so,
469 vmwgfx_dri.so,
470 <!-- End DRI Drivers -->
471 <!-- Begin VDPAU drivers -->
472 libvdpau_nouveau.so,
473 libvdpau_r300.so
474 libvdpau_r600.so, and
475 libvdpau_radeonsi.so
476 libvdpau_virtio_gpu.so
477 <!-- End VDPAU drivers -->
478 (Many of these drivers are hard-linked).
479 </seg>
480 <seg>
481 <!-- $XORG_PREFIX/include/GL is installed by xorg-protos -->
482 $XORG_PREFIX/{include/{EGL,GLES,GLES2,GLES3,KHR},
483 $XORG_PREFIX/lib/{dri,vdpau}},
484 $XORG_PREFIX/share/drirc.d (contains workarounds for various applications,
485 particularly browsers and games),
486 and /usr/share/doc/mesa-&mesa-version;
487 </seg>
488 </seglistitem>
489 </segmentedlist>
490
491 <variablelist>
492 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
493 <?dbfo list-presentation="list"?>
494 <?dbhtml list-presentation="table"?>
495
496 <varlistentry id="glxgears">
497 <term><command>glxgears</command></term>
498 <listitem>
499 <para>
500 is a GL demo useful for troubleshooting graphics
501 problems
502 </para>
503 <indexterm zone="mesa glxgears">
504 <primary sortas="b-glxgears">glxgears</primary>
505 </indexterm>
506 </listitem>
507 </varlistentry>
508
509 <varlistentry id="glxinfo">
510 <term><command>glxinfo</command></term>
511 <listitem>
512 <para>
513 is a diagnostic program that displays information about the
514 graphics hardware and installed GL libraries
515 </para>
516 <indexterm zone="mesa glxinfo">
517 <primary sortas="b-glxinfo">glxinfo</primary>
518 </indexterm>
519 </listitem>
520 </varlistentry>
521
522 <varlistentry id="libEGL">
523 <term><filename class="libraryfile">libEGL.so</filename></term>
524 <listitem>
525 <para>
526 provides a native platform graphics interface as
527 defined by the EGL-1.4 specification
528 </para>
529 <indexterm zone="mesa libEGL">
530 <primary sortas="c-libGL">libEGL.so</primary>
531 </indexterm>
532 </listitem>
533 </varlistentry>
534
535 <varlistentry id="libgbm">
536 <term><filename class="libraryfile">libgbm.so</filename></term>
537 <listitem>
538 <para>
539 is the <application>Mesa</application> Graphics Buffer
540 Manager library
541 </para>
542 <indexterm zone="mesa libgbm">
543 <primary sortas="c-libgbm">libgbm.so</primary>
544 </indexterm>
545 </listitem>
546 </varlistentry>
547
548 <varlistentry id="libGLESv1_CM">
549 <term><filename class="libraryfile">libGLESv1_CM.so</filename></term>
550 <listitem>
551 <para>
552 is the <application>Mesa</application> OpenGL ES 1.1 library
553 </para>
554 <indexterm zone="mesa libGLESv1_CM">
555 <primary sortas="c-libGLESv1_CM">libGLESv1_CM.so</primary>
556 </indexterm>
557 </listitem>
558 </varlistentry>
559
560 <varlistentry id="libGLES2">
561 <term><filename class="libraryfile">libGLES2.so</filename></term>
562 <listitem>
563 <para>
564 is the <application>Mesa</application> OpenGL ES 2.0 library
565 </para>
566 <indexterm zone="mesa libGLES2">
567 <primary sortas="c-libGLES2">libGLES2.so</primary>
568 </indexterm>
569 </listitem>
570 </varlistentry>
571
572 <varlistentry id="libGL">
573 <term><filename class="libraryfile">libGL.so</filename></term>
574 <listitem>
575 <para>
576 is the main <application>Mesa</application> OpenGL library
577 </para>
578 <indexterm zone="mesa libGL">
579 <primary sortas="c-libGL">libGL.so</primary>
580 </indexterm>
581 </listitem>
582 </varlistentry>
583
584 </variablelist>
585
586 </sect2>
587
588</sect1>
Note: See TracBrowser for help on using the repository browser.