diff options
author | Eric Anholt <[email protected]> | 2013-06-20 09:08:30 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2013-06-25 19:19:21 -0700 |
commit | 94ecf913b44d8b966b090723b6ab56cdbe6927e9 (patch) | |
tree | 6c26575f4ad59705694625e1b1d91c49117049b6 | |
parent | 3faccc42adddf1312461ee74385c645aeb4ddb9a (diff) |
intel: Stop doing special _NEW_STENCIL state flagging on drawbuffers.
2/3 packets depending on Stencil._Enabled already checked for
_NEW_BUFFERS, so just add _NEW_BUFFERS to the remaining one.
Reviewed-by: Anuj Phogat <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_cc.c | 4 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vtbl.c | 7 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_wm.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/gen6_depthstencil.c | 2 |
4 files changed, 5 insertions, 10 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_cc.c b/src/mesa/drivers/dri/i965/brw_cc.c index 71f93667510..698af6db87c 100644 --- a/src/mesa/drivers/dri/i965/brw_cc.c +++ b/src/mesa/drivers/dri/i965/brw_cc.c @@ -104,7 +104,7 @@ static void upload_cc_unit(struct brw_context *brw) sizeof(*cc), 64, &brw->cc.state_offset); memset(cc, 0, sizeof(*cc)); - /* _NEW_STENCIL */ + /* _NEW_STENCIL | _NEW_BUFFERS */ if (ctx->Stencil._Enabled) { const unsigned back = ctx->Stencil._BackFace; @@ -230,7 +230,7 @@ static void upload_cc_unit(struct brw_context *brw) const struct brw_tracked_state brw_cc_unit = { .dirty = { - .mesa = _NEW_STENCIL | _NEW_COLOR | _NEW_DEPTH, + .mesa = _NEW_STENCIL | _NEW_COLOR | _NEW_DEPTH | _NEW_BUFFERS, .brw = BRW_NEW_BATCH | BRW_NEW_STATS_WM, .cache = CACHE_NEW_CC_VP }, diff --git a/src/mesa/drivers/dri/i965/brw_vtbl.c b/src/mesa/drivers/dri/i965/brw_vtbl.c index a47b7a33965..2c71c087196 100644 --- a/src/mesa/drivers/dri/i965/brw_vtbl.c +++ b/src/mesa/drivers/dri/i965/brw_vtbl.c @@ -130,12 +130,7 @@ brw_update_draw_buffer(struct intel_context *intel) return; } - /* Mesa's Stencil._Enabled field is updated when - * _NEW_BUFFERS | _NEW_STENCIL, but i965 code assumes that the value - * only changes with _NEW_STENCIL (which seems sensible). So flag it - * here since this is the _NEW_BUFFERS path. - */ - intel->NewGLState |= (_NEW_DEPTH | _NEW_STENCIL); + intel->NewGLState |= _NEW_DEPTH; /* The driver uses this in places that need to look up * renderbuffers' buffer objects. diff --git a/src/mesa/drivers/dri/i965/brw_wm.c b/src/mesa/drivers/dri/i965/brw_wm.c index 60dc14a34a5..6eb4a1dd105 100644 --- a/src/mesa/drivers/dri/i965/brw_wm.c +++ b/src/mesa/drivers/dri/i965/brw_wm.c @@ -379,7 +379,7 @@ static void brw_wm_populate_key( struct brw_context *brw, if (ctx->Depth.Test && ctx->Depth.Mask) /* ?? */ lookup |= IZ_DEPTH_WRITE_ENABLE_BIT; - /* _NEW_STENCIL */ + /* _NEW_STENCIL | _NEW_BUFFERS */ if (ctx->Stencil._Enabled) { lookup |= IZ_STENCIL_TEST_ENABLE_BIT; diff --git a/src/mesa/drivers/dri/i965/gen6_depthstencil.c b/src/mesa/drivers/dri/i965/gen6_depthstencil.c index a8dbc62ab4f..8c471477938 100644 --- a/src/mesa/drivers/dri/i965/gen6_depthstencil.c +++ b/src/mesa/drivers/dri/i965/gen6_depthstencil.c @@ -47,7 +47,7 @@ gen6_upload_depth_stencil_state(struct brw_context *brw) &brw->cc.depth_stencil_state_offset); memset(ds, 0, sizeof(*ds)); - /* _NEW_STENCIL */ + /* _NEW_STENCIL | _NEW_BUFFERS */ if (ctx->Stencil._Enabled) { int back = ctx->Stencil._BackFace; |