diff options
Diffstat (limited to 'src/mesa/drivers/dri/r300/radeon_context.c')
-rw-r--r-- | src/mesa/drivers/dri/r300/radeon_context.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/r300/radeon_context.c b/src/mesa/drivers/dri/r300/radeon_context.c index d04045d971..b2cb9cfb5f 100644 --- a/src/mesa/drivers/dri/r300/radeon_context.c +++ b/src/mesa/drivers/dri/r300/radeon_context.c @@ -207,6 +207,23 @@ GLboolean radeonInitContext(radeonContextPtr radeon, /** + * Cleanup common context fields. + * Called by r200DestroyContext/r300DestroyContext + */ +void radeonCleanupContext(radeonContextPtr radeon) +{ + /* free the Mesa context */ + radeon->glCtx->DriverCtx = NULL; + _mesa_destroy_context(radeon->glCtx); + + if (radeon->state.scissor.pClipRects) { + FREE(radeon->state.scissor.pClipRects); + radeon->state.scissor.pClipRects = 0; + } +} + + +/** * Swap front and back buffer. */ void radeonSwapBuffers(__DRIdrawablePrivate * dPriv) |