i965/blorp: Use irb->layer_count in clear
authorChris Forbes <chrisf@ijw.co.nz>
Tue, 21 Jan 2014 08:55:38 +0000 (21:55 +1300)
committerChris Forbes <chrisf@ijw.co.nz>
Thu, 10 Apr 2014 06:27:41 +0000 (18:27 +1200)
Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Eric Anholt <eric@anholt.net>
src/mesa/drivers/dri/i965/brw_blorp_clear.cpp

index d8aa53c854cf53558fa7aac10dc47773e4afdd94..081f2d950286a30e491dbbe49d345fcdfaeda71d 100644 (file)
@@ -585,8 +585,7 @@ brw_blorp_clear_color(struct brw_context *brw, struct gl_framebuffer *fb,
             (irb->mt->msaa_layout == INTEL_MSAA_LAYOUT_UMS ||
              irb->mt->msaa_layout == INTEL_MSAA_LAYOUT_CMS) ?
             irb->mt->num_samples : 1;
-         unsigned num_layers =
-            irb->mt->level[irb->mt_level].depth / layer_multiplier;
+         unsigned num_layers = irb->layer_count;
          for (unsigned layer = 0; layer < num_layers; layer++) {
             if (!do_single_blorp_clear(brw, fb, rb, buf, partial_clear,
                                        layer * layer_multiplier)) {