mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 20:28:04 +02:00
loader: use os_get_option() to allow android to set LIBGL_DRIVERS_PATH, GBM_BACKENDS_PATH, GALLIUM_PIPE_SEARCH_DIR
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29816>
This commit is contained in:
parent
9bce6f5cc4
commit
787e0751c5
3 changed files with 4 additions and 4 deletions
|
|
@ -105,7 +105,7 @@ get_driver_descriptor(const char *driver_name, struct util_dl_library **plib)
|
|||
}
|
||||
return &kmsro_driver_descriptor;
|
||||
#else
|
||||
const char *search_dir = getenv("GALLIUM_PIPE_SEARCH_DIR");
|
||||
const char *search_dir = os_get_option("GALLIUM_PIPE_SEARCH_DIR");
|
||||
if (search_dir == NULL)
|
||||
search_dir = PIPE_SEARCH_DIR;
|
||||
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ pipe_loader_sw_probe_init_common(struct pipe_loader_sw_device *sdev)
|
|||
if (!sdev->dd)
|
||||
return false;
|
||||
#else
|
||||
const char *search_dir = getenv("GALLIUM_PIPE_SEARCH_DIR");
|
||||
const char *search_dir = os_get_option("GALLIUM_PIPE_SEARCH_DIR");
|
||||
if (search_dir == NULL)
|
||||
search_dir = PIPE_SEARCH_DIR;
|
||||
|
||||
|
|
@ -171,7 +171,7 @@ pipe_loader_vk_probe_init_common(struct pipe_loader_sw_device *sdev)
|
|||
if (!sdev->dd)
|
||||
return false;
|
||||
#else
|
||||
const char *search_dir = getenv("GALLIUM_PIPE_SEARCH_DIR");
|
||||
const char *search_dir = os_get_option("GALLIUM_PIPE_SEARCH_DIR");
|
||||
if (search_dir == NULL)
|
||||
search_dir = PIPE_SEARCH_DIR;
|
||||
|
||||
|
|
|
|||
|
|
@ -815,7 +815,7 @@ loader_open_driver_lib(const char *driver_name,
|
|||
search_paths = NULL;
|
||||
if (__normal_user() && search_path_vars) {
|
||||
for (int i = 0; search_path_vars[i] != NULL; i++) {
|
||||
search_paths = getenv(search_path_vars[i]);
|
||||
search_paths = os_get_option(search_path_vars[i]);
|
||||
if (search_paths)
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue