diff options
author | Zou Nan hai <[email protected]> | 2007-07-04 10:52:35 +0800 |
---|---|---|
committer | Zou Nan hai <[email protected]> | 2007-07-04 10:52:35 +0800 |
commit | fb9ee9b323bff93973a39560b2bc007aace4bddd (patch) | |
tree | 05e1e72e8f4d321cde2c48b8518e6d9736c680dd /src/mesa/drivers/fbdev/glfbdev.c | |
parent | 285b326c606e9b2f90e4fe177b15b3fa23239b86 (diff) | |
parent | 7ff4359a3be1278b26950f96ab23014a667af838 (diff) |
Merge branch 'master' of git+ssh://[email protected]/git/mesa/mesa into 965-glsl
Diffstat (limited to 'src/mesa/drivers/fbdev/glfbdev.c')
-rw-r--r-- | src/mesa/drivers/fbdev/glfbdev.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/mesa/drivers/fbdev/glfbdev.c b/src/mesa/drivers/fbdev/glfbdev.c index f9d57dbdd81..6c6511b7e53 100644 --- a/src/mesa/drivers/fbdev/glfbdev.c +++ b/src/mesa/drivers/fbdev/glfbdev.c @@ -682,9 +682,16 @@ glFBDevDestroyBuffer( GLFBDevBufferPtr buffer ) if (buffer == curDraw || buffer == curRead) { glFBDevMakeCurrent( NULL, NULL, NULL); } +#if 0 /* free the software depth, stencil, accum buffers */ _mesa_free_framebuffer_data(&buffer->glframebuffer); _mesa_free(buffer); +#else + { + struct gl_framebuffer *fb = &buffer->glframebuffer; + _mesa_unreference_framebuffer(&fb); + } +#endif } } @@ -799,10 +806,16 @@ glFBDevDestroyContext( GLFBDevContextPtr context ) GLFBDevContextPtr fbdevctx = glFBDevGetCurrentContext(); if (context) { + GLcontext *mesaCtx = &context->glcontext; + + _swsetup_DestroyContext( mesaCtx ); + _swrast_DestroyContext( mesaCtx ); + _tnl_DestroyContext( mesaCtx ); + _vbo_DestroyContext( mesaCtx ); + if (fbdevctx == context) { /* destroying current context */ _mesa_make_current(NULL, NULL, NULL); - _mesa_notifyDestroy(&context->glcontext); } _mesa_free_context_data(&context->glcontext); _mesa_free(context); |