When copying a resource fully we can just blit the whole level. This allows
to use the RS even for level sizes not aligned to the RS min alignment. This
is especially useful, as etna_copy_resource is part of the software fallback
paths (used in etna_transfer), that are used for doing unaligned copies.
Fixes: c9e8b49b ("etnaviv: gallium driver for Vivante GPUs")
Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Lucas Stach <dev@lynxeye.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
for (int level = first_level; level <= last_level; level++) {
blit.src.level = blit.dst.level = level;
blit.src.box.width = blit.dst.box.width =
- MIN2(src_priv->levels[level].width, dst_priv->levels[level].width);
+ MIN2(src_priv->levels[level].padded_width, dst_priv->levels[level].padded_width);
blit.src.box.height = blit.dst.box.height =
- MIN2(src_priv->levels[level].height, dst_priv->levels[level].height);
+ MIN2(src_priv->levels[level].padded_height, dst_priv->levels[level].padded_height);
for (int layer = 0; layer < dst->array_size; layer++) {
blit.src.box.z = blit.dst.box.z = layer;