panfrost: Get layer stride of level 0 on staging resources
authorBoris Brezillon <boris.brezillon@collabora.com>
Tue, 12 Jan 2021 13:40:18 +0000 (14:40 +0100)
committerMarge Bot <eric+marge@anholt.net>
Tue, 12 Jan 2021 22:40:44 +0000 (22:40 +0000)
commit6aed981e9dea77c90efacc768a6590280dbaebb6
tree0a283e90395b32868f8d720d2767cbc489cc5d7b
parentfff77e4b434a4989e6c54ab7ef8d1aa22fe81b3a
panfrost: Get layer stride of level 0 on staging resources

Staging resources have one level, we shouldn't query the stride of
level > 0.

Fixes: 3c92abe35937 ("panfrost: Use panfrost_get_layer_stride() instead of open-coding it")
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>
src/gallium/drivers/panfrost/pan_resource.c