loader: Factor out the common driver opening logic from each loader.
authorEric Anholt <eric@anholt.net>
Thu, 15 Nov 2018 21:54:49 +0000 (13:54 -0800)
committerEric Anholt <eric@anholt.net>
Sat, 17 Nov 2018 01:49:17 +0000 (17:49 -0800)
commitd971a4230d54069c996bca78b6ed6a6a23377821
tree2d9c29c0c0df5405a0bad5b2c7860bcc614069a2
parentcc198157382a988590b0288d287281139c5f73e6
loader: Factor out the common driver opening logic from each loader.

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.

Reviewed-by: Eric Engestrom <eric.engestrom@intel.com> (v1)
Reviewed-by: Emil Velikov <emil.velikov@collabora.com> (v1)
15 files changed:
src/egl/Makefile.am
src/egl/drivers/dri2/egl_dri2.c
src/egl/meson.build
src/gbm/Makefile.am
src/gbm/backends/dri/gbm_dri.c
src/gbm/meson.build
src/glx/Makefile.am
src/glx/SConscript
src/glx/dri_common.c
src/glx/meson.build
src/loader/Makefile.am
src/loader/SConscript
src/loader/loader.c
src/loader/loader.h
src/loader/meson.build