From: Alyssa Rosenzweig Date: Wed, 27 May 2020 14:58:17 +0000 (-0400) Subject: panfrost: Ensure nonlinear strides are 16-aligned X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0e88dff374bb72a1fb28941029726e2b79ad2784;p=mesa.git 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: --- 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"); }