diff options
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r-- | src/mesa/drivers/dri/r128/r128_context.c | 8 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r200/r200_context.c | 8 | ||||
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_context.c | 8 |
3 files changed, 12 insertions, 12 deletions
diff --git a/src/mesa/drivers/dri/r128/r128_context.c b/src/mesa/drivers/dri/r128/r128_context.c index 75f618ad37a..6194d128f4b 100644 --- a/src/mesa/drivers/dri/r128/r128_context.c +++ b/src/mesa/drivers/dri/r128/r128_context.c @@ -296,10 +296,6 @@ void r128DestroyContext( __DRIcontextPrivate *driContextPriv ) _ac_DestroyContext( rmesa->glCtx ); _swrast_DestroyContext( rmesa->glCtx ); - /* free the Mesa context */ - rmesa->glCtx->DriverCtx = NULL; - _mesa_destroy_context(rmesa->glCtx); - if ( release_texture_heaps ) { /* This share group is about to go away, free our private * texture object data. @@ -314,6 +310,10 @@ void r128DestroyContext( __DRIcontextPrivate *driContextPriv ) assert( is_empty_list( & rmesa->swapped ) ); } + /* free the Mesa context */ + rmesa->glCtx->DriverCtx = NULL; + _mesa_destroy_context(rmesa->glCtx); + /* free the option cache */ driDestroyOptionCache (&rmesa->optionCache); diff --git a/src/mesa/drivers/dri/r200/r200_context.c b/src/mesa/drivers/dri/r200/r200_context.c index 210feddb6a9..aaaaa5a95bf 100644 --- a/src/mesa/drivers/dri/r200/r200_context.c +++ b/src/mesa/drivers/dri/r200/r200_context.c @@ -590,10 +590,6 @@ void r200DestroyContext( __DRIcontextPrivate *driContextPriv ) r200VtxfmtDestroy( rmesa->glCtx ); } - /* free the Mesa context */ - rmesa->glCtx->DriverCtx = NULL; - _mesa_destroy_context( rmesa->glCtx ); - if (rmesa->state.scissor.pClipRects) { FREE(rmesa->state.scissor.pClipRects); rmesa->state.scissor.pClipRects = NULL; @@ -613,6 +609,10 @@ void r200DestroyContext( __DRIcontextPrivate *driContextPriv ) assert( is_empty_list( & rmesa->swapped ) ); } + /* free the Mesa context */ + rmesa->glCtx->DriverCtx = NULL; + _mesa_destroy_context( rmesa->glCtx ); + /* free the option cache */ driDestroyOptionCache (&rmesa->optionCache); diff --git a/src/mesa/drivers/dri/radeon/radeon_context.c b/src/mesa/drivers/dri/radeon/radeon_context.c index 4c7730485b7..21161d2f69d 100644 --- a/src/mesa/drivers/dri/radeon/radeon_context.c +++ b/src/mesa/drivers/dri/radeon/radeon_context.c @@ -521,10 +521,6 @@ void radeonDestroyContext( __DRIcontextPrivate *driContextPriv ) radeonVtxfmtDestroy( rmesa->glCtx ); } - /* free the Mesa context */ - rmesa->glCtx->DriverCtx = NULL; - _mesa_destroy_context( rmesa->glCtx ); - _mesa_vector4f_free( &rmesa->tcl.ObjClean ); if (rmesa->state.scissor.pClipRects) { @@ -546,6 +542,10 @@ void radeonDestroyContext( __DRIcontextPrivate *driContextPriv ) assert( is_empty_list( & rmesa->swapped ) ); } + /* free the Mesa context */ + rmesa->glCtx->DriverCtx = NULL; + _mesa_destroy_context( rmesa->glCtx ); + /* free the option cache */ driDestroyOptionCache (&rmesa->optionCache); |