From 40e20324e0c304960b86f4721270e7c1d5379318 Mon Sep 17 00:00:00 2001 From: Boris Brezillon Date: Thu, 5 Sep 2019 18:19:40 +0200 Subject: [PATCH] panfrost: Get rid of the unused 'flush jobs accessing res' infra Will be replaced by something similar but using a BOs as keys instead of resources. Signed-off-by: Boris Brezillon Reviewed-by: Alyssa Rosenzweig --- src/gallium/drivers/panfrost/pan_context.h | 3 --- src/gallium/drivers/panfrost/pan_job.c | 38 ------------------------------ src/gallium/drivers/panfrost/pan_job.h | 8 ------- 3 files changed, 49 deletions(-) diff --git a/src/gallium/drivers/panfrost/pan_context.h b/src/gallium/drivers/panfrost/pan_context.h index 9723d56..586b6d8 100644 --- a/src/gallium/drivers/panfrost/pan_context.h +++ b/src/gallium/drivers/panfrost/pan_context.h @@ -114,9 +114,6 @@ struct panfrost_context { struct panfrost_batch *batch; struct hash_table *batches; - /* panfrost_resource -> panfrost_job */ - struct hash_table *write_jobs; - /* Within a launch_grid call.. */ const struct pipe_grid_info *compute_grid; diff --git a/src/gallium/drivers/panfrost/pan_job.c b/src/gallium/drivers/panfrost/pan_job.c index 4d30c2a..0f8fe1a 100644 --- a/src/gallium/drivers/panfrost/pan_job.c +++ b/src/gallium/drivers/panfrost/pan_job.c @@ -164,21 +164,6 @@ panfrost_batch_get_polygon_list(struct panfrost_batch *batch, unsigned size) } void -panfrost_flush_jobs_writing_resource(struct panfrost_context *panfrost, - struct pipe_resource *prsc) -{ -#if 0 - struct hash_entry *entry = _mesa_hash_table_search(panfrost->write_jobs, - prsc); - if (entry) { - struct panfrost_batch *batch = entry->data; - panfrost_batch_submit(job); - } -#endif - /* TODO stub */ -} - -void panfrost_batch_submit(struct panfrost_batch *batch) { assert(batch); @@ -353,25 +338,6 @@ panfrost_batch_clear(struct panfrost_batch *batch, ctx->pipe_framebuffer.height); } -void -panfrost_flush_jobs_reading_resource(struct panfrost_context *panfrost, - struct pipe_resource *prsc) -{ - struct panfrost_resource *rsc = pan_resource(prsc); - - panfrost_flush_jobs_writing_resource(panfrost, prsc); - - hash_table_foreach(panfrost->batches, entry) { - struct panfrost_batch *batch = entry->data; - - if (_mesa_set_search(batch->bos, rsc->bo)) { - printf("TODO: submit job for flush\n"); - //panfrost_batch_submit(job); - continue; - } - } -} - static bool panfrost_batch_compare(const void *a, const void *b) { @@ -415,8 +381,4 @@ panfrost_batch_init(struct panfrost_context *ctx) ctx->batches = _mesa_hash_table_create(ctx, panfrost_batch_hash, panfrost_batch_compare); - - ctx->write_jobs = _mesa_hash_table_create(ctx, - _mesa_hash_pointer, - _mesa_key_pointer_equal); } diff --git a/src/gallium/drivers/panfrost/pan_job.h b/src/gallium/drivers/panfrost/pan_job.h index 7854e0a..a5347f8 100644 --- a/src/gallium/drivers/panfrost/pan_job.h +++ b/src/gallium/drivers/panfrost/pan_job.h @@ -133,14 +133,6 @@ void panfrost_batch_add_bo(struct panfrost_batch *batch, struct panfrost_bo *bo); void -panfrost_flush_jobs_writing_resource(struct panfrost_context *panfrost, - struct pipe_resource *prsc); - -void -panfrost_flush_jobs_reading_resource(struct panfrost_context *panfrost, - struct pipe_resource *prsc); - -void panfrost_batch_submit(struct panfrost_batch *batch); void -- 2.7.4