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@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10234>
This commit is contained in:
Erik Faye-Lund
2021-04-14 16:47:42 +02:00
committed by Marge Bot
parent 0ba3cf1f95
commit 5362adf68d
+5
View File
@@ -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);