*/
assert(mt->mesaFormat == image->base.Base.TexFormat);
- radeon_mipmap_level *srclvl = &image->mt->levels[image->mtlevel];
+ radeon_mipmap_level *srclvl = &image->mt->levels[image->base.Base.Level];
- assert(image->mtlevel == level);
+ assert(image->base.Base.Level == level);
assert(srclvl->size == dstlvl->size);
assert(srclvl->rowstride == dstlvl->rowstride);
radeon_bo_unmap(mt->bo);
radeon_miptree_reference(mt, &image->mt);
- image->mtface = face;
- image->mtlevel = level;
}
/**
for (i = 0; i < mtCount; ++i) {
if (mts[i] == img->mt) {
found = 1;
- mtSizes[i] += img->mt->levels[img->mtlevel].size;
+ mtSizes[i] += img->mt->levels[img->base.Base.Level].size;
break;
}
}
if (!found && radeon_miptree_matches_texture(img->mt, &texObj->base)) {
- mtSizes[mtCount] = img->mt->levels[img->mtlevel].size;
+ mtSizes[mtCount] = img->mt->levels[img->base.Base.Level].size;
mts[mtCount] = img->mt;
mtCount++;
}
return;
}
- lvl = &image->mt->levels[image->mtlevel];
+ lvl = &image->mt->levels[image->base.Base.Level];
- image->base.Data = image->mt->bo->ptr + lvl->faces[image->mtface].offset;
+ image->base.Data = image->mt->bo->ptr + lvl->faces[image->base.Base.Face].offset;
image->base.RowStride = lvl->rowstride / _mesa_get_format_bytes(image->base.Base.TexFormat);
}
} else if (likely(mt)) {
radeon_bo_map(mt->bo, write);
radeon_mipmap_level *lvl = &image->mt->levels[texImage->Level];
- void *base = mt->bo->ptr + lvl->faces[image->mtface].offset;
+ void *base = mt->bo->ptr + lvl->faces[image->base.Base.Face].offset;
*stride = lvl->rowstride;
*map = base + (slice * height) * *stride;
/* Miptree alocation may have failed,
* when there was no image for baselevel specified */
if (t->mt) {
- image->mtface = face;
- image->mtlevel = level;
radeon_miptree_reference(t->mt, &image->mt);
} else
radeon_print(RADEON_TEXTURE, RADEON_VERBOSE,
__func__, ctx, texObj, texImage, compressed);
if (image->mt) {
- dstRowStride = image->mt->levels[image->mtlevel].rowstride;
+ dstRowStride = image->mt->levels[image->base.Base.Level].rowstride;
} else if (t->bo) {
/* TFP case */
dstRowStride = get_texture_image_row_stride(rmesa, texImage->TexFormat, width, 0);
radeon_try_alloc_miptree(radeon, t);
- radeonImage->mtface = _mesa_tex_target_to_face(target);
- radeonImage->mtlevel = 0;
radeon_miptree_reference(t->mt, &radeonImage->mt);
if (t->mt == NULL)
t->mt->bo = image->bo;
if (!radeon_miptree_matches_image(t->mt, &radeonImage->base.Base,
- radeonImage->mtface, 0))
+ radeonImage->base.Base.Face, 0))
fprintf(stderr, "miptree doesn't match image\n");
}
#endif