isl/gen9: Fix array pitch of 3d surfaces

For tiled 3D surfaces, the array pitch must aligned to the tile height.

From the Skylake BSpec >> RENDER_SURFACE_STATE >> Surface QPitch:

   Tile Mode != Linear: This field must be set to an integer multiple of
   the tile height

Fixes CTS tests 'dEQP-VK.pipeline.image.view_type.3d.format.r8g8b8a8_unorm.*'.
Fixes Crucible tests 'func.miptree.r8g8b8a8-unorm.aspect-color.view-3d.*'.
This commit is contained in:
Chad Versace 2016-01-07 11:00:29 -08:00
parent 0af77fe5b6
commit d1e6c1b29b

View file

@ -785,7 +785,20 @@ isl_calc_array_pitch_el_rows(const struct isl_device *dev,
}
assert(pitch_sa_rows % fmtl->bh == 0);
return pitch_sa_rows / fmtl->bh;
uint32_t pitch_el_rows = pitch_sa_rows / fmtl->bh;
if (ISL_DEV_GEN(dev) >= 9 &&
info->dim == ISL_SURF_DIM_3D &&
tile_info->tiling != ISL_TILING_LINEAR) {
/* From the Skylake BSpec >> RENDER_SURFACE_STATE >> Surface QPitch:
*
* Tile Mode != Linear: This field must be set to an integer multiple
* of the tile height
*/
pitch_el_rows = isl_align(pitch_el_rows, tile_info->height);
}
return pitch_el_rows;
}
/**