From 16f4c215599e1f6e6db021e057d62aee666975a6 Mon Sep 17 00:00:00 2001 From: Echo J Date: Thu, 30 Mar 2023 19:58:28 +0300 Subject: [PATCH] nvk: Add A8B8G8R8_*_PACK32 format support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Here it is; the long-awaited change (as requested by 2 people on Discord 🥺) This change originally added one Vulkan format which was needed for STK's Vulkan renderer, but @gfxstrand suggested to add all of the A8B8G8R8_*_PACK32 formats in a GitLab thread) This obviously fixes SuperTuxKart crashing with the Vulkan renderer 🐸 Part-of: --- src/nouveau/vulkan/nvk_format.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/nouveau/vulkan/nvk_format.c b/src/nouveau/vulkan/nvk_format.c index 2b8afb7872b..8d8b112f0ae 100644 --- a/src/nouveau/vulkan/nvk_format.c +++ b/src/nouveau/vulkan/nvk_format.c @@ -60,6 +60,13 @@ static const struct nvk_va_format nvk_vf_formats[] = { VA_FMT(B8G8R8A8_UINT, R8_G8_B8_A8, TRUE, UINT), VA_FMT(B8G8R8A8_SINT, R8_G8_B8_A8, TRUE, SINT), + VA_FMT(A8B8G8R8_UNORM_PACK32, R8_G8_B8_A8, FALSE, UNORM), + VA_FMT(A8B8G8R8_SNORM_PACK32, R8_G8_B8_A8, FALSE, SNORM), + VA_FMT(A8B8G8R8_USCALED_PACK32, R8_G8_B8_A8, FALSE, USCALED), + VA_FMT(A8B8G8R8_SSCALED_PACK32, R8_G8_B8_A8, FALSE, SSCALED), + VA_FMT(A8B8G8R8_UINT_PACK32, R8_G8_B8_A8, FALSE, UINT), + VA_FMT(A8B8G8R8_SINT_PACK32, R8_G8_B8_A8, FALSE, SINT), + VA_FMT(A2R10G10B10_UNORM_PACK32, A2B10G10R10, TRUE, UNORM), VA_FMT(A2R10G10B10_SNORM_PACK32, A2B10G10R10, TRUE, SNORM), VA_FMT(A2R10G10B10_USCALED_PACK32, A2B10G10R10, TRUE, USCALED),