source: x/installing/mesa.xml@ 8b2b100

12.0 12.1 kea ken/TL2024 ken/tuningfonts lazarus lxqt plabs/newcss python3.11 rahul/power-profiles-daemon renodr/vulkan-addition trunk xry111/llvm18 xry111/xf86-video-removal
Last change on this file since 8b2b100 was 94c702f, checked in by Bruce Dubbs <bdubbs@…>, 13 months ago

Update to mesa-23.1.1.

  • Property mode set to 100644
File size: 17.4 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 "649177ce45f752c75b657288f3fc609a">
10 <!ENTITY mesa-size "17 MB">
11 <!ENTITY mesa-buildsize "462 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://www.vulkan.org/">libvulkan</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 <para condition="html" role="usernotes">User Notes:
151 <ulink url="&blfs-wiki;/mesalib"/>
152 </para>
153 </sect2>
154
155 <sect2 role="installation">
156 <title>Installation of Mesa</title>
157
158 <para>
159 If you have downloaded the xdemos patch (needed if testing the Xorg
160 installation per BLFS instructions), apply it by running the following
161 command:
162 </para>
163
164<!--<screen><userinput>patch -Np1 -i ../mesa-&mesa-version;-add_xdemos-1.patch</userinput></screen>-->
165<screen><userinput>patch -Np1 -i ../mesa-add_xdemos-2.patch</userinput></screen>
166
167 <!-- Note that freedreno, vc4, and virgl all need special support from
168 libdrm - renodr
169 For me, libdrm does not mention virgl, but mesa accepts it. AFAICS
170 freedreno is for qualcom hardware, libdrm will build for it on suitable
171 systems. VC4 is for the Broadcom VC4 used in the raspberry pi - ken -->
172<!--
173 <note>
174 <para>
175 The measurements above, and the Contents below, are for a full build.
176 Many people will not wish to install drivers they cannot use, so the
177 following paragraphs explain how to limit the drivers, and give an
178 example which can be be reduced or amended as necessary.
179 </para>
180 </note>
181
182 <para>
183 Now, select the drivers you wish to install. For the X86 architecture, the
184 available gallium drivers are auto (<emphasis>in 21.2.1 this does not select
185 crocus </emphasis>), <emphasis>or alternatively a choice from</emphasis>
186 crocus, i915, iris, nouveau, r300, r600, radeonsi, svga, swrast, and virgl.
187 The latter can provide acceleration in <xref linkend="qemu"/> if that has
188 been linked against
189 <ulink url="https://gitlab.freedesktop.org/virgl/virglrenderer/~/releases/">virglrenderer</ulink>
190 (you will need a freedesktop.org account to get to that page, you can
191 download the 0.9.1 release without an account from
192 <ulink url="https://gitlab.freedesktop.org/virgl/virglrenderer/-/archive/0.9.1/virglrenderer-0.9.1.tar.bz2">virglrenderer-0.9.1</ulink>).-->
193
194<!-- If you wish to build all available gallium drivers,
195 use 'auto'. FIXME : does not build crocus in 21.2.1 -->
196
197 <!-- crocus was added to the default x86/x86_64 drivers for meson in the
198 master branch on 2021-08-31, at some point it will appear in a stable release
199 </para>
200-->
201<!--
202 <para>
203 The (non-gallium) DRI drivers available in X86 are auto, <emphasis>or
204 alternatively a choice from</emphasis> i915, i965, nouveau, r100, r200,
205 and swrast. Use 'auto' to build all available DRI drivers, or use an
206 empty string (DRI_DRIVERS="") if you wish to only build gallium drivers.
207 </para>
208
209 <para>
210 The platforms ("window systems") available for X86 linux are x11, wayland,
211 drm, and surfaceless. By not specifying anything, the meson
212 build-system will build for all these platforms if you have the
213 dependencies, identical to if you had specified '-Dplatforms=auto'.
214 </para>
215
216 <para>
217 Modify the commands below for your desired drivers. The drivers listed
218 below will cover most modern video cards and virtual machines. For help in
219 selecting drivers see <ulink url="https://docs.mesa3d.org/systems.html"/>.
220-->
221 <!-- these two don't seem to be mentioned in that mesa link -->
222<!--
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
238 <para>
239 Install <application>Mesa</application> by running the following
240 commands:
241 </para>
242
243<screen><userinput>mkdir build &amp;&amp;
244cd build &amp;&amp;
245
246meson setup \
247 --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
256ninja</userinput></screen>
257
258 <para>
259 To test the results, issue:
260 <command>meson configure -Dbuild-tests=true &amp;&amp; ninja test</command>.
261 </para>
262<!-- All 88 tests passed for me for 22.3.3 [pierre]
263 All 90 tests passed for me for 23.1.0 [bdubbs]
264-->
265
266 <para>
267 Now, as the <systemitem class="username">root</systemitem> user:
268 </para>
269
270<screen role="root"><userinput>ninja install</userinput></screen>
271
272 <para>
273 If desired, install the optional documentation by running
274 the following commands as the
275 <systemitem class="username">root</systemitem> user:
276 </para>
277
278<screen role="root"
279 remap="doc"><userinput>install -v -dm755 /usr/share/doc/mesa-&mesa-version; &amp;&amp;
280cp -rfv ../docs/* /usr/share/doc/mesa-&mesa-version;</userinput></screen>
281
282 </sect2>
283
284 <sect2 role="commands">
285 <title>Command Explanations</title>
286
287 <para>
288 <parameter>--buildtype=release</parameter>: This switch ensures a
289 fully-optimized build, and disables debug assertions which will
290 severely slow down the libraries in certain use-cases. Without this
291 switch, build sizes can span into the 2GB range.
292 </para>
293
294 <para>
295 <parameter>-Dgallium-drivers="..."</parameter>: This parameter
296 controls which Gallium3D drivers should be built.
297 </para>
298<!--
299 <para>
300 <parameter>-Dosmesa=true</parameter>: This switch enables building
301 the <filename class="libraryfile">libOSMesa</filename> library and
302 provides Gallium3D support in it. It requires the swrast gallium driver.
303 </para>
304-->
305
306 <para>
307 <parameter>-Dplatforms="..."</parameter>: This parameter
308 controls which windowing systems will be supported. Available
309 linux platforms are x11 and wayland.
310 </para>
311
312 <para>
313 <parameter>-Dvulkan-drivers=""</parameter>: This switch allows choosing
314 which Vulkan drivers are built. The default is auto, but this requires
315 the optional dependency <filename>glslang</filename>. So it is better
316 to pass an empty list, in order to remove the need for that
317 dependency. Nothing in BLFS uses Vulkan anyway.
318 </para>
319
320 <para>
321 <parameter>-Dvalgrind=disabled</parameter>: This parameter disables
322 the usage of Valgrind during the build process. Remove this parameter
323 if you have Valgrind installed, and wish to check for memory leaks.
324 </para>
325
326 <para>
327 <parameter>-Dlibunwind=disabled</parameter>: This parameter disables
328 the usage of libunwind.
329 </para>
330
331 <para>
332 <command>meson configure -Dbuild-tests=true</command>: This command will
333 reconfigure the build to set <option>-Dbuild-tests=true</option>, but
334 keep the other options specified in the <command>meson setup</command>
335 command unchanged. It allows <command>ninja test</command> to build and
336 run unit tests.
337 </para>
338
339 <para>
340 <option>-Degl-native-platform="..."</option>: This parameter
341 controls which Embedded Graphics Library support will be built. Available
342 linux options are auto (default), x11, wayland, surfaceless, and drm.
343 </para>
344
345 </sect2>
346
347 <sect2 role="content">
348 <title>Contents</title>
349
350 <segmentedlist>
351 <segtitle>Installed Programs</segtitle>
352 <segtitle>Installed Libraries</segtitle><!-- in /usr/lib -->
353 <segtitle>Installed Drivers</segtitle><!-- in /usr/lib/<subdir> -->
354 <segtitle>Installed Directories</segtitle>
355
356 <seglistitem>
357 <seg>
358 glxgears and glxinfo
359 </seg>
360 <seg>
361 libEGL.so,
362 libGL.so,
363 libGLESv1_CM.so,
364 libGLESv2.so,
365 libgbm.so,
366 libglapi.so, and
367 libxatracker.so
368 </seg>
369 <seg>
370 <!-- Begin gallium DRI drivers : this is the full set -->
371<!-- d3dadapter9.so (optional), For Windows games. This is DirectX's
372 Direct3D -->
373 crocus_dri.so,
374 i915_dri.so,
375 iris_dri.so,
376 kms_swrast_dri.so,
377 nouveau_dri.so,
378 nouveau_drv_video.so,
379 r300_dri.so,
380 r600_dri.so,
381 r600_drv_video.so,
382 radeonsi_dri.so,
383 radeonsi_drv_video.so,
384 swrast_dri.so,
385 virtio_gpu_dri.so,
386 virtio_gpu_drv_video.so,
387 vmwgfx_dri.so,
388 <!-- End DRI Drivers -->
389 <!-- Begin VDPAU drivers -->
390 libvdpau_nouveau.so,
391 libvdpau_r300.so
392 libvdpau_r600.so, and
393 libvdpau_radeonsi.so
394 libvdpau_virtio_gpu.so
395 <!-- End VDPAU drivers -->
396 (Many of these drivers are hard-linked).
397 </seg>
398 <seg>
399 <!-- $XORG_PREFIX/include/GL is installed by xorg-protos -->
400 $XORG_PREFIX/{include/{EGL,GLES,GLES2,GLES3,KHR},
401 $XORG_PREFIX/lib/{dri,vdpau}},
402 $XORG_PREFIX/share/drirc.d (contains workarounds for various applications,
403 particularly browsers and games),
404 and /usr/share/doc/mesa-&mesa-version;
405 </seg>
406 </seglistitem>
407 </segmentedlist>
408
409 <variablelist>
410 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
411 <?dbfo list-presentation="list"?>
412 <?dbhtml list-presentation="table"?>
413
414 <varlistentry id="glxgears">
415 <term><command>glxgears</command></term>
416 <listitem>
417 <para>
418 is a GL demo useful for troubleshooting graphics
419 problems
420 </para>
421 <indexterm zone="mesa glxgears">
422 <primary sortas="b-glxgears">glxgears</primary>
423 </indexterm>
424 </listitem>
425 </varlistentry>
426
427 <varlistentry id="glxinfo">
428 <term><command>glxinfo</command></term>
429 <listitem>
430 <para>
431 is a diagnostic program that displays information about the
432 graphics hardware and installed GL libraries
433 </para>
434 <indexterm zone="mesa glxinfo">
435 <primary sortas="b-glxinfo">glxinfo</primary>
436 </indexterm>
437 </listitem>
438 </varlistentry>
439
440 <varlistentry id="libEGL">
441 <term><filename class="libraryfile">libEGL.so</filename></term>
442 <listitem>
443 <para>
444 provides a native platform graphics interface as
445 defined by the EGL-1.4 specification
446 </para>
447 <indexterm zone="mesa libEGL">
448 <primary sortas="c-libGL">libEGL.so</primary>
449 </indexterm>
450 </listitem>
451 </varlistentry>
452
453 <varlistentry id="libgbm">
454 <term><filename class="libraryfile">libgbm.so</filename></term>
455 <listitem>
456 <para>
457 is the <application>Mesa</application> Graphics Buffer
458 Manager library
459 </para>
460 <indexterm zone="mesa libgbm">
461 <primary sortas="c-libgbm">libgbm.so</primary>
462 </indexterm>
463 </listitem>
464 </varlistentry>
465
466 <varlistentry id="libGLESv1_CM">
467 <term><filename class="libraryfile">libGLESv1_CM.so</filename></term>
468 <listitem>
469 <para>
470 is the <application>Mesa</application> OpenGL ES 1.1 library
471 </para>
472 <indexterm zone="mesa libGLESv1_CM">
473 <primary sortas="c-libGLESv1_CM">libGLESv1_CM.so</primary>
474 </indexterm>
475 </listitem>
476 </varlistentry>
477
478 <varlistentry id="libGLES2">
479 <term><filename class="libraryfile">libGLES2.so</filename></term>
480 <listitem>
481 <para>
482 is the <application>Mesa</application> OpenGL ES 2.0 library
483 </para>
484 <indexterm zone="mesa libGLES2">
485 <primary sortas="c-libGLES2">libGLES2.so</primary>
486 </indexterm>
487 </listitem>
488 </varlistentry>
489
490 <varlistentry id="libGL">
491 <term><filename class="libraryfile">libGL.so</filename></term>
492 <listitem>
493 <para>
494 is the main <application>Mesa</application> OpenGL library
495 </para>
496 <indexterm zone="mesa libGL">
497 <primary sortas="c-libGL">libGL.so</primary>
498 </indexterm>
499 </listitem>
500 </varlistentry>
501
502 </variablelist>
503
504 </sect2>
505
506</sect1>
Note: See TracBrowser for help on using the repository browser.