loader: Factor out the common driver opening logic from each loader

Graphics / Mesa 3D Graphics Library / Mesa - Eric Anholt [anholt.net] - 17 November 2018 01:49 EST

I copied the code from egl_dri2.c, but the functionality was equivalent between all the loaders other than their particular environment variables.

v2: Drop the logging function equivalent to loader_default_logger() (requested by Eric, Emil). Move the SCons workaround across. Drop the now-unused driGetDriverExtensions() declaration that was lost in a rebase.

d971a4230d loader: Factor out the common driver opening logic from each loader.
src/egl/Makefile.am | 3 +-
src/egl/drivers/dri2/egl_dri2.c | 75 +++-----------------------------
src/egl/meson.build | 3 --
src/gbm/Makefile.am | 1 -
src/gbm/backends/dri/gbm_dri.c | 84 ++++++------------------------------
src/gbm/meson.build | 1 -
src/glx/Makefile.am | 1 -
src/glx/SConscript | 2 -
src/glx/dri_common.c | 94 ++++-------------------------------------
src/glx/meson.build | 1 -
src/loader/Makefile.am | 1 +
src/loader/SConscript | 2 +
src/loader/loader.c | 90 +++++++++++++++++++++++++++++++++++++++
src/loader/loader.h | 7 +++
src/loader/meson.build | 4 +-
15 files changed, 131 insertions(+), 238 deletions(-)

Upstream: cgit.freedesktop.org


  • Share