diff --git a/src/gallium/frontends/dri/dri_util.c b/src/gallium/frontends/dri/dri_util.c index 92012d783e0..8f77937f672 100644 --- a/src/gallium/frontends/dri/dri_util.c +++ b/src/gallium/frontends/dri/dri_util.c @@ -91,23 +91,6 @@ setupLoaderExtensions(__DRIscreen *psp, } } -/** - * This pointer determines which driver API we'll use in the case of the - * loader not passing us an explicit driver extensions list (that would, - * itself, contain a pointer to a driver API.) - * - * A driver's driDriverGetExtensions_drivername() can update this pointer to - * what it's returning, and a loader that is ignorant of createNewScreen2() - * will get the correct driver screen created, as long as no other - * driDriverGetExtensions() happened in between the first one and the - * createNewScreen(). - * - * This allows the X Server to not require the significant dri_interface.h - * updates for doing createNewScreen2(), which would discourage backporting of - * the X Server patches to support the new loader interface. - */ -const struct __DriverAPIRec *globalDriverAPI = &driDriverAPI; - /** * This is the first entrypoint in the driver called by the DRI driver loader * after dlopen()ing it. @@ -128,18 +111,11 @@ driCreateNewScreen2(int scrn, int fd, if (!psp) return NULL; - /* By default, use the global driDriverAPI symbol (non-megadrivers). */ - psp->driver = globalDriverAPI; - - /* If the driver exposes its vtable through its extensions list - * (megadrivers), use that instead. - */ - if (driver_extensions) { - for (int i = 0; driver_extensions[i]; i++) { - if (strcmp(driver_extensions[i]->name, __DRI_DRIVER_VTABLE) == 0) { - psp->driver = - ((__DRIDriverVtableExtension *)driver_extensions[i])->vtable; - } + assert(driver_extensions); + for (int i = 0; driver_extensions[i]; i++) { + if (strcmp(driver_extensions[i]->name, __DRI_DRIVER_VTABLE) == 0) { + psp->driver = + ((__DRIDriverVtableExtension *)driver_extensions[i])->vtable; } } diff --git a/src/gallium/frontends/dri/dri_util.h b/src/gallium/frontends/dri/dri_util.h index c6e68809637..7c40b775b55 100644 --- a/src/gallium/frontends/dri/dri_util.h +++ b/src/gallium/frontends/dri/dri_util.h @@ -143,9 +143,6 @@ struct __DriverAPIRec { int w, int h); }; -extern const struct __DriverAPIRec driDriverAPI; -extern const struct __DriverAPIRec *globalDriverAPI; - /** * Per-screen private driver information. */ diff --git a/src/gallium/targets/dri/target.c b/src/gallium/targets/dri/target.c index c2e884617ee..bf157b38094 100644 --- a/src/gallium/targets/dri/target.c +++ b/src/gallium/targets/dri/target.c @@ -7,7 +7,6 @@ const __DRIextension **__driDriverGetExtensions_##drivername(void); \ PUBLIC const __DRIextension **__driDriverGetExtensions_##drivername(void) \ { \ - globalDriverAPI = &galliumdrm_driver_api; \ return galliumdrm_driver_extensions; \ } @@ -17,7 +16,6 @@ const __DRIextension **__driDriverGetExtensions_swrast(void); PUBLIC const __DRIextension **__driDriverGetExtensions_swrast(void) { - globalDriverAPI = &galliumsw_driver_api; return galliumsw_driver_extensions; } @@ -27,7 +25,6 @@ const __DRIextension **__driDriverGetExtensions_kms_swrast(void); PUBLIC const __DRIextension **__driDriverGetExtensions_kms_swrast(void) { - globalDriverAPI = &dri_kms_driver_api; return dri_kms_driver_extensions; }