panfrost: Properly align stride
authorDaniel Stone <daniels@collabora.com>
Mon, 18 Mar 2019 16:07:00 +0000 (16:07 +0000)
committerAlyssa Rosenzweig <alyssa@rosenzweig.io>
Wed, 20 Mar 2019 04:20:42 +0000 (04:20 +0000)
commitd258b787faaf9b089acd740df26bddbb64c2c630
tree01d44535da59fa41c2a87b61905380f02c8e5e9d
parent2be60e0c73ed1555a919c5725cc0cab119a2b6de
panfrost: Properly align stride

Handle buffers whose width is not aligned to 16px by padding the stride
and storing it accordingly.

This does not reject imports for images whose stride is not sufficiently
aligned.

v2: make sure bo->stride is set on imported buffers, and add missing
variable definition. (Tomeu)

Tested-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
src/gallium/drivers/panfrost/pan_context.c
src/gallium/drivers/panfrost/pan_drm.c
src/gallium/drivers/panfrost/pan_mfbd.c
src/gallium/drivers/panfrost/pan_resource.c
src/gallium/drivers/panfrost/pan_resource.h
src/gallium/drivers/panfrost/pan_screen.h
src/gallium/drivers/panfrost/pan_sfbd.c