dri megadriver_stub: add compatibility for older DRI loaders
authorJordan Justen <jordan.l.justen@intel.com>
Fri, 6 Dec 2013 10:21:17 +0000 (02:21 -0800)
committerJordan Justen <jordan.l.justen@intel.com>
Tue, 10 Dec 2013 00:33:45 +0000 (16:33 -0800)
commit4859d492b25cba61f43bb883d878d6388be742be
tree2577343905a27877f15515e5ea66056f1cbbf355
parent4ed055b4a6c9e18c0bb9b6c66ef2d04b78a5dcff
dri megadriver_stub: add compatibility for older DRI loaders

To help the transition period when DRI loaders are being updated
to support the newer __driDriverExtensions_foo mechanism,
we populate __driDriverExtensions with the extensions returned
by __driDriverExtensions_foo during a library contructor
function.

We find the driver foo's name by using the dladdr function
which gives the path of the dynamic library's name that
was being loaded.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Keith Packard <keithp@keithp.com>
Cc: "10.0" <mesa-stable@lists.freedesktop.org>
src/mesa/drivers/dri/common/megadriver_stub.c