From: Rob Clark Date: Fri, 21 Apr 2017 20:26:49 +0000 (-0400) Subject: freedreno: drop ring arg from _set_stage() X-Git-Tag: upstream/18.1.0~10531 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=52d2fa37f5337f637d04d012331b40d923ea5354;p=platform%2Fupstream%2Fmesa.git freedreno: drop ring arg from _set_stage() It is always the draw ring. Except for a5xx queries like time-elapsed, where we will eventually want to emit cmds into both binning and draw rings. Signed-off-by: Rob Clark --- diff --git a/src/gallium/drivers/freedreno/freedreno_batch.c b/src/gallium/drivers/freedreno/freedreno_batch.c index 17078d4..5783ee8 100644 --- a/src/gallium/drivers/freedreno/freedreno_batch.c +++ b/src/gallium/drivers/freedreno/freedreno_batch.c @@ -262,7 +262,7 @@ batch_flush(struct fd_batch *batch) /* close out the draw cmds by making sure any active queries are * paused: */ - fd_batch_set_stage(batch, batch->draw, FD_STAGE_NULL); + fd_batch_set_stage(batch, FD_STAGE_NULL); fd_context_all_dirty(batch->ctx); batch_flush_reset_dependencies(batch, true); diff --git a/src/gallium/drivers/freedreno/freedreno_context.h b/src/gallium/drivers/freedreno/freedreno_context.h index 9bc87b4..b50e66c 100644 --- a/src/gallium/drivers/freedreno/freedreno_context.h +++ b/src/gallium/drivers/freedreno/freedreno_context.h @@ -307,8 +307,7 @@ struct fd_context { void (*query_prepare)(struct fd_batch *batch, uint32_t num_tiles); void (*query_prepare_tile)(struct fd_batch *batch, uint32_t n, struct fd_ringbuffer *ring); - void (*query_set_stage)(struct fd_batch *batch, - struct fd_ringbuffer *ring, enum fd_render_stage stage); + void (*query_set_stage)(struct fd_batch *batch, enum fd_render_stage stage); /* * Common pre-cooked VBO state (used for a3xx and later): @@ -388,8 +387,7 @@ fd_supported_prim(struct fd_context *ctx, unsigned prim) } static inline void -fd_batch_set_stage(struct fd_batch *batch, - struct fd_ringbuffer *ring, enum fd_render_stage stage) +fd_batch_set_stage(struct fd_batch *batch, enum fd_render_stage stage) { struct fd_context *ctx = batch->ctx; @@ -404,7 +402,7 @@ fd_batch_set_stage(struct fd_batch *batch, return; if (ctx->query_set_stage) - ctx->query_set_stage(batch, ring, stage); + ctx->query_set_stage(batch, stage); batch->stage = stage; } diff --git a/src/gallium/drivers/freedreno/freedreno_draw.c b/src/gallium/drivers/freedreno/freedreno_draw.c index 7d3fc8e..d5b9a7b 100644 --- a/src/gallium/drivers/freedreno/freedreno_draw.c +++ b/src/gallium/drivers/freedreno/freedreno_draw.c @@ -110,7 +110,7 @@ fd_draw_vbo(struct pipe_context *pctx, const struct pipe_draw_info *info) /* NOTE: needs to be before resource_written(batch->query_buf), otherwise * query_buf may not be created yet. */ - fd_batch_set_stage(batch, batch->draw, FD_STAGE_DRAW); + fd_batch_set_stage(batch, FD_STAGE_DRAW); /* * Figure out the buffers/features we need: @@ -375,7 +375,7 @@ fd_clear(struct pipe_context *pctx, unsigned buffers, return; } - fd_batch_set_stage(batch, batch->draw, FD_STAGE_CLEAR); + fd_batch_set_stage(batch, FD_STAGE_CLEAR); ctx->clear(ctx, buffers, color, depth, stencil); diff --git a/src/gallium/drivers/freedreno/freedreno_query_hw.c b/src/gallium/drivers/freedreno/freedreno_query_hw.c index 2ebf8ad..73c3691 100644 --- a/src/gallium/drivers/freedreno/freedreno_query_hw.c +++ b/src/gallium/drivers/freedreno/freedreno_query_hw.c @@ -380,8 +380,7 @@ fd_hw_query_prepare_tile(struct fd_batch *batch, uint32_t n, } void -fd_hw_query_set_stage(struct fd_batch *batch, struct fd_ringbuffer *ring, - enum fd_render_stage stage) +fd_hw_query_set_stage(struct fd_batch *batch, enum fd_render_stage stage) { if (stage != batch->stage) { struct fd_hw_query *hq; @@ -390,9 +389,9 @@ fd_hw_query_set_stage(struct fd_batch *batch, struct fd_ringbuffer *ring, bool now_active = is_active(hq, stage); if (now_active && !was_active) - resume_query(batch, hq, ring); + resume_query(batch, hq, batch->draw); else if (was_active && !now_active) - pause_query(batch, hq, ring); + pause_query(batch, hq, batch->draw); } } clear_sample_cache(batch); diff --git a/src/gallium/drivers/freedreno/freedreno_query_hw.h b/src/gallium/drivers/freedreno/freedreno_query_hw.h index abd8668..f283985 100644 --- a/src/gallium/drivers/freedreno/freedreno_query_hw.h +++ b/src/gallium/drivers/freedreno/freedreno_query_hw.h @@ -146,8 +146,7 @@ void __fd_hw_sample_destroy(struct fd_context *ctx, struct fd_hw_sample *samp); void fd_hw_query_prepare(struct fd_batch *batch, uint32_t num_tiles); void fd_hw_query_prepare_tile(struct fd_batch *batch, uint32_t n, struct fd_ringbuffer *ring); -void fd_hw_query_set_stage(struct fd_batch *batch, - struct fd_ringbuffer *ring, enum fd_render_stage stage); +void fd_hw_query_set_stage(struct fd_batch *batch, enum fd_render_stage stage); void fd_hw_query_enable(struct fd_batch *batch, struct fd_ringbuffer *ring); void fd_hw_query_register_provider(struct pipe_context *pctx, const struct fd_hw_sample_provider *provider); diff --git a/src/gallium/drivers/freedreno/freedreno_resource.c b/src/gallium/drivers/freedreno/freedreno_resource.c index e4e7aa92..e47ac32 100644 --- a/src/gallium/drivers/freedreno/freedreno_resource.c +++ b/src/gallium/drivers/freedreno/freedreno_resource.c @@ -1091,7 +1091,7 @@ fd_blitter_pipe_begin(struct fd_context *ctx, bool render_cond, bool discard, ctx->cond_query, ctx->cond_cond, ctx->cond_mode); if (ctx->batch) - fd_batch_set_stage(ctx->batch, ctx->batch->draw, stage); + fd_batch_set_stage(ctx->batch, stage); ctx->in_blit = discard; } @@ -1100,7 +1100,7 @@ void fd_blitter_pipe_end(struct fd_context *ctx) { if (ctx->batch) - fd_batch_set_stage(ctx->batch, ctx->batch->draw, FD_STAGE_NULL); + fd_batch_set_stage(ctx->batch, FD_STAGE_NULL); ctx->in_blit = false; } diff --git a/src/gallium/drivers/freedreno/freedreno_state.c b/src/gallium/drivers/freedreno/freedreno_state.c index 54bd548..8f46633 100644 --- a/src/gallium/drivers/freedreno/freedreno_state.c +++ b/src/gallium/drivers/freedreno/freedreno_state.c @@ -126,7 +126,7 @@ fd_set_framebuffer_state(struct pipe_context *pctx, fd_batch_reference(&old_batch, ctx->batch); if (likely(old_batch)) - fd_batch_set_stage(old_batch, old_batch->draw, FD_STAGE_NULL); + fd_batch_set_stage(old_batch, FD_STAGE_NULL); batch = fd_batch_from_fb(&ctx->screen->batch_cache, ctx, framebuffer); fd_batch_reference(&ctx->batch, NULL);