From bbd5baa32697836373097b514e4cab1e0753f227 Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Tue, 14 Mar 2023 13:00:50 +0200 Subject: [PATCH] anv: add maintenance5 A8_UNORM/A1B5G5R5_UNORM support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Lionel Landwerlin Reviewed-by: José Roberto de Souza Part-of: --- src/intel/vulkan/anv_formats.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/intel/vulkan/anv_formats.c b/src/intel/vulkan/anv_formats.c index 966bc9c505c..6fd9a8987ba 100644 --- a/src/intel/vulkan/anv_formats.c +++ b/src/intel/vulkan/anv_formats.c @@ -396,6 +396,11 @@ static const struct anv_format ycbcr_formats[] = { ycbcr_plane(2, ISL_FORMAT_R16_UNORM, RGBA)), }; +static const struct anv_format maintenance5_formats[] = { + fmt1(VK_FORMAT_A8_UNORM_KHR, ISL_FORMAT_A8_UNORM), + swiz_fmt1(VK_FORMAT_A1B5G5R5_UNORM_PACK16_KHR, ISL_FORMAT_B5G5R5A1_UNORM, BGRA) +}; + #undef _fmt #undef swiz_fmt1 #undef fmt1 @@ -411,6 +416,8 @@ static const struct { .n_formats = ARRAY_SIZE(_4444_formats), }, [_VK_KHR_sampler_ycbcr_conversion_number] = { .formats = ycbcr_formats, .n_formats = ARRAY_SIZE(ycbcr_formats), }, + [_VK_KHR_maintenance5_number] = { .formats = maintenance5_formats, + .n_formats = ARRAY_SIZE(maintenance5_formats), }, }; const struct anv_format *