From 54ad6f91c6875ead25d7a1f743a8a5e35081fa60 Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Thu, 15 Apr 2021 15:39:10 +0200 Subject: [PATCH] docs: use code-block for console-content Reviewed-by: Eric Anholt Part-of: --- docs/install.rst | 14 +++++++------- docs/osmesa.rst | 2 +- docs/releasing.rst | 14 +++++++------- docs/repository.rst | 20 ++++++++++---------- docs/shading.rst | 2 +- docs/submittingpatches.rst | 2 +- docs/xlibdriver.rst | 8 ++++---- 7 files changed, 31 insertions(+), 31 deletions(-) diff --git a/docs/install.rst b/docs/install.rst index 2878f8a84f9..99cc2adf894 100644 --- a/docs/install.rst +++ b/docs/install.rst @@ -44,7 +44,7 @@ Third party/extra tools. respectively, (or later) should work. On Windows with MinGW, install Flex and Bison with: - :: + .. code-block:: console mingw-get install msys-flex msys-bison @@ -66,7 +66,7 @@ configure error message. Here are some common ways to retrieve most/all of the dependencies based on the packaging tool used by your distro. -:: +.. code-block:: console zypper source-install --build-deps-only Mesa # openSUSE/SLED/SLES yum-builddep mesa # yum Fedora, OpenSuse(?) @@ -84,7 +84,7 @@ for \*nix systems like Linux and BSD, macOS, Haiku, and Windows. The general approach is: -:: +.. code-block:: console meson builddir/ ninja -C builddir/ @@ -92,7 +92,7 @@ The general approach is: On Windows you can also use the Visual Studio backend -:: +.. code-block:: console meson builddir --backend=vs cd builddir @@ -121,7 +121,7 @@ When compilation has finished, look in the top-level ``lib/`` (or ``lib64/``) directory. You'll see a set of library files similar to this: -:: +.. code-block:: console lrwxrwxrwx 1 brian users 10 Mar 26 07:53 libGL.so -> libGL.so.1* lrwxrwxrwx 1 brian users 19 Mar 26 07:53 libGL.so.1 -> libGL.so.1.5.060100* @@ -135,7 +135,7 @@ the OSMesa (Off-Screen) interface library. If you built the DRI hardware drivers, you'll also see the DRI drivers: -:: +.. code-block:: console -rwxr-xr-x 1 brian users 16895413 Jul 21 12:11 i915_dri.so -rwxr-xr-x 1 brian users 16895413 Jul 21 12:11 i965_dri.so @@ -156,6 +156,6 @@ determine the proper compiler and linker flags. For example, compiling and linking a GLUT application can be done with: -:: +.. code-block:: console gcc `pkg-config --cflags --libs glut` mydemo.c -o mydemo diff --git a/docs/osmesa.rst b/docs/osmesa.rst index 82019c82d71..79774aa829e 100644 --- a/docs/osmesa.rst +++ b/docs/osmesa.rst @@ -23,7 +23,7 @@ Building OSMesa Configure and build Mesa with something like: -:: +.. code-block:: console meson builddir -Dosmesa=true -Dgallium-drivers=swrast -Ddri-drivers=[] -Dvulkan-drivers=[] -Dprefix=$PWD/builddir/install ninja -C builddir install diff --git a/docs/releasing.rst b/docs/releasing.rst index 066f1ecb59f..b9e608438c1 100644 --- a/docs/releasing.rst +++ b/docs/releasing.rst @@ -112,7 +112,7 @@ good contact point. then they should be squashed together. The commit messages and the "``cherry picked from``"-tags must be preserved. - :: + .. code-block:: console git show b10859ec41d09c57663a258f43fe57c12332698e @@ -180,7 +180,7 @@ Check if the version number is going to remain as, alternatively To setup the branchpoint: -:: +.. code-block:: console git checkout master # make sure we're in master first git tag -s X.Y-branchpoint -m "Mesa X.Y branchpoint" @@ -223,7 +223,7 @@ Most of the testing should already be done during the Here is one solution: -:: +.. code-block:: console __glxgears_cmd='glxgears 2>&1 | grep -v "configuration file"' __es2info_cmd='es2_info 2>&1 | egrep "GL_VERSION|GL_RENDERER|.*dri\.so"' @@ -275,7 +275,7 @@ Use the release.sh script from xorg `util-modular `__ to push over HTTPS if ssh does not suit your needs. In this case, create a token, and put it in the URL as shown here: -:: +.. code-block:: console git remote set-url --push origin https://USER:TOKEN@gitlab.freedesktop.org/your~user~name/mesa.git @@ -89,7 +89,7 @@ Windows `__ you'll want to enable automatic CR/LF conversion in your local copy of the repository: -:: +.. code-block:: console git config --global core.autocrlf true @@ -118,7 +118,7 @@ Developer Git Tips If you try to do a pull by just saying\ ``git pull`` and Git complains that you have not specified a branch, try: - :: + .. code-block:: console git config branch.master.remote origin git config branch.master.merge master @@ -137,7 +137,7 @@ Developer Git Tips If it has been awhile since you've done the initial clone, try - :: + .. code-block:: console git pull @@ -145,7 +145,7 @@ Developer Git Tips Make your changes and use - :: + .. code-block:: console git add git commit @@ -161,7 +161,7 @@ Developer Git Tips To avoid this, - :: + .. code-block:: console git pull --rebase git push @@ -181,7 +181,7 @@ Developer Git Tips If you want the rebase action to be the default action, then - :: + .. code-block:: console git config branch.master.rebase true git config --global branch.autosetuprebase=always diff --git a/docs/shading.rst b/docs/shading.rst index 2e46727c71b..7b96e471e16 100644 --- a/docs/shading.rst +++ b/docs/shading.rst @@ -143,7 +143,7 @@ src/compiler/glsl/glsl_compiler Here's an example of using the compiler to compile a vertex shader and emit GL_ARB_vertex_program-style instructions: -:: +.. code-block:: console src/compiler/glsl/glsl_compiler --version XXX --dump-ast myshader.vert diff --git a/docs/submittingpatches.rst b/docs/submittingpatches.rst index 0dee27e555f..728cfd5ab62 100644 --- a/docs/submittingpatches.rst +++ b/docs/submittingpatches.rst @@ -165,7 +165,7 @@ to test this is to make use of the \`git rebase\` command, to run your tests on each commit. Assuming your branch is based off ``origin/master``, you can run: -:: +.. code-block:: console $ git rebase --interactive --exec "meson test -C build/" origin/master diff --git a/docs/xlibdriver.rst b/docs/xlibdriver.rst index 099cba21684..e07aed6c843 100644 --- a/docs/xlibdriver.rst +++ b/docs/xlibdriver.rst @@ -94,10 +94,10 @@ gamma value and G is one gamma value to use for all three channels. Each value is a positive real number typically in the range 1.0 to 2.5. The defaults are all 1.0, effectively disabling gamma correction. Examples: -:: +.. code-block:: console - % export MESA_GAMMA="2.3 2.2 2.4" // separate R,G,B values - % export MESA_GAMMA="2.0" // same gamma for R,G,B + % export MESA_GAMMA="2.3 2.2 2.4" # separate R,G,B values + % export MESA_GAMMA="2.0" # same gamma for R,G,B The ``demos/gamma.c`` program in mesa/demos repository may help you to determine reasonable gamma value for your display. With correct gamma @@ -124,7 +124,7 @@ Hardware overlay planes are supported by the Xlib driver. To determine if your X server has overlay support you can test for the SERVER_OVERLAY_VISUALS property: -:: +.. code-block:: console xprop -root | grep SERVER_OVERLAY_VISUALS