From 513fcb793600056b421b5528325d192e7e23a328 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Mon, 29 Aug 2022 11:17:43 -0400 Subject: [PATCH] zink: fix/relax resolve geometry check there's no requirement in the spec that the geometry for resolves must match, only that the geometry must be positive (i.e., no flipped extents) this avoids major perf issues for scaled resolves cc: mesa-stable Reviewed-by: Adam Jackson Part-of: --- src/gallium/drivers/zink/zink_blit.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/zink/zink_blit.c b/src/gallium/drivers/zink/zink_blit.c index a0051ed58c9..be36473eb05 100644 --- a/src/gallium/drivers/zink/zink_blit.c +++ b/src/gallium/drivers/zink/zink_blit.c @@ -33,9 +33,12 @@ blit_resolve(struct zink_context *ctx, const struct pipe_blit_info *info, bool * info->alpha_blend) return false; - if (info->src.box.width != info->dst.box.width || - info->src.box.height != info->dst.box.height || - info->src.box.depth != info->dst.box.depth) + if (info->src.box.width < 0 || + info->dst.box.width < 0 || + info->src.box.height < 0 || + info->dst.box.height < 0 || + info->src.box.depth < 0 || + info->dst.box.depth < 0) return false; if (info->render_condition_enable &&