From 85d4b41f6830253b81b591fa401a9c5aea5e407a Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Fri, 1 Nov 2019 13:21:59 +0100 Subject: [PATCH] zink: be more careful about the mask-check We currently disallow blits that we can support. Let's be more accurate when checking the mask. Reviewed-by: Dave Airlie Part-of: --- src/gallium/drivers/zink/zink_blit.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/zink/zink_blit.c b/src/gallium/drivers/zink/zink_blit.c index bc788556bb8..fc16aab7629 100644 --- a/src/gallium/drivers/zink/zink_blit.c +++ b/src/gallium/drivers/zink/zink_blit.c @@ -9,7 +9,8 @@ static bool blit_resolve(struct zink_context *ctx, const struct pipe_blit_info *info) { - if (info->mask != PIPE_MASK_RGBA || + if (util_format_get_mask(info->dst.format) != info->mask || + util_format_get_mask(info->src.format) != info->mask || info->scissor_enable || info->alpha_blend) return false; @@ -66,7 +67,8 @@ blit_resolve(struct zink_context *ctx, const struct pipe_blit_info *info) static bool blit_native(struct zink_context *ctx, const struct pipe_blit_info *info) { - if (info->mask != PIPE_MASK_RGBA || + if (util_format_get_mask(info->dst.format) != info->mask || + util_format_get_mask(info->src.format) != info->mask || info->scissor_enable || info->alpha_blend) return false; -- 2.30.2