summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/mesa/drivers/dri/i965/brw_vtbl.c10
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);
+ }
}