From 8ae5b44339187521999a621efd47ebc6c718f703 Mon Sep 17 00:00:00 2001 From: Iago Toral Quiroga Date: Wed, 16 Jun 2021 11:23:30 +0200 Subject: [PATCH] v3dv: don't support VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The hardware doesn't support this naturally and we need to do a lot of nasty stuff in the driver to almost make it work. Reviewed-by: Alejandro PiƱeiro Part-of: --- src/broadcom/vulkan/v3dv_formats.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/broadcom/vulkan/v3dv_formats.c b/src/broadcom/vulkan/v3dv_formats.c index 438be3e7679..43ba8b9c4f9 100644 --- a/src/broadcom/vulkan/v3dv_formats.c +++ b/src/broadcom/vulkan/v3dv_formats.c @@ -631,6 +631,18 @@ get_image_format_properties( if (!format_feature_flags) goto unsupported; + /* This allows users to create uncompressed views of compressed images, + * however this is not something the hardware supports naturally and requires + * the driver to lie when programming the texture state to make the hardware + * sample with the uncompressed view correctly, and even then, there are + * issues when running on real hardware. + * + * See https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11336 + * for details. + */ + if (info->flags & VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT) + goto unsupported; + if (info->usage & VK_IMAGE_USAGE_TRANSFER_SRC_BIT) { if (!(format_feature_flags & VK_FORMAT_FEATURE_TRANSFER_SRC_BIT)) { goto unsupported;