diff options
author | Brian Paul <brianp@vmware.com> | 2009-06-16 18:25:52 -0600 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2009-06-16 18:25:52 -0600 |
commit | 8d482227915552c414e13743652e6794c4313ae2 (patch) | |
tree | 27bb35b40ec242836320180370d7fd5fa3820f41 /src/mesa/drivers/dri/intel | |
parent | 4ef1f8e3b52a06fcf58f78c9c36738531b91dbac (diff) | |
parent | 6b917d0b1787280f976c2f0d1ead0e5d7587a3e9 (diff) |
Merge branch 'mesa_7_5_branch'
Conflicts:
src/mesa/main/api_validate.c
Diffstat (limited to 'src/mesa/drivers/dri/intel')
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_screen.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_screen.c b/src/mesa/drivers/dri/intel/intel_screen.c index 8da96ede64..70e0980ed6 100644 --- a/src/mesa/drivers/dri/intel/intel_screen.c +++ b/src/mesa/drivers/dri/intel/intel_screen.c @@ -410,6 +410,30 @@ intelCreateBuffer(__DRIscreenPrivate * driScrnPriv, static void intelDestroyBuffer(__DRIdrawablePrivate * driDrawPriv) { + struct intel_framebuffer *intel_fb = driDrawPriv->driverPrivate; + struct intel_renderbuffer *depth_rb; + struct intel_renderbuffer *stencil_rb; + + if (intel_fb) { + if (intel_fb->color_rb[0]) { + intel_renderbuffer_set_region(intel_fb->color_rb[0], NULL); + } + + if (intel_fb->color_rb[1]) { + intel_renderbuffer_set_region(intel_fb->color_rb[1], NULL); + } + + depth_rb = intel_get_renderbuffer(&intel_fb->Base, BUFFER_DEPTH); + if (depth_rb) { + intel_renderbuffer_set_region(depth_rb, NULL); + } + + stencil_rb = intel_get_renderbuffer(&intel_fb->Base, BUFFER_STENCIL); + if (stencil_rb) { + intel_renderbuffer_set_region(stencil_rb, NULL); + } + } + _mesa_reference_framebuffer((GLframebuffer **)(&(driDrawPriv->driverPrivate)), NULL); } |