panfrost: Always align strides to cache line (64)

(Performance tweak.)

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
This commit is contained in:
Alyssa Rosenzweig
2019-06-07 08:58:16 -07:00
parent 0534fcf57d
commit a38583e352

View File

@@ -210,7 +210,13 @@ panfrost_setup_slices(const struct pipe_resource *tmpl, struct panfrost_bo *bo)
}
slice->offset = offset;
slice->stride = bytes_per_pixel * effective_width;
/* Compute the would-be stride */
unsigned stride = bytes_per_pixel * effective_width;
/* ..but cache-line align it for performance */
stride = ALIGN(stride, 64);
slice->stride = stride;
offset += slice->stride * effective_height;