[Mesa-dev] [PATCH 19/23] st/dri/drm: remove __driDriverExtensions and driDriverAPI
Emil Velikov
emil.l.velikov at gmail.com
Tue Jun 17 11:38:35 PDT 2014
... and use libmegadriver_stub as their provider.
Teach scons how to build the library archive and use it.
Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
---
src/gallium/state_trackers/dri/drm/dri2.c | 21 ---------------------
src/gallium/targets/dri/Makefile.am | 1 +
src/gallium/targets/dri/SConscript | 1 +
src/mesa/drivers/dri/common/SConscript | 26 ++++++++++++++++++++++++++
4 files changed, 28 insertions(+), 21 deletions(-)
diff --git a/src/gallium/state_trackers/dri/drm/dri2.c b/src/gallium/state_trackers/dri/drm/dri2.c
index 0c2b20e..cf77b26 100644
--- a/src/gallium/state_trackers/dri/drm/dri2.c
+++ b/src/gallium/state_trackers/dri/drm/dri2.c
@@ -1178,20 +1178,6 @@ dri2_create_buffer(__DRIscreen * sPriv,
*
* DRI versions differ in their implementation of init_screen and swap_buffers.
*/
-const struct __DriverAPIRec driDriverAPI = {
- .InitScreen = dri2_init_screen,
- .DestroyScreen = dri_destroy_screen,
- .CreateContext = dri_create_context,
- .DestroyContext = dri_destroy_context,
- .CreateBuffer = dri2_create_buffer,
- .DestroyBuffer = dri_destroy_buffer,
- .MakeCurrent = dri_make_current,
- .UnbindContext = dri_unbind_context,
-
- .AllocateBuffer = dri2_allocate_buffer,
- .ReleaseBuffer = dri2_release_buffer,
-};
-
const struct __DriverAPIRec galliumdrm_driver_api = {
.InitScreen = dri2_init_screen,
.DestroyScreen = dri_destroy_screen,
@@ -1207,13 +1193,6 @@ const struct __DriverAPIRec galliumdrm_driver_api = {
};
/* This is the table of extensions that the loader will dlsym() for. */
-PUBLIC const __DRIextension *__driDriverExtensions[] = {
- &driCoreExtension.base,
- &driDRI2Extension.base,
- &gallium_config_options.base,
- NULL
-};
-
const __DRIextension *galliumdrm_driver_extensions[] = {
&driCoreExtension.base,
&driDRI2Extension.base,
diff --git a/src/gallium/targets/dri/Makefile.am b/src/gallium/targets/dri/Makefile.am
index ac5e12c..c4ee525 100644
--- a/src/gallium/targets/dri/Makefile.am
+++ b/src/gallium/targets/dri/Makefile.am
@@ -37,6 +37,7 @@ endif # HAVE_LD_VERSION_SCRIPT
gallium_dri_la_LIBADD = \
$(top_builddir)/src/mesa/libmesagallium.la \
$(top_builddir)/src/mesa/drivers/dri/common/libdricommon.la \
+ $(top_builddir)/src/mesa/drivers/dri/common/libmegadriver_stub.la \
$(top_builddir)/src/gallium/state_trackers/dri/drm/libdridrm.la \
$(top_builddir)/src/gallium/auxiliary/libgallium.la \
$(top_builddir)/src/gallium/drivers/galahad/libgalahad.la \
diff --git a/src/gallium/targets/dri/SConscript b/src/gallium/targets/dri/SConscript
index 5b5ddc6..a78a1b1 100644
--- a/src/gallium/targets/dri/SConscript
+++ b/src/gallium/targets/dri/SConscript
@@ -34,6 +34,7 @@ env.Prepend(LIBS = [
mesa,
glsl,
gallium,
+ megadrivers_stub,
COMMON_DRI_DRM_OBJECTS
])
diff --git a/src/mesa/drivers/dri/common/SConscript b/src/mesa/drivers/dri/common/SConscript
index 41f6356..8821952 100644
--- a/src/mesa/drivers/dri/common/SConscript
+++ b/src/mesa/drivers/dri/common/SConscript
@@ -76,9 +76,35 @@ driswenv.AppendUnique(LIBS = [
'expat',
])
+#
+# megadrivers_stub
+#
+env = env.Clone()
+
+env.Append(CPPPATH = [
+ '#/include',
+ '#/src/',
+ '#/src/mapi',
+ '#/src/mesa',
+])
+
+env.Append(CPPDEFINES = ['HAVE_DLADDR'])
+
+env.PkgUseModules('DRM')
+
+sources = env.ParseSourceList('Makefile.sources', 'megadriver_stub_FILES')
+
+megadrivers_stub = env.ConvenienceLibrary(
+ target = 'megadrivers_stub',
+ source = sources,
+)
+
+env.Alias('megadrivers_stub', megadrivers_stub)
+
Export([
'drienv',
'driswenv',
'COMMON_DRI_SW_OBJECTS',
'COMMON_DRI_DRM_OBJECTS',
+ 'megadrivers_stub',
])
--
2.0.0
More information about the mesa-dev
mailing list