diff options
author | Eric Anholt <[email protected]> | 2007-05-18 14:14:12 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2007-05-18 14:14:12 -0700 |
commit | 1bdee1853627e08894bd267b8f0ec176a1b5978f (patch) | |
tree | 78c3b8bb81e866de4544d2621abb633b008095ab /src/mesa/drivers/fbdev/glfbdev.c | |
parent | c085e350df593ab2af60f53b86265db4c3eab38a (diff) | |
parent | 4fca6bfa5d211a093c54b0bbeadaa38081e8c141 (diff) |
Merge branch 'master' into i915-unification
Conflicts:
src/mesa/drivers/dri/common/dri_bufmgr.c
src/mesa/drivers/dri/common/dri_drmpool.c
src/mesa/drivers/dri/i915tex/intel_batchpool.c
src/mesa/drivers/dri/i915tex/intel_buffer_objects.c
src/mesa/drivers/dri/i915tex/intel_regions.c
src/mesa/drivers/dri/i915tex/intel_screen.c
src/mesa/drivers/dri/i915tex/intel_screen.h
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); |