source: x/installing/mesa.xml@ 3713bc71

11.1 11.2 11.3 12.0 12.1 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 3713bc71 was 3713bc71, checked in by Pierre Labastie <pierre.labastie@…>, 2 years ago

Updates and a fix:

udisks2-2.9.4
upower: change download location
exim-4.95
mesa-21.2.4
libvpx-1.11.0

  • Property mode set to 100644
File size: 19.0 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 "68cc97f99ed38e9fbae026ca825c9703">
10 <!ENTITY mesa-size "15 MB">
11 <!ENTITY mesa-buildsize "722 MB (with docs, add 373 MB if running the tests)">
12 <!ENTITY mesa-time "3.2 SBU (Using parallelism=4; with docs and tests)">
13]>
14
15<sect1 id="mesa" xreflabel="Mesa-&mesa-version;">
16 <?dbhtml filename="mesa.html"?>
17
18 <sect1info>
19 <date>$Date$</date>
20 </sect1info>
21
22 <title>Mesa-&mesa-version;</title>
23
24 <indexterm zone="mesa">
25 <primary sortas="a-Mesa">Mesa</primary>
26 </indexterm>
27
28 <sect2 role="package">
29 <title>Introduction to Mesa</title>
30
31 <para>
32 <application>Mesa</application> is an OpenGL compatible 3D graphics
33 library.
34 </para>
35
36 <note>
37 <para>
38 <application>Mesa</application> is updated relatively often. You may
39 want to use the latest available &mesa-major-minor;.x mesa version.
40 </para>
41 </note>
42
43 &lfs110a_checked;
44
45 <bridgehead renderas="sect3">Package Information</bridgehead>
46 <itemizedlist spacing="compact">
47 <listitem>
48 <para>
49 Download (HTTP): <ulink url="&mesa-download-http;"/>
50 </para>
51 </listitem>
52 <listitem>
53 <para>
54 Download (FTP): <ulink url="&mesa-download-ftp;"/>
55 </para>
56 </listitem>
57 <listitem>
58 <para>
59 Download MD5 sum: &mesa-md5sum;
60 </para>
61 </listitem>
62 <listitem>
63 <para>
64 Download size: &mesa-size;
65 </para>
66 </listitem>
67 <listitem>
68 <para>
69 Estimated disk space required: &mesa-buildsize;
70 </para>
71 </listitem>
72 <listitem>
73 <para>
74 Estimated build time: &mesa-time;
75 </para>
76 </listitem>
77 </itemizedlist>
78
79 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
80 <itemizedlist spacing="compact">
81 <listitem>
82 <para>
83 Recommended patch:
84 <ulink url="&patch-root;/mesa-&mesa-version;-add_xdemos-1.patch"/>
85 (installs 2 demo programs for testing Mesa - not needed if you
86 install the <ulink url="ftp://ftp.freedesktop.org/pub/mesa/demos/">
87 mesa-demos</ulink> package)
88 </para>
89 </listitem>
90 </itemizedlist>
91
92 <bridgehead renderas="sect3">Mesa Dependencies</bridgehead>
93
94 <bridgehead renderas="sect4">Required</bridgehead>
95 <para role="required">
96 <xref linkend="xorg7-lib"/>,
97 <xref linkend="libdrm"/>, and
98 <xref linkend="Mako"/>
99 </para>
100
101 <bridgehead renderas="sect4">Recommended</bridgehead>
102 <para role="recommended">
103
104 <xref role="first" linkend="libva"/> (to provide VA-API support for some
105 gallium drivers, note that there is a circular dependency. You must
106 build <application>libva</application> first without EGL and GLX support,
107 install this package, and rebuild <application>libva</application>),
108 <xref linkend="libvdpau"/> (to build VDPAU drivers),
109 <xref linkend="llvm"/> (required for Gallium3D, nouveau, r300, 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 <xref linkend="wayland-protocols"/> (required for
114 <xref role="nodep" linkend='plasma5-build'/>,
115 <!-- <xref role="nodep" linkend='lxqt'/>, -->
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="lm_sensors"/> <!-- for libsensors according to Meson -->,
123 <xref linkend="nettle"/>,
124 <xref linkend="valgrind"/>,
125 <ulink url="ftp://ftp.freedesktop.org/pub/mesa/demos/">mesa-demos</ulink>
126 (provides more than 300 extra demos to test
127 <application>Mesa</application>; this includes the same programs added by
128 the patch above),
129 <ulink url="http://omxil.sourceforge.net/">Bellagio OpenMAX Integration
130 Layer</ulink> (for mobile platforms),
131 <ulink url="http://www.nongnu.org/libunwind/">libunwind</ulink>,
132 <ulink url="https://github.com/tizonia/tizonia-openmax-il/wiki/Tizonia-OpenMAX-IL/">
133 libtizonia</ulink>, and
134 <ulink url="https://www.vulkan.org/">libvulkan</ulink> (for the zink driver)
135 </para>
136
137 <note>
138 <para>
139 The instructions below assume that
140 <application>LLVM</application> with the r600/amdgpu and host backends
141 and run-time type information (RTTI - needed for nouveau) are installed.
142 You will need to modify the instructions if you
143 choose not to install all of these. For an explanation of Gallium3D see
144 <ulink url="https://en.wikipedia.org/wiki/Gallium3D"/>.
145 </para>
146 </note>
147
148 <para condition="html" role="usernotes">User Notes:
149 <ulink url="&blfs-wiki;/mesalib"/>
150 </para>
151 </sect2>
152
153 <sect2 role="installation">
154 <title>Installation of Mesa</title>
155
156 <para>
157 If you have downloaded the xdemos patch (needed if testing the Xorg
158 installation per BLFS instructions), apply it by running the following
159 command:
160 </para>
161
162<screen><userinput>patch -Np1 -i ../mesa-&mesa-version;-add_xdemos-1.patch</userinput></screen>
163
164 <!-- Note that freedreno, vc4, and virgl all need special support from
165 libdrm - renodr
166 For me, libdrm does not mention virgl, but mesa accepts it. AFAICS
167 freedreno is for qualcom hardware, libdrm will build for it on suitable
168 systems. VC4 is for the Broadcom VC4 used in the raspberry pi - ken -->
169
170 <para>
171 Adjust a script file in test suite to use Python 3, instead of the
172 obsolete Python 2:
173 </para>
174
175<screen><userinput>sed '1s/python/&amp;3/' -i bin/symbols-check.py</userinput></screen>
176
177 <note>
178 <para>
179 The measurements above, and the Contents below, are for a full build.
180 Many people will not wish to install drivers they cannot use, so the
181 following paragraphs explain how to limit the drivers, and give an
182 example which can be be reduced or amended as necessary.
183 </para>
184 </note>
185
186 <para>
187 Now, select the drivers you wish to install. For the X86 architecture, the
188 available gallium drivers are auto (<emphasis>in 21.2.1 this does not select
189 crocus </emphasis>), <emphasis>or alternatively a choice from</emphasis>
190 crocus, i915, iris, nouveau, r300, r600, radeonsi, svga, swrast, and virgl.
191 The latter can provide acceleration in <xref linkend="qemu"/> if that has
192 been linked against
193 <ulink url="https://gitlab.freedesktop.org/virgl/virglrenderer/~/releases/">virglrenderer</ulink>
194 (you will need a freedesktop.org account to get to that page, you can
195 download the 0.9.1 release without an account from
196 <ulink url="https://gitlab.freedesktop.org/virgl/virglrenderer/-/archive/0.9.1/virglrenderer-0.9.1.tar.bz2">virglrenderer-0.9.1</ulink>).
197<!-- If you wish to build all available gallium drivers,
198 use 'auto'. FIXME : does not build crocus in 21.2.1 -->
199
200 <!-- crocus was added to the default x86/x86_64 drivers for meson in the
201 master branch on 2021-08-31, at some point it will appear in a stable release -->
202 </para>
203
204 <para>
205 The (non-gallium) DRI drivers available in X86 are auto, <emphasis>or
206 alternatively a choice from</emphasis> i915, i965, nouveau, r100, r200,
207 and swrast. Use 'auto' to build all available DRI drivers, or use an
208 empty string (DRI_DRIVERS="") if you wish to only build gallium drivers.
209 </para>
210
211 <para>
212 The platforms ("window systems") available for X86 linux are x11, wayland,
213 <!--drm,--> and surfaceless. By not specifying anything, the meson
214 build-system will build for all these platforms if you have the
215 dependencies, identical to if you had specified '-Dplatforms=auto'.
216 </para>
217
218 <para>
219 Modify the commands below for your desired drivers. The drivers listed
220 below will cover most modern video cards and virtual machines. For help in
221 selecting drivers see <ulink url="https://docs.mesa3d.org/systems.html"/>.
222 <!-- these two don't seem to be mentioned in that mesa link -->
223 For intel drivers, specify crocus for i965 gen 4 through to haswell, iris
224 for broadwell and later.
225 </para>
226
227 <note>
228 <para>
229 Although the nouveau drivers can be built for both gallium and dri, the
230 i915 driver can only be built for one or the other.
231 </para>
232 </note>
233
234<screen><userinput>GALLIUM_DRV="crocus,i915,iris,nouveau,r600,radeonsi,svga,swrast,virgl"
235DRI_DRIVERS="i965,nouveau"</userinput></screen>
236
237 <para>
238 Install <application>Mesa</application> by running the following
239 commands:
240 </para>
241
242<screen><userinput>mkdir build &amp;&amp;
243cd build &amp;&amp;
244
245meson --prefix=$XORG_PREFIX \
246 --buildtype=release \
247 -Ddri-drivers=$DRI_DRIVERS \
248 -Dgallium-drivers=$GALLIUM_DRV \
249 -Dgallium-nine=false \
250 -Dglx=dri \
251 -Dvalgrind=disabled \
252 -Dlibunwind=disabled \
253 .. &amp;&amp;
254
255unset GALLIUM_DRV DRI_DRIVERS &amp;&amp;
256
257ninja</userinput></screen>
258
259 <para>
260 If you built the tests (see 'Command Explanations'), to run them issue:
261 <command>ninja test</command>.
262<!-- All tests passed for me for 21.2.4 [pierre]
263 All 33 subtests tests in the mesa:compiler+glsl / glsl compiler warnings
264 suite are known to fail.-->
265 </para>
266
267 <para>
268 Now, as the <systemitem class="username">root</systemitem> user:
269 </para>
270
271<screen role="root"><userinput>ninja install</userinput></screen>
272
273 <para>
274 If desired, install the optional documentation by running
275 the following commands as the
276 <systemitem class="username">root</systemitem> user:
277 </para>
278
279<screen role="root"
280 remap="doc"><userinput>install -v -dm755 /usr/share/doc/mesa-&mesa-version; &amp;&amp;
281cp -rfv ../docs/* /usr/share/doc/mesa-&mesa-version;</userinput></screen>
282
283 </sect2>
284
285 <sect2 role="commands">
286 <title>Command Explanations</title>
287
288 <para>
289 <parameter>--buildtype=release</parameter>: This switch ensures a
290 fully-optimized build, and disables debug assertions which will
291 severely slow down the libraries in certain use-cases. Without this
292 switch, build sizes can span into the 2GB range.
293 </para>
294
295 <para>
296 <parameter>-Ddri-drivers="..."</parameter>: This parameter
297 controls which (non-gallium) dri drivers should be built.
298 </para>
299
300 <para>
301 <parameter>-Dgallium-drivers="..."</parameter>: This parameter
302 controls which Gallium3D drivers should be built.
303 </para>
304
305 <para>
306 <parameter>-Dgallium-nine=false</parameter>: Prevents building
307 support for (MS Windows) games designed for DX9. Set it to true if
308 this support is desired.
309 </para>
310<!--
311 <para>
312 <parameter>-Dosmesa=true</parameter>: This switch enables building
313 the <filename class="libraryfile">libOSMesa</filename> library and
314 provides Gallium3D support in it. It requires the swrast gallium driver.
315 </para>
316-->
317<!--
318 <para>
319 <parameter>-Dplatforms="..."</parameter>: This parameter
320 controls which platforms EGL will be built for. Available
321 linux X86 platforms are drm, x11, wayland, and surfaceless.
322 </para>
323-->
324 <para>
325 <parameter>-Dvalgrind=disabled</parameter>: This parameter disables
326 the usage of Valgrind during the build process. Remove this parameter
327 if you have Valgrind installed, and wish to check for memory leaks.
328 </para>
329
330 <para>
331 <parameter>-Dlibunwind=disabled</parameter>: This parameter disables
332 the usage of libunwind.
333 </para>
334
335<!--
336 <para>
337 <parameter>- -enable-xa</parameter>: This switch enables building the
338 XA X Acceleration API (Required for VMware 3D Driver).
339 </para>
340
341 <para>
342 <parameter>- -enable-gbm</parameter>: This switch enables building the
343 <application>Mesa</application> Graphics Buffer Manager library.
344 </para>
345 These two seem to be automatic in 19.0 - ken
346
347 <para>
348 <parameter>- -enable-glx-tls</parameter>: This switch enables TLS (Thread Local
349 Storage) support in GLX.
350 </para>
351-->
352 <para>
353 <option>-Dbuild-tests=true</option>: This option will cause the test code
354 to be enabled. To run the tests, issue: <command>ninja test</command>.
355 </para>
356
357 <para>
358 <option>-Dvulkan-drivers=...</option>: This option allows choosing which
359 Vulkan drivers are built. Since those drivers depend on the
360 corresponding Gallium3D drivers, do not enable drivers that are not
361 enabled in Gallium3D drivers. Furthermore, since BLFS does not use
362 Vulkan, it is safe to leave the list of Vulkan drivers empty.
363 </para>
364
365 </sect2>
366
367 <sect2 role="content">
368 <title>Contents</title>
369
370 <segmentedlist>
371 <segtitle>Installed Programs</segtitle>
372 <segtitle>Installed Libraries</segtitle><!-- in /usr/lib -->
373 <segtitle>Installed Drivers</segtitle><!-- in /usr/lib/<subdir> -->
374 <segtitle>Installed Directories</segtitle>
375
376 <seglistitem>
377 <seg>
378 glxgears and glxinfo
379 </seg>
380 <seg>
381 libEGL.so,
382 libGL.so,
383 libGLESv1_CM.so,
384 libGLESv2.so,
385 libOSMesa.so,
386 libXvMCnouveau.so,
387 libXvMCr600.so,
388 libgbm.so,
389 libglapi.so,
390 <!-- Begin Vulkan drivers -->
391 libvulkan_intel.so,
392 libvulkan_lvp.so,
393 libvulkan_radeon.so, and
394 <!-- End Vulkan drivers -->
395 libxatracker.so,
396 </seg>
397 <seg>
398 <!-- Begin gallium DRI drivers : this is the full set -->
399 d3dadapter9.so (optional), <!-- For Windows games. This is DirectX's
400 Direct3D -->
401 crocus_dri.so,
402 i830_dri.so,
403 i915_dri.so,
404 i965_dri.so,
405 iris_dri.so,
406 kms_swrast_dri.so,
407 nouveau_dri.so,
408 nouveau_drv_video.so,
409 nouveau_vieux_dri.so,
410 r200_dri.so (optional),
411 r300_dri.so (optional),
412 r600_dri.so,
413 r600_drv_video.so,
414 radeon_dri.so (optional),
415 radeonsi_dri.so,
416 radeonsi_drv_video.so,
417 swrast_dri.so,
418 virtio_gpu_dri.so,
419 vmwgfx_dri.so,
420 <!-- End DRI Drivers -->
421 <!-- Begin VDPAU drivers -->
422 libvdpau_nouveau.so,
423 libvdpau_r300.so (optional),
424 libvdpau_r600.so, and
425 libvdpau_radeonsi.so
426 <!-- End VDPAU drivers -->
427 (Many of these drivers are hard-linked).
428 </seg>
429 <seg>
430 $XORG_PREFIX/{include/{EGL,GL,GLES,GLES2,GLES3,KHR},lib/{dri,vdpau}},
431 $XORG_PREFIX/include/d3adapter (optional),
432 $XORG_PREFIX/lib/d3d (optional),
433 $XORG_PREFIX/share/drirc.d (contains workarounds for various applications,
434 particularly browsers and games)
435 $XORG_PREFIX/share/vulkan/icd.d,
436 and
437 /usr/share/doc/mesa-&mesa-version; (optional)
438 </seg>
439 </seglistitem>
440 </segmentedlist>
441
442 <variablelist>
443 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
444 <?dbfo list-presentation="list"?>
445 <?dbhtml list-presentation="table"?>
446
447 <varlistentry id="glxgears">
448 <term><command>glxgears</command></term>
449 <listitem>
450 <para>
451 is a GL demo useful for troubleshooting graphics
452 problems
453 </para>
454 <indexterm zone="mesa glxgears">
455 <primary sortas="b-glxgears">glxgears</primary>
456 </indexterm>
457 </listitem>
458 </varlistentry>
459
460 <varlistentry id="glxinfo">
461 <term><command>glxinfo</command></term>
462 <listitem>
463 <para>
464 is a diagnostic program that displays information about the
465 graphics hardware and installed GL libraries
466 </para>
467 <indexterm zone="mesa glxinfo">
468 <primary sortas="b-glxinfo">glxinfo</primary>
469 </indexterm>
470 </listitem>
471 </varlistentry>
472
473 <varlistentry id="libEGL">
474 <term><filename class="libraryfile">libEGL.so</filename></term>
475 <listitem>
476 <para>
477 provides a native platform graphics interface as
478 defined by the EGL-1.4 specification
479 </para>
480 <indexterm zone="mesa libEGL">
481 <primary sortas="c-libGL">libEGL.so</primary>
482 </indexterm>
483 </listitem>
484 </varlistentry>
485
486 <varlistentry id="libgbm">
487 <term><filename class="libraryfile">libgbm.so</filename></term>
488 <listitem>
489 <para>
490 is the <application>Mesa</application> Graphics Buffer
491 Manager library
492 </para>
493 <indexterm zone="mesa libgbm">
494 <primary sortas="c-libgbm">libgbm.so</primary>
495 </indexterm>
496 </listitem>
497 </varlistentry>
498
499 <varlistentry id="libGLESv1_CM">
500 <term><filename class="libraryfile">libGLESv1_CM.so</filename></term>
501 <listitem>
502 <para>
503 is the <application>Mesa</application> OpenGL ES 1.1 library
504 </para>
505 <indexterm zone="mesa libGLESv1_CM">
506 <primary sortas="c-libGLESv1_CM">libGLESv1_CM.so</primary>
507 </indexterm>
508 </listitem>
509 </varlistentry>
510
511 <varlistentry id="libGLES2">
512 <term><filename class="libraryfile">libGLES2.so</filename></term>
513 <listitem>
514 <para>
515 is the <application>Mesa</application> OpenGL ES 2.0 library
516 </para>
517 <indexterm zone="mesa libGLES2">
518 <primary sortas="c-libGLES2">libGLES2.so</primary>
519 </indexterm>
520 </listitem>
521 </varlistentry>
522
523 <varlistentry id="libGL">
524 <term><filename class="libraryfile">libGL.so</filename></term>
525 <listitem>
526 <para>
527 is the main <application>Mesa</application> OpenGL library
528 </para>
529 <indexterm zone="mesa libGL">
530 <primary sortas="c-libGL">libGL.so</primary>
531 </indexterm>
532 </listitem>
533 </varlistentry>
534
535 <varlistentry id="libOSMesa">
536 <term><filename class="libraryfile">libOSMesa.so</filename></term>
537 <listitem>
538 <para>
539 is the <application>Mesa</application> Off-screen Rendering library
540 </para>
541 <indexterm zone="mesa libOSMesa">
542 <primary sortas="c-libOSMesa">libOSMesa.so</primary>
543 </indexterm>
544 </listitem>
545 </varlistentry>
546
547 </variablelist>
548
549 </sect2>
550
551</sect1>
Note: See TracBrowser for help on using the repository browser.