i965/gen6: Move viewport state setup to emit() time.
authorEric Anholt <eric@anholt.net>
Sat, 22 Oct 2011 18:18:56 +0000 (11:18 -0700)
committerEric Anholt <eric@anholt.net>
Sat, 29 Oct 2011 19:16:56 +0000 (12:16 -0700)
Only the emit() for the pointers into the batch later in this file
cares.

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

index ab378d3fc0e0fad3c7477cba189e1e5c5fabade7..9ff2bd95680b49122bb4813236b086bee42b372b 100644 (file)
@@ -39,7 +39,7 @@
  * up in the guardband or not.
  */
 static void
-prepare_clip_vp(struct brw_context *brw)
+gen6_upload_clip_vp(struct brw_context *brw)
 {
    struct brw_clipper_viewport *vp;
 
@@ -60,11 +60,11 @@ const struct brw_tracked_state gen6_clip_vp = {
       .brw = BRW_NEW_BATCH,
       .cache = 0,
    },
-   .prepare = prepare_clip_vp,
+   .emit = gen6_upload_clip_vp,
 };
 
 static void
-prepare_sf_vp(struct brw_context *brw)
+gen6_upload_sf_vp(struct brw_context *brw)
 {
    struct gl_context *ctx = &brw->intel.ctx;
    const GLfloat depth_scale = 1.0F / ctx->DrawBuffer->_DepthMaxF;
@@ -103,7 +103,7 @@ const struct brw_tracked_state gen6_sf_vp = {
       .brw = BRW_NEW_BATCH,
       .cache = 0,
    },
-   .prepare = prepare_sf_vp,
+   .emit = gen6_upload_sf_vp,
 };
 
 static void upload_viewport_state_pointers(struct brw_context *brw)