From 72e232374eda780a5dcd374b55d203d0e2a6d02b Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Fri, 13 Nov 2015 16:09:37 -0800 Subject: [PATCH] meta/generate_mipmap: Don't leak the framebuffer object Signed-off-by: Ian Romanick Reviewed-by: Anuj Phogat Cc: "10.6 11.0" --- 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 ffd71b6a199..bde170fcf6f 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); } -- 2.30.2