summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLucas Stach <dev@lynxeye.de>2017-06-04 21:06:29 +0200
committerAndres Gomez <agomez@igalia.com>2017-06-28 20:15:03 +0300
commitc0f7d34247a6237fef1eeae02977a2cfa0e2d334 (patch)
tree70cf9e8f61b525c02686eaff8420319c457013ac
parente3a2ff07e7e81b837d429d74ad529222229958e4 (diff)
etnaviv: use padded width/height for resource copies
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> (cherry picked from commit ff490eb8fd3a1edee1b3aec3f8122f7d6f90a80f)
-rw-r--r--src/gallium/drivers/etnaviv/etnaviv_clear_blit.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/etnaviv/etnaviv_clear_blit.c b/src/gallium/drivers/etnaviv/etnaviv_clear_blit.c
index 96745656e48..ae60454571e 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_clear_blit.c
+++ b/src/gallium/drivers/etnaviv/etnaviv_clear_blit.c
@@ -628,9 +628,9 @@ etna_copy_resource(struct pipe_context *pctx, struct pipe_resource *dst,
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;