intel_get_image_dims(&intelImage->base.Base, &width, &height, &depth);
- if (old_mt && old_mt->surf.size > 0) {
+ if (old_mt) {
old_width = old_mt->surf.logical_level0_px.width;
old_height = old_mt->surf.logical_level0_px.height;
old_depth = old_mt->surf.dim == ISL_SURF_DIM_3D ?
old_mt->surf.logical_level0_px.depth :
old_mt->surf.logical_level0_px.array_len;
- } else if (old_mt) {
- old_width = old_mt->logical_width0;
- old_height = old_mt->logical_height0;
- old_depth = old_mt->logical_depth0;
}
DBG("%s\n", __func__);
struct intel_texture_image *intel_image = intel_texture_image(image);
_mesa_init_teximage_fields(&brw->ctx, image,
- mt->logical_width0, mt->logical_height0, 1,
- 0, internal_format, mt->format);
+ mt->surf.logical_level0_px.width,
+ mt->surf.logical_level0_px.height, 1,
+ 0, internal_format, mt->format);
brw->ctx.Driver.FreeTextureImageBuffer(&brw->ctx, image);
/* Since we are going to write raw data to the miptree, we need to resolve
* any pending fast color clears before we start.
*/
- assert(image->mt->logical_depth0 == 1);
+ assert(image->mt->surf.logical_level0_px.depth == 1);
+ assert(image->mt->surf.logical_level0_px.array_len == 1);
+
intel_miptree_access_raw(brw, image->mt, level, 0, true);
bo = image->mt->bo;