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 <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3681>
This commit is contained in:
Erik Faye-Lund 2019-11-01 13:21:59 +01:00
parent b550b7ef3b
commit 85d4b41f68

View file

@ -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;