source: x/installing/mesa.xml@ 3619a7b

ken/refactor-virt lazarus qt5new trunk upgradedb
Last change on this file since 3619a7b was 3619a7b, checked in by Bruce Dubbs <bdubbs@…>, 4 months ago

Package updates.
Update to sudo-1.9.8p2.
Update to xterm-369.
Update to mesa-21.2.2.
Update to nghttp2-1.45.1.
Update to neon-0.32.1.
Update to btrfs-progs-v5.14.1.

  • Property mode set to 100644
File size: 18.1 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 "25f4b3a8e92d20e2fc6231e253fce1ee">
10 <!ENTITY mesa-size "15 MB">
11 <!ENTITY mesa-buildsize "562 MB (with docs, add 376 MB if running the tests)">
12 <!ENTITY mesa-time "3.5 SBU (Using parallelism=4; with docs)">
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. The
191 latter is recommended if you intend to run the system under
192 <xref linkend="qemu"/>.<!-- If you wish to build all available gallium drivers,
193 use 'auto'. FIXME : does not build crocus in 21.2.1 -->
194
195 <!-- crocus was added to the default x86/x86_64 drivers for meson in the
196 master branch on 2021-08-31, at some point it will appear in a stable release -->
197 </para>
198
199 <para>
200 The (non-gallium) DRI drivers available in X86 are auto, <emphasis>or
201 alternatively a choice from</emphasis> i915, i965, nouveau, r100, r200,
202 and swrast. Use 'auto' to build all available DRI drivers, or use an
203 empty string (DRI_DRIVERS="") if you wish to only build gallium drivers.
204 </para>
205
206 <para>
207 The platforms ("window systems") available for X86 linux are x11, wayland,
208 <!--drm,--> and surfaceless. By not specifying anything, the meson
209 build-system will build for all these platforms if you have the
210 dependencies, identical to if you had specified '-Dplatforms=auto'.
211 </para>
212
213 <para>
214 Modify the commands below for your desired drivers. The drivers listed
215 below will cover most modern video cards and virtual machines. For help in
216 selecting drivers see <ulink url="https://docs.mesa3d.org/systems.html"/>.
217 <!-- these two don't seem to be mentioned in that mesa link -->
218 For intel drivers, specify crocus for i965 gen 4 through to haswell, iris
219 for broadwell and later.
220 </para>
221
222 <note>
223 <para>
224 Although the nouveau drivers can be built for both gallium and dri, the
225 i915 driver can only be built for one or the other.
226 </para>
227 </note>
228
229<screen><userinput>GALLIUM_DRV="crocus,i915,iris,nouveau,r600,radeonsi,svga,swrast,virgl"
230DRI_DRIVERS="i965,nouveau"</userinput></screen>
231
232 <para>
233 Install <application>Mesa</application> by running the following
234 commands:
235 </para>
236
237<screen><userinput>mkdir build &amp;&amp;
238cd build &amp;&amp;
239
240meson --prefix=$XORG_PREFIX \
241 --buildtype=release \
242 -Ddri-drivers=$DRI_DRIVERS \
243 -Dgallium-drivers=$GALLIUM_DRV \
244 -Dgallium-nine=false \
245 -Dglx=dri \
246 -Dvalgrind=disabled \
247 -Dlibunwind=disabled \
248 .. &amp;&amp;
249
250unset GALLIUM_DRV DRI_DRIVERS &amp;&amp;
251
252ninja</userinput></screen>
253
254 <para>
255 If you built the tests (see 'Command Explanations'), to run them issue:
256 <command>ninja test</command>.
257 All 33 subtests tests in the mesa:compiler+glsl / glsl compiler warnings
258 suite are known to fail.
259 </para>
260
261 <para>
262 Now, as the <systemitem class="username">root</systemitem> user:
263 </para>
264
265<screen role="root"><userinput>ninja install</userinput></screen>
266
267 <para>
268 If desired, install the optional documentation by running
269 the following commands as the
270 <systemitem class="username">root</systemitem> user:
271 </para>
272
273<screen role="root"><userinput>install -v -dm755 /usr/share/doc/mesa-&mesa-version; &amp;&amp;
274cp -rfv ../docs/* /usr/share/doc/mesa-&mesa-version;</userinput></screen>
275
276 </sect2>
277
278 <sect2 role="commands">
279 <title>Command Explanations</title>
280
281 <para>
282 <parameter>--buildtype=release</parameter>: This switch ensures a
283 fully-optimized build, and disables debug assertions which will
284 severely slow down the libraries in certain use-cases. Without this
285 switch, build sizes can span into the 2GB range.
286 </para>
287
288 <para>
289 <parameter>-Ddri-drivers="..."</parameter>: This parameter
290 controls which (non-gallium) dri drivers should be built.
291 </para>
292
293 <para>
294 <parameter>-Dgallium-drivers="..."</parameter>: This parameter
295 controls which Gallium3D drivers should be built.
296 </para>
297
298 <para>
299 <parameter>-Dgallium-nine=false</parameter>: Prevents building
300 support for (MS Windows) games designed for DX9. Set it to true if
301 this support is desired.
302 </para>
303<!--
304 <para>
305 <parameter>-Dosmesa=true</parameter>: This switch enables building
306 the <filename class="libraryfile">libOSMesa</filename> library and
307 provides Gallium3D support in it. It requires the swrast gallium driver.
308 </para>
309-->
310<!--
311 <para>
312 <parameter>-Dplatforms="..."</parameter>: This parameter
313 controls which platforms EGL will be built for. Available
314 linux X86 platforms are drm, x11, wayland, and surfaceless.
315 </para>
316-->
317 <para>
318 <parameter>-Dvalgrind=disabled</parameter>: This parameter disables
319 the usage of Valgrind during the build process. Remove this parameter
320 if you have Valgrind installed, and wish to check for memory leaks.
321 </para>
322
323 <para>
324 <parameter>-Dlibunwind=disabled</parameter>: This parameter disables
325 the usage of libunwind.
326 </para>
327
328<!--
329 <para>
330 <parameter>- -enable-xa</parameter>: This switch enables building the
331 XA X Acceleration API (Required for VMware 3D Driver).
332 </para>
333
334 <para>
335 <parameter>- -enable-gbm</parameter>: This switch enables building the
336 <application>Mesa</application> Graphics Buffer Manager library.
337 </para>
338 These two seem to be automatic in 19.0 - ken
339
340 <para>
341 <parameter>- -enable-glx-tls</parameter>: This switch enables TLS (Thread Local
342 Storage) support in GLX.
343 </para>
344-->
345 <para>
346 <option>-Dbuild-tests=true</option>: This option will cause the test code
347 to be enabled. To run the tests, issue: <command>ninja test</command>.
348 </para>
349
350 </sect2>
351
352 <sect2 role="content">
353 <title>Contents</title>
354
355 <segmentedlist>
356 <segtitle>Installed Programs</segtitle>
357 <segtitle>Installed Libraries</segtitle><!-- in /usr/lib -->
358 <segtitle>Installed Drivers</segtitle><!-- in /usr/lib/<subdir> -->
359 <segtitle>Installed Directories</segtitle>
360
361 <seglistitem>
362 <seg>
363 glxgears and glxinfo
364 </seg>
365 <seg>
366 libEGL.so,
367 libGL.so,
368 libGLESv1_CM.so,
369 libGLESv2.so,
370 libOSMesa.so,
371 libXvMCnouveau.so,
372 libXvMCr600.so,
373 libgbm.so,
374 libglapi.so,
375 <!-- Begin Vulkan drivers -->
376 libvulkan_intel.so,
377 libvulkan_lvp.so,
378 libvulkan_radeon.so, and
379 <!-- End Vulkan drivers -->
380 libxatracker.so,
381 </seg>
382 <seg>
383 <!-- Begini gallium DRI drivers : this is the full set -->
384 d3dadapter9.so (optional), <!-- For Windows games. This is DirectX's
385 Direct3D -->
386 crocus_dri.so,
387 i830_dri.so,
388 i915_dri.so,
389 i965_dri.so,
390 iris_dri.so,
391 kms_swrast_dri.so,
392 nouveau_dri.so,
393 nouveau_drv_video.so,
394 nouveau_vieux_dri.so,
395 r200_dri.so (optional),
396 r300_dri.so (optional),
397 r600_dri.so,
398 r600_drv_video.so,
399 radeon_dri.so (optional),
400 radeonsi_dri.so,
401 radeonsi_drv_video.so,
402 swrast_dri.so,
403 virtio_gpu_dri.so,
404 vmwgfx_dri.so,
405 <!-- End DRI Drivers -->
406 <!-- Begin VDPAU drivers -->
407 libvdpau_nouveau.so,
408 libvdpau_r300.so (optional),
409 libvdpau_r600.so, and
410 libvdpau_radeonsi.so
411 <!-- End VDPAU drivers -->
412 (Many of these drivers are hard-linked).
413 </seg>
414 <seg>
415 $XORG_PREFIX/{include/{EGL,GL,GLES,GLES2,GLES3,KHR,vulkan},lib/{dri,vdpau}},
416 $XORG_PREFIX/include/d3adapter (optional),
417 $XORG_PREFIX/lib/d3d (optional),
418 $XORG_PREFIX/share/drirc.d (contains workarounds for various applications,
419 particularly browsers and games)
420 $XORG_PREFIX/share/vulkan/icd.d,
421 and
422 /usr/share/doc/mesa-&mesa-version; (optional)
423 </seg>
424 </seglistitem>
425 </segmentedlist>
426
427 <variablelist>
428 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
429 <?dbfo list-presentation="list"?>
430 <?dbhtml list-presentation="table"?>
431
432 <varlistentry id="glxgears">
433 <term><command>glxgears</command></term>
434 <listitem>
435 <para>
436 is a GL demo useful for troubleshooting graphics
437 problems
438 </para>
439 <indexterm zone="mesa glxgears">
440 <primary sortas="b-glxgears">glxgears</primary>
441 </indexterm>
442 </listitem>
443 </varlistentry>
444
445 <varlistentry id="glxinfo">
446 <term><command>glxinfo</command></term>
447 <listitem>
448 <para>
449 is a diagnostic program that displays information about the
450 graphics hardware and installed GL libraries
451 </para>
452 <indexterm zone="mesa glxinfo">
453 <primary sortas="b-glxinfo">glxinfo</primary>
454 </indexterm>
455 </listitem>
456 </varlistentry>
457
458 <varlistentry id="libEGL">
459 <term><filename class="libraryfile">libEGL.so</filename></term>
460 <listitem>
461 <para>
462 provides a native platform graphics interface as
463 defined by the EGL-1.4 specification
464 </para>
465 <indexterm zone="mesa libEGL">
466 <primary sortas="c-libGL">libEGL.so</primary>
467 </indexterm>
468 </listitem>
469 </varlistentry>
470
471 <varlistentry id="libgbm">
472 <term><filename class="libraryfile">libgbm.so</filename></term>
473 <listitem>
474 <para>
475 is the <application>Mesa</application> Graphics Buffer
476 Manager library
477 </para>
478 <indexterm zone="mesa libgbm">
479 <primary sortas="c-libgbm">libgbm.so</primary>
480 </indexterm>
481 </listitem>
482 </varlistentry>
483
484 <varlistentry id="libGLESv1_CM">
485 <term><filename class="libraryfile">libGLESv1_CM.so</filename></term>
486 <listitem>
487 <para>
488 is the <application>Mesa</application> OpenGL ES 1.1 library
489 </para>
490 <indexterm zone="mesa libGLESv1_CM">
491 <primary sortas="c-libGLESv1_CM">libGLESv1_CM.so</primary>
492 </indexterm>
493 </listitem>
494 </varlistentry>
495
496 <varlistentry id="libGLES2">
497 <term><filename class="libraryfile">libGLES2.so</filename></term>
498 <listitem>
499 <para>
500 is the <application>Mesa</application> OpenGL ES 2.0 library
501 </para>
502 <indexterm zone="mesa libGLES2">
503 <primary sortas="c-libGLES2">libGLES2.so</primary>
504 </indexterm>
505 </listitem>
506 </varlistentry>
507
508 <varlistentry id="libGL">
509 <term><filename class="libraryfile">libGL.so</filename></term>
510 <listitem>
511 <para>
512 is the main <application>Mesa</application> OpenGL library
513 </para>
514 <indexterm zone="mesa libGL">
515 <primary sortas="c-libGL">libGL.so</primary>
516 </indexterm>
517 </listitem>
518 </varlistentry>
519
520 <varlistentry id="libOSMesa">
521 <term><filename class="libraryfile">libOSMesa.so</filename></term>
522 <listitem>
523 <para>
524 is the <application>Mesa</application> Off-screen Rendering library
525 </para>
526 <indexterm zone="mesa libOSMesa">
527 <primary sortas="c-libOSMesa">libOSMesa.so</primary>
528 </indexterm>
529 </listitem>
530 </varlistentry>
531
532 </variablelist>
533
534 </sect2>
535
536</sect1>
Note: See TracBrowser for help on using the repository browser.