turnip: add more 2d_ifmt translations
authorJonathan Marek <jonathan@marek.ca>
Sat, 5 Oct 2019 16:13:29 +0000 (12:13 -0400)
committerJonathan Marek <jonathan@marek.ca>
Tue, 15 Oct 2019 11:56:19 +0000 (07:56 -0400)
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
src/freedreno/vulkan/tu_formats.c

index 1ec8673f5b43368b6b62c774e1c9c7ef9f528d9d..02dc87a7426fef91b7699b7c6accc1cf53e64f93 100644 (file)
@@ -337,6 +337,11 @@ tu6_rb_fmt_to_ifmt(enum a6xx_color_fmt fmt)
    case RB6_R8G8B8A8_UNORM:
    case RB6_R8G8B8_UNORM:
    case RB6_R8G8B8A8_SNORM:
+   case RB6_R4G4B4A4_UNORM:
+   case RB6_R5G5B5A1_UNORM:
+   case RB6_R5G6B5_UNORM:
+   case RB6_X8Z24_UNORM:
+   case RB6_Z24_UNORM_S8_UINT:
       return R2D_UNORM8;
 
    case RB6_R32_UINT:
@@ -353,6 +358,7 @@ tu6_rb_fmt_to_ifmt(enum a6xx_color_fmt fmt)
    case RB6_R16G16_SINT:
    case RB6_R16G16B16A16_UINT:
    case RB6_R16G16B16A16_SINT:
+   case RB6_R10G10B10A2_UINT:
       return R2D_INT16;
 
    case RB6_R8_UINT:
@@ -377,17 +383,10 @@ tu6_rb_fmt_to_ifmt(enum a6xx_color_fmt fmt)
    case RB6_R16_FLOAT:
    case RB6_R16G16_FLOAT:
    case RB6_R16G16B16A16_FLOAT:
+   case RB6_R11G11B10_FLOAT:
+   case RB6_R10G10B10A2_UNORM:
       return R2D_FLOAT16;
 
-   case RB6_R4G4B4A4_UNORM:
-   case RB6_R5G5B5A1_UNORM:
-   case RB6_R5G6B5_UNORM:
-   case RB6_R10G10B10A2_UNORM:
-   case RB6_R10G10B10A2_UINT:
-   case RB6_R11G11B10_FLOAT:
-   case RB6_X8Z24_UNORM:
-      // ???
-      return 0;
    default:
       unreachable("bad format");
       return 0;