From: Erik Faye-Lund Date: Fri, 1 Nov 2019 09:38:13 +0000 (+0100) Subject: zink: use u_blitter when format-reinterpreting X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=dd4587b55cdfb09d5e0ebf6b7e7216b46ae10c3e;p=mesa.git zink: use u_blitter when format-reinterpreting --- diff --git a/src/gallium/drivers/zink/zink_context.c b/src/gallium/drivers/zink/zink_context.c index 1fd6a3da5a7..30d19c6ffa2 100644 --- a/src/gallium/drivers/zink/zink_context.c +++ b/src/gallium/drivers/zink/zink_context.c @@ -1268,6 +1268,11 @@ blit_resolve(struct zink_context *ctx, const struct pipe_blit_info *info) struct zink_resource *src = zink_resource(info->src.resource); struct zink_resource *dst = zink_resource(info->dst.resource); + struct zink_screen *screen = zink_screen(ctx->base.screen); + if (src->format != zink_get_format(screen, info->src.format) || + dst->format != zink_get_format(screen, info->dst.format)) + return false; + struct zink_batch *batch = zink_batch_no_rp(ctx); zink_batch_reference_resoure(batch, src); @@ -1325,6 +1330,11 @@ blit_native(struct zink_context *ctx, const struct pipe_blit_info *info) struct zink_resource *src = zink_resource(info->src.resource); struct zink_resource *dst = zink_resource(info->dst.resource); + struct zink_screen *screen = zink_screen(ctx->base.screen); + if (src->format != zink_get_format(screen, info->src.format) || + dst->format != zink_get_format(screen, info->dst.format)) + return false; + struct zink_batch *batch = zink_batch_no_rp(ctx); zink_batch_reference_resoure(batch, src); zink_batch_reference_resoure(batch, dst);