From 7773c7109c9a3b31767fab012183f64b932264a7 Mon Sep 17 00:00:00 2001 From: Christian Koenig Date: Thu, 20 Sep 2012 12:15:11 +0200 Subject: radeonsi: start seperating commands into si_commands.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christian Koenig Reviewed-by: Michel Dänzer --- src/gallium/drivers/radeonsi/si_commands.c | 8 ++++++++ src/gallium/drivers/radeonsi/si_state.c | 5 +---- src/gallium/drivers/radeonsi/si_state.h | 1 + 3 files changed, 10 insertions(+), 4 deletions(-) (limited to 'src/gallium/drivers/radeonsi') diff --git a/src/gallium/drivers/radeonsi/si_commands.c b/src/gallium/drivers/radeonsi/si_commands.c index e9492b8e81e..5215a342f41 100644 --- a/src/gallium/drivers/radeonsi/si_commands.c +++ b/src/gallium/drivers/radeonsi/si_commands.c @@ -28,6 +28,14 @@ #include "radeonsi_pm4.h" #include "sid.h" +void si_cmd_context_control(struct si_pm4_state *pm4) +{ + si_pm4_cmd_begin(pm4, PKT3_CONTEXT_CONTROL); + si_pm4_cmd_add(pm4, 0x80000000); + si_pm4_cmd_add(pm4, 0x80000000); + si_pm4_cmd_end(pm4, false); +} + void si_cmd_surface_sync(struct si_pm4_state *pm4, uint32_t cp_coher_cntl) { si_pm4_cmd_begin(pm4, PKT3_SURFACE_SYNC); diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c index 4def9a82005..8d198483dc1 100644 --- a/src/gallium/drivers/radeonsi/si_state.c +++ b/src/gallium/drivers/radeonsi/si_state.c @@ -2596,10 +2596,7 @@ void si_init_config(struct r600_context *rctx) { struct si_pm4_state *pm4 = CALLOC_STRUCT(si_pm4_state); - si_pm4_cmd_begin(pm4, PKT3_CONTEXT_CONTROL); - si_pm4_cmd_add(pm4, 0x80000000); - si_pm4_cmd_add(pm4, 0x80000000); - si_pm4_cmd_end(pm4, false); + si_cmd_context_control(pm4); si_pm4_set_reg(pm4, R_028A4C_PA_SC_MODE_CNTL_1, 0x0); diff --git a/src/gallium/drivers/radeonsi/si_state.h b/src/gallium/drivers/radeonsi/si_state.h index 5c908a701ce..5e945ec25e0 100644 --- a/src/gallium/drivers/radeonsi/si_state.h +++ b/src/gallium/drivers/radeonsi/si_state.h @@ -159,6 +159,7 @@ void si_set_so_targets(struct pipe_context *ctx, void si_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *dinfo); /* si_commands.c */ +void si_cmd_context_control(struct si_pm4_state *pm4); void si_cmd_surface_sync(struct si_pm4_state *pm4, uint32_t cp_coher_cntl); #endif -- cgit v1.2.1