freedreno: drop ring arg from _set_stage()
authorRob Clark <robdclark@gmail.com>
Fri, 21 Apr 2017 20:26:49 +0000 (16:26 -0400)
committerRob Clark <robdclark@gmail.com>
Sat, 22 Apr 2017 14:03:02 +0000 (10:03 -0400)
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 <robdclark@gmail.com>
src/gallium/drivers/freedreno/freedreno_batch.c
src/gallium/drivers/freedreno/freedreno_context.h
src/gallium/drivers/freedreno/freedreno_draw.c
src/gallium/drivers/freedreno/freedreno_query_hw.c
src/gallium/drivers/freedreno/freedreno_query_hw.h
src/gallium/drivers/freedreno/freedreno_resource.c
src/gallium/drivers/freedreno/freedreno_state.c

index 17078d425e090f4c0d5bfe878a9fa4958656fc66..5783ee800521f257be41d6d776f3db5c4822e9b9 100644 (file)
@@ -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);
index 9bc87b4f33d728c9fb73ac38eb1b97434eef8c57..b50e66c90a99ba99eea0f6e215fd75693cdda650 100644 (file)
@@ -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;
 }
index 7d3fc8e32da04511bd48cfc54ea2f6f94d67d0d5..d5b9a7b23a5323dd54d325a699c5c00d78a02704 100644 (file)
@@ -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);
 
index 2ebf8ade585badb92cd92d932b5dc6307e832074..73c3691147122bcaf2d42c53330d342ae7257886 100644 (file)
@@ -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);
index abd86682a9ff5f328081ba911ae27c59fb9824d5..f283985679d03e387ff0862314159b9cac54a0bd 100644 (file)
@@ -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);
index e4e7aa92a462329e588825909abef654fba51cf5..e47ac326314cbd5b9452401ec576114fea08cf32 100644 (file)
@@ -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;
 }
 
index 54bd54898a3421b418bde645bcb812c408091051..8f466339799970d1a1bf98fb6720127c2e267180 100644 (file)
@@ -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);