summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/panfrost/pan_job.c
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2019-07-12 13:05:14 -0700
committerAlyssa Rosenzweig <[email protected]>2019-07-12 15:31:48 -0700
commit37097b2f3818e3a30319600f3441b96dc1261382 (patch)
tree6ffbe1f243b92d291ec7746005150878e34d1277 /src/gallium/drivers/panfrost/pan_job.c
parent0f5ad9efccc28fc78883ef10a1aad83d1013a4c3 (diff)
panfrost: Recycle fixed-size transient BOs
The usual case. We use the bitset to mark freedom and seize it. Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/gallium/drivers/panfrost/pan_job.c')
-rw-r--r--src/gallium/drivers/panfrost/pan_job.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gallium/drivers/panfrost/pan_job.c b/src/gallium/drivers/panfrost/pan_job.c
index a802030769f..0faefe2157a 100644
--- a/src/gallium/drivers/panfrost/pan_job.c
+++ b/src/gallium/drivers/panfrost/pan_job.c
@@ -61,6 +61,14 @@ panfrost_free_job(struct panfrost_context *ctx, struct panfrost_job *job)
panfrost_bo_unreference(ctx->base.screen, bo);
}
+ /* Free up the transient BOs we're sitting on */
+ struct panfrost_screen *screen = pan_screen(ctx->base.screen);
+
+ util_dynarray_foreach(&job->transient_indices, unsigned, index) {
+ /* Mark it free */
+ BITSET_SET(screen->free_transient, *index);
+ }
+
_mesa_hash_table_remove_key(ctx->jobs, &job->key);
if (ctx->job == job)