meson: Make prefer-{crocus,iris} always take effect

As written this would require that the driver be built before we looked
at the option. This is wrong because it affects code outside of the
driver, it's in libGL's PCI ID table. This is sort of harmless for
crocus at the moment, but for iris you would need to build it in order
to remove it from the table; if you built just i965 and tried to run it
against gen9, the libGL you just built would direct the loader to the
iris driver you just didn't, and setup would fail, which is: goofy.

Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11655>
This commit is contained in:
Adam Jackson 2021-06-30 09:44:26 -04:00 committed by Marge Bot
parent 6e55890b6c
commit 9cc4ce16fd
1 changed files with 2 additions and 2 deletions

View File

@ -41,11 +41,11 @@ loader_c_args = [
'-DDEFAULT_DRIVER_DIR="@0@"'.format(dri_search_path),
]
if with_gallium_iris and get_option('prefer-iris')
if get_option('prefer-iris')
loader_c_args += ['-DPREFER_IRIS']
endif
if with_gallium_crocus and get_option('prefer-crocus')
if get_option('prefer-crocus')
loader_c_args += ['-DPREFER_CROCUS']
endif