diff options
author | Chad Versace <[email protected]> | 2016-01-07 11:00:29 -0800 |
---|---|---|
committer | Chad Versace <[email protected]> | 2016-01-07 11:04:17 -0800 |
commit | d1e6c1b29bf45b807e298921e5b1386fec61669e (patch) | |
tree | 02918ceefa8c9a0d5a631629ebd2b876058e1bf0 /src | |
parent | 0af77fe5b6d0201be564f98e58e7f62cd55cc05e (diff) |
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.*'.
Diffstat (limited to 'src')
-rw-r--r-- | src/isl/isl.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/isl/isl.c b/src/isl/isl.c index 67e2ff6fae9..0e6f1e31d12 100644 --- a/src/isl/isl.c +++ b/src/isl/isl.c @@ -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; } /** |