freedreno/a6xx: RB6_R8G8B8 is actually 32 bit RGBX
authorKristian H. Kristensen <hoegsberg@google.com>
Thu, 12 Dec 2019 01:05:57 +0000 (17:05 -0800)
committerKristian H. Kristensen <hoegsberg@google.com>
Thu, 19 Dec 2019 17:56:05 +0000 (09:56 -0800)
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2848>

src/freedreno/registers/a6xx.xml
src/freedreno/vulkan/tu_formats.c
src/gallium/drivers/freedreno/a6xx/fd6_format.c
src/gallium/drivers/freedreno/a6xx/fd6_format.h
src/gallium/drivers/freedreno/a6xx/fd6_resource.c

index 1909276ba6276f5f5df9f5160e090c950960481f..ff723941f313c5fe4de2dc00acf7c83050c7548c 100644 (file)
@@ -26,7 +26,7 @@ xsi:schemaLocation="http://nouveau.freedesktop.org/ rules-ng.xsd">
        <value value="0x18" name="RB6_R16_UINT"/>
        <value value="0x19" name="RB6_R16_SINT"/>
        <value value="0x30" name="RB6_R8G8B8A8_UNORM"/>
-       <value value="0x31" name="RB6_R8G8B8_UNORM"/>
+       <value value="0x31" name="RB6_R8G8B8X8_UNORM"/> <!-- 32 bpp format, samples 1 for alpha -->
        <value value="0x32" name="RB6_R8G8B8A8_SNORM"/>
        <value value="0x33" name="RB6_R8G8B8A8_UINT"/>
        <value value="0x34" name="RB6_R8G8B8A8_SINT"/>
index 4f8833cf586c5da8f54f7cfafbb9b9b2b2d9398f..c9cc4a895264a0983130ca8912c6a8c318a61bcf 100644 (file)
@@ -345,7 +345,7 @@ tu6_rb_fmt_to_ifmt(enum a6xx_color_fmt fmt)
    case RB6_R8G8_UNORM:
    case RB6_R8G8_SNORM:
    case RB6_R8G8B8A8_UNORM:
-   case RB6_R8G8B8_UNORM:
+   case RB6_R8G8B8X8_UNORM:
    case RB6_R8G8B8A8_SNORM:
    case RB6_R4G4B4A4_UNORM:
    case RB6_R5G5B5A1_UNORM:
index d09bdc776b28506cfa38e3e4129b35b625631f17..ec0e8b0ce8abe9681fae2bdec9436a3962a26b03 100644 (file)
@@ -176,9 +176,9 @@ static struct fd6_format formats[PIPE_FORMAT_COUNT] = {
        _T(L16A16_SINT,    16_16_SINT,  NONE,         WZYX),
 
        VT(R8G8B8A8_UNORM,   8_8_8_8_UNORM, R8G8B8A8_UNORM, WZYX),
-       _T(R8G8B8X8_UNORM,   8_8_8_8_UNORM, R8G8B8A8_UNORM, WZYX),
+       _T(R8G8B8X8_UNORM,   8_8_8_8_UNORM, R8G8B8X8_UNORM, WZYX),
        _T(R8G8B8A8_SRGB,    8_8_8_8_UNORM, R8G8B8A8_UNORM, WZYX),
-       _T(R8G8B8X8_SRGB,    8_8_8_8_UNORM, R8G8B8A8_UNORM, WZYX),
+       _T(R8G8B8X8_SRGB,    8_8_8_8_UNORM, R8G8B8X8_UNORM, WZYX),
        VT(R8G8B8A8_SNORM,   8_8_8_8_SNORM, R8G8B8A8_SNORM, WZYX),
        VT(R8G8B8A8_UINT,    8_8_8_8_UINT,  R8G8B8A8_UINT,  WZYX),
        VT(R8G8B8A8_SINT,    8_8_8_8_SINT,  R8G8B8A8_SINT,  WZYX),
@@ -186,19 +186,19 @@ static struct fd6_format formats[PIPE_FORMAT_COUNT] = {
        V_(R8G8B8A8_SSCALED, 8_8_8_8_SINT,  NONE,           WZYX),
 
        VT(B8G8R8A8_UNORM,   8_8_8_8_UNORM, R8G8B8A8_UNORM, WXYZ),
-       _T(B8G8R8X8_UNORM,   8_8_8_8_UNORM, R8G8B8A8_UNORM, WXYZ),
+       _T(B8G8R8X8_UNORM,   8_8_8_8_UNORM, R8G8B8X8_UNORM, WXYZ),
        VT(B8G8R8A8_SRGB,    8_8_8_8_UNORM, R8G8B8A8_UNORM, WXYZ),
-       _T(B8G8R8X8_SRGB,    8_8_8_8_UNORM, R8G8B8A8_UNORM, WXYZ),
+       _T(B8G8R8X8_SRGB,    8_8_8_8_UNORM, R8G8B8X8_UNORM, WXYZ),
 
        VT(A8B8G8R8_UNORM,   8_8_8_8_UNORM, R8G8B8A8_UNORM, XYZW),
-       _T(X8B8G8R8_UNORM,   8_8_8_8_UNORM, R8G8B8A8_UNORM, XYZW),
+       _T(X8B8G8R8_UNORM,   8_8_8_8_UNORM, R8G8B8X8_UNORM, XYZW),
        _T(A8B8G8R8_SRGB,    8_8_8_8_UNORM, R8G8B8A8_UNORM, XYZW),
-       _T(X8B8G8R8_SRGB,    8_8_8_8_UNORM, R8G8B8A8_UNORM, XYZW),
+       _T(X8B8G8R8_SRGB,    8_8_8_8_UNORM, R8G8B8X8_UNORM, XYZW),
 
        VT(A8R8G8B8_UNORM,   8_8_8_8_UNORM, R8G8B8A8_UNORM, ZYXW),
-       _T(X8R8G8B8_UNORM,   8_8_8_8_UNORM, R8G8B8A8_UNORM, ZYXW),
+       _T(X8R8G8B8_UNORM,   8_8_8_8_UNORM, R8G8B8X8_UNORM, ZYXW),
        _T(A8R8G8B8_SRGB,    8_8_8_8_UNORM, R8G8B8A8_UNORM, ZYXW),
-       _T(X8R8G8B8_SRGB,    8_8_8_8_UNORM, R8G8B8A8_UNORM, ZYXW),
+       _T(X8R8G8B8_SRGB,    8_8_8_8_UNORM, R8G8B8X8_UNORM, ZYXW),
 
        VT(R10G10B10A2_UNORM,   10_10_10_2_UNORM, R10G10B10A2_UNORM, WZYX),
        VT(B10G10R10A2_UNORM,   10_10_10_2_UNORM, R10G10B10A2_UNORM, WXYZ),
index 90b06197ef586506e179526bbdda26f615d0741c..5f84f9958d6021bdbc84c5453ebe94050ad6499c 100644 (file)
@@ -60,7 +60,7 @@ fd6_ifmt(enum a6xx_color_fmt fmt)
        case RB6_R8G8_UNORM:
        case RB6_R8G8_SNORM:
        case RB6_R8G8B8A8_UNORM:
-       case RB6_R8G8B8_UNORM:
+       case RB6_R8G8B8X8_UNORM:
        case RB6_R8G8B8A8_SNORM:
                return R2D_UNORM8;
 
index 942a99b41f1e328f220ad4ee94a06723844ba1ad..b16a406c479b913745638f522cb1d39f36a1e7ae 100644 (file)
@@ -69,7 +69,7 @@ ok_ubwc_format(enum pipe_format pfmt)
        case RB6_R8G8B8A8_SINT:
        case RB6_R8G8B8A8_UINT:
        case RB6_R8G8B8A8_UNORM:
-       case RB6_R8G8B8_UNORM:
+       case RB6_R8G8B8X8_UNORM:
        case RB6_R8G8_SINT:
        case RB6_R8G8_UINT:
        case RB6_R8G8_UNORM: