diff options
author | Chris Forbes <[email protected]> | 2014-01-21 21:53:21 +1300 |
---|---|---|
committer | Chris Forbes <[email protected]> | 2014-04-10 18:27:41 +1200 |
commit | 0a08147fcbd34c2ff810d10b596e801b92730ef4 (patch) | |
tree | 8daf0c545ec079844bc9972fdc9cf3932c814023 /src/mesa/drivers/dri/i965 | |
parent | a76cde35d8e9a6e2ac2581e9c314f84b2cc92869 (diff) |
i965: Pull out layer_multiplier in intel_update_renderbuffer_wrapper
We're about to need this in another place.
Signed-off-by: Chris Forbes <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Acked-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965')
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_fbo.c | 7 |
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); |