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

Author: Yevhenii Kolesnikov <[email protected]>
Date:   Tue Jul  9 15:11:15 2019 +0300

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 <[email protected]>
Signed-off-by: Yevhenii Kolesnikov <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>

---

 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 {

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to