source: x/installing/mesa.xml@ ef936e4

11.0 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 ef936e4 was ef936e4, checked in by Ken Moffat <ken@…>, 3 years ago

Update to meson-21.2.1.

  • Property mode set to 100644
File size: 18.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 "f81336168864b1f890edfa5db8587f2b">
10 <!ENTITY mesa-size "15 MB">
11 <!ENTITY mesa-buildsize "799 MB (with docs, add 376 MB if running the tests)">
12 <!-- using NINJAJOBS=6 -->
13 <!ENTITY mesa-time "5.1 SBU (on a 4-core machine with docs)">
14]>
15
16<sect1 id="mesa" xreflabel="Mesa-&mesa-version;">
17 <?dbhtml filename="mesa.html"?>
18
19 <sect1info>
20 <date>$Date$</date>
21 </sect1info>
22
23 <title>Mesa-&mesa-version;</title>
24
25 <indexterm zone="mesa">
26 <primary sortas="a-Mesa">Mesa</primary>
27 </indexterm>
28
29 <sect2 role="package">
30 <title>Introduction to Mesa</title>
31
32 <para>
33 <application>Mesa</application> is an OpenGL compatible 3D graphics
34 library.
35 </para>
36
37 <note>
38 <para>
39 <application>Mesa</application> is updated relatively often. You may
40 want to use the latest available &mesa-major-minor;.x mesa version.
41 </para>
42 </note>
43
44 &lfs110_checked;
45
46 <bridgehead renderas="sect3">Package Information</bridgehead>
47 <itemizedlist spacing="compact">
48 <listitem>
49 <para>
50 Download (HTTP): <ulink url="&mesa-download-http;"/>
51 </para>
52 </listitem>
53 <listitem>
54 <para>
55 Download (FTP): <ulink url="&mesa-download-ftp;"/>
56 </para>
57 </listitem>
58 <listitem>
59 <para>
60 Download MD5 sum: &mesa-md5sum;
61 </para>
62 </listitem>
63 <listitem>
64 <para>
65 Download size: &mesa-size;
66 </para>
67 </listitem>
68 <listitem>
69 <para>
70 Estimated disk space required: &mesa-buildsize;
71 </para>
72 </listitem>
73 <listitem>
74 <para>
75 Estimated build time: &mesa-time;
76 </para>
77 </listitem>
78 </itemizedlist>
79
80 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
81 <itemizedlist spacing="compact">
82 <listitem>
83 <para>
84 Recommended patch:
85 <ulink url="&patch-root;/mesa-&mesa-version;-add_xdemos-1.patch"/>
86 (installs 2 demo programs for testing Mesa - not needed if you
87 install the <ulink url="ftp://ftp.freedesktop.org/pub/mesa/demos/">
88 mesa-demos</ulink> package)
89 </para>
90 </listitem>
91 </itemizedlist>
92
93 <bridgehead renderas="sect3">Mesa Dependencies</bridgehead>
94
95 <bridgehead renderas="sect4">Required</bridgehead>
96 <para role="required">
97 <xref linkend="xorg7-lib"/>,
98 <xref linkend="libdrm"/>, and
99 <xref linkend="Mako"/>
100 </para>
101
102 <bridgehead renderas="sect4">Recommended</bridgehead>
103 <para role="recommended">
104
105 <xref role="first" linkend="libva"/> (to provide VA-API support for some
106 gallium drivers, note that there is a circular dependency. You must
107 build <application>libva</application> first without EGL and GLX support,
108 install this package, and rebuild <application>libva</application>),
109 <xref linkend="libvdpau"/> (to build VDPAU drivers),
110 <xref linkend="llvm"/> (required for Gallium3D, nouveau, r300, and radeonsi
111 drivers and for swrast, the software rasterizer which is sometimes referred
112 to as llvmpipe. See <ulink role="nodep"
113 url="https://docs.mesa3d.org/systems.html"/> for more information), and
114 <xref linkend="wayland-protocols"/> (required for
115 <xref role="nodep" linkend='plasma5-build'/>,
116 <!-- <xref role="nodep" linkend='lxqt'/>, -->
117 GNOME, and recommended for <xref role="nodep" linkend='gtk3'/>)
118 </para>
119
120 <bridgehead renderas="sect4">Optional</bridgehead>
121 <para role="optional">
122 <xref linkend="libgcrypt"/>,
123 <xref linkend="lm_sensors"/> <!-- for libsensors according to Meson -->,
124 <xref linkend="nettle"/>,
125 <xref linkend="valgrind"/>,
126 <ulink url="ftp://ftp.freedesktop.org/pub/mesa/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="http://omxil.sourceforge.net/">Bellagio OpenMAX Integration
131 Layer</ulink> (for mobile platforms),
132 <ulink url="http://www.nongnu.org/libunwind/">libunwind</ulink>,
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> (for the zink driver)
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;/mesa"/>
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 <para>
172 Adjust a script file in test suite to use Python 3, instead of the
173 obsolete Python 2:
174 </para>
175
176<screen><userinput>sed '1s/python/&amp;3/' -i bin/symbols-check.py</userinput></screen>
177
178 <note>
179 <para>
180 The measurements above, and the Contents below, are for a full build.
181 Many people will not wish to install drivers they cannot use, so the
182 following paragraphs explain how to limit the drivers, and give an
183 example which can be be reduced or amended as necessary.
184 </para>
185 </note>
186
187 <para>
188 Now, select the drivers you wish to install. For the X86 architecture, the
189 available gallium drivers are auto (<emphasis>in 21.2.1 this does not select
190 crocus </emphasis>), <emphasis>or alternatively a choice from</emphasis>
191 crocus, i915, nouveau, r300, r600, radeonsi, svga, swrast, and virgl. The
192 latter is recommended if you intend to run the system under
193 <xref linkend="qemu"/>.<!-- If you wish to build all available gallium drivers,
194 use 'auto'. FIXME : does not build crocus in 21.2.1 -->
195 </para>
196
197 <para>
198 The (non-gallium) DRI drivers available in X86 are auto, <emphasis>or
199 alternatively a choice from</emphasis> i915, i965, nouveau, r100, r200,
200 and swrast. Use 'auto' to build all available DRI drivers, or use an
201 empty string (DRI_DRIVERS="") if you wish to only build gallium drivers.
202 </para>
203
204 <para>
205 The platforms ("window systems") available for X86 linux are x11, wayland,
206 <!--drm,--> and surfaceless. By not specifying anything, the meson
207 build-system will build for all these platforms if you have the
208 dependencies, identical to if you had specified '-Dplatforms=auto'.
209 </para>
210
211 <para>
212 Modify the commands below for your desired drivers. The drivers listed
213 below will cover most modern video cards and virtual machines. For help in
214 selecting drivers see <ulink url="https://docs.mesa3d.org/systems.html"/>.
215 <!-- these two don't seem to be mentioned in that mesa link -->
216 For intel drivers, specify crocus for i965 gen 4 through to haswell, iris
217 for broadwell and later.
218 </para>
219
220 <note>
221 <para>
222 Although the nouveau drivers can be built for both gallium and dri, the
223 i915 driver can only be built for one or the other.
224 </para>
225 </note>
226
227<screen><userinput>GALLIUM_DRV="crocus,i915,iris,nouveau,r600,radeonsi,svga,swrast,virgl"
228DRI_DRIVERS="i965,nouveau"</userinput></screen>
229
230 <para>
231 Install <application>Mesa</application> by running the following
232 commands:
233 </para>
234
235<screen><userinput>mkdir build &amp;&amp;
236cd build &amp;&amp;
237
238meson --prefix=$XORG_PREFIX \
239 --buildtype=release \
240 -Ddri-drivers=$DRI_DRIVERS \
241 -Dgallium-drivers=$GALLIUM_DRV \
242 -Dgallium-nine=false \
243 -Dglx=dri \
244 -Dvalgrind=disabled \
245 -Dlibunwind=disabled \
246 .. &amp;&amp;
247
248unset GALLIUM_DRV DRI_DRIVERS &amp;&amp;
249
250ninja</userinput></screen>
251
252 <para>
253 If you built the tests (see 'Command Explanations'), to run them issue:
254 <command>ninja test</command>.
255 All 33 subtests tests in the mesa:compiler+glsl / glsl compiler warnings
256 suite are known to fail.
257 </para>
258
259 <para>
260 Now, as the <systemitem class="username">root</systemitem> user:
261 </para>
262
263<screen role="root"><userinput>ninja install</userinput></screen>
264
265 <para>
266 If desired, install the optional documentation by running
267 the following commands as the
268 <systemitem class="username">root</systemitem> user:
269 </para>
270
271<screen role="root"><userinput>install -v -dm755 /usr/share/doc/mesa-&mesa-version; &amp;&amp;
272cp -rfv ../docs/* /usr/share/doc/mesa-&mesa-version;</userinput></screen>
273
274 </sect2>
275
276 <sect2 role="commands">
277 <title>Command Explanations</title>
278
279 <para>
280 <parameter>--buildtype=release</parameter>: This switch ensures a
281 fully-optimized build, and disables debug assertions which will
282 severely slow down the libraries in certain use-cases. Without this
283 switch, build sizes can span into the 2GB range.
284 </para>
285
286 <para>
287 <parameter>-Ddri-drivers="..."</parameter>: This parameter
288 controls which (non-gallium) dri drivers should be built.
289 </para>
290
291 <para>
292 <parameter>-Dgallium-drivers="..."</parameter>: This parameter
293 controls which Gallium3D drivers should be built.
294 </para>
295
296 <para>
297 <parameter>-Dgallium-nine=false</parameter>: Prevents building
298 support for (MS Windows) games designed for DX9. Set it to true if
299 this support is desired.
300 </para>
301<!--
302 <para>
303 <parameter>-Dosmesa=true</parameter>: This switch enables building
304 the <filename class="libraryfile">libOSMesa</filename> library and
305 provides Gallium3D support in it. It requires the swrast gallium driver.
306 </para>
307-->
308<!--
309 <para>
310 <parameter>-Dplatforms="..."</parameter>: This parameter
311 controls which platforms EGL will be built for. Available
312 linux X86 platforms are drm, x11, wayland, and surfaceless.
313 </para>
314-->
315 <para>
316 <parameter>-Dvalgrind=disabled</parameter>: This parameter disables
317 the usage of Valgrind during the build process. Remove this parameter
318 if you have Valgrind installed, and wish to check for memory leaks.
319 </para>
320
321 <para>
322 <parameter>-Dlibunwind=disabled</parameter>: This parameter disables
323 the usage of libunwind.
324 </para>
325
326<!--
327 <para>
328 <parameter>- -enable-xa</parameter>: This switch enables building the
329 XA X Acceleration API (Required for VMware 3D Driver).
330 </para>
331
332 <para>
333 <parameter>- -enable-gbm</parameter>: This switch enables building the
334 <application>Mesa</application> Graphics Buffer Manager library.
335 </para>
336 These two seem to be automatic in 19.0 - ken
337
338 <para>
339 <parameter>- -enable-glx-tls</parameter>: This switch enables TLS (Thread Local
340 Storage) support in GLX.
341 </para>
342-->
343 <para>
344 <option>-Dbuild-tests=true</option>: This option will cause the test code
345 to be enabled. To run the tests, issue: <command>ninja test</command>.
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 libOSMesa.so,
369 libXvMCnouveau.so,
370 libXvMCr600.so,
371 libgbm.so,
372 libglapi.so,
373 <!-- Begin Vulkan drivers -->
374 libvulkan_intel.so,
375 libvulkan_lvp.so,
376 libvulkan_radeon.so, and
377 <!-- End Vulkan drivers -->
378 libxatracker.so,
379 </seg>
380 <seg>
381 <!-- Begini gallium DRI drivers : this is the full set -->
382 d3dadapter9.so (optional), <!-- For Windows games. This is DirectX's
383 Direct3D -->
384 crocus_dri.so,
385 i830_dri.so,
386 i915_dri.so,
387 i965_dri.so,
388 iris_dri.so,
389 kms_swrast_dri.so,
390 nouveau_dri.so,
391 nouveau_drv_video.so,
392 nouveau_vieux_dri.so,
393 r200_dri.so (optional),
394 r300_dri.so (optional),
395 r600_dri.so,
396 r600_drv_video.so,
397 radeon_dri.so (optional),
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 (optional),
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/{EGL,GL,GLES,GLES2,GLES3,KHR,vulkan},lib/{dri,vdpau}},
414 $XORG_PREFIX/include/d3adapter (optional),
415 $XORG_PREFIX/lib/d3d (optional),
416 $XORG_PREFIX/share/drirc.d (contains workarounds for various applications,
417 particularly browsers and games)
418 $XORG_PREFIX/share/vulkan/icd.d,
419 and
420 /usr/share/doc/mesa-&mesa-version; (optional)
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 <varlistentry id="libOSMesa">
519 <term><filename class="libraryfile">libOSMesa.so</filename></term>
520 <listitem>
521 <para>
522 is the <application>Mesa</application> Off-screen Rendering library
523 </para>
524 <indexterm zone="mesa libOSMesa">
525 <primary sortas="c-libOSMesa">libOSMesa.so</primary>
526 </indexterm>
527 </listitem>
528 </varlistentry>
529
530 </variablelist>
531
532 </sect2>
533
534</sect1>
Note: See TracBrowser for help on using the repository browser.