aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/drivers/dri/swrast/swrast.c
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/drivers/dri/swrast/swrast.c')
-rwxr-xr-x[-rw-r--r--]mesalib/src/mesa/drivers/dri/swrast/swrast.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/mesalib/src/mesa/drivers/dri/swrast/swrast.c b/mesalib/src/mesa/drivers/dri/swrast/swrast.c
index dde868864..fa7d695ab 100644..100755
--- a/mesalib/src/mesa/drivers/dri/swrast/swrast.c
+++ b/mesalib/src/mesa/drivers/dri/swrast/swrast.c
@@ -64,6 +64,7 @@
#include "swrast_priv.h"
#include "swrast/s_context.h"
+const __DRIextension **__driDriverGetExtensions_swrast(void);
/**
* Screen and config-related functions
@@ -824,7 +825,7 @@ dri_unbind_context(__DRIcontext * cPriv)
}
-const struct __DriverAPIRec driDriverAPI = {
+static const struct __DriverAPIRec swrast_driver_api = {
/*.InitScreen = */dri_init_screen,
/*.DestroyScreen = */dri_destroy_screen,
/*.CreateContext = */dri_create_context,
@@ -836,9 +837,21 @@ const struct __DriverAPIRec driDriverAPI = {
/*.UnbindContext = */dri_unbind_context,
};
-/* This is the table of extensions that the loader will dlsym() for. */
-PUBLIC const __DRIextension *__driDriverExtensions[] = {
+static const struct __DRIDriverVtableExtensionRec swrast_vtable = {
+ .base = { __DRI_DRIVER_VTABLE, 1 },
+ .vtable = &swrast_driver_api,
+};
+
+static const __DRIextension *swrast_driver_extensions[] = {
&driCoreExtension.base,
&driSWRastExtension.base,
+ &swrast_vtable.base,
NULL
};
+
+PUBLIC const __DRIextension **__driDriverGetExtensions_swrast(void)
+{
+ globalDriverAPI = &swrast_driver_api;
+
+ return swrast_driver_extensions;
+}