summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2008-09-03 12:36:43 +0100
committerEric Anholt <[email protected]>2008-09-03 13:31:44 +0100
commite32721c46a713f55a8fd70e61f9cb066eeb69211 (patch)
tree38d334a44748f3b163f1210b048765066a2c3180 /src/mesa/drivers/dri/i965
parent3bb2a24921af0ec419afc928ee5b279982aa01ea (diff)
intel: Fix refcounting on depth buffer initialization in DRI2.
(Reverts a change to work around the problem on 965).
Diffstat (limited to 'src/mesa/drivers/dri/i965')
-rw-r--r--src/mesa/drivers/dri/i965/brw_vtbl.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vtbl.c b/src/mesa/drivers/dri/i965/brw_vtbl.c
index ece01a8c9a5..31e96a250ac 100644
--- a/src/mesa/drivers/dri/i965/brw_vtbl.c
+++ b/src/mesa/drivers/dri/i965/brw_vtbl.c
@@ -75,27 +75,15 @@ static void brw_set_draw_region( struct intel_context *intel,
GLuint num_regions)
{
struct brw_context *brw = brw_context(&intel->ctx);
- struct intel_region *old_depth_region, *old_draw_regions[MAX_DRAW_BUFFERS];
int i;
-
if (brw->state.depth_region != depth_region)
brw->state.dirty.brw |= BRW_NEW_DEPTH_BUFFER;
-
- for (i = 0; i < brw->state.nr_draw_regions; i++) {
- old_draw_regions[i] = brw->state.draw_regions[i];
- brw->state.draw_regions[i] = NULL;
- }
- old_depth_region = brw->state.depth_region;
- brw->state.depth_region = NULL;
-
+ for (i = 0; i < brw->state.nr_draw_regions; i++)
+ intel_region_release(&brw->state.draw_regions[i]);
+ intel_region_release(&brw->state.depth_region);
for (i = 0; i < num_regions; i++)
intel_region_reference(&brw->state.draw_regions[i], draw_regions[i]);
intel_region_reference(&brw->state.depth_region, depth_region);
-
- for (i = 0; i < brw->state.nr_draw_regions; i++)
- intel_region_release(&old_draw_regions[i]);
- intel_region_release(&old_depth_region);
-
brw->state.nr_draw_regions = num_regions;
}