panfrost: Ensure nonlinear strides are 16-aligned

To match how they are encoded.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Fixes: bde19c0e7b ("panfrost: Fix tiled texture "stride"s on Bifrost")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5232>
This commit is contained in:
Alyssa Rosenzweig 2020-05-27 10:58:17 -04:00
parent d45936c01c
commit 0e88dff374
1 changed files with 1 additions and 1 deletions

View File

@ -178,7 +178,7 @@ panfrost_nonlinear_stride(enum mali_texture_layout layout,
unsigned width)
{
if (layout == MALI_TEXTURE_TILED) {
return (width < 16) ? 0 : (16 * bytes_per_pixel * width);
return (width < 16) ? 0 : (16 * bytes_per_pixel * ALIGN_POT(width, 16));
} else {
unreachable("TODO: AFBC on Bifrost");
}