This is the effective layer count, for clears etc. This differs from the
depth of the miptree level when views are involved.
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>
if (!irb->mt)
return false;
+ irb->layer_count = 1;
+
return true;
}
rb->Format = image->format;
rb->_BaseFormat = _mesa_base_fbo_format(ctx, image->internal_format);
rb->NeedsFinishRenderTexture = true;
+ irb->layer_count = 1;
}
/**
}
rb = &irb->Base.Base;
+ irb->layer_count = 1;
_mesa_init_renderbuffer(rb, 0);
rb->ClassID = INTEL_RB_CLASS;
irb->mt_layer = layer_multiplier * layer;
+ if (layered) {
+ irb->layer_count = image->TexObject->NumLayers ?: mt->level[level].depth / layer_multiplier;
+ } else {
+ irb->layer_count = 1;
+ }
+
intel_miptree_reference(&irb->mt, mt);
intel_renderbuffer_set_draw_offset(irb);
*/
unsigned int mt_level;
unsigned int mt_layer;
+
+ /* The number of attached logical layers. */
+ unsigned int layer_count;
/** \} */
GLuint draw_x, draw_y; /**< Offset of drawing within the region */