From 2d8f7d3c153bf73fa7137b89e194d4e0e79d943d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Sun, 30 Aug 2015 18:46:06 +0200 Subject: [PATCH] radeonsi: use an indirect buffer for init_config MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reviewed-by: Alex Deucher Acked-by: Christian König --- src/gallium/drivers/radeonsi/si_state.c | 1 + src/gallium/drivers/radeonsi/si_state_shaders.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c index e31895d6933..1e2f32a8799 100644 --- a/src/gallium/drivers/radeonsi/si_state.c +++ b/src/gallium/drivers/radeonsi/si_state.c @@ -3392,5 +3392,6 @@ static void si_init_config(struct si_context *sctx) si_pm4_add_bo(pm4, sctx->border_color_buffer, RADEON_USAGE_READ, RADEON_PRIO_SHADER_DATA); + si_pm4_upload_indirect_buffer(sctx, pm4); sctx->init_config = pm4; } diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c b/src/gallium/drivers/radeonsi/si_state_shaders.c index 78b68bc3dfe..db45cc181c6 100644 --- a/src/gallium/drivers/radeonsi/si_state_shaders.c +++ b/src/gallium/drivers/radeonsi/si_state_shaders.c @@ -1087,6 +1087,7 @@ static void si_init_gs_rings(struct si_context *sctx) /* Flush the context to re-emit the init_config state. * This is done only once in a lifetime of a context. */ + si_pm4_upload_indirect_buffer(sctx, sctx->init_config); sctx->b.initial_gfx_cs_size = 0; /* force flush */ si_context_gfx_flush(sctx, RADEON_FLUSH_ASYNC, NULL); @@ -1288,6 +1289,7 @@ static void si_init_tess_factor_ring(struct si_context *sctx) /* Flush the context to re-emit the init_config state. * This is done only once in a lifetime of a context. */ + si_pm4_upload_indirect_buffer(sctx, sctx->init_config); sctx->b.initial_gfx_cs_size = 0; /* force flush */ si_context_gfx_flush(sctx, RADEON_FLUSH_ASYNC, NULL); -- 2.30.2