radeonsi: don't send IB dword usage to si_need_cs_space
authorMarek Olšák <marek.olsak@amd.com>
Sun, 30 Aug 2015 01:56:13 +0000 (03:56 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Tue, 1 Sep 2015 19:51:15 +0000 (21:51 +0200)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
src/gallium/drivers/radeonsi/si_cp_dma.c
src/gallium/drivers/radeonsi/si_hw_context.c
src/gallium/drivers/radeonsi/si_pipe.h
src/gallium/drivers/radeonsi/si_state.c
src/gallium/drivers/radeonsi/si_state_draw.c

index 7b8a8433cc6bd1428f1c7f3bf649e9be5c2eb7dd..32ab6a9dcbfbc9158cb068074a6492ec170c63f4 100644 (file)
@@ -155,8 +155,7 @@ static void si_clear_buffer(struct pipe_context *ctx, struct pipe_resource *dst,
                unsigned byte_count = MIN2(size, CP_DMA_MAX_BYTE_COUNT);
                unsigned dma_flags = tc_l2_flag;
 
-               si_need_cs_space(sctx, 7 + (sctx->b.flags ? sctx->cache_flush.num_dw : 0),
-                                FALSE);
+               si_need_cs_space(sctx);
 
                /* This must be done after need_cs_space. */
                radeon_add_to_buffer_list(&sctx->b, &sctx->b.rings.gfx,
@@ -226,7 +225,7 @@ void si_copy_buffer(struct si_context *sctx,
                unsigned sync_flags = tc_l2_flag;
                unsigned byte_count = MIN2(size, CP_DMA_MAX_BYTE_COUNT);
 
-               si_need_cs_space(sctx, 7 + (sctx->b.flags ? sctx->cache_flush.num_dw : 0), FALSE);
+               si_need_cs_space(sctx);
 
                /* Flush the caches for the first copy only. Also wait for old CP DMA packets to complete. */
                if (sctx->b.flags) {
index dffc6df6c81682e164850ee176c5383e7c011bf4..1d5d42657e4e80c2fcdb8da96a13f753bc5db9c2 100644 (file)
@@ -27,8 +27,7 @@
 #include "si_pipe.h"
 
 /* initialize */
-void si_need_cs_space(struct si_context *ctx, unsigned num_dw,
-                       boolean count_draw_in)
+void si_need_cs_space(struct si_context *ctx)
 {
        struct radeon_winsys_cs *cs = ctx->b.rings.gfx.cs;
 
index abdc900ece6f0737f322b2a72621fcd4813710a4..1c4c46d916a1d1aa76485c4a60b0304e3f934353 100644 (file)
@@ -317,7 +317,7 @@ void si_dma_copy(struct pipe_context *ctx,
 void si_context_gfx_flush(void *context, unsigned flags,
                          struct pipe_fence_handle **fence);
 void si_begin_new_cs(struct si_context *ctx);
-void si_need_cs_space(struct si_context *ctx, unsigned num_dw, boolean count_draw_in);
+void si_need_cs_space(struct si_context *ctx);
 
 /* si_compute.c */
 void si_init_compute_functions(struct si_context *sctx);
index 183ae4c5bfda2cd1e67d07680cb9b8e1bb70a1ff..9019b3596e6f2059802613d89b80791cac18cfa0 100644 (file)
@@ -3039,7 +3039,7 @@ static void *si_create_blend_custom(struct si_context *sctx, unsigned 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, num_dw, include_draw_vbo);
+       si_need_cs_space((struct si_context*)ctx);
 }
 
 static void si_init_config(struct si_context *sctx);
index 36f15852843365c051c85ac858107782b85b5163..8cb98d7317c1b1cd5624adbe33b8b70f46965e43 100644 (file)
@@ -818,7 +818,7 @@ void si_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *info)
        if (sctx->b.flags)
                si_mark_atom_dirty(sctx, sctx->atoms.s.cache_flush);
 
-       si_need_cs_space(sctx, 0, TRUE);
+       si_need_cs_space(sctx);
 
        /* Emit states. */
        mask = sctx->dirty_atoms;