summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/mesa/drivers/dri/i965/intel_fbo.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_fbo.c b/src/mesa/drivers/dri/i965/intel_fbo.c
index 201e06f51bf..5ade9e6168a 100644
--- a/src/mesa/drivers/dri/i965/intel_fbo.c
+++ b/src/mesa/drivers/dri/i965/intel_fbo.c
@@ -519,16 +519,19 @@ intel_renderbuffer_update_wrapper(struct brw_context *brw,
intel_miptree_check_level_layer(mt, level, layer);
irb->mt_level = level;
+ int layer_multiplier;
switch (mt->msaa_layout) {
case INTEL_MSAA_LAYOUT_UMS:
case INTEL_MSAA_LAYOUT_CMS:
- irb->mt_layer = layer * mt->num_samples;
+ layer_multiplier = mt->num_samples;
break;
default:
- irb->mt_layer = layer;
+ layer_multiplier = 1;
}
+ irb->mt_layer = layer_multiplier * layer;
+
intel_miptree_reference(&irb->mt, mt);
intel_renderbuffer_set_draw_offset(irb);