radeonsi: remove r600_pipe_common::need_gfx_cs_space
authorMarek Olšák <marek.olsak@amd.com>
Sun, 1 Apr 2018 17:32:47 +0000 (13:32 -0400)
committerMarek Olšák <marek.olsak@amd.com>
Thu, 5 Apr 2018 19:34:58 +0000 (15:34 -0400)
Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
src/gallium/drivers/radeon/r600_pipe_common.h
src/gallium/drivers/radeon/r600_query.c
src/gallium/drivers/radeonsi/si_state.c

index b67aae6cdfe12007a3bfe799efcf4e4096886720..09bc4ea978323e30bf86ca891605ca0cb48ca544 100644 (file)
@@ -512,10 +512,6 @@ struct r600_common_context {
                                          bool old_perfect_enable);
 
        void (*save_qbo_state)(struct pipe_context *ctx, struct r600_qbo_state *st);
-
-       /* This ensures there is enough space in the command stream. */
-       void (*need_gfx_cs_space)(struct pipe_context *ctx, unsigned num_dw,
-                                 bool include_draw_vbo);
 };
 
 /* r600_buffer_common.c */
index 0ec53dd9192bd2217d3ccb8c5f211617891f1413..bf76ae88dde88551338d94f55181ab96365b5418 100644 (file)
@@ -807,8 +807,7 @@ static void r600_query_hw_emit_start(struct r600_common_context *ctx,
        r600_update_occlusion_query_state(ctx, query->b.type, 1);
        si_update_prims_generated_query_state((void*)ctx, query->b.type, 1);
 
-       ctx->need_gfx_cs_space(&ctx->b, query->num_cs_dw_begin + query->num_cs_dw_end,
-                              true);
+       si_need_cs_space((struct si_context*)ctx);
 
        /* Get a new query buffer if needed. */
        if (query->buffer.results_end + query->result_size > query->buffer.buf->b.b.width0) {
@@ -904,9 +903,8 @@ static void r600_query_hw_emit_stop(struct r600_common_context *ctx,
                return; // previous buffer allocation failure
 
        /* The queries which need begin already called this in begin_query. */
-       if (query->flags & R600_QUERY_HW_FLAG_NO_START) {
-               ctx->need_gfx_cs_space(&ctx->b, query->num_cs_dw_end, false);
-       }
+       if (query->flags & R600_QUERY_HW_FLAG_NO_START)
+               si_need_cs_space((struct si_context*)ctx);
 
        /* emit end query */
        va = query->buffer.buf->gpu_address + query->buffer.results_end;
@@ -1876,7 +1874,7 @@ void si_resume_queries(struct r600_common_context *ctx)
        assert(ctx->num_cs_dw_queries_suspend == 0);
 
        /* Check CS space here. Resuming must not be interrupted by flushes. */
-       ctx->need_gfx_cs_space(&ctx->b, num_cs_dw, true);
+       si_need_cs_space((struct si_context*)ctx);
 
        LIST_FOR_EACH_ENTRY(query, &ctx->active_queries, list) {
                r600_query_hw_emit_start(ctx, query);
index cd64d3bc0fb208dc48e0ccaa66d2d523897f7256..08ba5c0b7dca6c8e2dd98c99b92e0acb8f2d8d0c 100644 (file)
@@ -4523,12 +4523,6 @@ static void *si_create_blend_custom(struct si_context *sctx, unsigned mode)
        return si_create_blend_state_mode(&sctx->b.b, &blend, mode);
 }
 
-static void si_need_gfx_cs_space(struct pipe_context *ctx, unsigned num_dw,
-                                bool include_draw_vbo)
-{
-       si_need_cs_space((struct si_context*)ctx);
-}
-
 static void si_init_config(struct si_context *sctx);
 
 void si_init_state_functions(struct si_context *sctx)
@@ -4596,7 +4590,6 @@ void si_init_state_functions(struct si_context *sctx)
        sctx->b.b.set_active_query_state = si_set_active_query_state;
        sctx->b.set_occlusion_query_state = si_set_occlusion_query_state;
        sctx->b.save_qbo_state = si_save_qbo_state;
-       sctx->b.need_gfx_cs_space = si_need_gfx_cs_space;
 
        sctx->b.b.draw_vbo = si_draw_vbo;