struct intel_mipmap_tree *mt;
uint32_t depth = 1;
bool ok;
+ GLenum target = num_samples > 1 ? GL_TEXTURE_2D_MULTISAMPLE : GL_TEXTURE_2D;
- mt = intel_miptree_create(brw, GL_TEXTURE_2D, format, 0, 0,
+ mt = intel_miptree_create(brw, target, format, 0, 0,
width, height, depth, true, num_samples,
INTEL_MIPTREE_TILING_ANY);
if (!mt)
static void
assert_is_flat(struct intel_mipmap_tree *mt)
{
- assert(mt->target == GL_TEXTURE_2D);
+ assert(mt->target == GL_TEXTURE_2D ||
+ mt->target == GL_TEXTURE_2D_MULTISAMPLE);
assert(mt->first_level == 0);
assert(mt->last_level == 0);
}
assert(mt->num_samples > 1);
/* Only flat, renderbuffer-like miptrees are supported. */
- if (mt->target != GL_TEXTURE_2D ||
+ if (mt->target != GL_TEXTURE_2D_MULTISAMPLE ||
mt->first_level != 0 ||
mt->last_level != 0) {
_mesa_problem(ctx, "attempt to map a multisample miptree for "