Mesa (main): freedreno/a4xx: add some missing legacy formats to help TBOs

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Nov 22 18:08:46 UTC 2021


Module: Mesa
Branch: main
Commit: c87967bf179ffad7345ef31481981817d5b9be51
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=c87967bf179ffad7345ef31481981817d5b9be51

Author: Ilia Mirkin <imirkin at alum.mit.edu>
Date:   Sun Nov 21 20:41:03 2021 -0500

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 <imirkin at alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13906>

---

 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),



More information about the mesa-commit mailing list