From 0e88dff374bb72a1fb28941029726e2b79ad2784 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Wed, 27 May 2020 10:58:17 -0400 Subject: [PATCH] panfrost: Ensure nonlinear strides are 16-aligned To match how they are encoded. Signed-off-by: Alyssa Rosenzweig Fixes: bde19c0e7ba ("panfrost: Fix tiled texture "stride"s on Bifrost") Part-of: --- src/panfrost/encoder/pan_texture.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/panfrost/encoder/pan_texture.c b/src/panfrost/encoder/pan_texture.c index fd9e1ea9e3a..22ff30828ca 100644 --- a/src/panfrost/encoder/pan_texture.c +++ b/src/panfrost/encoder/pan_texture.c @@ -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"); } -- 2.30.2