pvr: Check depth/stencil attachment is tile-aligned
authorMatt Coster <matt.coster@imgtec.com>
Mon, 28 Nov 2022 15:04:17 +0000 (15:04 +0000)
committerMarge Bot <emma+marge@anholt.net>
Thu, 8 Dec 2022 14:53:13 +0000 (14:53 +0000)
commit3068f046bccfd09da6087b415a47d9cadb7386a4
treebf907e2f32f6c59cbf2bff4377cec48943dd1d0d
parent2112a7d9edce2996276b289ba4d60c0fdc6a89a3
pvr: Check depth/stencil attachment is tile-aligned

The hardware requires depth/stencil attachments to be size-aligned to
the zls tile size (as defined by rogue_get_zls_tile_size_xy()).

In practice however, this is a tiny edge case. The restriction only
applies during some operations, and any attachment larger than the tile
size will be twiddled and over-allocated into alignment beforehand.

This commit also adds the mentioned rogue_get_zls_tile_size_xy()
function. These values differ from the regular tile_size_{x,y} feature
values in some cases. Instead of including them as features as well, we
compute them directly.

Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20160>
src/imagination/include/hwdef/rogue_hw_utils.h
src/imagination/vulkan/pvr_cmd_buffer.c