diff options
Diffstat (limited to 'src/mesa/drivers/dri/mach64')
-rw-r--r-- | src/mesa/drivers/dri/mach64/mach64_screen.c | 55 |
1 files changed, 17 insertions, 38 deletions
diff --git a/src/mesa/drivers/dri/mach64/mach64_screen.c b/src/mesa/drivers/dri/mach64/mach64_screen.c index d524a050e67..fd9acec36f4 100644 --- a/src/mesa/drivers/dri/mach64/mach64_screen.c +++ b/src/mesa/drivers/dri/mach64/mach64_screen.c @@ -67,11 +67,8 @@ static const GLuint __driNConfigOptions = 3; static const GLuint __driNConfigOptions = 2; #endif -#ifdef USE_NEW_INTERFACE static PFNGLXCREATECONTEXTMODES create_context_modes = NULL; -#endif /* USE_NEW_INTERFACE */ -#ifdef USE_NEW_INTERFACE static __GLcontextModes * fill_in_modes( __GLcontextModes * modes, unsigned pixel_bits, unsigned depth_bits, @@ -136,10 +133,8 @@ static __GLcontextModes * fill_in_modes( __GLcontextModes * modes, return modes; } -#endif /* USE_NEW_INTERFACE */ -#ifdef USE_NEW_INTERFACE static __GLcontextModes * mach64FillInModes( unsigned pixel_bits, unsigned depth_bits, unsigned stencil_bits, GLboolean have_back_buffer ) @@ -204,7 +199,6 @@ mach64FillInModes( unsigned pixel_bits, unsigned depth_bits, return modes; } -#endif /* USE_NEW_INTERFACE */ /* Create the device specific screen private data struct. @@ -214,10 +208,18 @@ mach64CreateScreen( __DRIscreenPrivate *sPriv ) { mach64ScreenPtr mach64Screen; ATIDRIPtr serverInfo = (ATIDRIPtr)sPriv->pDevPriv; + PFNGLXSCRENABLEEXTENSIONPROC glx_enable_extension = + (PFNGLXSCRENABLEEXTENSIONPROC) glXGetProcAddress( (const GLubyte *) "__glXScrEnableExtension" ); + void * const psc = sPriv->psc->screenConfigs; + if ( MACH64_DEBUG & DEBUG_VERBOSE_DRI ) fprintf( stderr, "%s\n", __FUNCTION__ ); + if ( glx_enable_extension == NULL ) { + return NULL; + } + /* Allocate the private area */ mach64Screen = (mach64ScreenPtr) CALLOC( sizeof(*mach64Screen) ); if ( !mach64Screen ) return NULL; @@ -316,21 +318,15 @@ mach64CreateScreen( __DRIscreenPrivate *sPriv ) } mach64Screen->driScreen = sPriv; - if ( driCompareGLXAPIVersion( 20030813 ) >= 0 ) { - PFNGLXSCRENABLEEXTENSIONPROC glx_enable_extension = - (PFNGLXSCRENABLEEXTENSIONPROC) glXGetProcAddress( (const GLubyte *) "__glXScrEnableExtension" ); - void * const psc = sPriv->psc->screenConfigs; - - if ( glx_enable_extension != NULL ) { - if ( mach64Screen->irq != 0 ) { - (*glx_enable_extension)( psc, "GLX_SGI_swap_control" ); - (*glx_enable_extension)( psc, "GLX_SGI_video_sync" ); - (*glx_enable_extension)( psc, "GLX_MESA_swap_control" ); - } - - (*glx_enable_extension)( psc, "GLX_MESA_swap_frame_usage" ); - } + + if ( mach64Screen->irq != 0 ) { + (*glx_enable_extension)( psc, "GLX_SGI_swap_control" ); + (*glx_enable_extension)( psc, "GLX_SGI_video_sync" ); + (*glx_enable_extension)( psc, "GLX_MESA_swap_control" ); } + + (*glx_enable_extension)( psc, "GLX_MESA_swap_frame_usage" ); + return mach64Screen; } @@ -492,21 +488,6 @@ static struct __DriverAPIRec mach64API = { }; -/* - * This is the bootstrap function for the driver. - * The __driCreateScreen name is the symbol that libGL.so fetches. - * Return: pointer to a __DRIscreenPrivate. - */ -#if !defined(DRI_NEW_INTERFACE_ONLY) -void *__driCreateScreen(Display *dpy, int scrn, __DRIscreen *psc, - int numConfigs, __GLXvisualConfig *config) -{ - __DRIscreenPrivate *psp; - psp = __driUtilCreateScreen(dpy, scrn, psc, numConfigs, config, &mach64API); - return (void *) psp; -} -#endif /* !defined(DRI_NEW_INTERFACE_ONLY) */ - /** * This is the bootstrap function for the driver. libGL supplies all of the * requisite information about the system, and the driver initializes itself. @@ -517,9 +498,8 @@ void *__driCreateScreen(Display *dpy, int scrn, __DRIscreen *psc, * \return A pointer to a \c __DRIscreenPrivate on success, or \c NULL on * failure. */ -#ifdef USE_NEW_INTERFACE PUBLIC -void * __driCreateNewScreen( __DRInativeDisplay *dpy, int scrn, __DRIscreen *psc, +void * __driCreateNewScreen_20050722( __DRInativeDisplay *dpy, int scrn, __DRIscreen *psc, const __GLcontextModes * modes, const __DRIversion * ddx_version, const __DRIversion * dri_version, @@ -560,4 +540,3 @@ void * __driCreateNewScreen( __DRInativeDisplay *dpy, int scrn, __DRIscreen *psc return (void *) psp; } -#endif /* USE_NEW_INTERFACE */ |