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

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 3f495c6 was 3f495c6, checked in by Bruce Dubbs <bdubbs@…>, 18 months ago

Update to mesa-22.2.2.

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