freedreno: fix memory leak
authorRob Clark <robdclark@gmail.com>
Fri, 24 Mar 2017 21:03:05 +0000 (17:03 -0400)
committerRob Clark <robdclark@gmail.com>
Fri, 24 Mar 2017 21:49:00 +0000 (17:49 -0400)
Otherwise blitter would still hold a ref to, for example, sampler-
views.

To reproduce:

   glmark2 -b desktop:duration=2 --run-forever

Fixes: a8e6734 ("freedreno: support for using generic clear path")
Cc: "13.0 17.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
src/gallium/drivers/freedreno/freedreno_draw.c

index edeb88bf34b7719bbe634b19916a860ec15861df..a3c35cbce9633f0162693f0e3d5dccdf925e2c12 100644 (file)
@@ -276,6 +276,8 @@ fd_blitter_clear(struct pipe_context *pctx, unsigned buffers,
        util_blitter_restore_constant_buffer_state(blitter);
        util_blitter_restore_vertex_states(blitter);
        util_blitter_restore_fragment_states(blitter);
+       util_blitter_restore_textures(blitter);
+       util_blitter_restore_fb_state(blitter);
        util_blitter_restore_render_cond(blitter);
        util_blitter_unset_running_flag(blitter);