v3dv/formats: expose support for BC1-3 compressed formats

Even though we can't expose textureCompressedBC as the hw doesn't
support all the formats, we can expose as supported individual
formats.

This gets several ~850 CTS tests going from skip to pass, with
patterns like:

  * dEQP-VK.texture.compressed.bc*
  * dEQP-VK.api.copy_and_blit.core.image_to_image.all_formats.color.2d*bc*
  * dEQP-VK.api.copy_and_blit.core.image_to_image.all_formats.color.3d*bc*
  * dEQP-VK.api.info.image_format_properties*bc*
  * etc

v2: BC1-3 formats are texture filterable (Iago)

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8929>
This commit is contained in:
Alejandro Piñeiro
2021-02-10 21:56:13 +01:00
committed by Marge Bot
parent fcb229cbe0
commit 6fdf375a90
+10
View File
@@ -156,6 +156,16 @@ static const struct v3dv_format format_table[] = {
FORMAT(EAC_R11_SNORM_BLOCK, NO, SIGNED_R11_EAC, SWIZ_X001, 16, true),
FORMAT(EAC_R11G11_UNORM_BLOCK, NO, RG11_EAC, SWIZ_XY01, 16, true),
FORMAT(EAC_R11G11_SNORM_BLOCK, NO, SIGNED_RG11_EAC, SWIZ_XY01, 16, true),
/* Compressed: BC1-3 */
FORMAT(BC1_RGB_UNORM_BLOCK, NO, BC1, SWIZ_XYZ1, 16, true),
FORMAT(BC1_RGB_SRGB_BLOCK, NO, BC1, SWIZ_XYZ1, 16, true),
FORMAT(BC1_RGBA_UNORM_BLOCK, NO, BC1, SWIZ_XYZW, 16, true),
FORMAT(BC1_RGBA_SRGB_BLOCK, NO, BC1, SWIZ_XYZW, 16, true),
FORMAT(BC2_UNORM_BLOCK, NO, BC2, SWIZ_XYZW, 16, true),
FORMAT(BC2_SRGB_BLOCK, NO, BC2, SWIZ_XYZW, 16, true),
FORMAT(BC3_UNORM_BLOCK, NO, BC3, SWIZ_XYZW, 16, true),
FORMAT(BC3_SRGB_BLOCK, NO, BC3, SWIZ_XYZW, 16, true),
};
const struct v3dv_format *