diff options
author | Kristian Høgsberg <krh@redhat.com> | 2008-02-28 10:32:28 -0500 |
---|---|---|
committer | Kristian Høgsberg <krh@redhat.com> | 2008-02-29 15:05:39 -0500 |
commit | 6cb3f5c4d8618a14bb7ad1d9df10ed7e648a7b2b (patch) | |
tree | b4fa3dcaf590e54c455aeaa8c68d2dc7897b234d /src/mesa/drivers/dri/mga | |
parent | 16242a8007f41ab63f9a28bb9a750857c8cdb8af (diff) |
Use __DRIextension mechanism providing loader functionality to the driver.
Instead of passing in a fixed struct, the loader now passes in a list
of __DRIextension structs, to advertise the functionality it can provide
to the driver. Each extension is individually versioned and can be
extended or phased out as the interface develops.
Diffstat (limited to 'src/mesa/drivers/dri/mga')
-rw-r--r-- | src/mesa/drivers/dri/mga/mga_xmesa.c | 10 | ||||
-rw-r--r-- | src/mesa/drivers/dri/mga/mgaioctl.c | 6 |
2 files changed, 9 insertions, 7 deletions
diff --git a/src/mesa/drivers/dri/mga/mga_xmesa.c b/src/mesa/drivers/dri/mga/mga_xmesa.c index b0282e5f65..7f2f71d309 100644 --- a/src/mesa/drivers/dri/mga/mga_xmesa.c +++ b/src/mesa/drivers/dri/mga/mga_xmesa.c @@ -115,7 +115,8 @@ int MGA_DEBUG = 0; static int getSwapInfo( __DRIdrawablePrivate *dPriv, __DRIswapInfo * sInfo ); static __GLcontextModes * -mgaFillInModes( unsigned pixel_bits, unsigned depth_bits, +mgaFillInModes( __DRIscreenPrivate *psp, + unsigned pixel_bits, unsigned depth_bits, unsigned stencil_bits, GLboolean have_back_buffer ) { __GLcontextModes * modes; @@ -163,7 +164,7 @@ mgaFillInModes( unsigned pixel_bits, unsigned depth_bits, fb_type = GL_UNSIGNED_INT_8_8_8_8_REV; } - modes = (*dri_interface->createContextModes)( num_modes, sizeof( __GLcontextModes ) ); + modes = (*psp->contextModes->createContextModes)( num_modes, sizeof( __GLcontextModes ) ); m = modes; if ( ! driFillInModes( & m, fb_format, fb_type, depth_bits_array, stencil_bits_array, depth_buffer_factor, @@ -650,7 +651,7 @@ mgaCreateContext( const __GLcontextModes *mesaVis, debug_control ); #endif - (*dri_interface->getUST)( & mmesa->swap_ust ); + (*sPriv->systemTime->getUST)( & mmesa->swap_ust ); if (driQueryOptionb(&mmesa->optionCache, "no_rast")) { fprintf(stderr, "disabling 3D acceleration\n"); @@ -998,7 +999,8 @@ __GLcontextModes *__driDriverInitScreen(__DRIscreenPrivate *psp) if (!mgaInitDriver(psp)) return NULL; - return mgaFillInModes( dri_priv->cpp * 8, + return mgaFillInModes( psp, + dri_priv->cpp * 8, (dri_priv->cpp == 2) ? 16 : 24, (dri_priv->cpp == 2) ? 0 : 8, (dri_priv->backOffset != dri_priv->depthOffset) ); diff --git a/src/mesa/drivers/dri/mga/mgaioctl.c b/src/mesa/drivers/dri/mga/mgaioctl.c index ff26b9475b..dee9399556 100644 --- a/src/mesa/drivers/dri/mga/mgaioctl.c +++ b/src/mesa/drivers/dri/mga/mgaioctl.c @@ -417,7 +417,7 @@ void mgaCopyBuffer( __DRIdrawablePrivate *dPriv ) GLint ret; GLint i; GLboolean missed_target; - + __DRIscreenPrivate *psp = dPriv->driScreenPriv; assert(dPriv); assert(dPriv->driContextPriv); @@ -431,7 +431,7 @@ void mgaCopyBuffer( __DRIdrawablePrivate *dPriv ) driWaitForVBlank( dPriv, & missed_target ); if ( missed_target ) { mmesa->swap_missed_count++; - (void) (*dri_interface->getUST)( & mmesa->swap_missed_ust ); + (void) (*psp->systemTime->getUST)( & mmesa->swap_missed_ust ); } LOCK_HARDWARE( mmesa ); @@ -469,7 +469,7 @@ void mgaCopyBuffer( __DRIdrawablePrivate *dPriv ) mmesa->dirty |= MGA_UPLOAD_CLIPRECTS; mmesa->swap_count++; - (void) (*dri_interface->getUST)( & mmesa->swap_ust ); + (void) (*psp->systemTime->getUST)( & mmesa->swap_ust ); } |