aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorErik Faye-Lund <[email protected]>2019-11-01 13:21:59 +0100
committerErik Faye-Lund <[email protected]>2020-02-03 21:42:49 +0100
commit85d4b41f6830253b81b591fa401a9c5aea5e407a (patch)
tree8d14d77ce5fd5c5160cd70eaca919d7f54e5e449 /src/gallium/drivers
parentb550b7ef3b8d12f533b67b1a03159a127a3ff34a (diff)
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 <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3681>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/zink/zink_blit.c6
1 files 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;