docs: use meson instead invoking ninja directly

This approach is available since meson 0.47.0 which we depend on.

Reviewed-by: Sergi Blanch-Torné <sergi.blanch.torne@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23127>
This commit is contained in:
David Heidelberg
2023-05-19 12:20:56 +02:00
parent 62961b172f
commit 32b150344e
8 changed files with 17 additions and 17 deletions

View File

@@ -51,7 +51,7 @@ one cross-compiling the turnip driver for a stock Pixel phone)
-Dgallium-drivers= \ -Dgallium-drivers= \
-Dvulkan-drivers=freedreno \ -Dvulkan-drivers=freedreno \
-Dfreedreno-kmds=kgsl -Dfreedreno-kmds=kgsl
ninja -C build-android-aarch64 meson compile -C build-android-aarch64
Replacing Android drivers on stock Android Replacing Android drivers on stock Android
------------------------------------------ ------------------------------------------

View File

@@ -248,7 +248,7 @@ directory. You can hack on mesa and iterate testing the build with:
.. code-block:: console .. code-block:: console
sudo docker run --rm -v `pwd`:/mesa $IMAGE ninja -C /mesa/_build sudo docker run --rm -v `pwd`:/mesa $IMAGE meson compile -C /mesa/_build
Running specific CI jobs Running specific CI jobs
------------------------ ------------------------

View File

@@ -113,8 +113,8 @@ Building the Code
cd $TOP/drm cd $TOP/drm
meson builddir --prefix=/usr --libdir=${LIBDIR} meson builddir --prefix=/usr --libdir=${LIBDIR}
ninja -C builddir meson compile -C builddir
sudo ninja -C builddir install sudo meson install -C builddir
- Build Mesa: - Build Mesa:
@@ -124,8 +124,8 @@ Building the Code
cd $TOP/mesa cd $TOP/mesa
meson builddir -Dvulkan-drivers= -Dgallium-drivers=svga -Ddri-drivers= -Dglvnd=true -Dglvnd-vendor-name=mesa meson builddir -Dvulkan-drivers= -Dgallium-drivers=svga -Ddri-drivers= -Dglvnd=true -Dglvnd-vendor-name=mesa
ninja -C builddir meson compile -C builddir
sudo ninja -C builddir install sudo meson install -C builddir
Note that you may have to install other packages that Mesa depends Note that you may have to install other packages that Mesa depends

View File

@@ -56,7 +56,7 @@ build virglrenderer with Venus support and to start the vtest server,
$ git clone https://gitlab.freedesktop.org/virgl/virglrenderer.git $ git clone https://gitlab.freedesktop.org/virgl/virglrenderer.git
$ cd virglrenderer $ cd virglrenderer
$ meson out -Dvenus=true $ meson out -Dvenus=true
$ ninja -C out $ meson compile -C out
$ meson devenv -C out $ meson devenv -C out
$ ./vtest/virgl_test_server --venus $ ./vtest/virgl_test_server --venus
$ exit $ exit
@@ -133,7 +133,7 @@ To build minigbm and to enable minigbm support in virglrenderer,
$ CFLAGS=-DDRV_<I915-or-your-driver> OUT=out DESTDIR=out/install make install $ CFLAGS=-DDRV_<I915-or-your-driver> OUT=out DESTDIR=out/install make install
$ cd ../virglrenderer $ cd ../virglrenderer
$ meson configure out -Dminigbm_allocation=true $ meson configure out -Dminigbm_allocation=true
$ ninja -C out $ meson compile -C out
Make sure a host Wayland compositor is running. Replace Make sure a host Wayland compositor is running. Replace
``--display-window-keyboard --display-window-mouse`` by ``--display-window-keyboard --display-window-mouse`` by
@@ -146,7 +146,7 @@ In the guest, build and start sommelier, the special Wayland compositor,
$ git clone https://chromium.googlesource.com/chromiumos/platform2 $ git clone https://chromium.googlesource.com/chromiumos/platform2
$ cd platform2/vm_tools/sommelier $ cd platform2/vm_tools/sommelier
$ meson out -Dxwayland_path=/usr/bin/Xwayland -Dxwayland_gl_driver_path=/usr/lib/dri $ meson out -Dxwayland_path=/usr/bin/Xwayland -Dxwayland_gl_driver_path=/usr/lib/dri
$ ninja -C out $ meson compile -C out
$ sudo chmod 777 /dev/wl0 $ sudo chmod 777 /dev/wl0
$ ./out/sommelier -X --glamor $ ./out/sommelier -X --glamor
--xwayland-gl-driver-path=<path-to-locally-built-gl-driver> \ --xwayland-gl-driver-path=<path-to-locally-built-gl-driver> \

View File

@@ -191,7 +191,7 @@ example, if the ``find`` command listed ``/usr/lib64/dri``, then set
After determining the correct values for the install location, configure After determining the correct values for the install location, configure
Mesa with Mesa with
``meson configure --prefix=/usr --libdir=xxx -D dri-drivers-path=xxx`` ``meson configure --prefix=/usr --libdir=xxx -D dri-drivers-path=xxx``
and then install with ``sudo ninja install``. and then install with ``sudo meson install``.
3. Runtime / Rendering Problems 3. Runtime / Rendering Problems
------------------------------- -------------------------------

View File

@@ -87,8 +87,8 @@ The general approach is:
.. code-block:: console .. code-block:: console
meson setup builddir/ meson setup builddir/
ninja -C builddir/ meson compile -C builddir/
sudo ninja -C builddir/ install sudo meson install -C builddir/
On Windows you can also use the Visual Studio backend On Windows you can also use the Visual Studio backend
@@ -116,7 +116,7 @@ First, configure Mesa and install in the temporary location:
.. code-block:: console .. code-block:: console
meson setup builddir/ -Dprefix="$MESA_INSTALLDIR" OTHER_OPTIONS meson setup builddir/ -Dprefix="$MESA_INSTALLDIR" OTHER_OPTIONS
ninja -C builddir/ install meson install -C builddir/
where ``OTHER_OPTIONS`` is replaced by any meson configuration options you may where ``OTHER_OPTIONS`` is replaced by any meson configuration options you may
want. For instance, if you want to build the LLVMpipe drivers, it would look want. For instance, if you want to build the LLVMpipe drivers, it would look
@@ -126,7 +126,7 @@ like this:
meson setup builddir/ -Dprefix="$MESA_INSTALLDIR" \ meson setup builddir/ -Dprefix="$MESA_INSTALLDIR" \
-Dgallium-drivers=swrast -Dvulkan-drivers=swrast -Dgallium-drivers=swrast -Dvulkan-drivers=swrast
ninja -C builddir/ install meson install -C builddir/
Once Mesa has built and installed to ``$MESA_INSTALLDIR``, you can run any app Once Mesa has built and installed to ``$MESA_INSTALLDIR``, you can run any app
against your temporary install by setting the right environment variables. against your temporary install by setting the right environment variables.
@@ -226,7 +226,7 @@ Gallium-based versions of libGL and device drivers.
6. Building OpenGL programs with pkg-config 6. Building OpenGL programs with pkg-config
------------------------------------------- -------------------------------------------
Running ``ninja install`` will install package configuration files for Running ``meson install`` will install package configuration files for
the pkg-config utility. the pkg-config utility.
When compiling your OpenGL application you can use pkg-config to When compiling your OpenGL application you can use pkg-config to

View File

@@ -26,7 +26,7 @@ Configure and build Mesa with something like:
.. code-block:: console .. code-block:: console
meson setup builddir -Dosmesa=true -Dgallium-drivers=swrast -Dvulkan-drivers=[] -Dprefix=$PWD/builddir/install meson setup builddir -Dosmesa=true -Dgallium-drivers=swrast -Dvulkan-drivers=[] -Dprefix=$PWD/builddir/install
ninja -C builddir install meson install -C builddir
Make sure you have LLVM installed first if you want to use the LLVMpipe Make sure you have LLVM installed first if you want to use the LLVMpipe
driver. driver.

View File

@@ -88,7 +88,7 @@ the steps above :
# Configure Mesa with perfetto # Configure Mesa with perfetto
mesa $ meson . build -Dperfetto=true -Dvulkan-drivers=intel,broadcom -Dgallium-drivers= mesa $ meson . build -Dperfetto=true -Dvulkan-drivers=intel,broadcom -Dgallium-drivers=
# Build mesa # Build mesa
mesa $ ninja -C build mesa $ meson compile -C build
# Within the Mesa repo, build perfetto # Within the Mesa repo, build perfetto
mesa $ cd subprojects/perfetto mesa $ cd subprojects/perfetto