source: x/installing/mesa.xml@ e5324803

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 xry111/llvm18 xry111/xf86-video-removal
Last change on this file since e5324803 was 3f2db3a6, checked in by Pierre Labastie <pierre.labastie@…>, 17 months ago

Remove sect1info tags

They only contain a date tag that is nowhere used.

  • Property mode set to 100644
File size: 17.3 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 "a258a3d590d76bc1ff89a204f063e3b8">
10 <!ENTITY mesa-size "16 MB">
11 <!ENTITY mesa-buildsize "463 MB (with docs, add 230 MB for tests)">
12 <!ENTITY mesa-time "2.4 SBU (Using parallelism=4; with docs, add 0.6 SBU for tests)">
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 &lfs112_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 <listitem>
79 <para>
80 Recommended patch:
81 <ulink url="&patch-root;/mesa-&mesa-version;-add_xdemos-1.patch"/>
82 (installs 2 demo programs for testing Mesa - not needed if you
83 install the <ulink url="https://archive.mesa3d.org/demos/">
84 mesa-demos</ulink> package)
85 </para>
86 </listitem>
87 </itemizedlist>
88
89 <bridgehead renderas="sect3">Mesa Dependencies</bridgehead>
90
91 <bridgehead renderas="sect4">Required</bridgehead>
92 <para role="required">
93 <xref linkend="xorg7-lib"/>,
94 <xref linkend="libdrm"/>, and
95 <xref linkend="Mako"/>
96 </para>
97
98 <bridgehead renderas="sect4">Recommended</bridgehead>
99 <para role="recommended">
100
101 <xref role="first" linkend="libva"/> (to provide VA-API support for some
102 gallium drivers, note that there is a circular dependency. You must
103 build <application>libva</application> first without EGL and GLX support,
104 install this package, and rebuild <application>libva</application>),
105
106 <xref linkend="libvdpau"/> (to build VDPAU drivers),
107
108 <xref linkend="llvm"/> (required for Gallium3D, nouveau, and radeonsi
109 drivers and for swrast, the software rasterizer which is sometimes referred
110 to as llvmpipe. See <ulink role="nodep"
111 url="https://docs.mesa3d.org/systems.html"/> for more information), and
112
113 <xref linkend="wayland-protocols"/> (required for
114 <xref role="nodep" linkend='plasma5-build'/>,
115 GNOME, and recommended for <xref role="nodep" linkend='gtk3'/>)
116 </para>
117
118 <bridgehead renderas="sect4">Optional</bridgehead>
119 <para role="optional">
120 <xref linkend="libgcrypt"/>,
121 <xref linkend="libunwind"/>,
122 <xref linkend="lm_sensors"/> <!-- for libsensors according to Meson -->,
123 <xref linkend="nettle"/>,
124 <xref linkend="valgrind"/>,
125 <ulink url="https://archive.mesa3d.org/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="https://github.com/KhronosGroup/glslang">glslang</ulink>
132 (for vulkan drivers),
133 <ulink url="https://github.com/tizonia/tizonia-openmax-il/wiki/Tizonia-OpenMAX-IL/">
134 libtizonia</ulink>, and
135 <ulink url="https://www.vulkan.org/">libvulkan</ulink>
136 </para>
137<!--
138 <note>
139 <para>
140 The instructions below assume that
141 <application>LLVM</application> with the r600/amdgpu and host backends
142 and run-time type information (RTTI - needed for nouveau) are installed.
143 You will need to modify the instructions if you
144 choose not to install all of these. For an explanation of Gallium3D see
145 <ulink url="https://en.wikipedia.org/wiki/Gallium3D"/>.
146 </para>
147 </note>
148-->
149 <para condition="html" role="usernotes">User Notes:
150 <ulink url="&blfs-wiki;/mesalib"/>
151 </para>
152 </sect2>
153
154 <sect2 role="installation">
155 <title>Installation of Mesa</title>
156
157 <para>
158 If you have downloaded the xdemos patch (needed if testing the Xorg
159 installation per BLFS instructions), apply it by running the following
160 command:
161 </para>
162
163<screen><userinput>patch -Np1 -i ../mesa-&mesa-version;-add_xdemos-1.patch</userinput></screen>
164
165 <!-- Note that freedreno, vc4, and virgl all need special support from
166 libdrm - renodr
167 For me, libdrm does not mention virgl, but mesa accepts it. AFAICS
168 freedreno is for qualcom hardware, libdrm will build for it on suitable
169 systems. VC4 is for the Broadcom VC4 used in the raspberry pi - ken -->
170<!--
171 <note>
172 <para>
173 The measurements above, and the Contents below, are for a full build.
174 Many people will not wish to install drivers they cannot use, so the
175 following paragraphs explain how to limit the drivers, and give an
176 example which can be be reduced or amended as necessary.
177 </para>
178 </note>
179
180 <para>
181 Now, select the drivers you wish to install. For the X86 architecture, the
182 available gallium drivers are auto (<emphasis>in 21.2.1 this does not select
183 crocus </emphasis>), <emphasis>or alternatively a choice from</emphasis>
184 crocus, i915, iris, nouveau, r300, r600, radeonsi, svga, swrast, and virgl.
185 The latter can provide acceleration in <xref linkend="qemu"/> if that has
186 been linked against
187 <ulink url="https://gitlab.freedesktop.org/virgl/virglrenderer/~/releases/">virglrenderer</ulink>
188 (you will need a freedesktop.org account to get to that page, you can
189 download the 0.9.1 release without an account from
190 <ulink url="https://gitlab.freedesktop.org/virgl/virglrenderer/-/archive/0.9.1/virglrenderer-0.9.1.tar.bz2">virglrenderer-0.9.1</ulink>).-->
191
192<!-- 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<!--
200 <para>
201 The (non-gallium) DRI drivers available in X86 are auto, <emphasis>or
202 alternatively a choice from</emphasis> i915, i965, nouveau, r100, r200,
203 and swrast. Use 'auto' to build all available DRI drivers, or use an
204 empty string (DRI_DRIVERS="") if you wish to only build gallium drivers.
205 </para>
206
207 <para>
208 The platforms ("window systems") available for X86 linux are x11, wayland,
209 drm, and surfaceless. By not specifying anything, the meson
210 build-system will build for all these platforms if you have the
211 dependencies, identical to if you had specified '-Dplatforms=auto'.
212 </para>
213
214 <para>
215 Modify the commands below for your desired drivers. The drivers listed
216 below will cover most modern video cards and virtual machines. For help in
217 selecting drivers see <ulink url="https://docs.mesa3d.org/systems.html"/>.
218-->
219 <!-- these two don't seem to be mentioned in that mesa link -->
220<!--
221 For intel drivers, specify crocus for i965 gen 4 through to haswell, iris
222 for broadwell and later.
223 </para>
224
225 <note>
226 <para>
227 Although the nouveau drivers can be built for both gallium and dri, the
228 i915 driver can only be built for one or the other.
229 </para>
230 </note>
231
232<screen><userinput>GALLIUM_DRV="crocus,i915,iris,nouveau,r600,radeonsi,svga,swrast,virgl"
233DRI_DRIVERS="i965,nouveau"</userinput></screen>
234-->
235
236 <para>
237 Install <application>Mesa</application> by running the following
238 commands:
239 </para>
240
241<screen><userinput>mkdir build &amp;&amp;
242cd build &amp;&amp;
243
244meson --prefix=$XORG_PREFIX \
245 --buildtype=release \
246 -Dplatforms=x11,wayland \
247 -Dgallium-drivers=auto \
248 -Dvulkan-drivers="" \
249 -Dvalgrind=disabled \
250 -Dlibunwind=disabled \
251 .. &amp;&amp;
252<!-- Removed for 22.2.1: seems to be the default -Dglx=dri \ -->
253ninja</userinput></screen>
254
255 <para>
256 If you built the tests (see 'Command Explanations'), to run them issue:
257 <command>ninja test</command>.
258 </para>
259<!-- All tests passed for me for 21.2.4 [pierre]
260 All 33 subtests tests in the mesa:compiler+glsl / glsl compiler warnings
261 suite are known to fail.
262
263 For 22.1.0:
264 Ok: 74
265 Expected Fail: 0
266 Fail: 0
267 Unexpected Pass: 0
268 Skipped: 0
269 Timeout: 0
270-->
271
272 <para>
273 Now, as the <systemitem class="username">root</systemitem> user:
274 </para>
275
276<screen role="root"><userinput>ninja install</userinput></screen>
277
278 <para>
279 If desired, install the optional documentation by running
280 the following commands as the
281 <systemitem class="username">root</systemitem> user:
282 </para>
283
284<screen role="root"
285 remap="doc"><userinput>install -v -dm755 /usr/share/doc/mesa-&mesa-version; &amp;&amp;
286cp -rfv ../docs/* /usr/share/doc/mesa-&mesa-version;</userinput></screen>
287
288 </sect2>
289
290 <sect2 role="commands">
291 <title>Command Explanations</title>
292
293 <para>
294 <parameter>--buildtype=release</parameter>: This switch ensures a
295 fully-optimized build, and disables debug assertions which will
296 severely slow down the libraries in certain use-cases. Without this
297 switch, build sizes can span into the 2GB range.
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>-Dosmesa=true</parameter>: This switch enables building
307 the <filename class="libraryfile">libOSMesa</filename> library and
308 provides Gallium3D support in it. It requires the swrast gallium driver.
309 </para>
310-->
311
312 <para>
313 <parameter>-Dplatforms="..."</parameter>: This parameter
314 controls which windowing systems will be supported. Available
315 linux platforms are x11 and wayland.
316 </para>
317
318 <para>
319 <parameter>-Dvulkan-drivers=""</parameter>: This switch allows choosing
320 which Vulkan drivers are built. The default is auto, but this requires
321 the optional dependency <filename>glslang</filename>. So it is better
322 to pass an empty list, in order to remove the need for that
323 dependency. Nothing in BLFS uses Vulkan anyway.
324 </para>
325
326 <para>
327 <parameter>-Dvalgrind=disabled</parameter>: This parameter disables
328 the usage of Valgrind during the build process. Remove this parameter
329 if you have Valgrind installed, and wish to check for memory leaks.
330 </para>
331
332 <para>
333 <parameter>-Dlibunwind=disabled</parameter>: This parameter disables
334 the usage of libunwind.
335 </para>
336
337 <para>
338 <option>-Dbuild-tests=true</option>: This switch will cause the test code
339 to be enabled.
340 </para>
341
342 <para>
343 <option>-Degl-native-platform="..."</option>: This parameter
344 controls which Embedded Graphics Library support will be built. Available
345 linux options are auto (default), x11, wayland, surfaceless, and drm.
346 </para>
347
348 </sect2>
349
350 <sect2 role="content">
351 <title>Contents</title>
352
353 <segmentedlist>
354 <segtitle>Installed Programs</segtitle>
355 <segtitle>Installed Libraries</segtitle><!-- in /usr/lib -->
356 <segtitle>Installed Drivers</segtitle><!-- in /usr/lib/<subdir> -->
357 <segtitle>Installed Directories</segtitle>
358
359 <seglistitem>
360 <seg>
361 glxgears and glxinfo
362 </seg>
363 <seg>
364 libEGL.so,
365 libGL.so,
366 libGLESv1_CM.so,
367 libGLESv2.so,
368 libXvMCnouveau.so,
369 libXvMCr600.so,
370 libgbm.so,
371 libglapi.so, and
372 libxatracker.so
373 </seg>
374 <seg>
375 <!-- Begin gallium DRI drivers : this is the full set -->
376<!-- d3dadapter9.so (optional), For Windows games. This is DirectX's
377 Direct3D -->
378 crocus_dri.so,
379 i915_dri.so,
380 iris_dri.so,
381 kms_swrast_dri.so,
382 nouveau_dri.so,
383 nouveau_drv_video.so,
384 r300_dri.so,
385 r600_dri.so,
386 r600_drv_video.so,
387 radeonsi_dri.so,
388 radeonsi_drv_video.so,
389 swrast_dri.so,
390 virtio_gpu_dri.so,
391 vmwgfx_dri.so,
392 <!-- End DRI Drivers -->
393 <!-- Begin VDPAU drivers -->
394 libvdpau_nouveau.so,
395 libvdpau_r300.so
396 libvdpau_r600.so, and
397 libvdpau_radeonsi.so
398 <!-- End VDPAU drivers -->
399 (Many of these drivers are hard-linked).
400 </seg>
401 <seg>
402 <!-- $XORG_PREFIX/include/GL is installed by xorg-protos -->
403 $XORG_PREFIX/{include/{EGL,GLES,GLES2,GLES3,KHR},
404 $XORG_PREFIX/lib/{dri,vdpau}},
405 $XORG_PREFIX/share/drirc.d (contains workarounds for various applications,
406 particularly browsers and games),
407 and /usr/share/doc/mesa-&mesa-version;
408 </seg>
409 </seglistitem>
410 </segmentedlist>
411
412 <variablelist>
413 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
414 <?dbfo list-presentation="list"?>
415 <?dbhtml list-presentation="table"?>
416
417 <varlistentry id="glxgears">
418 <term><command>glxgears</command></term>
419 <listitem>
420 <para>
421 is a GL demo useful for troubleshooting graphics
422 problems
423 </para>
424 <indexterm zone="mesa glxgears">
425 <primary sortas="b-glxgears">glxgears</primary>
426 </indexterm>
427 </listitem>
428 </varlistentry>
429
430 <varlistentry id="glxinfo">
431 <term><command>glxinfo</command></term>
432 <listitem>
433 <para>
434 is a diagnostic program that displays information about the
435 graphics hardware and installed GL libraries
436 </para>
437 <indexterm zone="mesa glxinfo">
438 <primary sortas="b-glxinfo">glxinfo</primary>
439 </indexterm>
440 </listitem>
441 </varlistentry>
442
443 <varlistentry id="libEGL">
444 <term><filename class="libraryfile">libEGL.so</filename></term>
445 <listitem>
446 <para>
447 provides a native platform graphics interface as
448 defined by the EGL-1.4 specification
449 </para>
450 <indexterm zone="mesa libEGL">
451 <primary sortas="c-libGL">libEGL.so</primary>
452 </indexterm>
453 </listitem>
454 </varlistentry>
455
456 <varlistentry id="libgbm">
457 <term><filename class="libraryfile">libgbm.so</filename></term>
458 <listitem>
459 <para>
460 is the <application>Mesa</application> Graphics Buffer
461 Manager library
462 </para>
463 <indexterm zone="mesa libgbm">
464 <primary sortas="c-libgbm">libgbm.so</primary>
465 </indexterm>
466 </listitem>
467 </varlistentry>
468
469 <varlistentry id="libGLESv1_CM">
470 <term><filename class="libraryfile">libGLESv1_CM.so</filename></term>
471 <listitem>
472 <para>
473 is the <application>Mesa</application> OpenGL ES 1.1 library
474 </para>
475 <indexterm zone="mesa libGLESv1_CM">
476 <primary sortas="c-libGLESv1_CM">libGLESv1_CM.so</primary>
477 </indexterm>
478 </listitem>
479 </varlistentry>
480
481 <varlistentry id="libGLES2">
482 <term><filename class="libraryfile">libGLES2.so</filename></term>
483 <listitem>
484 <para>
485 is the <application>Mesa</application> OpenGL ES 2.0 library
486 </para>
487 <indexterm zone="mesa libGLES2">
488 <primary sortas="c-libGLES2">libGLES2.so</primary>
489 </indexterm>
490 </listitem>
491 </varlistentry>
492
493 <varlistentry id="libGL">
494 <term><filename class="libraryfile">libGL.so</filename></term>
495 <listitem>
496 <para>
497 is the main <application>Mesa</application> OpenGL library
498 </para>
499 <indexterm zone="mesa libGL">
500 <primary sortas="c-libGL">libGL.so</primary>
501 </indexterm>
502 </listitem>
503 </varlistentry>
504
505 </variablelist>
506
507 </sect2>
508
509</sect1>
Note: See TracBrowser for help on using the repository browser.