meson: Add a "prefer_iris" build option
Enabling this option makes Intel Gen8-11 hardware load the 'iris' driver by default instead of the older 'i965' driver.
Regardless of how this option is set, users can still override which driver the loader selects via two methods. The first is to create a ~/.drirc or /etc/drirc file with the following snippet:
<driconf>
<device driver="loader" kernel_driver="i915">
<option name="dri_driver" value="i965" />
</device>
</driconf>
The other option is to set an environment variable:
export MESA_LOADER_DRIVER_OVERRIDE=i965
For now, "prefer_iris" defaults to i965 (the historical choice). A separate future patch will change the default driver to iris.
Closes: #1893 (closed)
Merge request reports
Activity
See also xorg/xserver!351 (merged) and xorg/xserver!354 (merged) which solve the xserver loader issues. If you build Mesa with
-Dprefer-iris=true
, and have libepoxy 1.5.4 and X with those patches, it uses iris.mentioned in issue #1893 (closed)
added 94 commits
-
b421f7cb...bebfb17a - 93 commits from branch
mesa:master
- dbe923bf - meson: Add a "prefer_iris" build option
-
b421f7cb...bebfb17a - 93 commits from branch
enabled an automatic merge when the pipeline for dbe923bf succeeds
mentioned in issue #2678 (closed)
What happens if I put such a file on a platform that is supported only by
i915
(e.g. very old Intel GMA)?- It will try to use the
i965
anyway - It will fallback to
i915
- It will fallback to a software rendering (e.g. Gallium on
LLVMpipe
)
I know that exporting the
MESA_LOADER_DRIVER_OVERRIDE
variable is risky and leads to undesirable results: https://github.com/widelands/widelands/issues/3937#issuecomment-650520062What about this
driconf
file?<?xml version="1.0" standalone="yes"?> <driconf> <device driver="loader" kernel_driver="i915"> <option name="dri_driver" value="i965" /> </device> </driconf>
Can we use it to disable
iris
, but only on Gen8-Gen11 hardware, so it won't affect Gen3-Gen7 or Gen12?See also: #1893 (closed)
We could perhaps update this mechanism to only override the driver among supported choices for the given PCI ID (i.e. ignore it if the value isn't in the driver list). Or extend it to allow matching only a subset of cards somehow.
Is it just an idea or was someone actually working on it?
Edited by scx- It will try to use the