summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/unichrome
diff options
context:
space:
mode:
authorKristian Høgsberg <[email protected]>2007-05-15 16:09:44 -0400
committerKristian Høgsberg <[email protected]>2007-10-10 19:14:10 -0400
commitefaf90b03e8b69e04909bce071f8ef6b65cc0e9d (patch)
tree04ec5f1e1f7e6b96ee986763ee6b48d4de43b5f3 /src/mesa/drivers/dri/unichrome
parentac3e838fa748c8c8a6ffc04d1ab13da71f75f103 (diff)
Move swap_interval to new extension mechanism.
Diffstat (limited to 'src/mesa/drivers/dri/unichrome')
-rw-r--r--src/mesa/drivers/dri/unichrome/via_screen.c7
-rw-r--r--src/mesa/drivers/dri/unichrome/via_screen.h2
2 files changed, 7 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/unichrome/via_screen.c b/src/mesa/drivers/dri/unichrome/via_screen.c
index 53f4c5c5642..153e401a165 100644
--- a/src/mesa/drivers/dri/unichrome/via_screen.c
+++ b/src/mesa/drivers/dri/unichrome/via_screen.c
@@ -100,6 +100,7 @@ viaInitDriver(__DRIscreenPrivate *sPriv)
VIADRIPtr gDRIPriv = (VIADRIPtr)sPriv->pDevPriv;
PFNGLXSCRENABLEEXTENSIONPROC glx_enable_extension =
(PFNGLXSCRENABLEEXTENSIONPROC) (*dri_interface->getProcAddress("glxEnableExtension"));
+ int i;
if (sPriv->devPrivSize != sizeof(VIADRIRec)) {
fprintf(stderr,"\nERROR! sizeof(VIADRIRec) does not match passed size from device driver\n");
@@ -174,16 +175,18 @@ viaInitDriver(__DRIscreenPrivate *sPriv)
viaScreen->sareaPrivOffset = gDRIPriv->sarea_priv_offset;
+ i = 0;
if ( glx_enable_extension != NULL ) {
if ( viaScreen->irqEnabled ) {
- (*glx_enable_extension)( sPriv->psc, "GLX_SGI_swap_control" );
+ viaScreen->extensions[i++] = &driSwapControlExtension.base;
(*glx_enable_extension)( sPriv->psc, "GLX_SGI_video_sync" );
- (*glx_enable_extension)( sPriv->psc, "GLX_MESA_swap_control" );
}
(*glx_enable_extension)( sPriv->psc, "GLX_SGI_make_current_read" );
(*glx_enable_extension)( sPriv->psc, "GLX_MESA_swap_frame_usage" );
}
+ viaScreen->extensions[i++] = NULL;
+ sPriv->extensions = viaScreen->extensions;
return GL_TRUE;
}
diff --git a/src/mesa/drivers/dri/unichrome/via_screen.h b/src/mesa/drivers/dri/unichrome/via_screen.h
index 84aa5aef88e..85f87c4da39 100644
--- a/src/mesa/drivers/dri/unichrome/via_screen.h
+++ b/src/mesa/drivers/dri/unichrome/via_screen.h
@@ -70,6 +70,8 @@ typedef struct {
/* Configuration cache with default values for all contexts */
driOptionCache optionCache;
+
+ const __DRIextension *extensions[2];
} viaScreenPrivate;