Mesa (master): meta/generate_mipmap: Don't leak the framebuffer object

Ian Romanick idr at kemper.freedesktop.org
Wed Nov 18 17:38:33 UTC 2015


Module: Mesa
Branch: master
Commit: 72e232374eda780a5dcd374b55d203d0e2a6d02b
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=72e232374eda780a5dcd374b55d203d0e2a6d02b

Author: Ian Romanick <ian.d.romanick at intel.com>
Date:   Fri Nov 13 16:09:37 2015 -0800

meta/generate_mipmap: Don't leak the framebuffer object

Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat at gmail.com>
Cc: "10.6 11.0" <mesa-stable at lists.freedesktop.org>

---

 src/mesa/drivers/common/meta_generate_mipmap.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/mesa/drivers/common/meta_generate_mipmap.c b/src/mesa/drivers/common/meta_generate_mipmap.c
index ffd71b6..bde170f 100644
--- a/src/mesa/drivers/common/meta_generate_mipmap.c
+++ b/src/mesa/drivers/common/meta_generate_mipmap.c
@@ -131,6 +131,11 @@ _mesa_meta_glsl_generate_mipmap_cleanup(struct gen_mipmap_state *mipmap)
    _mesa_DeleteSamplers(1, &mipmap->Sampler);
    mipmap->Sampler = 0;
 
+   if (mipmap->FBO != 0) {
+      _mesa_DeleteFramebuffers(1, &mipmap->FBO);
+      mipmap->FBO = 0;
+   }
+
    _mesa_meta_blit_shader_table_cleanup(&mipmap->shaders);
 }
 




More information about the mesa-commit mailing list