diff options
7 files changed, 13 insertions, 17 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_batch.c b/src/gallium/drivers/freedreno/freedreno_batch.c index 17078d425e0..5783ee80052 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 9bc87b4f33d..b50e66c90a9 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 7d3fc8e32da..d5b9a7b23a5 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 2ebf8ade585..73c36911471 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 abd86682a9f..f283985679d 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 e4e7aa92a46..e47ac326314 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 54bd54898a3..8f466339799 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); |