meta: leaking of BO with DrawPixels
authorYevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com>
Tue, 9 Jul 2019 12:11:15 +0000 (15:11 +0300)
committerEric Anholt <eric@anholt.net>
Tue, 16 Jul 2019 20:06:56 +0000 (20:06 +0000)
ctx->Unpack.BufferObj wasn't unreferenced.

Fixes: d492e7b0171 (meta: Fix invalid PBO access from DrawPixels when
trying to just alloc.)
CC: Eric Anholt <eric@anholt.net>
Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/drivers/common/meta.c

index 18ed6e7f16852267cb16e540dc36a94e526c871f..65362935320d320fdea94c400cd44cdd415d0d24 100644 (file)
@@ -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 {