From dfd70bab4ac2336be6c1085f195aef8e0e10dc13 Mon Sep 17 00:00:00 2001 From: Eric Engestrom Date: Fri, 19 Jul 2024 15:19:35 +0200 Subject: [PATCH] loader: gc loader_get_extensions_name() and __DRI_DRIVER_{GET_,}EXTENSIONS defines Leaving the defines in include/GL/internal/dri_interface.h because I'm not sure if something needs it. Fixes: fa541a887c8a67321362 ("loader: delete loader_open_driver()") Part-of: --- src/gallium/include/mesa_interface.h | 19 ------------------- src/loader/loader.c | 17 ----------------- src/loader/loader.h | 3 --- 3 files changed, 39 deletions(-) diff --git a/src/gallium/include/mesa_interface.h b/src/gallium/include/mesa_interface.h index abaeaa0e807..fffccd817c4 100644 --- a/src/gallium/include/mesa_interface.h +++ b/src/gallium/include/mesa_interface.h @@ -668,25 +668,6 @@ struct __DRIuseInvalidateExtensionRec { __DRIextension base; }; -/** - * Dead, do not use; kept only to allow old Xserver to compile since - * this file is a public API. - */ -#define __DRI_DRIVER_EXTENSIONS "__driDriverExtensions" - -/** - * This symbol replaces the __DRI_DRIVER_EXTENSIONS symbol, and will be - * suffixed by "_drivername", allowing multiple drivers to be built into one - * library, and also giving the driver the chance to return a variable driver - * extensions struct depending on the driver name being loaded or any other - * system state. - * - * The function prototype is: - * - * const __DRIextension **__driDriverGetExtensions_drivername(void); - */ -#define __DRI_DRIVER_GET_EXTENSIONS "__driDriverGetExtensions" - /** * Tokens for __DRIconfig attribs. A number of attributes defined by * GLX or EGL standards are not in the table, as they must be provided diff --git a/src/loader/loader.c b/src/loader/loader.c index ec3576b1cac..e9eb4d8b796 100644 --- a/src/loader/loader.c +++ b/src/loader/loader.c @@ -732,23 +732,6 @@ loader_set_logger(loader_logger *logger) log_ = logger; } -char * -loader_get_extensions_name(const char *driver_name) -{ - char *name = NULL; - - if (asprintf(&name, "%s_%s", __DRI_DRIVER_GET_EXTENSIONS, driver_name) < 0) - return NULL; - - const size_t len = strlen(name); - for (size_t i = 0; i < len; i++) { - if (name[i] == '-') - name[i] = '_'; - } - - return name; -} - bool loader_bind_extensions(void *data, const struct dri_extension_match *matches, size_t num_matches, diff --git a/src/loader/loader.h b/src/loader/loader.h index 07dcf2e9fe1..d790a63eca1 100644 --- a/src/loader/loader.h +++ b/src/loader/loader.h @@ -94,9 +94,6 @@ typedef void loader_logger(int level, const char *fmt, ...); void loader_set_logger(loader_logger *logger); -char * -loader_get_extensions_name(const char *driver_name); - struct dri_extension_match { /* __DRI_* extension name */ const char *name;