source: x/installing/mesa.xml@ c1918dd

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 9.0 9.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 c1918dd was c1918dd, checked in by Douglas R. Reno <renodr@…>, 5 years ago

Fix patch application in Mesa

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@21427 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 17.0 KB
RevLine 
[868c7c2]1<?xml version="1.0" encoding="ISO-8859-1"?>
[6732c094]2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
[868c7c2]4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
[c0a8c0dc]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">
[d2f50ba]9 <!ENTITY mesa-md5sum "19636bb3da35c21f43040d31e575d5ce">
10 <!ENTITY mesa-size "12 MB">
11 <!ENTITY mesa-buildsize "473 MB (with demos and docs), add 141 MB if tests are enabled ">
12 <!ENTITY mesa-time "2.4 SBU (with parallelism=4, demos, and docs), add 0.4 SBU if tests are enabled">
[868c7c2]13]>
14
[7a395d1]15<sect1 id="mesa" xreflabel="Mesa-&mesa-version;">
16 <?dbhtml filename="mesa.html"?>
[868c7c2]17
18 <sect1info>
19 <othername>$LastChangedBy$</othername>
20 <date>$Date$</date>
21 </sect1info>
22
[7a395d1]23 <title>Mesa-&mesa-version;</title>
[868c7c2]24
[7a395d1]25 <indexterm zone="mesa">
26 <primary sortas="a-Mesa">Mesa</primary>
[868c7c2]27 </indexterm>
28
29 <sect2 role="package">
[7a395d1]30 <title>Introduction to Mesa</title>
[868c7c2]31
[eb425b4]32 <para>
33 <application>Mesa</application> is an OpenGL compatible 3D graphics
34 library.
35 </para>
[868c7c2]36
[fdcf97c7]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
[38489aa0]44 &lfs84_checked;
[ca0c29cc]45
[868c7c2]46 <bridgehead renderas="sect3">Package Information</bridgehead>
47 <itemizedlist spacing="compact">
48 <listitem>
[de938a4e]49 <para>
[7a395d1]50 Download (HTTP): <ulink url="&mesa-download-http;"/>
[de938a4e]51 </para>
[868c7c2]52 </listitem>
53 <listitem>
[de938a4e]54 <para>
[7a395d1]55 Download (FTP): <ulink url="&mesa-download-ftp;"/>
[de938a4e]56 </para>
[868c7c2]57 </listitem>
58 <listitem>
[de938a4e]59 <para>
[7a395d1]60 Download MD5 sum: &mesa-md5sum;
[de938a4e]61 </para>
[868c7c2]62 </listitem>
63 <listitem>
[de938a4e]64 <para>
[7a395d1]65 Download size: &mesa-size;
[de938a4e]66 </para>
[868c7c2]67 </listitem>
68 <listitem>
[de938a4e]69 <para>
[7a395d1]70 Estimated disk space required: &mesa-buildsize;
[de938a4e]71 </para>
[868c7c2]72 </listitem>
73 <listitem>
[de938a4e]74 <para>
[7a395d1]75 Estimated build time: &mesa-time;
[de938a4e]76 </para>
[868c7c2]77 </listitem>
78 </itemizedlist>
79
[625079b6]80 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
[a07e9eb]81 <itemizedlist spacing="compact">
82 <listitem>
[eb425b4]83 <para>
84 Recommended patch:
[39dd48b]85 <ulink
[d2f50ba]86 url="&patch-root;/mesa-&mesa-version;-add_xdemos-1.patch"/>
[7a395d1]87 (installs 2 demo programs for testing Mesa - not needed if you
[39dd48b]88 install the <ulink url="ftp://ftp.freedesktop.org/pub/mesa/demos/">
89 mesa-demos</ulink> package)
[ace536a]90 </para>
[eeb29511]91 </listitem>
92 </itemizedlist>
93
[7a395d1]94 <bridgehead renderas="sect3">Mesa Dependencies</bridgehead>
[868c7c2]95
96 <bridgehead renderas="sect4">Required</bridgehead>
[7b74537e]97 <para role="required">
[df343952]98 <xref linkend="xorg7-lib"/>,
[e2aae21f]99 <xref linkend="libdrm"/>, and
100 <xref linkend="Mako"/>
[eb425b4]101 </para>
[868c7c2]102
[606dfd4]103 <bridgehead renderas="sect4">Recommended</bridgehead>
[eb425b4]104 <para role="recommended">
[d2f50ba]105
106 <xref linkend="libva"/> (to provide VA-API support for some gallium
107 drivers, note that there is a circular dependency. You must
[df343952]108 build <application>libva</application> first without EGL and GLX support,
[d2f50ba]109 install this package, and rebuild <application>libva</application>.),
[9065a56b]110 <xref linkend="libvdpau"/> (to build VDPAU drivers),
[d2f50ba]111 <xref linkend="llvm"/> (required for Gallium3D, nouveau, r300, and radeonsi
112 drivers and for swrast, the software rasterizer which is sometimes referred
113 to as llvmpipe. See <ulink role="nodep"
[fdcf97c7]114 url="http://www.mesa3d.org/systems.html"/> for more information), and
[8e17e54]115 <xref linkend="wayland-protocols"/> (required for
116 <xref role="nodep" linkend='plasma5-build'/>,
117 <!-- <xref role="nodep" linkend='lxqt'/>, -->
[d2f50ba]118 GNOME, and recommended for <xref role="nodep" linkend='gtk3'/>)
[606dfd4]119 </para>
[60bcf481]120
[07584d8]121 <bridgehead renderas="sect4">Optional</bridgehead>
122 <para role="optional">
[57bcce9]123 <xref linkend="libgcrypt"/>,
[b4d0b5a]124 <xref linkend="lm_sensors"/> <!-- for libsensors according to Meson -->,
[57bcce9]125 <xref linkend="nettle"/>,
[b4d0b5a]126 <xref linkend="valgrind"/>,
[58720a7b]127 <ulink url="ftp://ftp.freedesktop.org/pub/mesa/demos/">mesa-demos</ulink>
[1cdb1f7]128 (provides more than 300 extra demos to test
[973dabe9]129 <application>Mesa</application>; this includes the same programs added by
[b4d0b5a]130 the patch above),
[c18b8f23]131 <ulink url="http://omxil.sourceforge.net/">Bellagio OpenMAX Integration
[b4d0b5a]132 Layer</ulink> (for mobile platforms), and
133 <ulink url="https://github.com/tizonia/tizonia-openmax-il/wiki/Tizonia-OpenMAX-IL/">
134 libtizonia</ulink>
[07584d8]135 </para>
136
[9065a56b]137 <note>
[fd2f9a2]138 <para>
[e4fbb24]139 The instructions below assume that
[d2f50ba]140 <application>LLVM</application> with the r600/amdgpu and host backends
141 and run-time type information (RTTI - needed for nouveau) are installed.
142 You will need to modify the instructions if you
143 choose not to install all of these. For an explanation of Gallium3D see
[e83a3bb]144 <ulink url="https://en.wikipedia.org/wiki/Gallium3D"/>.
[fd2f9a2]145 </para>
[9065a56b]146 </note>
[fd2f9a2]147
[c5c2654]148 <para condition="html" role="usernotes">User Notes:
[7a395d1]149 <ulink url="&blfs-wiki;/mesa"/>
[2993b2f]150 </para>
[868c7c2]151 </sect2>
152
153 <sect2 role="installation">
[7a395d1]154 <title>Installation of Mesa</title>
[868c7c2]155
[a07e9eb]156 <para>
[51c08f3]157 If you have downloaded the xdemos patch (needed if testing the Xorg
158 installation per BLFS instructions), apply it by running the following
159 command:
[a07e9eb]160 </para>
161
[c1918dd]162<screen><userinput>patch -Np1 -i ../mesa-&mesa-version;-add_xdemos-1.patch</userinput></screen>
[a07e9eb]163
[054e926]164 <!-- Note that freedreno, vc4, and virgl all need special support from
[d2f50ba]165 libdrm - renodr
166 For me, libdrm does not mention virgl, but mesa accepts it. AFAICS
167 freedreno is for qualcom hardware, libdrm will build for it on suitable
168 systems. VC4 is for the Broadcom VC4 used in the raspberry pi - ken -->
169
170 <note>
171 <para>
172 The measurements above, and the Contents below, are for a full build.
173 Many people will not wish to install drivers they cannot use, so the
174 following paragraphs explain how to limit the drivers, and give an
175 example which can be be reduced or amended as necessary.
176 </para>
177 </note>
178
179 <para>
180 Now, select the drivers you wish to install. For the X86 architecture, the
181 available gallium drivers are auto, <emphasis>or alternatively a choice
182 from</emphasis> i915, nouveau, r300, r600, radeonsi, svga, swrast, and
183 virgl. The latter is recommended if you intend to run the system under
184 <xref linkend="qemu"/>. If you wish to build all available gallium drivers,
185 use 'auto'.
186 </para>
187
188 <para>
189 The (non-gallium) DRI drivers available in X86 are auto, <emphasis>or
190 alternatively a choice from</emphasis> i915, i965, nouveau, r100, r200,
191 and swrast. Use 'auto' to build all available DRI drivers, or use an
192 empty string (DRI_DRIVERS="") if you wish to only build gallium drivers.
193 </para>
194
195 <para>
196 The platforms ("window systems") available for X86 linux are x11, wayland,
197 drm, and surfaceless. By not specifying anything, the meson build-system
198 will build for all these platforms if you have the dependencies, identical
199 to if you had specified '-Dplatforms=auto'.
200 </para>
201
202 <para>
203 Modify the commands below for your desired drivers. The drivers listed
204 below will cover most modern video cards and virtual machines. For help in
205 selecting drivers see <ulink url='http://www.mesa3d.org/systems.html'/>.
206 </para>
207
208 <note>
209 <para>
210 Although the nouveau drivers can be built for both gallium and dri, the
211 i915 driver can only be built for one or the other.
212 </para>
213 </note>
214
215<screen><userinput>GALLIUM_DRV="i915,nouveau,r600,radeonsi,svga,swrast,virgl"
216DRI_DRIVERS="i965,nouveau"</userinput></screen>
[973dabe9]217
[eb425b4]218 <para>
[7a395d1]219 Install <application>Mesa</application> by running the following
[eb425b4]220 commands:
221 </para>
[868c7c2]222
[b3f053c5]223<screen><userinput>mkdir build &amp;&amp;
224cd build &amp;&amp;
[a85e5ce]225
[b3f053c5]226meson --prefix=$XORG_PREFIX \
[d2f50ba]227 -Dbuildtype=release \
[b3f053c5]228 -Ddri-drivers=$DRI_DRIVERS \
229 -Dgallium-drivers=$GALLIUM_DRV \
[d2f50ba]230 -Dgallium-nine=true \
231 -Dglx=dri \
232 -Dosmesa=gallium \
233 -Dvalgrind=false \
[b3f053c5]234 .. &amp;&amp;
[a85e5ce]235
[d2f50ba]236unset GALLIUM_DRV DRI_DRIVERS &amp;&amp;
[b3f053c5]237
238ninja</userinput></screen>
[868c7c2]239
[a07e9eb]240 <para>
[7dd7061]241 If you have applied the xdemos patch, build the demo programs by
[a07e9eb]242 running the following command:
243 </para>
244
[86a3742]245<screen><userinput>make -C ../xdemos DEMOS_PREFIX=$XORG_PREFIX LIBRARY_PATH=$PWD/src/glx</userinput></screen>
[d2f50ba]246
[b3f053c5]247 <para>
[d2f50ba]248 If you built the tests (see 'Command Explanations'), to run them issue:
249 <command>ninja test</command>.
[b3f053c5]250 </para>
[ff55539b]251
[eb425b4]252 <para>
253 Now, as the <systemitem class="username">root</systemitem> user:
254 </para>
[ff55539b]255
[b3f053c5]256<screen role="root"><userinput>ninja install</userinput></screen>
[a07e9eb]257
258 <para>
[5f91dfd]259 If you have built the demo programs, install them by running the
[a07e9eb]260 following command as the
261 <systemitem class="username">root</systemitem> user:
262 </para>
263
[b3f053c5]264<screen role="root"><userinput>make -C ../xdemos DEMOS_PREFIX=$XORG_PREFIX install</userinput></screen>
[a07e9eb]265
[eb425b4]266 <para>
[a07e9eb]267 If desired, install the optional documentation by running
268 the following commands as the
[eb425b4]269 <systemitem class="username">root</systemitem> user:
270 </para>
[91859cf]271
[7a395d1]272<screen role="root"><userinput>install -v -dm755 /usr/share/doc/mesa-&mesa-version; &amp;&amp;
[b3f053c5]273cp -rfv ../docs/* /usr/share/doc/mesa-&mesa-version;</userinput></screen>
[5a883bc4]274
[868c7c2]275 </sect2>
276
[a07e9eb]277 <sect2 role="commands">
278 <title>Command Explanations</title>
[d2f50ba]279
[95e8211]280 <para>
[d2f50ba]281 <parameter>-Dbuildtype=release</parameter>: This switch ensures a
282 fully-optimized build, and disables debug assertions which will
283 severely slow down the libraries in certain use-cases.
[95e8211]284 </para>
285
[b642036d]286 <para>
[d2f50ba]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=true</parameter>: This switch provides
298 support for (MS Windows) games designed for DX9. It requires swrast.
299 </para>
300
301 <para>
302 <parameter>-Dosmesa=gallium</parameter>: This switch enables building
303 the <filename class="libraryfile">libOSMesa</filename> library and
304 provides Gallium3D support in it.
[b642036d]305 </para>
[0f09c2b8]306<!--
[eb425b4]307 <para>
[d2f50ba]308 <parameter>-Dplatforms="..."</parameter>: This parameter
309 controls which platforms EGL will be built for. Available
310 linux X86 platforms are drm, x11, wayland, and surfaceless.
[eb425b4]311 </para>
[0f09c2b8]312-->
[2993b2f]313 <para>
[d2f50ba]314 <parameter>-Dvalgrind=false</parameter>: This parameter disables
315 the usage of Valgrind during the build process. Remove this parameter
316 if you have Valgrind installed, and wish to check for memory leaks.
[2993b2f]317 </para>
318
[d2f50ba]319<!--
[eb425b4]320 <para>
[b3f053c5]321 <parameter>- -enable-xa</parameter>: This switch enables building the
[eb425b4]322 XA X Acceleration API (Required for VMware 3D Driver).
323 </para>
324
325 <para>
[b3f053c5]326 <parameter>- -enable-gbm</parameter>: This switch enables building the
[a07e9eb]327 <application>Mesa</application> Graphics Buffer Manager library.
328 </para>
[d2f50ba]329 These two seem to be automatic in 19.0 - ken
[a07e9eb]330
[eb425b4]331 <para>
[b3f053c5]332 <parameter>- -enable-glx-tls</parameter>: This switch enables TLS (Thread Local
[4d92247]333 Storage) support in GLX.
[eb425b4]334 </para>
[b3f053c5]335-->
[a07e9eb]336 <para>
[d2f50ba]337 <option>-Dbuild-tests=true</option>: This option will cause the test code
338 to be enabled.
[b4d0b5a]339 </para>
340
[371ff30]341 </sect2>
342
[868c7c2]343 <sect2 role="content">
344 <title>Contents</title>
345
346 <segmentedlist>
[1263ab1e]347 <segtitle>Installed Programs</segtitle>
[868c7c2]348 <segtitle>Installed Libraries</segtitle>
[ba2ac60]349 <segtitle>Installed Directories</segtitle>
[868c7c2]350
351 <seglistitem>
[eb425b4]352 <seg>
353 glxgears and glxinfo
354 </seg>
355 <seg>
[d2f50ba]356 <!-- Begin DRI drivers : this is the full set from auto -->
357 d3dadapter9.so, <!-- For Windows games. This is DirectX's Direct3D -->
[b3f053c5]358 i915_dri.so,
359 i965_dri.so,
360 kms_swrast_dri.so,
361 nouveau_dri.so,
[d2f50ba]362 nouveau_drv_video.so,
[b3f053c5]363 nouveau_vieux_dri.so,
[d2f50ba]364 r200_dri.so,
365 r300_dri.so,
366 r600_dri.so,
367 r600_drv_video.so,
368 radeon_dri.so,
[b3f053c5]369 radeonsi_dri.so,
370 radeonsi_drv_video.so,
371 swrast_dri.so,
[d2f50ba]372 virtio_gpu_dri.so,
[b3f053c5]373 vmwgfx_dri.so
[e4fbb24]374 <!-- End DRI Drivers -->
[ed6d075]375 libEGL.so,
[b3f053c5]376 libGL.so,
[ed6d075]377 libGLESv1_CM.so,
[5a14a19]378 libGLESv2.so,
[a640d58]379 libOSMesa.so,
380 libXvMCnouveau.so,
[d2f50ba]381 libXvMCr600.so,
[b3f053c5]382 libgbm.so,
383 libglapi.so,
[e4fbb24]384 <!-- Begin Vulkan drivers -->
[b3f053c5]385 libvulkan_intel.so,
386 libvulkan_radeon.so,
[e4fbb24]387 <!-- End Vulkan drivers -->
[b3f053c5]388 libxatracker.so,
[e4fbb24]389 <!-- Begin VDPAU drivers -->
[d2f50ba]390 libvdpau_nouveau.so,
391 libvdpau_r300.so,
392 libvdpau_r600.so, and
[b3f053c5]393 libvdpau_radeonsi.so
[e4fbb24]394 <!-- End VDPAU drivers -->
[eb425b4]395 </seg>
396 <seg>
[b3f053c5]397 $XORG_PREFIX/{include/{EGL,GL,GLES,GLES2,GLES3,KHR,vulkan},lib/{d3d,dri,vdpau}}
[d2f50ba]398 $XORG_PREFIX/share/drirc.d (contains workarounds for various applications,
399 particularly browsers and games)
400 $XORG_PREFIX/share/vulkan/icd.d,
[880727e]401 and
[7a395d1]402 /usr/share/doc/mesa-&mesa-version; (optional)
[eb425b4]403 </seg>
[868c7c2]404 </seglistitem>
405 </segmentedlist>
[d3ef1e4]406
[4437f63]407 <variablelist>
408 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
409 <?dbfo list-presentation="list"?>
410 <?dbhtml list-presentation="table"?>
411
412 <varlistentry id="glxgears">
[eb50ddde]413 <term><command>glxgears</command></term>
[4437f63]414 <listitem>
[eb425b4]415 <para>
416 is a GL demo useful for troubleshooting graphics
417 problems.
418 </para>
[7a395d1]419 <indexterm zone="mesa glxgears">
[4437f63]420 <primary sortas="b-glxgears">glxgears</primary>
421 </indexterm>
422 </listitem>
423 </varlistentry>
424
425 <varlistentry id="glxinfo">
[eb50ddde]426 <term><command>glxinfo</command></term>
[4437f63]427 <listitem>
[eb425b4]428 <para>
429 is a diagnostic program that displays information about the
430 graphics hardware and installed GL libraries.
431 </para>
[7a395d1]432 <indexterm zone="mesa glxinfo">
[4437f63]433 <primary sortas="b-glxinfo">glxinfo</primary>
434 </indexterm>
435 </listitem>
436 </varlistentry>
437
[25f6d94]438 <varlistentry id="libEGL">
[a07e9eb]439 <term><filename class="libraryfile">libEGL.so</filename></term>
[25f6d94]440 <listitem>
[eb425b4]441 <para>
[a07e9eb]442 provides a native platform graphics interface as
443 defined by the EGL-1.4 specification.
[eb425b4]444 </para>
[7a395d1]445 <indexterm zone="mesa libEGL">
[25f6d94]446 <primary sortas="c-libGL">libEGL.so</primary>
447 </indexterm>
448 </listitem>
449 </varlistentry>
450
[a07e9eb]451 <varlistentry id="libgbm">
452 <term><filename class="libraryfile">libgbm.so</filename></term>
453 <listitem>
454 <para>
455 is the <application>Mesa</application> Graphics Buffer
[0d7900a]456 Manager library.
[a07e9eb]457 </para>
[7a395d1]458 <indexterm zone="mesa libgbm">
[a07e9eb]459 <primary sortas="c-libgbm">libgbm.so</primary>
460 </indexterm>
461 </listitem>
462 </varlistentry>
463
464 <varlistentry id="libGLESv1_CM">
465 <term><filename class="libraryfile">libGLESv1_CM.so</filename></term>
466 <listitem>
467 <para>
468 is the <application>Mesa</application> OpenGL ES 1.1 library.
469 </para>
[7a395d1]470 <indexterm zone="mesa libGLESv1_CM">
[a07e9eb]471 <primary sortas="c-libGLESv1_CM">libGLESv1_CM.so</primary>
472 </indexterm>
473 </listitem>
474 </varlistentry>
475
476 <varlistentry id="libGLES2">
477 <term><filename class="libraryfile">libGLES2.so</filename></term>
478 <listitem>
479 <para>
480 is the <application>Mesa</application> OpenGL ES 2.0 library.
481 </para>
[7a395d1]482 <indexterm zone="mesa libGLES2">
[a07e9eb]483 <primary sortas="c-libGLES2">libGLES2.so</primary>
484 </indexterm>
485 </listitem>
486 </varlistentry>
487
[ba2ac60]488 <varlistentry id="libGL">
[a07e9eb]489 <term><filename class="libraryfile">libGL.so</filename></term>
[ba2ac60]490 <listitem>
[eb425b4]491 <para>
[a07e9eb]492 is the main <application>Mesa</application> OpenGL library.
[eb425b4]493 </para>
[7a395d1]494 <indexterm zone="mesa libGL">
[ba2ac60]495 <primary sortas="c-libGL">libGL.so</primary>
496 </indexterm>
497 </listitem>
498 </varlistentry>
499
[2993b2f]500 <varlistentry id="libOSMesa">
501 <term><filename class="libraryfile">libOSMesa.so</filename></term>
502 <listitem>
503 <para>
504 is the <application>Mesa</application> Off-screen Rendering library.
505 </para>
[7a395d1]506 <indexterm zone="mesa libOSMesa">
[2993b2f]507 <primary sortas="c-libOSMesa">libOSMesa.so</primary>
508 </indexterm>
509 </listitem>
510 </varlistentry>
511
[4437f63]512 </variablelist>
513
[868c7c2]514 </sect2>
[d3ef1e4]515
[868c7c2]516</sect1>
Note: See TracBrowser for help on using the repository browser.