Panfrost's tiling routines (incorrectly) ignored the source stride,
masking this bug; lima's routines respect this stride, causing issues
when tiling NPOT textures whose stride is not a multiple of 64
(for instance, NPOT textures with bpp=1).
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
/* We don't know how to specify a 2D stride for 3D textures */
- bool should_align_stride =
+ bool can_align_stride =
tmpl->target != PIPE_TEXTURE_3D;
- should_align &= should_align_stride;
+ should_align &= can_align_stride;
unsigned offset = 0;
unsigned size_2d = 0;
unsigned stride = bytes_per_pixel * effective_width;
/* ..but cache-line align it for performance */
- if (should_align_stride)
+ if (can_align_stride && bo->layout == PAN_LINEAR)
stride = ALIGN(stride, 64);
slice->stride = stride;