Mesa (master): zink: verify that source-format support linear-filter

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Apr 14 15:58:51 UTC 2021


Module: Mesa
Branch: master
Commit: 5362adf68dc30dcf132e89e686c21bdd6a7f6dbb
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=5362adf68dc30dcf132e89e686c21bdd6a7f6dbb

Author: Erik Faye-Lund <erik.faye-lund at collabora.com>
Date:   Wed Apr 14 16:47:42 2021 +0200

zink: verify that source-format support linear-filter

Similar to the previous commit, we should also verify that the
source-format support linear-filter if we try to blit with it.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10234>

---

 src/gallium/drivers/zink/zink_blit.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/gallium/drivers/zink/zink_blit.c b/src/gallium/drivers/zink/zink_blit.c
index 6900e42281f..062bc484e47 100644
--- a/src/gallium/drivers/zink/zink_blit.c
+++ b/src/gallium/drivers/zink/zink_blit.c
@@ -132,6 +132,11 @@ blit_native(struct zink_context *ctx, const struct pipe_blit_info *info)
        !(get_resource_features(screen, dst) & VK_FORMAT_FEATURE_BLIT_DST_BIT))
       return false;
 
+   if (info->filter == PIPE_TEX_FILTER_LINEAR &&
+       !(get_resource_features(screen, src) &
+          VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT))
+      return false;
+
    zink_fb_clears_apply_or_discard(ctx, info->dst.resource, zink_rect_from_box(&info->dst.box), false);
    zink_fb_clears_apply_region(ctx, info->src.resource, zink_rect_from_box(&info->src.box));
    struct zink_batch *batch = zink_batch_no_rp(ctx);



More information about the mesa-commit mailing list