From c87967bf179ffad7345ef31481981817d5b9be51 Mon Sep 17 00:00:00 2001 From: Ilia Mirkin Date: Sun, 21 Nov 2021 20:41:03 -0500 Subject: [PATCH] freedreno/a4xx: add some missing legacy formats to help TBOs Unlike with regular textures, we really have to support all the formats directly for TBOs to work properly. Add the missing formats to fix arb_texture_buffer_object-formats piglit. Signed-off-by: Ilia Mirkin Part-of: --- src/gallium/drivers/freedreno/a4xx/fd4_format.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/gallium/drivers/freedreno/a4xx/fd4_format.c b/src/gallium/drivers/freedreno/a4xx/fd4_format.c index c2e7e973b5b..5c34213cd02 100644 --- a/src/gallium/drivers/freedreno/a4xx/fd4_format.c +++ b/src/gallium/drivers/freedreno/a4xx/fd4_format.c @@ -104,14 +104,17 @@ static struct fd4_format formats[PIPE_FORMAT_COUNT] = { _T(A16_SNORM, 16_SNORM, NONE, WZYX), _T(A16_UINT, 16_UINT, NONE, WZYX), _T(A16_SINT, 16_SINT, NONE, WZYX), + _T(A16_FLOAT, 16_FLOAT, NONE, WZYX), _T(L16_UNORM, 16_UNORM, NONE, WZYX), _T(L16_SNORM, 16_SNORM, NONE, WZYX), _T(L16_UINT, 16_UINT, NONE, WZYX), _T(L16_SINT, 16_SINT, NONE, WZYX), + _T(L16_FLOAT, 16_FLOAT, NONE, WZYX), _T(I16_UNORM, 16_UNORM, NONE, WZYX), _T(I16_SNORM, 16_SNORM, NONE, WZYX), _T(I16_UINT, 16_UINT, NONE, WZYX), _T(I16_SINT, 16_SINT, NONE, WZYX), + _T(I16_FLOAT, 16_FLOAT, NONE, WZYX), VT(R8G8_UNORM, 8_8_UNORM, R8G8_UNORM, WZYX), _T(R8G8_SRGB, 8_8_UNORM, R8G8_UNORM, WZYX), @@ -121,6 +124,7 @@ static struct fd4_format formats[PIPE_FORMAT_COUNT] = { V_(R8G8_USCALED, 8_8_UINT, NONE, WZYX), V_(R8G8_SSCALED, 8_8_SINT, NONE, WZYX), + _T(L8A8_UNORM, 8_8_UNORM, NONE, WZYX), _T(L8A8_UINT, 8_8_UINT, NONE, WZYX), _T(L8A8_SINT, 8_8_SINT, NONE, WZYX), @@ -147,10 +151,13 @@ static struct fd4_format formats[PIPE_FORMAT_COUNT] = { _T(A32_UINT, 32_UINT, NONE, WZYX), _T(A32_SINT, 32_SINT, NONE, WZYX), + _T(A32_FLOAT, 32_FLOAT, NONE, WZYX), _T(L32_UINT, 32_UINT, NONE, WZYX), _T(L32_SINT, 32_SINT, NONE, WZYX), + _T(L32_FLOAT, 32_FLOAT, NONE, WZYX), _T(I32_UINT, 32_UINT, NONE, WZYX), _T(I32_SINT, 32_SINT, NONE, WZYX), + _T(I32_FLOAT, 32_FLOAT, NONE, WZYX), VT(R16G16_UNORM, 16_16_UNORM, R16G16_UNORM, WZYX), VT(R16G16_SNORM, 16_16_SNORM, R16G16_SNORM, WZYX), @@ -164,6 +171,7 @@ static struct fd4_format formats[PIPE_FORMAT_COUNT] = { _T(L16A16_SNORM, 16_16_SNORM, NONE, WZYX), _T(L16A16_UINT, 16_16_UINT, NONE, WZYX), _T(L16A16_SINT, 16_16_SINT, NONE, WZYX), + _T(L16A16_FLOAT, 16_16_FLOAT, NONE, WZYX), VT(R8G8B8A8_UNORM, 8_8_8_8_UNORM, R8G8B8A8_UNORM, WZYX), _T(R8G8B8X8_UNORM, 8_8_8_8_UNORM, R8G8B8A8_UNORM, WZYX), @@ -245,6 +253,7 @@ static struct fd4_format formats[PIPE_FORMAT_COUNT] = { _T(L32A32_UINT, 32_32_UINT, NONE, WZYX), _T(L32A32_SINT, 32_32_SINT, NONE, WZYX), + _T(L32A32_FLOAT, 32_32_FLOAT, NONE, WZYX), /* 96-bit */ VT(R32G32B32_UINT, 32_32_32_UINT, NONE, WZYX),