egl,gbm,glx: fix log message spam

Based on the other similar logs we only want to log when extensions
is NULL.
Use this opportunity to indicate the source of the log and remove
the extra ')' at the end of each line.

Fixes: 50fc7cc290 ("glx: directly link to gallium")
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30257>
This commit is contained in:
Pierre-Eric Pelloux-Prayer 2024-07-19 09:22:50 +02:00 committed by Marge Bot
parent a55b9c0c60
commit 159a3edd80
3 changed files with 4 additions and 4 deletions

View file

@ -666,7 +666,7 @@ dri2_load_driver_common(_EGLDisplay *disp,
extensions = dri2_open_driver(disp);
if (!extensions) {
if (disp->Options.FallbackZink)
_eglLog(_LOADER_WARNING, "MESA-LOADER: failed to open %s: driver not built!)\n", dri2_dpy->driver_name);
_eglLog(_LOADER_WARNING, "MESA-LOADER: egl: failed to open %s: driver not built!\n", dri2_dpy->driver_name);
return EGL_FALSE;
}

View file

@ -275,7 +275,7 @@ dri_screen_create_for_driver(struct gbm_dri_device *dri, char *driver_name, bool
const __DRIextension **extensions = dri_open_driver(dri);
if (!extensions) {
if (driver_name_is_inferred)
fprintf(stderr, "MESA-LOADER: failed to open %s: driver not built!)\n", dri->driver_name);
fprintf(stderr, "MESA-LOADER: gbm: failed to open %s: driver not built!\n", dri->driver_name);
goto fail;
}

View file

@ -78,9 +78,9 @@ driOpenDriver(const char *driverName, bool driver_name_is_inferred)
const __DRIextension **extensions = dri_loader_get_extensions(driverName);
if (driver_name_is_inferred) {
if (!extensions && driver_name_is_inferred) {
glx_message(_LOADER_WARNING,
"MESA-LOADER: failed to open %s: driver not built!)\n", driverName);
"MESA-LOADER: glx: failed to open %s: driver not built!\n", driverName);
}
if (glhandle)