mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 09:38:07 +02:00
panfrost: Always align strides to cache line (64)
(Performance tweak.) Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
This commit is contained in:
parent
0534fcf57d
commit
a38583e352
1 changed files with 7 additions and 1 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue