docs: document DRI_PRIME
authorPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Mon, 1 Aug 2022 09:00:41 +0000 (11:00 +0200)
committerMarge Bot <emma+marge@anholt.net>
Mon, 8 Aug 2022 16:52:44 +0000 (16:52 +0000)
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17298>

docs/envvars.rst

index 56550ec..e301cb7 100644 (file)
@@ -192,6 +192,19 @@ Core Mesa environment variables
    not they ever see a wait-before-signal condition.
 :envvar:`MESA_LOADER_DRIVER_OVERRIDE`
    chooses a different driver binary such as ``etnaviv`` or ``zink``.
+:envvar:`DRI_PRIME`
+   the default GPU is the one used by Wayland/Xorg or the one connected to a
+   display. This variable allows to select a different GPU. It applies to OpenGL
+   and Vulkan (in this case "select" means the GPU will be first in the reported
+   physical devices list). The supported syntaxes are:
+
+   - ``DRI_PRIME=1``: selects the first non-default GPU.
+   - ``DRI_PRIME=pci-0000_02_00_0``: selects the GPU connected to this PCIe bus
+   - ``DRI_PRIME=vendor_id:device_id``: selects the first GPU matching these ids
+
+   .. note::
+
+      ``lspci -nn | grep VGA`` can be used to know the PCIe bus or ids to use.
 
 NIR passes environment variables
 --------------------------------