source: x/installing/mesa.xml@ fe0192e

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 fe0192e was 3918112a, checked in by Xi Ruoyao <xry111@…>, 3 years ago

add xinclude for --buildtype=release

  • 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 "b6eecb58b0cef493c3a0802191456012">
10 <!ENTITY mesa-size "14 MB">
11 <!ENTITY mesa-buildsize "545 MB (with docs)">
12 <!ENTITY mesa-time "3.1 SBU (with parallelism=4 and 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 &lfs101_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>, and
132 <ulink url="https://github.com/tizonia/tizonia-openmax-il/wiki/Tizonia-OpenMAX-IL/">
133 libtizonia</ulink>
134 </para>
135
136 <note>
137 <para>
138 The instructions below assume that
139 <application>LLVM</application> with the r600/amdgpu and host backends
140 and run-time type information (RTTI - needed for nouveau) are installed.
141 You will need to modify the instructions if you
142 choose not to install all of these. For an explanation of Gallium3D see
143 <ulink url="https://en.wikipedia.org/wiki/Gallium3D"/>.
144 </para>
145 </note>
146
147 <para condition="html" role="usernotes">User Notes:
148 <ulink url="&blfs-wiki;/mesa"/>
149 </para>
150 </sect2>
151
152 <sect2 role="installation">
153 <title>Installation of Mesa</title>
154
155 <para>
156 If you have downloaded the xdemos patch (needed if testing the Xorg
157 installation per BLFS instructions), apply it by running the following
158 command:
159 </para>
160
161<screen><userinput>patch -Np1 -i ../mesa-&mesa-version;-add_xdemos-1.patch</userinput></screen>
162
163 <!-- Note that freedreno, vc4, and virgl all need special support from
164 libdrm - renodr
165 For me, libdrm does not mention virgl, but mesa accepts it. AFAICS
166 freedreno is for qualcom hardware, libdrm will build for it on suitable
167 systems. VC4 is for the Broadcom VC4 used in the raspberry pi - ken -->
168
169 <para>
170 Adjust a script file in test suite to use Python 3, instead of the
171 obsolete Python 2:
172 </para>
173
174<screen><userinput>sed '1s/python/&amp;3/' -i bin/symbols-check.py</userinput></screen>
175
176 <note>
177 <para>
178 The measurements above, and the Contents below, are for a full build.
179 Many people will not wish to install drivers they cannot use, so the
180 following paragraphs explain how to limit the drivers, and give an
181 example which can be be reduced or amended as necessary.
182 </para>
183 </note>
184
185 <para>
186 Now, select the drivers you wish to install. For the X86 architecture, the
187 available gallium drivers are auto, <emphasis>or alternatively a choice
188 from</emphasis> i915, nouveau, r300, r600, radeonsi, svga, swrast, and
189 virgl. The latter is recommended if you intend to run the system under
190 <xref linkend="qemu"/>. If you wish to build all available gallium drivers,
191 use 'auto'.
192 </para>
193
194 <para>
195 The (non-gallium) DRI drivers available in X86 are auto, <emphasis>or
196 alternatively a choice from</emphasis> i915, i965, nouveau, r100, r200,
197 and swrast. Use 'auto' to build all available DRI drivers, or use an
198 empty string (DRI_DRIVERS="") if you wish to only build gallium drivers.
199 </para>
200
201 <para>
202 The platforms ("window systems") available for X86 linux are x11, wayland,
203 <!--drm,--> and surfaceless. By not specifying anything, the meson
204 build-system will build for all these platforms if you have the
205 dependencies, identical to if you had specified '-Dplatforms=auto'.
206 </para>
207
208 <para>
209 Modify the commands below for your desired drivers. The drivers listed
210 below will cover most modern video cards and virtual machines. For help in
211 selecting drivers see <ulink url="https://docs.mesa3d.org/systems.html"/>.
212 </para>
213
214 <note>
215 <para>
216 Although the nouveau drivers can be built for both gallium and dri, the
217 i915 driver can only be built for one or the other.
218 </para>
219 </note>
220
221<screen><userinput>GALLIUM_DRV="i915,iris,nouveau,r600,radeonsi,svga,swrast,virgl"
222DRI_DRIVERS="i965,nouveau"</userinput></screen>
223
224 <para>
225 Install <application>Mesa</application> by running the following
226 commands:
227 </para>
228
229<screen><userinput>mkdir build &amp;&amp;
230cd build &amp;&amp;
231
232meson --prefix=$XORG_PREFIX \
233 --buildtype=release \
234 -Ddri-drivers=$DRI_DRIVERS \
235 -Dgallium-drivers=$GALLIUM_DRV \
236 -Dgallium-nine=false \
237 -Dglx=dri \
238 -Dvalgrind=disabled \
239 -Dlibunwind=disabled \
240 .. &amp;&amp;
241
242unset GALLIUM_DRV DRI_DRIVERS &amp;&amp;
243
244ninja</userinput></screen>
245
246 <para>
247 This package no longer comes with a test suite.
248 </para>
249<!--
250 <para>
251 If you built the tests (see 'Command Explanations'), to run them issue:
252 <command>ninja test</command>.
253 Two tests in the llvmpipe suite are known to fail.
254 </para>
255-->
256 <para>
257 Now, as the <systemitem class="username">root</systemitem> user:
258 </para>
259
260<screen role="root"><userinput>ninja install</userinput></screen>
261
262 <para>
263 If desired, install the optional documentation by running
264 the following commands as the
265 <systemitem class="username">root</systemitem> user:
266 </para>
267
268<screen role="root"><userinput>install -v -dm755 /usr/share/doc/mesa-&mesa-version; &amp;&amp;
269cp -rfv ../docs/* /usr/share/doc/mesa-&mesa-version;</userinput></screen>
270
271 </sect2>
272
273 <sect2 role="commands">
274 <title>Command Explanations</title>
275
276 <para>
277 <parameter>--buildtype=release</parameter>: This switch ensures a
278 fully-optimized build, and disables debug assertions which will
279 severely slow down the libraries in certain use-cases. Without this
280 switch, build sizes can span into the 2GB range.
281 </para>
282
283 <para>
284 <parameter>-Ddri-drivers="..."</parameter>: This parameter
285 controls which (non-gallium) dri drivers should be built.
286 </para>
287
288 <para>
289 <parameter>-Dgallium-drivers="..."</parameter>: This parameter
290 controls which Gallium3D drivers should be built.
291 </para>
292
293 <para>
294 <parameter>-Dgallium-nine=false</parameter>: Prevents building
295 support for (MS Windows) games designed for DX9. Set it to true if
296 this support is desired.
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 platforms EGL will be built for. Available
309 linux X86 platforms are drm, x11, wayland, and surfaceless.
310 </para>
311-->
312 <para>
313 <parameter>-Dvalgrind=disabled</parameter>: This parameter disables
314 the usage of Valgrind during the build process. Remove this parameter
315 if you have Valgrind installed, and wish to check for memory leaks.
316 </para>
317
318 <para>
319 <parameter>-Dlibunwind=disabled</parameter>: This parameter disables
320 the usage of libunwind.
321 </para>
322
323<!--
324 <para>
325 <parameter>- -enable-xa</parameter>: This switch enables building the
326 XA X Acceleration API (Required for VMware 3D Driver).
327 </para>
328
329 <para>
330 <parameter>- -enable-gbm</parameter>: This switch enables building the
331 <application>Mesa</application> Graphics Buffer Manager library.
332 </para>
333 These two seem to be automatic in 19.0 - ken
334
335 <para>
336 <parameter>- -enable-glx-tls</parameter>: This switch enables TLS (Thread Local
337 Storage) support in GLX.
338 </para>
339-->
340 <para>
341 <option>-Dbuild-tests=true</option>: This option will cause the test code
342 to be enabled.
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 libOSMesa.so,
366 libXvMCnouveau.so,
367 libXvMCr600.so,
368 libgbm.so,
369 libglapi.so,
370 <!-- Begin Vulkan drivers -->
371 libvulkan_intel.so,
372 libvulkan_lvp.so,
373 libvulkan_radeon.so, and
374 <!-- End Vulkan drivers -->
375 libxatracker.so,
376 </seg>
377 <seg>
378 <!-- Begin DRI drivers : this is the full set from auto -->
379 d3dadapter9.so (optional), <!-- For Windows games. This is DirectX's
380 Direct3D -->
381 i915_dri.so,
382 i965_dri.so,
383 iris_dri.so,
384 kms_swrast_dri.so,
385 nouveau_dri.so,
386 nouveau_drv_video.so,
387 nouveau_vieux_dri.so,
388 r200_dri.so (optional),
389 r300_dri.so (optional),
390 r600_dri.so,
391 r600_drv_video.so,
392 radeon_dri.so (optional),
393 radeonsi_dri.so,
394 radeonsi_drv_video.so,
395 swrast_dri.so,
396 virtio_gpu_dri.so,
397 vmwgfx_dri.so,
398 <!-- End DRI Drivers -->
399 <!-- Begin VDPAU drivers -->
400 libvdpau_nouveau.so,
401 libvdpau_r300.so (optional),
402 libvdpau_r600.so, and
403 libvdpau_radeonsi.so
404 <!-- End VDPAU drivers -->
405 </seg>
406 <seg>
407 $XORG_PREFIX/{include/{EGL,GL,GLES,GLES2,GLES3,KHR,vulkan},lib/{dri,vdpau}},
408 $XORG_PREFIX/include/d3adapter (optional),
409 $XORG_PREFIX/lib/d3d (optional),
410 $XORG_PREFIX/share/drirc.d (contains workarounds for various applications,
411 particularly browsers and games)
412 $XORG_PREFIX/share/vulkan/icd.d,
413 and
414 /usr/share/doc/mesa-&mesa-version; (optional)
415 </seg>
416 </seglistitem>
417 </segmentedlist>
418
419 <variablelist>
420 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
421 <?dbfo list-presentation="list"?>
422 <?dbhtml list-presentation="table"?>
423
424 <varlistentry id="glxgears">
425 <term><command>glxgears</command></term>
426 <listitem>
427 <para>
428 is a GL demo useful for troubleshooting graphics
429 problems
430 </para>
431 <indexterm zone="mesa glxgears">
432 <primary sortas="b-glxgears">glxgears</primary>
433 </indexterm>
434 </listitem>
435 </varlistentry>
436
437 <varlistentry id="glxinfo">
438 <term><command>glxinfo</command></term>
439 <listitem>
440 <para>
441 is a diagnostic program that displays information about the
442 graphics hardware and installed GL libraries
443 </para>
444 <indexterm zone="mesa glxinfo">
445 <primary sortas="b-glxinfo">glxinfo</primary>
446 </indexterm>
447 </listitem>
448 </varlistentry>
449
450 <varlistentry id="libEGL">
451 <term><filename class="libraryfile">libEGL.so</filename></term>
452 <listitem>
453 <para>
454 provides a native platform graphics interface as
455 defined by the EGL-1.4 specification
456 </para>
457 <indexterm zone="mesa libEGL">
458 <primary sortas="c-libGL">libEGL.so</primary>
459 </indexterm>
460 </listitem>
461 </varlistentry>
462
463 <varlistentry id="libgbm">
464 <term><filename class="libraryfile">libgbm.so</filename></term>
465 <listitem>
466 <para>
467 is the <application>Mesa</application> Graphics Buffer
468 Manager library
469 </para>
470 <indexterm zone="mesa libgbm">
471 <primary sortas="c-libgbm">libgbm.so</primary>
472 </indexterm>
473 </listitem>
474 </varlistentry>
475
476 <varlistentry id="libGLESv1_CM">
477 <term><filename class="libraryfile">libGLESv1_CM.so</filename></term>
478 <listitem>
479 <para>
480 is the <application>Mesa</application> OpenGL ES 1.1 library
481 </para>
482 <indexterm zone="mesa libGLESv1_CM">
483 <primary sortas="c-libGLESv1_CM">libGLESv1_CM.so</primary>
484 </indexterm>
485 </listitem>
486 </varlistentry>
487
488 <varlistentry id="libGLES2">
489 <term><filename class="libraryfile">libGLES2.so</filename></term>
490 <listitem>
491 <para>
492 is the <application>Mesa</application> OpenGL ES 2.0 library
493 </para>
494 <indexterm zone="mesa libGLES2">
495 <primary sortas="c-libGLES2">libGLES2.so</primary>
496 </indexterm>
497 </listitem>
498 </varlistentry>
499
500 <varlistentry id="libGL">
501 <term><filename class="libraryfile">libGL.so</filename></term>
502 <listitem>
503 <para>
504 is the main <application>Mesa</application> OpenGL library
505 </para>
506 <indexterm zone="mesa libGL">
507 <primary sortas="c-libGL">libGL.so</primary>
508 </indexterm>
509 </listitem>
510 </varlistentry>
511
512 <varlistentry id="libOSMesa">
513 <term><filename class="libraryfile">libOSMesa.so</filename></term>
514 <listitem>
515 <para>
516 is the <application>Mesa</application> Off-screen Rendering library
517 </para>
518 <indexterm zone="mesa libOSMesa">
519 <primary sortas="c-libOSMesa">libOSMesa.so</primary>
520 </indexterm>
521 </listitem>
522 </varlistentry>
523
524 </variablelist>
525
526 </sect2>
527
528</sect1>
Note: See TracBrowser for help on using the repository browser.