diff options
author | Kristian Høgsberg <[email protected]> | 2007-05-15 16:09:44 -0400 |
---|---|---|
committer | Kristian Høgsberg <[email protected]> | 2007-10-10 19:14:10 -0400 |
commit | efaf90b03e8b69e04909bce071f8ef6b65cc0e9d (patch) | |
tree | 04ec5f1e1f7e6b96ee986763ee6b48d4de43b5f3 /src/mesa/drivers/dri/radeon | |
parent | ac3e838fa748c8c8a6ffc04d1ab13da71f75f103 (diff) |
Move swap_interval to new extension mechanism.
Diffstat (limited to 'src/mesa/drivers/dri/radeon')
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_screen.c | 14 | ||||
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_screen.h | 2 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/mesa/drivers/dri/radeon/radeon_screen.c b/src/mesa/drivers/dri/radeon/radeon_screen.c index 7e533fef2cc..46160babb01 100644 --- a/src/mesa/drivers/dri/radeon/radeon_screen.c +++ b/src/mesa/drivers/dri/radeon/radeon_screen.c @@ -332,11 +332,6 @@ radeonFillInModes( unsigned pixel_bits, unsigned depth_bits, return modes; } -static const __DRIextension *radeonExtensions[] = { - &driCopySubBufferExtension.base, - NULL -}; - /* Create the device specific screen private data struct. */ static radeonScreenPtr @@ -347,6 +342,7 @@ radeonCreateScreen( __DRIscreenPrivate *sPriv ) unsigned char *RADEONMMIO; PFNGLXSCRENABLEEXTENSIONPROC glx_enable_extension = (PFNGLXSCRENABLEEXTENSIONPROC) (*dri_interface->getProcAddress("glxEnableExtension")); + int i; if (sPriv->devPrivSize != sizeof(RADEONDRIRec)) { fprintf(stderr,"\nERROR! sizeof(RADEONDRIRec) does not match passed size from device driver\n"); @@ -735,13 +731,13 @@ radeonCreateScreen( __DRIscreenPrivate *sPriv ) dri_priv->log2GARTTexGran; } - sPriv->extensions = radeonExtensions; + i = 0; + screen->extensions[i++] = &driCopySubBufferExtension.base; if ( glx_enable_extension != NULL ) { if ( screen->irq != 0 ) { - (*glx_enable_extension)( sPriv->psc, "GLX_SGI_swap_control" ); + screen->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_MESA_swap_frame_usage" ); @@ -750,6 +746,8 @@ radeonCreateScreen( __DRIscreenPrivate *sPriv ) (*glx_enable_extension)( sPriv->psc, "GLX_SGI_make_current_read" ); } + screen->extensions[i++] = NULL; + sPriv->extensions = screen->extensions; #if RADEON_COMMON && defined(RADEON_COMMON_FOR_R200) if (IS_R200_CLASS(screen)) { diff --git a/src/mesa/drivers/dri/radeon/radeon_screen.h b/src/mesa/drivers/dri/radeon/radeon_screen.h index 25e6fcf399a..eceab53f5f5 100644 --- a/src/mesa/drivers/dri/radeon/radeon_screen.h +++ b/src/mesa/drivers/dri/radeon/radeon_screen.h @@ -103,6 +103,8 @@ typedef struct { /* Configuration cache with default values for all contexts */ driOptionCache optionCache; + + const __DRIextension *extensions[3]; } radeonScreenRec, *radeonScreenPtr; #define IS_R100_CLASS(screen) \ |