dri: Implement a DRI vtable extension to replace the global driDriverAPI.
authorEric Anholt <eric@anholt.net>
Thu, 26 Sep 2013 17:51:29 +0000 (10:51 -0700)
committerEric Anholt <eric@anholt.net>
Thu, 24 Oct 2013 21:04:20 +0000 (14:04 -0700)
commit4e54751624db7cb07cb4d36c3e683d9ed0a30016
tree4b6ced37d1a6a696619ecb6f1608b53baed262da
parentf93533d118b6dab00022cc9bc1448615a25946dc
dri: Implement a DRI vtable extension to replace the global driDriverAPI.

As we move to megadrivers, we are unable to build multiple drivers with
the same public global symbol per driver (Think an X Server with an intel
and a nouveau driver, and the X Server implementing indirect for both --
we have to actually talk to the right driver).  By slipping the
driDriverAPI vtable into the driver's extension list, we can replace the
usage of the global symbol with usage of the loader-dlsym()ed driver
information.

v2: Pull in the hunk to avoid crashing on null driver_extensions.  Thanks,
    Emil!

Reviewed-by: Matt Turner <mattst88@gmail.com> (v1)
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
include/GL/internal/dri_interface.h
src/mesa/drivers/dri/common/dri_util.c