panfrost: Pass the resource dimension to panfrost_compression_tag()

The reload surface logic creates 2D image views pointing to a specific
3D texture layer, but panfrost_compression_tag() cares about the resource
dimension, not the image view one.

Fixes: 4dd7991422 ("panfrost: Add a pan_image_layout object")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8449>
This commit is contained in:
Boris Brezillon 2021-01-12 14:46:42 +01:00 committed by Marge Bot
parent 6aed981e9d
commit 2cf41ae494
1 changed files with 4 additions and 1 deletions

View File

@ -363,7 +363,10 @@ panfrost_emit_texture_payload(const struct panfrost_device *dev,
bool manual_stride,
mali_ptr base)
{
base |= panfrost_compression_tag(dev, desc, dim, layout->modifier);
/* panfrost_compression_tag() wants the dimension of the resource, not the
* one of the image view (those might differ).
*/
base |= panfrost_compression_tag(dev, desc, layout->dim, layout->modifier);
/* Inject the addresses in, interleaving array indices, mip levels,
* cube faces, and strides in that order */