Mesa (master): v3dv/formats: expose support for BC1-3 compressed formats

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Feb 12 22:14:50 UTC 2021


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

Author: Alejandro Piñeiro <apinheiro at igalia.com>
Date:   Wed Feb 10 21:56:13 2021 +0100

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 at igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8929>

---

 src/broadcom/vulkan/v3dv_formats.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/broadcom/vulkan/v3dv_formats.c b/src/broadcom/vulkan/v3dv_formats.c
index a7bf14746bb..cefa1418b18 100644
--- a/src/broadcom/vulkan/v3dv_formats.c
+++ b/src/broadcom/vulkan/v3dv_formats.c
@@ -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 *



More information about the mesa-commit mailing list