diff options
author | Marek Olšák <[email protected]> | 2016-09-08 00:59:55 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2016-09-09 22:45:06 +0200 |
commit | a67d81580b520aa6adf6c06ef29f27692b1aebe5 (patch) | |
tree | 87422e85374079785e879614668e05e67e485cfa /src/gallium/drivers | |
parent | f9750932ea23f7ee94fff6d3b52aa95cf8db4a91 (diff) |
radeonsi: remove the cache_flush atom
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_compute.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_cp_dma.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_hw_context.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_pipe.h | 1 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_state.c | 1 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_state.h | 3 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_state_draw.c | 10 |
7 files changed, 9 insertions, 12 deletions
diff --git a/src/gallium/drivers/radeonsi/si_compute.c b/src/gallium/drivers/radeonsi/si_compute.c index 5041761b1cb..f43c616b272 100644 --- a/src/gallium/drivers/radeonsi/si_compute.c +++ b/src/gallium/drivers/radeonsi/si_compute.c @@ -474,7 +474,7 @@ static void si_launch_grid( si_initialize_compute(sctx); if (sctx->b.flags) - si_emit_cache_flush(sctx, NULL); + si_emit_cache_flush(sctx); if (!si_switch_compute_shader(sctx, program, &program->shader, info->pc)) return; diff --git a/src/gallium/drivers/radeonsi/si_cp_dma.c b/src/gallium/drivers/radeonsi/si_cp_dma.c index 7d4edc046cd..08d3dfe67e9 100644 --- a/src/gallium/drivers/radeonsi/si_cp_dma.c +++ b/src/gallium/drivers/radeonsi/si_cp_dma.c @@ -170,7 +170,7 @@ static void si_cp_dma_prepare(struct si_context *sctx, struct pipe_resource *dst * Also wait for the previous CP DMA operations. */ if (sctx->b.flags) { - si_emit_cache_flush(sctx, NULL); + si_emit_cache_flush(sctx); *flags |= SI_CP_DMA_RAW_WAIT; } diff --git a/src/gallium/drivers/radeonsi/si_hw_context.c b/src/gallium/drivers/radeonsi/si_hw_context.c index 24b03604890..67e83524ec0 100644 --- a/src/gallium/drivers/radeonsi/si_hw_context.c +++ b/src/gallium/drivers/radeonsi/si_hw_context.c @@ -115,7 +115,7 @@ void si_context_gfx_flush(void *context, unsigned flags, ctx->b.flags |= SI_CONTEXT_INV_GLOBAL_L2 | SI_CONTEXT_INV_VMEM_L1; - si_emit_cache_flush(ctx, NULL); + si_emit_cache_flush(ctx); if (ctx->trace_buf) si_trace_emit(ctx); diff --git a/src/gallium/drivers/radeonsi/si_pipe.h b/src/gallium/drivers/radeonsi/si_pipe.h index a648d868225..1080e7270b7 100644 --- a/src/gallium/drivers/radeonsi/si_pipe.h +++ b/src/gallium/drivers/radeonsi/si_pipe.h @@ -229,7 +229,6 @@ struct si_context { union si_state emitted; /* Atom declarations. */ - struct r600_atom cache_flush; struct si_framebuffer framebuffer; struct si_sample_locs msaa_sample_locs; struct r600_atom db_render_state; diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c index 0d3de9ab31a..1703e42e9b2 100644 --- a/src/gallium/drivers/radeonsi/si_state.c +++ b/src/gallium/drivers/radeonsi/si_state.c @@ -3441,7 +3441,6 @@ void si_init_state_functions(struct si_context *sctx) si_init_external_atom(sctx, &sctx->b.scissors.atom, &sctx->atoms.s.scissors); si_init_external_atom(sctx, &sctx->b.viewports.atom, &sctx->atoms.s.viewports); - si_init_atom(sctx, &sctx->cache_flush, &sctx->atoms.s.cache_flush, si_emit_cache_flush); si_init_atom(sctx, &sctx->framebuffer.atom, &sctx->atoms.s.framebuffer, si_emit_framebuffer_state); si_init_atom(sctx, &sctx->msaa_sample_locs.atom, &sctx->atoms.s.msaa_sample_locs, si_emit_msaa_sample_locs); si_init_atom(sctx, &sctx->db_render_state, &sctx->atoms.s.db_render_state, si_emit_db_render_state); diff --git a/src/gallium/drivers/radeonsi/si_state.h b/src/gallium/drivers/radeonsi/si_state.h index d0e519c4994..e83b4284300 100644 --- a/src/gallium/drivers/radeonsi/si_state.h +++ b/src/gallium/drivers/radeonsi/si_state.h @@ -124,7 +124,6 @@ union si_state { union si_state_atoms { struct { /* The order matters. */ - struct r600_atom *cache_flush; struct r600_atom *render_cond; struct r600_atom *streamout_begin; struct r600_atom *streamout_enable; /* must be after streamout_begin */ @@ -343,7 +342,7 @@ void si_destroy_shader_cache(struct si_screen *sscreen); void si_init_shader_selector_async(void *job, int thread_index); /* si_state_draw.c */ -void si_emit_cache_flush(struct si_context *sctx, struct r600_atom *atom); +void si_emit_cache_flush(struct si_context *sctx); void si_ce_pre_draw_synchronization(struct si_context *sctx); void si_ce_post_draw_synchronization(struct si_context *sctx); void si_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *dinfo); diff --git a/src/gallium/drivers/radeonsi/si_state_draw.c b/src/gallium/drivers/radeonsi/si_state_draw.c index d7325ff37d2..d3e6e1ac937 100644 --- a/src/gallium/drivers/radeonsi/si_state_draw.c +++ b/src/gallium/drivers/radeonsi/si_state_draw.c @@ -706,7 +706,7 @@ static void si_emit_draw_packets(struct si_context *sctx, } } -void si_emit_cache_flush(struct si_context *sctx, struct r600_atom *atom) +void si_emit_cache_flush(struct si_context *sctx) { struct r600_common_context *rctx = &sctx->b; struct radeon_winsys_cs *cs = rctx->gfx.cs; @@ -1029,10 +1029,6 @@ void si_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *info) r600_resource(info->indirect_params)->TC_L2_dirty = false; } - /* Check flush flags. */ - if (sctx->b.flags) - si_mark_atom_dirty(sctx, sctx->atoms.s.cache_flush); - /* Add buffer sizes for memory checking in need_cs_space. */ if (sctx->emit_scratch_reloc && sctx->scratch_buffer) r600_context_add_resource_size(ctx, &sctx->scratch_buffer->b.b); @@ -1048,6 +1044,10 @@ void si_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *info) if (!si_upload_vertex_buffer_descriptors(sctx)) return; + /* Flushed caches prior to emitting states. */ + if (sctx->b.flags) + si_emit_cache_flush(sctx); + /* Emit states. */ mask = sctx->dirty_atoms; while (mask) { |