From 3853871ef80d3dcd357b72056f2ce709706ac11c Mon Sep 17 00:00:00 2001 From: Yevhenii Kolesnikov Date: Tue, 9 Jul 2019 15:11:15 +0300 Subject: [PATCH] meta: leaking of BO with DrawPixels ctx->Unpack.BufferObj wasn't unreferenced. Fixes: d492e7b0171 (meta: Fix invalid PBO access from DrawPixels when trying to just alloc.) CC: Eric Anholt Signed-off-by: Yevhenii Kolesnikov Reviewed-by: Eric Anholt --- src/mesa/drivers/common/meta.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c index 18ed6e7f168..65362935320 100644 --- a/src/mesa/drivers/common/meta.c +++ b/src/mesa/drivers/common/meta.c @@ -1468,6 +1468,8 @@ _mesa_meta_setup_drawpix_texture(struct gl_context *ctx, /* load image */ _mesa_TexSubImage2D(tex->Target, 0, 0, 0, width, height, format, type, pixels); + + _mesa_reference_buffer_object(ctx, &save_unpack_obj, NULL); } } else { -- 2.30.2