radeonsi: start seperating commands into si_commands.c
authorChristian Koenig <christian.koenig@amd.com>
Thu, 20 Sep 2012 10:15:11 +0000 (12:15 +0200)
committerChristian König <deathsimple@vodafone.de>
Wed, 26 Sep 2012 09:05:31 +0000 (11:05 +0200)
Signed-off-by: Christian Koenig <christian.koenig@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
src/gallium/drivers/radeonsi/si_commands.c
src/gallium/drivers/radeonsi/si_state.c
src/gallium/drivers/radeonsi/si_state.h

index e9492b8e81ec1a3cf1977f98eb584d1d9ec07225..5215a342f415c7077bd058b72a0c19efe72056d8 100644 (file)
 #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);
index 4def9a8200551f3859754fa2ff2cce6cf0ba920e..8d198483dc184dd4d6b36bcdb00e820118cbc6e7 100644 (file)
@@ -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);
 
index 5c908a701cefe234c8953d13312f3e93a6825326..5e945ec25e074368ea26ebefc9c9cf2361bd1b85 100644 (file)
@@ -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