From 33d52db1f0a2b541b11c4ae8f5f730b317fc5391 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tapani=20P=C3=A4lli?= Date: Fri, 14 May 2021 09:41:10 +0300 Subject: [PATCH] anv: require rendering support for blit destination feature MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes some new cts tests that exercise blitting between compressed and uncompressed formats. Cc: mesa-stable Signed-off-by: Tapani Pälli Reviewed-by: Lionel Landwerlin Part-of: (cherry picked from commit 72fd126070ba749e10f7f58b1dfbb52198fb7eb9) --- .pick_status.json | 2 +- src/intel/vulkan/anv_formats.c | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 36efa5997c6..0488839724e 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -229,7 +229,7 @@ "description": "anv: require rendering support for blit destination feature", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "master_sha": null, "because_sha": null }, diff --git a/src/intel/vulkan/anv_formats.c b/src/intel/vulkan/anv_formats.c index 6cc79b97845..379ada7811c 100644 --- a/src/intel/vulkan/anv_formats.c +++ b/src/intel/vulkan/anv_formats.c @@ -645,9 +645,12 @@ anv_get_image_format_features(const struct gen_device_info *devinfo, if (flags) { flags |= VK_FORMAT_FEATURE_BLIT_SRC_BIT | - VK_FORMAT_FEATURE_BLIT_DST_BIT | VK_FORMAT_FEATURE_TRANSFER_SRC_BIT | VK_FORMAT_FEATURE_TRANSFER_DST_BIT; + + /* Blit destination requires rendering support. */ + if (isl_format_supports_rendering(devinfo, plane_format.isl_format)) + flags |= VK_FORMAT_FEATURE_BLIT_DST_BIT; } /* XXX: We handle 3-channel formats by switching them out for RGBX or