diff options
Diffstat (limited to 'src/mesa/drivers/dri/radeon/common_misc.c')
-rw-r--r-- | src/mesa/drivers/dri/radeon/common_misc.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/radeon/common_misc.c b/src/mesa/drivers/dri/radeon/common_misc.c index 21719c69ec..333db053bb 100644 --- a/src/mesa/drivers/dri/radeon/common_misc.c +++ b/src/mesa/drivers/dri/radeon/common_misc.c @@ -866,6 +866,9 @@ void radeonCleanupContext(radeonContextPtr radeon) FILE *track; struct radeon_renderbuffer *rb; GLframebuffer *fb; + + /* free the Mesa context */ + _mesa_destroy_context(radeon->glCtx); fb = (void*)radeon->dri.drawable->driverPrivate; rb = (void *)fb->Attachment[BUFFER_FRONT_LEFT].Renderbuffer; @@ -906,12 +909,13 @@ void radeonCleanupContext(radeonContextPtr radeon) * radeon->glCtx->DriverCtx = NULL; */ - /* free the Mesa context */ - _mesa_destroy_context(radeon->glCtx); + /* free the option cache */ driDestroyOptionCache(&radeon->optionCache); + rcommonDestroyCmdBuf(radeon); + if (radeon->state.scissor.pClipRects) { FREE(radeon->state.scissor.pClipRects); radeon->state.scissor.pClipRects = 0; |