intel/isl: Size Tile64 surfaces with 4 dimensions

In order to size Tile64 surfaces correctly, make sure that the total
physical extent is arrayed. The code should handle 3D surfaces as well,
but is untested for now.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12132>
This commit is contained in:
Nanley Chery 2018-11-02 13:01:58 -07:00 committed by Marge Bot
parent 8fd7678241
commit 4309012774

View file

@ -1260,13 +1260,23 @@ isl_calc_phys_total_extent_el_gfx4_2d(
image_align_sa, phys_level0_sa,
array_pitch_span,
&phys_slice0_sa);
*phys_total_el = (struct isl_extent4d) {
.w = isl_align_div_npot(phys_slice0_sa.w, fmtl->bw),
.h = *array_pitch_el_rows * (phys_level0_sa->array_len - 1) +
isl_align_div_npot(phys_slice0_sa.h, fmtl->bh),
.d = 1,
.a = 1,
};
if (tile_info->tiling == ISL_TILING_64) {
*phys_total_el = (struct isl_extent4d) {
.w = isl_align_div_npot(phys_slice0_sa.w, fmtl->bw),
.h = isl_align_div_npot(phys_slice0_sa.h, fmtl->bh),
.d = isl_align_div_npot(phys_level0_sa->d, fmtl->bd),
.a = phys_level0_sa->array_len,
};
} else {
*phys_total_el = (struct isl_extent4d) {
.w = isl_align_div_npot(phys_slice0_sa.w, fmtl->bw),
.h = *array_pitch_el_rows * (phys_level0_sa->array_len - 1) +
isl_align_div_npot(phys_slice0_sa.h, fmtl->bh),
.d = 1,
.a = 1,
};
}
}
/**