v3d: allow TFU blitting for single layer textures

TFU just handles 2D textures.

But for 2D array textures, cubemaps and 3D textures, if only one layer needs
to be blitted, then it is like a simple 2D texture, and thus we can also
use the TFU.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16372>
This commit is contained in:
Juan A. Suarez Romero
2022-05-06 13:56:17 +02:00
committed by Marge Bot
parent 7ea2e86a8b
commit 6386144270

View File

@@ -220,9 +220,6 @@ v3d_tfu(struct pipe_context *pctx,
if (psrc->nr_samples != pdst->nr_samples)
return false;
if (pdst->target != PIPE_TEXTURE_2D || psrc->target != PIPE_TEXTURE_2D)
return false;
/* Can't write to raster. */
if (dst_base_slice->tiling == V3D_TILING_RASTER)
return false;
@@ -369,10 +366,12 @@ v3d_tfu_blit(struct pipe_context *pctx, struct pipe_blit_info *info)
info->dst.box.y != 0 ||
info->dst.box.width != dst_width ||
info->dst.box.height != dst_height ||
info->dst.box.depth != 1 ||
info->src.box.x != 0 ||
info->src.box.y != 0 ||
info->src.box.width != info->dst.box.width ||
info->src.box.height != info->dst.box.height) {
info->src.box.height != info->dst.box.height ||
info->src.box.depth != 1) {
return;
}