meta/generate_mipmap: Don't leak the sampler object
authorIan Romanick <ian.d.romanick@intel.com>
Tue, 10 Nov 2015 20:36:58 +0000 (12:36 -0800)
committerIan Romanick <ian.d.romanick@intel.com>
Fri, 13 Nov 2015 20:29:56 +0000 (12:29 -0800)
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Cc: "10.6 11.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
src/mesa/drivers/common/meta_generate_mipmap.c

index 4800278..a9da0a2 100644 (file)
@@ -128,6 +128,8 @@ _mesa_meta_glsl_generate_mipmap_cleanup(struct gen_mipmap_state *mipmap)
    mipmap->VAO = 0;
    _mesa_DeleteBuffers(1, &mipmap->VBO);
    mipmap->VBO = 0;
+   _mesa_DeleteSamplers(1, &mipmap->Sampler);
+   mipmap->Sampler = 0;
 
    _mesa_meta_blit_shader_table_cleanup(&mipmap->shaders);
 }