diff options
author | Luc Ma <luc@sietium.com> | 2024-04-29 22:53:31 +0800 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2024-05-10 14:19:59 +0000 |
commit | 3825e24085a27d98b1ea050dd4d87f13f4c0b7b1 (patch) | |
tree | 5301da30bfa58b0f6b7ff10994b368639399c35e /src/glx | |
parent | dc7e80ce85578c3596f860da5a46f2e140c6d806 (diff) |
loader: silence implicit-load zink error by the loader
Since commit 7d9ea77b4598 ("glx: add automatic zink fallback loading between hw
and sw drivers"), zink could be tried as a fallback. It'd better silence
if the zink loading is implicit and on fail as what commit 4cc975c6e912 ("glx: silence
more implicit-load zink errors") has done. But there seems to be one
left bebind, which is spit when building swrast but no zink with -Dglx=dri.
v2: plumb the flag through from egl/glx to the loader (zmike)
Signed-off-by: Luc Ma <luc@sietium.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28970>
Diffstat (limited to 'src/glx')
-rw-r--r-- | src/glx/dri2_glx.c | 2 | ||||
-rw-r--r-- | src/glx/dri3_glx.c | 2 | ||||
-rw-r--r-- | src/glx/dri_common.c | 6 | ||||
-rw-r--r-- | src/glx/dri_common.h | 3 | ||||
-rw-r--r-- | src/glx/drisw_glx.c | 2 |
5 files changed, 8 insertions, 7 deletions
diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c index 8351be19f36..fbef32ac3fb 100644 --- a/src/glx/dri2_glx.c +++ b/src/glx/dri2_glx.c @@ -1058,7 +1058,7 @@ dri2CreateScreen(int screen, struct glx_display * priv, bool driver_name_is_infe } psc->driverName = driverName; - extensions = driOpenDriver(driverName, &psc->driver); + extensions = driOpenDriver(driverName, &psc->driver, driver_name_is_inferred); if (extensions == NULL) goto handle_error; diff --git a/src/glx/dri3_glx.c b/src/glx/dri3_glx.c index 9a0119c6b1a..d27432896f6 100644 --- a/src/glx/dri3_glx.c +++ b/src/glx/dri3_glx.c @@ -842,7 +842,7 @@ dri3_create_screen(int screen, struct glx_display * priv, bool driver_name_is_in goto handle_error; } - extensions = driOpenDriver(driverName, &psc->driver); + extensions = driOpenDriver(driverName, &psc->driver, driver_name_is_inferred); if (extensions == NULL) goto handle_error; diff --git a/src/glx/dri_common.c b/src/glx/dri_common.c index 40bbcfffb15..40cf9a0bae2 100644 --- a/src/glx/dri_common.c +++ b/src/glx/dri_common.c @@ -70,7 +70,7 @@ * file not found. */ _X_HIDDEN const __DRIextension ** -driOpenDriver(const char *driverName, void **out_driver_handle) +driOpenDriver(const char *driverName, void **out_driver_handle, bool driver_name_is_inferred) { void *glhandle; @@ -84,7 +84,7 @@ driOpenDriver(const char *driverName, void **out_driver_handle) }; const __DRIextension **extensions = - loader_open_driver(driverName, out_driver_handle, search_path_vars); + loader_open_driver(driverName, out_driver_handle, search_path_vars, driver_name_is_inferred); if (glhandle) dlclose(glhandle); @@ -744,7 +744,7 @@ get_driver_config(const char *driverName) { void *handle; char *config = NULL; - const __DRIextension **extensions = driOpenDriver(driverName, &handle); + const __DRIextension **extensions = driOpenDriver(driverName, &handle, false); if (extensions) { for (int i = 0; extensions[i]; i++) { if (strcmp(extensions[i]->name, __DRI_CONFIG_OPTIONS) != 0) diff --git a/src/glx/dri_common.h b/src/glx/dri_common.h index d762308a4fb..1aa6a84e789 100644 --- a/src/glx/dri_common.h +++ b/src/glx/dri_common.h @@ -64,7 +64,8 @@ extern void driReleaseDrawables(struct glx_context *gc); extern const __DRIextension **driOpenDriver(const char *driverName, - void **out_driver_handle); + void **out_driver_handle, + bool driver_name_is_inferred); struct dri_ctx_attribs { unsigned major_ver; diff --git a/src/glx/drisw_glx.c b/src/glx/drisw_glx.c index 0002cc0b3f8..98a69554eec 100644 --- a/src/glx/drisw_glx.c +++ b/src/glx/drisw_glx.c @@ -953,7 +953,7 @@ driswCreateScreenDriver(int screen, struct glx_display *priv, return NULL; } - extensions = driOpenDriver(driver, &psc->driver); + extensions = driOpenDriver(driver, &psc->driver, driver_name_is_inferred); if (extensions == NULL) goto handle_error; psc->name = driver; |