source: x/installing/mesa.xml@ 751dd1e

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 xry111/llvm18 xry111/soup3 xry111/xf86-video-removal
Last change on this file since 751dd1e was 751dd1e, checked in by Bruce Dubbs <bdubbs@…>, 2 years ago

Update to sysprof-3.44.0 and change some references.
Change <ulink> references to libunwind to internal <linkend> references.

  • Property mode set to 100644
File size: 19.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 "689d32b071b10520a54d78267a2edcf7">
10 <!ENTITY mesa-size "16 MB">
11 <!ENTITY mesa-buildsize "674 MB (with docs, add 380 MB for tests)">
12 <!ENTITY mesa-time "3.5 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 &lfs111_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 <listitem>
91 <para>
92 Required patch (for systems with NVIDIA GPUs):
93 <ulink url="&patch-root;/mesa-&mesa-version;-nouveau_fixes-1.patch"/>
94 </para>
95 </listitem>
96 </itemizedlist>
97
98 <bridgehead renderas="sect3">Mesa Dependencies</bridgehead>
99
100 <bridgehead renderas="sect4">Required</bridgehead>
101 <para role="required">
102 <xref linkend="xorg7-lib"/>,
103 <xref linkend="libdrm"/>, and
104 <xref linkend="Mako"/>
105 </para>
106
107 <bridgehead renderas="sect4">Recommended</bridgehead>
108 <para role="recommended">
109
110 <xref role="first" linkend="libva"/> (to provide VA-API support for some
111 gallium drivers, note that there is a circular dependency. You must
112 build <application>libva</application> first without EGL and GLX support,
113 install this package, and rebuild <application>libva</application>),
114 <xref linkend="libvdpau"/> (to build VDPAU drivers),
115 <xref linkend="llvm"/> (required for Gallium3D, nouveau, r300, and radeonsi
116 drivers and for swrast, the software rasterizer which is sometimes referred
117 to as llvmpipe. See <ulink role="nodep"
118 url="https://docs.mesa3d.org/systems.html"/> for more information), and
119 <xref linkend="wayland-protocols"/> (required for
120 <xref role="nodep" linkend='plasma5-build'/>,
121 <!-- <xref role="nodep" linkend='lxqt'/>, -->
122 GNOME, and recommended for <xref role="nodep" linkend='gtk3'/>)
123 </para>
124
125 <bridgehead renderas="sect4">Optional</bridgehead>
126 <para role="optional">
127 <xref linkend="libgcrypt"/>,
128 <xref linkend="libunwind"/>,
129 <xref linkend="lm_sensors"/> <!-- for libsensors according to Meson -->,
130 <xref linkend="nettle"/>,
131 <xref linkend="valgrind"/>,
132 <ulink url="ftp://ftp.freedesktop.org/pub/mesa/demos/">mesa-demos</ulink>
133 (provides more than 300 extra demos to test
134 <application>Mesa</application>; this includes the same programs added by
135 the patch above),
136 <ulink url="http://omxil.sourceforge.net/">Bellagio OpenMAX Integration
137 Layer</ulink> (for mobile platforms),
138 <ulink url="https://github.com/tizonia/tizonia-openmax-il/wiki/Tizonia-OpenMAX-IL/">
139 libtizonia</ulink>, and
140 <ulink url="https://www.vulkan.org/">libvulkan</ulink> (for the zink driver)
141 </para>
142
143 <note>
144 <para>
145 The instructions below assume that
146 <application>LLVM</application> with the r600/amdgpu and host backends
147 and run-time type information (RTTI - needed for nouveau) are installed.
148 You will need to modify the instructions if you
149 choose not to install all of these. For an explanation of Gallium3D see
150 <ulink url="https://en.wikipedia.org/wiki/Gallium3D"/>.
151 </para>
152 </note>
153
154 <para condition="html" role="usernotes">User Notes:
155 <ulink url="&blfs-wiki;/mesalib"/>
156 </para>
157 </sect2>
158
159 <sect2 role="installation">
160 <title>Installation of Mesa</title>
161
162 <para>
163 If you have downloaded the xdemos patch (needed if testing the Xorg
164 installation per BLFS instructions), apply it by running the following
165 command:
166 </para>
167
168<screen><userinput>patch -Np1 -i ../mesa-&mesa-version;-add_xdemos-1.patch</userinput></screen>
169
170 <!-- Note that freedreno, vc4, and virgl all need special support from
171 libdrm - renodr
172 For me, libdrm does not mention virgl, but mesa accepts it. AFAICS
173 freedreno is for qualcom hardware, libdrm will build for it on suitable
174 systems. VC4 is for the Broadcom VC4 used in the raspberry pi - ken -->
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>in 21.2.1 this does not select
188 crocus </emphasis>), <emphasis>or alternatively a choice from</emphasis>
189 crocus, i915, iris, nouveau, r300, r600, radeonsi, svga, swrast, and virgl.
190 The latter can provide acceleration in <xref linkend="qemu"/> if that has
191 been linked against
192 <ulink url="https://gitlab.freedesktop.org/virgl/virglrenderer/~/releases/">virglrenderer</ulink>
193 (you will need a freedesktop.org account to get to that page, you can
194 download the 0.9.1 release without an account from
195 <ulink url="https://gitlab.freedesktop.org/virgl/virglrenderer/-/archive/0.9.1/virglrenderer-0.9.1.tar.bz2">virglrenderer-0.9.1</ulink>).
196<!-- If you wish to build all available gallium drivers,
197 use 'auto'. FIXME : does not build crocus in 21.2.1 -->
198
199 <!-- crocus was added to the default x86/x86_64 drivers for meson in the
200 master branch on 2021-08-31, at some point it will appear in a stable release -->
201 </para>
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 <!-- these two don't seem to be mentioned in that mesa link -->
222 For intel drivers, specify crocus for i965 gen 4 through to haswell, iris
223 for broadwell and later.
224 </para>
225
226 <note>
227 <para>
228 Although the nouveau drivers can be built for both gallium and dri, the
229 i915 driver can only be built for one or the other.
230 </para>
231 </note>
232
233<screen><userinput>GALLIUM_DRV="crocus,i915,iris,nouveau,r600,radeonsi,svga,swrast,virgl"
234DRI_DRIVERS="i965,nouveau"</userinput></screen>
235
236 <note>
237 <para>
238 If you are using a NVIDIA GPU in your system, a special patch has been
239 created that allows for proper multi-threading in the Mesa driver. This
240 fixes issues with multi-threaded Qt applications, as well as with
241 starting some GNOME Applications. This patch is also essential if you
242 plan to use KDE Plasma.
243
244 Apply the patch using the following command:
245 </para>
246
247<screen><userinput remap="pre">patch -Np1 -i ../mesa-&mesa-version;-nouveau_fixes-1.patch</userinput></screen>
248 </note>
249
250 <para>
251 Install <application>Mesa</application> by running the following
252 commands:
253 </para>
254
255<screen><userinput>mkdir build &amp;&amp;
256cd build &amp;&amp;
257
258meson --prefix=$XORG_PREFIX \
259 --buildtype=release \
260 -Ddri-drivers=$DRI_DRIVERS \
261 -Dgallium-drivers=$GALLIUM_DRV \
262 -Dgallium-nine=false \
263 -Dglx=dri \
264 -Dvalgrind=disabled \
265 -Dlibunwind=disabled \
266 .. &amp;&amp;
267
268unset GALLIUM_DRV DRI_DRIVERS &amp;&amp;
269
270ninja</userinput></screen>
271
272 <para>
273 If you built the tests (see 'Command Explanations'), to run them issue:
274 <command>ninja test</command>. One test,
275 <application>mesa: intel/anv_state_pool</application>, is known to fail.
276<!-- All tests passed for me for 21.2.4 [pierre]
277 All 33 subtests tests in the mesa:compiler+glsl / glsl compiler warnings
278 suite are known to fail.-->
279 </para>
280
281 <para>
282 Now, as the <systemitem class="username">root</systemitem> user:
283 </para>
284
285<screen role="root"><userinput>ninja install</userinput></screen>
286
287 <para>
288 If desired, install the optional documentation by running
289 the following commands as the
290 <systemitem class="username">root</systemitem> user:
291 </para>
292
293<screen role="root"
294 remap="doc"><userinput>install -v -dm755 /usr/share/doc/mesa-&mesa-version; &amp;&amp;
295cp -rfv ../docs/* /usr/share/doc/mesa-&mesa-version;</userinput></screen>
296
297 </sect2>
298
299 <sect2 role="commands">
300 <title>Command Explanations</title>
301
302 <para>
303 <parameter>--buildtype=release</parameter>: This switch ensures a
304 fully-optimized build, and disables debug assertions which will
305 severely slow down the libraries in certain use-cases. Without this
306 switch, build sizes can span into the 2GB range.
307 </para>
308
309 <para>
310 <parameter>-Ddri-drivers="..."</parameter>: This parameter
311 controls which (non-gallium) dri drivers should be built.
312 </para>
313
314 <para>
315 <parameter>-Dgallium-drivers="..."</parameter>: This parameter
316 controls which Gallium3D drivers should be built.
317 </para>
318
319 <para>
320 <parameter>-Dgallium-nine=false</parameter>: Prevents building
321 support for (MS Windows) games designed for DX9. Set it to true if
322 this support is desired.
323 </para>
324<!--
325 <para>
326 <parameter>-Dosmesa=true</parameter>: This switch enables building
327 the <filename class="libraryfile">libOSMesa</filename> library and
328 provides Gallium3D support in it. It requires the swrast gallium driver.
329 </para>
330-->
331<!--
332 <para>
333 <parameter>-Dplatforms="..."</parameter>: This parameter
334 controls which platforms EGL will be built for. Available
335 linux X86 platforms are drm, x11, wayland, and surfaceless.
336 </para>
337-->
338 <para>
339 <parameter>-Dvalgrind=disabled</parameter>: This parameter disables
340 the usage of Valgrind during the build process. Remove this parameter
341 if you have Valgrind installed, and wish to check for memory leaks.
342 </para>
343
344 <para>
345 <parameter>-Dlibunwind=disabled</parameter>: This parameter disables
346 the usage of libunwind.
347 </para>
348
349<!--
350 <para>
351 <parameter>- -enable-xa</parameter>: This switch enables building the
352 XA X Acceleration API (Required for VMware 3D Driver).
353 </para>
354
355 <para>
356 <parameter>- -enable-gbm</parameter>: This switch enables building the
357 <application>Mesa</application> Graphics Buffer Manager library.
358 </para>
359 These two seem to be automatic in 19.0 - ken
360
361 <para>
362 <parameter>- -enable-glx-tls</parameter>: This switch enables TLS (Thread Local
363 Storage) support in GLX.
364 </para>
365-->
366 <para>
367 <option>-Dbuild-tests=true</option>: This option will cause the test code
368 to be enabled. To run the tests, issue: <command>ninja test</command>.
369 </para>
370
371 <para>
372 <option>-Dvulkan-drivers=...</option>: This option allows choosing which
373 Vulkan drivers are built. Since those drivers depend on the
374 corresponding Gallium3D drivers, do not enable drivers that are not
375 enabled in Gallium3D drivers. Furthermore, since BLFS does not use
376 Vulkan, it is safe to leave the list of Vulkan drivers empty.
377 </para>
378
379 </sect2>
380
381 <sect2 role="content">
382 <title>Contents</title>
383
384 <segmentedlist>
385 <segtitle>Installed Programs</segtitle>
386 <segtitle>Installed Libraries</segtitle><!-- in /usr/lib -->
387 <segtitle>Installed Drivers</segtitle><!-- in /usr/lib/<subdir> -->
388 <segtitle>Installed Directories</segtitle>
389
390 <seglistitem>
391 <seg>
392 glxgears and glxinfo
393 </seg>
394 <seg>
395 libEGL.so,
396 libGL.so,
397 libGLESv1_CM.so,
398 libGLESv2.so,
399<!-- libOSMesa.so,-->
400 libXvMCnouveau.so,
401 libXvMCr600.so,
402 libgbm.so,
403 libglapi.so,
404 <!-- Begin Vulkan drivers -->
405 libvulkan_intel.so,
406 libvulkan_lvp.so,
407 libvulkan_radeon.so, and
408 <!-- End Vulkan drivers -->
409 libxatracker.so,
410 </seg>
411 <seg>
412 <!-- Begin gallium DRI drivers : this is the full set -->
413 d3dadapter9.so (optional), <!-- For Windows games. This is DirectX's
414 Direct3D -->
415 crocus_dri.so,
416<!-- i830_dri.so,-->
417 i915_dri.so,
418 i965_dri.so,
419 iris_dri.so,
420 kms_swrast_dri.so,
421 nouveau_dri.so,
422 nouveau_drv_video.so,
423 nouveau_vieux_dri.so,
424 r200_dri.so (optional),
425 r300_dri.so (optional),
426 r600_dri.so,
427 r600_drv_video.so,
428 radeon_dri.so (optional),
429 radeonsi_dri.so,
430 radeonsi_drv_video.so,
431 swrast_dri.so,
432 virtio_gpu_dri.so,
433 vmwgfx_dri.so,
434 <!-- End DRI Drivers -->
435 <!-- Begin VDPAU drivers -->
436 libvdpau_nouveau.so,
437 libvdpau_r300.so (optional),
438 libvdpau_r600.so, and
439 libvdpau_radeonsi.so
440 <!-- End VDPAU drivers -->
441 (Many of these drivers are hard-linked).
442 </seg>
443 <seg>
444 $XORG_PREFIX/{include/{EGL,GL,GLES,GLES2,GLES3,KHR},lib/{dri,vdpau}},
445 $XORG_PREFIX/include/d3adapter (optional),
446 $XORG_PREFIX/lib/d3d (optional),
447 $XORG_PREFIX/share/drirc.d (contains workarounds for various applications,
448 particularly browsers and games),
449 $XORG_PREFIX/share/vulkan,
450 and
451 /usr/share/doc/mesa-&mesa-version; (optional)
452 </seg>
453 </seglistitem>
454 </segmentedlist>
455
456 <variablelist>
457 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
458 <?dbfo list-presentation="list"?>
459 <?dbhtml list-presentation="table"?>
460
461 <varlistentry id="glxgears">
462 <term><command>glxgears</command></term>
463 <listitem>
464 <para>
465 is a GL demo useful for troubleshooting graphics
466 problems
467 </para>
468 <indexterm zone="mesa glxgears">
469 <primary sortas="b-glxgears">glxgears</primary>
470 </indexterm>
471 </listitem>
472 </varlistentry>
473
474 <varlistentry id="glxinfo">
475 <term><command>glxinfo</command></term>
476 <listitem>
477 <para>
478 is a diagnostic program that displays information about the
479 graphics hardware and installed GL libraries
480 </para>
481 <indexterm zone="mesa glxinfo">
482 <primary sortas="b-glxinfo">glxinfo</primary>
483 </indexterm>
484 </listitem>
485 </varlistentry>
486
487 <varlistentry id="libEGL">
488 <term><filename class="libraryfile">libEGL.so</filename></term>
489 <listitem>
490 <para>
491 provides a native platform graphics interface as
492 defined by the EGL-1.4 specification
493 </para>
494 <indexterm zone="mesa libEGL">
495 <primary sortas="c-libGL">libEGL.so</primary>
496 </indexterm>
497 </listitem>
498 </varlistentry>
499
500 <varlistentry id="libgbm">
501 <term><filename class="libraryfile">libgbm.so</filename></term>
502 <listitem>
503 <para>
504 is the <application>Mesa</application> Graphics Buffer
505 Manager library
506 </para>
507 <indexterm zone="mesa libgbm">
508 <primary sortas="c-libgbm">libgbm.so</primary>
509 </indexterm>
510 </listitem>
511 </varlistentry>
512
513 <varlistentry id="libGLESv1_CM">
514 <term><filename class="libraryfile">libGLESv1_CM.so</filename></term>
515 <listitem>
516 <para>
517 is the <application>Mesa</application> OpenGL ES 1.1 library
518 </para>
519 <indexterm zone="mesa libGLESv1_CM">
520 <primary sortas="c-libGLESv1_CM">libGLESv1_CM.so</primary>
521 </indexterm>
522 </listitem>
523 </varlistentry>
524
525 <varlistentry id="libGLES2">
526 <term><filename class="libraryfile">libGLES2.so</filename></term>
527 <listitem>
528 <para>
529 is the <application>Mesa</application> OpenGL ES 2.0 library
530 </para>
531 <indexterm zone="mesa libGLES2">
532 <primary sortas="c-libGLES2">libGLES2.so</primary>
533 </indexterm>
534 </listitem>
535 </varlistentry>
536
537 <varlistentry id="libGL">
538 <term><filename class="libraryfile">libGL.so</filename></term>
539 <listitem>
540 <para>
541 is the main <application>Mesa</application> OpenGL library
542 </para>
543 <indexterm zone="mesa libGL">
544 <primary sortas="c-libGL">libGL.so</primary>
545 </indexterm>
546 </listitem>
547 </varlistentry>
548<!--
549 <varlistentry id="libOSMesa">
550 <term><filename class="libraryfile">libOSMesa.so</filename></term>
551 <listitem>
552 <para>
553 is the <application>Mesa</application> Off-screen Rendering library
554 </para>
555 <indexterm zone="mesa libOSMesa">
556 <primary sortas="c-libOSMesa">libOSMesa.so</primary>
557 </indexterm>
558 </listitem>
559 </varlistentry>
560-->
561 </variablelist>
562
563 </sect2>
564
565</sect1>
Note: See TracBrowser for help on using the repository browser.