freedreno: destroy transfer pool after blitter
authorRob Clark <robclark@freedesktop.org>
Tue, 30 Sep 2014 17:47:58 +0000 (13:47 -0400)
committerRob Clark <robclark@freedesktop.org>
Tue, 30 Sep 2014 20:56:15 +0000 (16:56 -0400)
Blitter can still have transfers hanging around which it frees in
util_blitter_destroy().  So let it clean up before we yank the
transfer_pool from under it.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
src/gallium/drivers/freedreno/freedreno_context.c

index 496a422709937d2584eb9c4786fbafee2019cd2f..3a8545f6716ffad3bbd5d9fe191676bd1a0798d3 100644 (file)
@@ -148,8 +148,6 @@ fd_context_destroy(struct pipe_context *pctx)
        fd_prog_fini(pctx);
        fd_hw_query_fini(pctx);
 
-       util_slab_destroy(&ctx->transfer_pool);
-
        util_dynarray_fini(&ctx->draw_patches);
 
        if (ctx->blitter)
@@ -158,6 +156,8 @@ fd_context_destroy(struct pipe_context *pctx)
        if (ctx->primconvert)
                util_primconvert_destroy(ctx->primconvert);
 
+       util_slab_destroy(&ctx->transfer_pool);
+
        fd_ringmarker_del(ctx->draw_start);
        fd_ringmarker_del(ctx->draw_end);
        fd_ringmarker_del(ctx->binning_start);