diff options
author | Chad Versace <[email protected]> | 2011-04-07 15:44:24 -0700 |
---|---|---|
committer | Chad Versace <[email protected]> | 2011-04-12 17:52:09 -0700 |
commit | 9949d2a2511564226e0d68d303a53cf7d80f0c2b (patch) | |
tree | 708b2713d3d33bacf257b2179f13934637b1946e | |
parent | 3f7318c1b8d2ad4f4aef66362cdb7b9e8dc89eac (diff) |
i965: Remove unnecessary release/reference of brw_context.state.depth_region
Release the old depth region and reference the new one *only* if it has
changed.
Reviewed-by: Kenneth Graunke <[email protected]>
Signed-off-by: Chad Versace <[email protected]>
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vtbl.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vtbl.c b/src/mesa/drivers/dri/i965/brw_vtbl.c index 152ee141568..ce8712a260f 100644 --- a/src/mesa/drivers/dri/i965/brw_vtbl.c +++ b/src/mesa/drivers/dri/i965/brw_vtbl.c @@ -115,13 +115,11 @@ static void brw_set_draw_region( struct intel_context *intel, { struct brw_context *brw = brw_context(&intel->ctx); - /* release old color/depth regions */ - if (brw->state.depth_region != depth_region) + if (brw->state.depth_region != depth_region) { brw->state.dirty.brw |= BRW_NEW_DEPTH_BUFFER; - intel_region_release(&brw->state.depth_region); - - /* reference new color/depth regions */ - intel_region_reference(&brw->state.depth_region, depth_region); + intel_region_release(&brw->state.depth_region); + intel_region_reference(&brw->state.depth_region, depth_region); + } } |