diff options
author | Eric Anholt <[email protected]> | 2011-10-22 10:53:18 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2011-10-29 12:16:24 -0700 |
commit | c0574d5a903df450b694c13018149cb2d9978ba5 (patch) | |
tree | 4e1fa76cdfa618e81e7cf7b4ad0860d8baccd37d /src/mesa | |
parent | 7a874d04a8410a2b778b29ba85797eaf45d96c84 (diff) |
i965/gen7: Fold prepare() and emit() of SF CLIP/VP state together.
The prepare() only made state for its emit(), not anybody else.
Reviewed-by: Kenneth Graunke <[email protected]>
Acked-by: Paul Berry <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/i965/gen7_viewport_state.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/mesa/drivers/dri/i965/gen7_viewport_state.c b/src/mesa/drivers/dri/i965/gen7_viewport_state.c index b1aa38bc357..252a35b21fc 100644 --- a/src/mesa/drivers/dri/i965/gen7_viewport_state.c +++ b/src/mesa/drivers/dri/i965/gen7_viewport_state.c @@ -27,9 +27,10 @@ #include "intel_batchbuffer.h" static void -prepare_sf_clip_viewport(struct brw_context *brw) +gen7_upload_sf_clip_viewport(struct brw_context *brw) { - struct gl_context *ctx = &brw->intel.ctx; + struct intel_context *intel = &brw->intel; + struct gl_context *ctx = &intel->ctx; const GLfloat depth_scale = 1.0F / ctx->DrawBuffer->_DepthMaxF; GLfloat y_scale, y_bias; const bool render_to_fbo = (ctx->DrawBuffer->Name != 0); @@ -63,11 +64,6 @@ prepare_sf_clip_viewport(struct brw_context *brw) vp->viewport.m30 = v[MAT_TX]; vp->viewport.m31 = v[MAT_TY] * y_scale + y_bias; vp->viewport.m32 = v[MAT_TZ] * depth_scale; -} - -static void upload_sf_clip_viewport_state_pointer(struct brw_context *brw) -{ - struct intel_context *intel = &brw->intel; BEGIN_BATCH(2); OUT_BATCH(_3DSTATE_VIEWPORT_STATE_POINTERS_SF_CL << 16 | (2 - 2)); @@ -81,8 +77,7 @@ const struct brw_tracked_state gen7_sf_clip_viewport = { .brw = BRW_NEW_BATCH, .cache = 0, }, - .prepare = prepare_sf_clip_viewport, - .emit = upload_sf_clip_viewport_state_pointer, + .emit = gen7_upload_sf_clip_viewport, }; /* ----------------------------------------------------- */ |