i965/gen6: Move setup of CC state batches to emit time.
authorEric Anholt <eric@anholt.net>
Sat, 22 Oct 2011 17:37:14 +0000 (10:37 -0700)
committerEric Anholt <eric@anholt.net>
Sat, 29 Oct 2011 19:16:15 +0000 (12:16 -0700)
This is part of a series trying to eliminate the separate prepare()
hook in state upload.  The prepare() hook existed to support the
check_aperture in between calculating state updates and setting up the
batch, but there should be no reason for that any more.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Paul Berry <stereotype441@gmail.com>
src/mesa/drivers/dri/i965/gen6_cc.c
src/mesa/drivers/dri/i965/gen6_depthstencil.c

index b3ad157d032d6148d01a23f05c2dbbc2a2333d2b..916ec7d0456a90020629023a5c906a95ce102679 100644 (file)
@@ -33,7 +33,7 @@
 #include "main/macros.h"
 
 static void
-prepare_blend_state(struct brw_context *brw)
+gen6_upload_blend_state(struct brw_context *brw)
 {
    struct gl_context *ctx = &brw->intel.ctx;
    struct gen6_blend_state *blend;
@@ -151,11 +151,11 @@ const struct brw_tracked_state gen6_blend_state = {
       .brw = BRW_NEW_BATCH,
       .cache = 0,
    },
-   .prepare = prepare_blend_state,
+   .emit = gen6_upload_blend_state,
 };
 
 static void
-gen6_prepare_color_calc_state(struct brw_context *brw)
+gen6_upload_color_calc_state(struct brw_context *brw)
 {
    struct gl_context *ctx = &brw->intel.ctx;
    struct gen6_color_calc_state *cc;
@@ -187,7 +187,7 @@ const struct brw_tracked_state gen6_color_calc_state = {
       .brw = BRW_NEW_BATCH,
       .cache = 0,
    },
-   .prepare = gen6_prepare_color_calc_state,
+   .emit = gen6_upload_color_calc_state,
 };
 
 static void upload_cc_state_pointers(struct brw_context *brw)
index 5d14147db3dbe1faca4c74aa31479d13c95d1c95..72e86879b2bb95d9fb3405031d6ce749a1336793 100644 (file)
@@ -29,7 +29,7 @@
 #include "brw_state.h"
 
 static void
-gen6_prepare_depth_stencil_state(struct brw_context *brw)
+gen6_upload_depth_stencil_state(struct brw_context *brw)
 {
    struct gl_context *ctx = &brw->intel.ctx;
    struct gen6_depth_stencil_state *ds;
@@ -92,5 +92,5 @@ const struct brw_tracked_state gen6_depth_stencil_state = {
       .brw = BRW_NEW_BATCH,
       .cache = 0,
    },
-   .prepare = gen6_prepare_depth_stencil_state,
+   .emit = gen6_upload_depth_stencil_state,
 };