- struct isl_extent4d level0_extent_px;
-
- if (!isl_format_is_compressed(format) &&
- isl_format_is_compressed(image->format->isl_format)) {
- /* Scale the ImageView extent by the backing Image. This is used
- * internally when an uncompressed ImageView is created on a
- * compressed Image. The ImageView can therefore be used for copying
- * data from a source Image to a destination Image.
- */
- const struct isl_format_layout * isl_layout = image->format->isl_layout;
-
- level0_extent_px.depth = anv_minify(image->extent.depth, range->baseMipLevel);
- level0_extent_px.depth = DIV_ROUND_UP(level0_extent_px.depth, isl_layout->bd);
-
- level0_extent_px.height = isl_surf_get_array_pitch_el_rows(&surface->isl) * image->array_size;
- level0_extent_px.width = isl_surf_get_row_pitch_el(&surface->isl);
- isl_view.base_level = 0;
- isl_view.base_array_layer = 0;
- } else {
- level0_extent_px.width = image->extent.width;
- level0_extent_px.height = image->extent.height;
- level0_extent_px.depth = image->extent.depth;
- }
-