Push __driDriverExtensions out of dri_util.c and into the drivers
authorKristian Høgsberg <krh@bitplanet.net>
Fri, 1 Jan 2010 22:56:29 +0000 (17:56 -0500)
committerKristian Høgsberg <krh@bitplanet.net>
Mon, 4 Jan 2010 16:48:00 +0000 (11:48 -0500)
This lets the individual drivers select which extensions to advertise.
Specifically, most drivers (tdfx, sis, savage etc) don't support DRI2
but the shared extension list in dri_util.c does list the DRI2 extension.

Pushing the list into the drivers, lets us avoid listing the DRI2
extension for drivers that don't support it.

16 files changed:
src/gallium/state_trackers/dri/dri_screen.c
src/mesa/drivers/dri/common/dri_util.c
src/mesa/drivers/dri/common/dri_util.h
src/mesa/drivers/dri/fb/fb_dri.c
src/mesa/drivers/dri/ffb/ffb_xmesa.c
src/mesa/drivers/dri/gamma/gamma_xmesa.c
src/mesa/drivers/dri/i810/i810screen.c
src/mesa/drivers/dri/intel/intel_screen.c
src/mesa/drivers/dri/mach64/mach64_screen.c
src/mesa/drivers/dri/mga/mga_xmesa.c
src/mesa/drivers/dri/r128/r128_screen.c
src/mesa/drivers/dri/radeon/radeon_screen.c
src/mesa/drivers/dri/savage/savage_xmesa.c
src/mesa/drivers/dri/sis/sis_screen.c
src/mesa/drivers/dri/tdfx/tdfx_screen.c
src/mesa/drivers/dri/unichrome/via_screen.c

index ce79d09901f5f312d3a5bbe9eb8020ac59345857..bb12baf2815d62a6d02c4a6b2fda6d204bcce3d7 100644 (file)
@@ -346,4 +346,12 @@ PUBLIC const struct __DriverAPIRec driDriverAPI = {
    .InitScreen2 = dri_init_screen2,
 };
 
+/* This is the table of extensions that the loader will dlsym() for. */
+PUBLIC const __DRIextension *__driDriverExtensions[] = {
+    &driCoreExtension.base,
+    &driLegacyExtension.base,
+    &driDRI2Extension.base,
+    NULL
+};
+
 /* vim: set sw=3 ts=8 sts=3 expandtab: */
index fd0359fac99857a78f8bd346c49520deb93243b7..0e01d742656b4767269109656d4cbee7b4c58feb 100644 (file)
@@ -841,7 +841,7 @@ const __DRIlegacyExtension driLegacyExtension = {
     driCreateNewContext,
 };
 
-/** Legacy DRI interface */
+/** DRI2 interface */
 const __DRIdri2Extension driDRI2Extension = {
     { __DRI_DRI2, __DRI_DRI2_VERSION },
     dri2CreateNewScreen,
@@ -849,14 +849,6 @@ const __DRIdri2Extension driDRI2Extension = {
     dri2CreateNewContext,
 };
 
-/* This is the table of extensions that the loader will dlsym() for. */
-PUBLIC const __DRIextension *__driDriverExtensions[] = {
-    &driCoreExtension.base,
-    &driLegacyExtension.base,
-    &driDRI2Extension.base,
-    NULL
-};
-
 static int
 driFrameTracking(__DRIdrawable *drawable, GLboolean enable)
 {
index 984e5e69090ca8b88401e6c64bbcf56034e553ac..35d8b8ff9326b7f9470858cb5633ff633e563a94 100644 (file)
@@ -64,6 +64,7 @@ typedef struct __DRIswapInfoRec        __DRIswapInfo;
  */
 extern const __DRIlegacyExtension driLegacyExtension;
 extern const __DRIcoreExtension driCoreExtension;
+extern const __DRIdri2Extension driDRI2Extension;
 extern const __DRIextension driReadDrawableExtension;
 extern const __DRIcopySubBufferExtension driCopySubBufferExtension;
 extern const __DRIswapControlExtension driSwapControlExtension;
index 11058b38539cf4848f0c6c3df93b1b49700c2447..f37241dd69ad0f45ac44da6bfe74ea3b8cc08021 100644 (file)
@@ -785,3 +785,10 @@ void * __driCreateNewScreen( __DRInativeDisplay *dpy, int scrn, __DRIscreen *psc
 
           return (void *) psp;
 }
+
+/* This is the table of extensions that the loader will dlsym() for. */
+PUBLIC const __DRIextension *__driDriverExtensions[] = {
+    &driCoreExtension.base,
+    &driLegacyExtension.base,
+    NULL
+};
index ea212e9dbdca432ea78503f0861f9fd34d56dcc4..88285f454e9f726ba7c01c87c1e5f6f139df0470 100644 (file)
@@ -722,3 +722,10 @@ const struct __DriverAPIRec driDriverAPI = {
    .WaitForSBC      = NULL,
    .SwapBuffersMSC  = NULL
 };
+
+/* This is the table of extensions that the loader will dlsym() for. */
+PUBLIC const __DRIextension *__driDriverExtensions[] = {
+    &driCoreExtension.base,
+    &driLegacyExtension.base,
+    NULL
+};
index 3492f5cb0f6898d884b64b2920404b96b6dc8bb3..e49ab5bae35b2c0d6ee7d2a81963121401e34b71 100644 (file)
@@ -263,3 +263,10 @@ void *__driCreateScreen(Display *dpy, int scrn, __DRIscreen *psc,
    psp = __driUtilCreateScreen(dpy, scrn, psc, numConfigs, config, &gammaAPI);
    return (void *) psp;
 }
+
+/* This is the table of extensions that the loader will dlsym() for. */
+PUBLIC const __DRIextension *__driDriverExtensions[] = {
+    &driCoreExtension.base,
+    &driLegacyExtension.base,
+    NULL
+};
index 09da4700c75aa569a10951c6ed0863feaca40b6f..2a30782afd465da73c150e68b965f3c3be0f248e 100644 (file)
@@ -356,3 +356,10 @@ const struct __DriverAPIRec driDriverAPI = {
    .WaitForSBC      = NULL,
    .SwapBuffersMSC  = NULL
 };
+
+/* This is the table of extensions that the loader will dlsym() for. */
+PUBLIC const __DRIextension *__driDriverExtensions[] = {
+    &driCoreExtension.base,
+    &driLegacyExtension.base,
+    NULL
+};
index d8d89b1ec16437f52f43a8f1169959f821989d9d..2acc0dbfdda9e26c478e45fb7a7e2493331c549f 100644 (file)
@@ -831,3 +831,11 @@ const struct __DriverAPIRec driDriverAPI = {
 
    .InitScreen2                 = intelInitScreen2,
 };
+
+/* This is the table of extensions that the loader will dlsym() for. */
+PUBLIC const __DRIextension *__driDriverExtensions[] = {
+    &driCoreExtension.base,
+    &driLegacyExtension.base,
+    &driDRI2Extension.base,
+    NULL
+};
index 63515d278c077b7db8e5c166cf8cc9a5d8ebca22..1ed3b0b70ef4d4fd442cb6f5de4d311ef2603dba 100644 (file)
@@ -457,3 +457,9 @@ const struct __DriverAPIRec driDriverAPI = {
    .SwapBuffersMSC  = NULL
 };
 
+/* This is the table of extensions that the loader will dlsym() for. */
+PUBLIC const __DRIextension *__driDriverExtensions[] = {
+    &driCoreExtension.base,
+    &driLegacyExtension.base,
+    NULL
+};
index 428afa589511fe912506e09c2622dba4f0dbadc7..f835cb8bd6bf137850120d9465b3ecc2f12c35e3 100644 (file)
@@ -998,3 +998,10 @@ const struct __DriverAPIRec driDriverAPI = {
    .WaitForSBC      = NULL,
    .SwapBuffersMSC  = NULL
 };
+
+/* This is the table of extensions that the loader will dlsym() for. */
+PUBLIC const __DRIextension *__driDriverExtensions[] = {
+    &driCoreExtension.base,
+    &driLegacyExtension.base,
+    NULL
+};
index fe3fb8747ee2d8be04067a833b83c79f2b493375..80b265811ec614c2559028cef5602b83421e980c 100644 (file)
@@ -517,3 +517,10 @@ const struct __DriverAPIRec driDriverAPI = {
    .WaitForSBC      = NULL,
    .SwapBuffersMSC  = NULL
 };
+
+/* This is the table of extensions that the loader will dlsym() for. */
+PUBLIC const __DRIextension *__driDriverExtensions[] = {
+    &driCoreExtension.base,
+    &driLegacyExtension.base,
+    NULL
+};
index 801d7e147ce7a83f837f52cc34b3b319f5ac44e3..3080a0fcd0e75fc372a7b3bc1920712ca9af2536 100644 (file)
@@ -1751,3 +1751,10 @@ const struct __DriverAPIRec driDriverAPI = {
    .InitScreen2     = radeonInitScreen2,
 };
 
+/* This is the table of extensions that the loader will dlsym() for. */
+PUBLIC const __DRIextension *__driDriverExtensions[] = {
+    &driCoreExtension.base,
+    &driLegacyExtension.base,
+    &driDRI2Extension.base,
+    NULL
+};
index 564e68eb89d9067fa203c197f02f42d1d8024127..8e879ca41c0c263ac1c2b37d49dc4d6127bcc3f6 100644 (file)
@@ -1001,3 +1001,10 @@ const struct __DriverAPIRec driDriverAPI = {
    savageMakeCurrent,
    savageUnbindContext
 };
+
+/* This is the table of extensions that the loader will dlsym() for. */
+PUBLIC const __DRIextension *__driDriverExtensions[] = {
+    &driCoreExtension.base,
+    &driLegacyExtension.base,
+    NULL
+};
index f39a51ab6900727a0a7ab3769c624bb063203889..d38b93ec9b8a7f217fb696f0e3eccf69ecf00623 100644 (file)
@@ -325,3 +325,10 @@ const struct __DriverAPIRec driDriverAPI = {
    .SwapBuffersMSC  = NULL
 
 };
+
+/* This is the table of extensions that the loader will dlsym() for. */
+PUBLIC const __DRIextension *__driDriverExtensions[] = {
+    &driCoreExtension.base,
+    &driLegacyExtension.base,
+    NULL
+};
index d72d8e0d47f3ca14025d89be7534ef9e836a382f..4422b5dec46b49a44f2384edf215c6a5fbeecfb7 100644 (file)
@@ -440,3 +440,10 @@ const struct __DriverAPIRec driDriverAPI = {
    .WaitForSBC      = NULL,
    .SwapBuffersMSC  = NULL
 };
+
+/* This is the table of extensions that the loader will dlsym() for. */
+PUBLIC const __DRIextension *__driDriverExtensions[] = {
+    &driCoreExtension.base,
+    &driLegacyExtension.base,
+    NULL
+};
index 82668f2def33151989e3e986396ea2eca72346f1..2cfb98317da1ee576466830cb0261c0af1b4ccf8 100644 (file)
@@ -443,3 +443,10 @@ const struct __DriverAPIRec driDriverAPI = {
    .WaitForSBC      = NULL,
    .SwapBuffersMSC  = NULL
 };
+
+/* This is the table of extensions that the loader will dlsym() for. */
+PUBLIC const __DRIextension *__driDriverExtensions[] = {
+    &driCoreExtension.base,
+    &driLegacyExtension.base,
+    NULL
+};